Refactoring: struct side_integer_value for all type systems
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Nov 2022 19:31:04 +0000 (15:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Nov 2022 19:31:04 +0000 (15:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/side/trace.h
src/test.c
src/tracer.c

index 504c53925998bc8962135047420fa2d94bf5ba35..b22f81c8553282a5721ea9e52d9d9494a662d47f 100644 (file)
@@ -198,18 +198,23 @@ typedef enum side_visitor_status (*side_dynamic_vla_visitor)(
                const struct side_tracer_dynamic_vla_visitor_ctx *tracer_ctx,
                void *app_ctx);
 
+struct side_integer_value {
+       uint8_t side_u8;
+       uint16_t side_u16;
+       uint32_t side_u32;
+       uint64_t side_u64;
+       int8_t side_s8;
+       int16_t side_s16;
+       int32_t side_s32;
+       int64_t side_s64;
+};
+
 struct side_attr_value {
        uint32_t type;  /* enum side_attr_type */
        union {
+               struct side_integer_value integer_value;
                uint8_t side_bool;
-               uint8_t side_u8;
-               uint16_t side_u16;
-               uint32_t side_u32;
-               uint64_t side_u64;
-               int8_t side_s8;
-               int16_t side_s16;
-               int32_t side_s32;
-               int64_t side_s64;
+
 #if __HAVE_FLOAT16
                _Float16 side_float_binary16;
 #endif
@@ -394,15 +399,8 @@ struct side_arg_dynamic_vec {
                        uint32_t nr_attr;
                        uint32_t byte_order;    /* enum side_type_byte_order */
                        union {
+                               struct side_integer_value integer_value;
                                uint8_t side_bool;
-                               uint8_t side_u8;
-                               uint16_t side_u16;
-                               uint32_t side_u32;
-                               uint64_t side_u64;
-                               int8_t side_s8;
-                               int16_t side_s16;
-                               int32_t side_s32;
-                               int64_t side_s64;
                                uint8_t side_byte;
 #if __HAVE_FLOAT16
                                _Float16 side_float_binary16;
@@ -461,14 +459,7 @@ struct side_arg_vec {
        enum side_type type;
        union {
                /* Integer types */
-               uint8_t side_u8;
-               uint16_t side_u16;
-               uint32_t side_u32;
-               uint64_t side_u64;
-               int8_t side_s8;
-               int16_t side_s16;
-               int32_t side_s32;
-               int64_t side_s64;
+               struct side_integer_value integer_value;
 
                /* Basic types */
                uint8_t side_bool;
@@ -539,14 +530,14 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 # define SIDE_TYPE_VLA_POINTER_HOST    SIDE_TYPE_VLA_POINTER64
 # define SIDE_DYNAMIC_TYPE_POINTER_HOST        SIDE_DYNAMIC_TYPE_POINTER64
 # define SIDE_ATTR_TYPE_POINTER_HOST   SIDE_ATTR_TYPE_POINTER64
-# define SIDE_PTR_HOST                 .side_u64
+# define SIDE_PTR_HOST                 .integer_value.side_u64
 #else
 # define SIDE_TYPE_POINTER_HOST                SIDE_TYPE_POINTER32
 # define SIDE_TYPE_ARRAY_POINTER_HOST  SIDE_TYPE_ARRAY_POINTER32
 # define SIDE_TYPE_VLA_POINTER_HOST    SIDE_TYPE_VLA_POINTER32
 # define SIDE_DYNAMIC_TYPE_POINTER_HOST        SIDE_DYNAMIC_TYPE_POINTER32
 # define SIDE_ATTR_TYPE_POINTER_HOST   SIDE_ATTR_TYPE_POINTER32
-# define SIDE_PTR_HOST                 .side_u32
+# define SIDE_PTR_HOST                 .integer_value.side_u32
 #endif
 
 #define side_attr(_key, _value)        \
@@ -560,14 +551,14 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 
 #define side_attr_null(_val)           { .type = SIDE_ATTR_TYPE_NULL }
 #define side_attr_bool(_val)           { .type = SIDE_ATTR_TYPE_BOOL, .u = { .side_bool = !!(_val) } }
-#define side_attr_u8(_val)             { .type = SIDE_ATTR_TYPE_U8, .u = { .side_u8 = (_val) } }
-#define side_attr_u16(_val)            { .type = SIDE_ATTR_TYPE_U16, .u = { .side_u16 = (_val) } }
-#define side_attr_u32(_val)            { .type = SIDE_ATTR_TYPE_U32, .u = { .side_u32 = (_val) } }
-#define side_attr_u64(_val)            { .type = SIDE_ATTR_TYPE_U64, .u = { .side_u64 = (_val) } }
-#define side_attr_s8(_val)             { .type = SIDE_ATTR_TYPE_S8, .u = { .side_s8 = (_val) } }
-#define side_attr_s16(_val)            { .type = SIDE_ATTR_TYPE_S16, .u = { .side_s16 = (_val) } }
-#define side_attr_s32(_val)            { .type = SIDE_ATTR_TYPE_S32, .u = { .side_s32 = (_val) } }
-#define side_attr_s64(_val)            { .type = SIDE_ATTR_TYPE_S64, .u = { .side_s64 = (_val) } }
+#define side_attr_u8(_val)             { .type = SIDE_ATTR_TYPE_U8, .u = { .integer_value.side_u8 = (_val) } }
+#define side_attr_u16(_val)            { .type = SIDE_ATTR_TYPE_U16, .u = { .integer_value.side_u16 = (_val) } }
+#define side_attr_u32(_val)            { .type = SIDE_ATTR_TYPE_U32, .u = { .integer_value.side_u32 = (_val) } }
+#define side_attr_u64(_val)            { .type = SIDE_ATTR_TYPE_U64, .u = { .integer_value.side_u64 = (_val) } }
+#define side_attr_s8(_val)             { .type = SIDE_ATTR_TYPE_S8, .u = { .integer_value.side_s8 = (_val) } }
+#define side_attr_s16(_val)            { .type = SIDE_ATTR_TYPE_S16, .u = { .integer_value.side_s16 = (_val) } }
+#define side_attr_s32(_val)            { .type = SIDE_ATTR_TYPE_S32, .u = { .integer_value.side_s32 = (_val) } }
+#define side_attr_s64(_val)            { .type = SIDE_ATTR_TYPE_S64, .u = { .integer_value.side_s64 = (_val) } }
 #define side_attr_pointer(_val)                { .type = SIDE_ATTR_TYPE_POINTER_HOST, .u = { SIDE_PTR_HOST = (uintptr_t) (_val) } }
 #define side_attr_float_binary16(_val) { .type = SIDE_ATTR_TYPE_FLOAT_BINARY16, .u = { .side_float_binary16 = (_val) } }
 #define side_attr_float_binary32(_val) { .type = SIDE_ATTR_TYPE_FLOAT_BINARY32, .u = { .side_float_binary32 = (_val) } }
@@ -865,20 +856,20 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 /* Static field arguments */
 
 #define side_arg_bool(_val)            { .type = SIDE_TYPE_BOOL, .u = { .side_bool = !!(_val) } }
-#define side_arg_u8(_val)              { .type = SIDE_TYPE_U8, .u = { .side_u8 = (_val) } }
-#define side_arg_u16(_val)             { .type = SIDE_TYPE_U16, .u = { .side_u16 = (_val) } }
-#define side_arg_u32(_val)             { .type = SIDE_TYPE_U32, .u = { .side_u32 = (_val) } }
-#define side_arg_u64(_val)             { .type = SIDE_TYPE_U64, .u = { .side_u64 = (_val) } }
-#define side_arg_s8(_val)              { .type = SIDE_TYPE_S8, .u = { .side_s8 = (_val) } }
-#define side_arg_s16(_val)             { .type = SIDE_TYPE_S16, .u = { .side_s16 = (_val) } }
-#define side_arg_s32(_val)             { .type = SIDE_TYPE_S32, .u = { .side_s32 = (_val) } }
-#define side_arg_s64(_val)             { .type = SIDE_TYPE_S64, .u = { .side_s64 = (_val) } }
+#define side_arg_u8(_val)              { .type = SIDE_TYPE_U8, .u = { .integer_value.side_u8 = (_val) } }
+#define side_arg_u16(_val)             { .type = SIDE_TYPE_U16, .u = { .integer_value.side_u16 = (_val) } }
+#define side_arg_u32(_val)             { .type = SIDE_TYPE_U32, .u = { .integer_value.side_u32 = (_val) } }
+#define side_arg_u64(_val)             { .type = SIDE_TYPE_U64, .u = { .integer_value.side_u64 = (_val) } }
+#define side_arg_s8(_val)              { .type = SIDE_TYPE_S8, .u = { .integer_value.side_s8 = (_val) } }
+#define side_arg_s16(_val)             { .type = SIDE_TYPE_S16, .u = { .integer_value.side_s16 = (_val) } }
+#define side_arg_s32(_val)             { .type = SIDE_TYPE_S32, .u = { .integer_value.side_s32 = (_val) } }
+#define side_arg_s64(_val)             { .type = SIDE_TYPE_S64, .u = { .integer_value.side_s64 = (_val) } }
 #define side_arg_byte(_val)            { .type = SIDE_TYPE_BYTE, .u = { .side_byte = (_val) } }
 #define side_arg_pointer(_val)         { .type = SIDE_TYPE_POINTER_HOST, .u = { SIDE_PTR_HOST = (uintptr_t) (_val) } }
-#define side_arg_enum_bitmap8(_val)    { .type = SIDE_TYPE_ENUM_BITMAP8, .u = { .side_u8 = (_val) } }
-#define side_arg_enum_bitmap16(_val)   { .type = SIDE_TYPE_ENUM_BITMAP16, .u = { .side_u16 = (_val) } }
-#define side_arg_enum_bitmap32(_val)   { .type = SIDE_TYPE_ENUM_BITMAP32, .u = { .side_u32 = (_val) } }
-#define side_arg_enum_bitmap64(_val)   { .type = SIDE_TYPE_ENUM_BITMAP64, .u = { .side_u64 = (_val) } }
+#define side_arg_enum_bitmap8(_val)    { .type = SIDE_TYPE_ENUM_BITMAP8, .u = { .integer_value.side_u8 = (_val) } }
+#define side_arg_enum_bitmap16(_val)   { .type = SIDE_TYPE_ENUM_BITMAP16, .u = { .integer_value.side_u16 = (_val) } }
+#define side_arg_enum_bitmap32(_val)   { .type = SIDE_TYPE_ENUM_BITMAP32, .u = { .integer_value.side_u32 = (_val) } }
+#define side_arg_enum_bitmap64(_val)   { .type = SIDE_TYPE_ENUM_BITMAP64, .u = { .integer_value.side_u64 = (_val) } }
 #define side_arg_enum_bitmap_array(_side_type) { .type = SIDE_TYPE_ENUM_BITMAP_ARRAY, .u = { .side_array = (_side_type) } }
 #define side_arg_enum_bitmap_vla(_side_type)   { .type = SIDE_TYPE_ENUM_BITMAP_VLA, .u = { .side_vla = (_side_type) } }
 #define side_arg_float_binary16(_val)  { .type = SIDE_TYPE_FLOAT_BINARY16, .u = { .side_float_binary16 = (_val) } }
@@ -961,7 +952,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \
                                .u = { \
-                                       .side_u8 = (_val), \
+                                       .integer_value.side_u8 = (_val), \
                                }, \
                        }, \
                }, \
@@ -975,7 +966,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \
                                .u = { \
-                                       .side_s8 = (_val), \
+                                       .integer_value.side_s8 = (_val), \
                                }, \
                        }, \
                }, \
@@ -1018,7 +1009,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_u16 = (_val), \
+                                       .integer_value.side_u16 = (_val), \
                                }, \
                        }, \
                }, \
@@ -1032,7 +1023,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_u32 = (_val), \
+                                       .integer_value.side_u32 = (_val), \
                                }, \
                        }, \
                }, \
@@ -1046,7 +1037,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_u64 = (_val), \
+                                       .integer_value.side_u64 = (_val), \
                                }, \
                        }, \
                }, \
@@ -1061,7 +1052,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_s16 = (_val), \
+                                       .integer_value.side_s16 = (_val), \
                                }, \
                        }, \
                }, \
@@ -1075,7 +1066,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_s32 = (_val), \
+                                       .integer_value.side_s32 = (_val), \
                                }, \
                        }, \
                }, \
@@ -1089,7 +1080,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                .byte_order = _byte_order, \
                                .u = { \
-                                       .side_s64 = (_val), \
+                                       .integer_value.side_s64 = (_val), \
                                }, \
                        }, \
                }, \
index 45c38213fdb1462fd8bc8f729bb5dd4e471dbc63..51907036146e2094d17faeeb4a047e7ca74a5bc9 100644 (file)
@@ -659,7 +659,7 @@ enum side_visitor_status test_dynamic_vla_visitor(const struct side_tracer_dynam
                                        .attr = NULL,
                                        .nr_attr = 0,
                                        .u = {
-                                               .side_u32 = ctx->ptr[i],
+                                               .integer_value.side_u32 = ctx->ptr[i],
                                        },
                                },
                        },
@@ -724,7 +724,7 @@ enum side_visitor_status test_dynamic_struct_visitor(const struct side_tracer_dy
                                                .nr_attr = 0,
                                                .attr = NULL,
                                                .u = {
-                                                       .side_u32 = ctx->ptr[i].value,
+                                                       .integer_value.side_u32 = ctx->ptr[i].value,
                                                },
                                        },
                                },
index f4aa70c1e227e9475d72cb2e155bd15406128819..d8fd7508ac4ae89f4b32a4f2f80890f27c35c33e 100644 (file)
@@ -47,28 +47,28 @@ int64_t get_attr_integer_value(const struct side_attr *attr)
 
        switch (attr->value.type) {
        case SIDE_ATTR_TYPE_U8:
-               val = attr->value.u.side_u8;
+               val = attr->value.u.integer_value.side_u8;
                break;
        case SIDE_ATTR_TYPE_U16:
-               val = attr->value.u.side_u16;
+               val = attr->value.u.integer_value.side_u16;
                break;
        case SIDE_ATTR_TYPE_U32:
-               val = attr->value.u.side_u32;
+               val = attr->value.u.integer_value.side_u32;
                break;
        case SIDE_ATTR_TYPE_U64:
-               val = attr->value.u.side_u64;
+               val = attr->value.u.integer_value.side_u64;
                break;
        case SIDE_ATTR_TYPE_S8:
-               val = attr->value.u.side_s8;
+               val = attr->value.u.integer_value.side_s8;
                break;
        case SIDE_ATTR_TYPE_S16:
-               val = attr->value.u.side_s16;
+               val = attr->value.u.integer_value.side_s16;
                break;
        case SIDE_ATTR_TYPE_S32:
-               val = attr->value.u.side_s32;
+               val = attr->value.u.integer_value.side_s32;
                break;
        case SIDE_ATTR_TYPE_S64:
-               val = attr->value.u.side_s64;
+               val = attr->value.u.integer_value.side_s64;
                break;
        default:
                fprintf(stderr, "Unexpected attribute type\n");
@@ -209,34 +209,34 @@ void tracer_print_attr_type(const char *separator, const struct side_attr *attr)
                printf("%s", attr->value.u.side_bool ? "true" : "false");
                break;
        case SIDE_ATTR_TYPE_U8:
-               printf("%" PRIu8, attr->value.u.side_u8);
+               printf("%" PRIu8, attr->value.u.integer_value.side_u8);
                break;
        case SIDE_ATTR_TYPE_U16:
-               printf("%" PRIu16, attr->value.u.side_u16);
+               printf("%" PRIu16, attr->value.u.integer_value.side_u16);
                break;
        case SIDE_ATTR_TYPE_U32:
-               printf("%" PRIu32, attr->value.u.side_u32);
+               printf("%" PRIu32, attr->value.u.integer_value.side_u32);
                break;
        case SIDE_ATTR_TYPE_U64:
-               printf("%" PRIu64, attr->value.u.side_u64);
+               printf("%" PRIu64, attr->value.u.integer_value.side_u64);
                break;
        case SIDE_ATTR_TYPE_S8:
-               printf("%" PRId8, attr->value.u.side_s8);
+               printf("%" PRId8, attr->value.u.integer_value.side_s8);
                break;
        case SIDE_ATTR_TYPE_S16:
-               printf("%" PRId16, attr->value.u.side_s16);
+               printf("%" PRId16, attr->value.u.integer_value.side_s16);
                break;
        case SIDE_ATTR_TYPE_S32:
-               printf("%" PRId32, attr->value.u.side_s32);
+               printf("%" PRId32, attr->value.u.integer_value.side_s32);
                break;
        case SIDE_ATTR_TYPE_S64:
-               printf("%" PRId64, attr->value.u.side_s64);
+               printf("%" PRId64, attr->value.u.integer_value.side_s64);
                break;
        case SIDE_ATTR_TYPE_POINTER32:
-               printf("0x%" PRIx32, attr->value.u.side_u32);
+               printf("0x%" PRIx32, attr->value.u.integer_value.side_u32);
                break;
        case SIDE_ATTR_TYPE_POINTER64:
-               printf("0x%" PRIx64, attr->value.u.side_u64);
+               printf("0x%" PRIx64, attr->value.u.integer_value.side_u64);
                break;
        case SIDE_ATTR_TYPE_FLOAT_BINARY16:
 #if __HAVE_FLOAT16
@@ -310,13 +310,13 @@ void print_enum(const struct side_type_description *type_desc, const struct side
        }
        switch (item->type) {
        case SIDE_TYPE_U8:
-               value = (int64_t) item->u.side_u8;
+               value = (int64_t) item->u.integer_value.side_u8;
                break;
        case SIDE_TYPE_U16:
        {
                uint16_t v;
 
-               v = item->u.side_u16;
+               v = item->u.integer_value.side_u16;
                if (type_to_host_reverse_bo(elem_type))
                        v = side_bswap_16(v);
                value = (int64_t) v;
@@ -326,7 +326,7 @@ void print_enum(const struct side_type_description *type_desc, const struct side
        {
                uint32_t v;
 
-               v = item->u.side_u32;
+               v = item->u.integer_value.side_u32;
                if (type_to_host_reverse_bo(elem_type))
                        v = side_bswap_32(v);
                value = (int64_t) v;
@@ -336,20 +336,20 @@ void print_enum(const struct side_type_description *type_desc, const struct side
        {
                uint64_t v;
 
-               v = item->u.side_u64;
+               v = item->u.integer_value.side_u64;
                if (type_to_host_reverse_bo(elem_type))
                        v = side_bswap_64(v);
                value = (int64_t) v;
                break;
        }
        case SIDE_TYPE_S8:
-               value = (int64_t) item->u.side_s8;
+               value = (int64_t) item->u.integer_value.side_s8;
                break;
        case SIDE_TYPE_S16:
        {
                int16_t v;
 
-               v = item->u.side_s16;
+               v = item->u.integer_value.side_s16;
                if (type_to_host_reverse_bo(elem_type))
                        v = side_bswap_16(v);
                value = (int64_t) v;
@@ -359,7 +359,7 @@ void print_enum(const struct side_type_description *type_desc, const struct side
        {
                int32_t v;
 
-               v = item->u.side_s32;
+               v = item->u.integer_value.side_s32;
                if (type_to_host_reverse_bo(elem_type))
                        v = side_bswap_32(v);
                value = (int64_t) v;
@@ -369,7 +369,7 @@ void print_enum(const struct side_type_description *type_desc, const struct side
        {
                int64_t v;
 
-               v = item->u.side_s64;
+               v = item->u.integer_value.side_s64;
                if (type_to_host_reverse_bo(elem_type))
                        v = side_bswap_64(v);
                value = v;
@@ -485,7 +485,7 @@ void print_enum_bitmap(const struct side_type_description *type_desc,
                        switch (stride_bit) {
                        case 8:
                        {
-                               uint8_t v = array_item[bit / 8].u.side_u8;
+                               uint8_t v = array_item[bit / 8].u.integer_value.side_u8;
                                if (v & (1ULL << (bit % 8))) {
                                        match = true;
                                        goto match;
@@ -494,7 +494,7 @@ void print_enum_bitmap(const struct side_type_description *type_desc,
                        }
                        case 16:
                        {
-                               uint16_t v = array_item[bit / 16].u.side_u16;
+                               uint16_t v = array_item[bit / 16].u.integer_value.side_u16;
                                if (reverse_byte_order)
                                        v = side_bswap_16(v);
                                if (v & (1ULL << (bit % 16))) {
@@ -505,7 +505,7 @@ void print_enum_bitmap(const struct side_type_description *type_desc,
                        }
                        case 32:
                        {
-                               uint32_t v = array_item[bit / 32].u.side_u32;
+                               uint32_t v = array_item[bit / 32].u.integer_value.side_u32;
                                if (reverse_byte_order)
                                        v = side_bswap_32(v);
                                if (v & (1ULL << (bit % 32))) {
@@ -516,7 +516,7 @@ void print_enum_bitmap(const struct side_type_description *type_desc,
                        }
                        case 64:
                        {
-                               uint64_t v = array_item[bit / 64].u.side_u64;
+                               uint64_t v = array_item[bit / 64].u.integer_value.side_u64;
                                if (reverse_byte_order)
                                        v = side_bswap_64(v);
                                if (v & (1ULL << (bit % 64))) {
@@ -577,13 +577,13 @@ void tracer_print_type_integer(enum side_type type, const struct side_type_descr
                        type_desc->u.side_integer.nr_attr);
        switch (type) {
        case SIDE_TYPE_U8:
-               v.v_unsigned = item->u.side_u8;
+               v.v_unsigned = item->u.integer_value.side_u8;
                break;
        case SIDE_TYPE_U16:
        {
                uint16_t side_u16;
 
-               side_u16 = item->u.side_u16;
+               side_u16 = item->u.integer_value.side_u16;
                if (type_to_host_reverse_bo(type_desc))
                        side_u16 = side_bswap_16(side_u16);
                v.v_unsigned = side_u16;
@@ -593,7 +593,7 @@ void tracer_print_type_integer(enum side_type type, const struct side_type_descr
        {
                uint32_t side_u32;
 
-               side_u32 = item->u.side_u32;
+               side_u32 = item->u.integer_value.side_u32;
                if (type_to_host_reverse_bo(type_desc))
                        side_u32 = side_bswap_32(side_u32);
                v.v_unsigned = side_u32;
@@ -603,20 +603,20 @@ void tracer_print_type_integer(enum side_type type, const struct side_type_descr
        {
                uint64_t side_u64;
 
-               side_u64 = item->u.side_u64;
+               side_u64 = item->u.integer_value.side_u64;
                if (type_to_host_reverse_bo(type_desc))
                        side_u64 = side_bswap_64(side_u64);
                v.v_unsigned = side_u64;
                break;
        }
        case SIDE_TYPE_S8:
-               v.v_signed = item->u.side_s8;
+               v.v_signed = item->u.integer_value.side_s8;
                break;
        case SIDE_TYPE_S16:
        {
                int16_t side_s16;
 
-               side_s16 = item->u.side_s16;
+               side_s16 = item->u.integer_value.side_s16;
                if (type_to_host_reverse_bo(type_desc))
                        side_s16 = side_bswap_16(side_s16);
                v.v_unsigned = side_s16;
@@ -626,7 +626,7 @@ void tracer_print_type_integer(enum side_type type, const struct side_type_descr
        {
                int32_t side_s32;
 
-               side_s32 = item->u.side_s32;
+               side_s32 = item->u.integer_value.side_s32;
                if (type_to_host_reverse_bo(type_desc))
                        side_s32 = side_bswap_32(side_s32);
                v.v_unsigned = side_s32;
@@ -636,7 +636,7 @@ void tracer_print_type_integer(enum side_type type, const struct side_type_descr
        {
                int64_t side_s64;
 
-               side_s64 = item->u.side_s64;
+               side_s64 = item->u.integer_value.side_s64;
                if (type_to_host_reverse_bo(type_desc))
                        side_s64 = side_bswap_64(side_s64);
                v.v_unsigned = side_s64;
@@ -795,7 +795,7 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
        {
                uint32_t v;
 
-               v = item->u.side_u32;
+               v = item->u.integer_value.side_u32;
                if (type_to_host_reverse_bo(type_desc))
                        v = side_bswap_32(v);
                tracer_print_basic_type_header(type_desc);
@@ -806,7 +806,7 @@ void tracer_print_type(const struct side_type_description *type_desc, const stru
        {
                uint64_t v;
 
-               v = item->u.side_u64;
+               v = item->u.integer_value.side_u64;
                if (type_to_host_reverse_bo(type_desc))
                        v = side_bswap_64(v);
                tracer_print_basic_type_header(type_desc);
@@ -1474,37 +1474,37 @@ void tracer_print_array_fixint(const struct side_type_description *type_desc, co
 
                switch (side_type) {
                case SIDE_TYPE_U8:
-                       sav_elem.u.side_u8 = ((const uint8_t *) p)[i];
+                       sav_elem.u.integer_value.side_u8 = ((const uint8_t *) p)[i];
                        break;
                case SIDE_TYPE_S8:
-                       sav_elem.u.side_s8 = ((const int8_t *) p)[i];
+                       sav_elem.u.integer_value.side_s8 = ((const int8_t *) p)[i];
                        break;
                case SIDE_TYPE_U16:
-                       sav_elem.u.side_u16 = ((const uint16_t *) p)[i];
+                       sav_elem.u.integer_value.side_u16 = ((const uint16_t *) p)[i];
                        break;
                case SIDE_TYPE_S16:
-                       sav_elem.u.side_s16 = ((const int16_t *) p)[i];
+                       sav_elem.u.integer_value.side_s16 = ((const int16_t *) p)[i];
                        break;
                case SIDE_TYPE_U32:
-                       sav_elem.u.side_u32 = ((const uint32_t *) p)[i];
+                       sav_elem.u.integer_value.side_u32 = ((const uint32_t *) p)[i];
                        break;
                case SIDE_TYPE_S32:
-                       sav_elem.u.side_s32 = ((const int32_t *) p)[i];
+                       sav_elem.u.integer_value.side_s32 = ((const int32_t *) p)[i];
                        break;
                case SIDE_TYPE_U64:
-                       sav_elem.u.side_u64 = ((const uint64_t *) p)[i];
+                       sav_elem.u.integer_value.side_u64 = ((const uint64_t *) p)[i];
                        break;
                case SIDE_TYPE_S64:
-                       sav_elem.u.side_s64 = ((const int64_t *) p)[i];
+                       sav_elem.u.integer_value.side_s64 = ((const int64_t *) p)[i];
                        break;
                case SIDE_TYPE_BYTE:
                        sav_elem.u.side_byte = ((const uint8_t *) p)[i];
                        break;
                case SIDE_TYPE_POINTER32:
-                       sav_elem.u.side_u32 = ((const uint32_t *) p)[i];
+                       sav_elem.u.integer_value.side_u32 = ((const uint32_t *) p)[i];
                        break;
                case SIDE_TYPE_POINTER64:
-                       sav_elem.u.side_u64 = ((const uint64_t *) p)[i];
+                       sav_elem.u.integer_value.side_u64 = ((const uint64_t *) p)[i];
                        break;
 
                default:
@@ -1591,37 +1591,37 @@ void tracer_print_vla_fixint(const struct side_type_description *type_desc, cons
 
                switch (side_type) {
                case SIDE_TYPE_U8:
-                       sav_elem.u.side_u8 = ((const uint8_t *) p)[i];
+                       sav_elem.u.integer_value.side_u8 = ((const uint8_t *) p)[i];
                        break;
                case SIDE_TYPE_S8:
-                       sav_elem.u.side_s8 = ((const int8_t *) p)[i];
+                       sav_elem.u.integer_value.side_s8 = ((const int8_t *) p)[i];
                        break;
                case SIDE_TYPE_U16:
-                       sav_elem.u.side_u16 = ((const uint16_t *) p)[i];
+                       sav_elem.u.integer_value.side_u16 = ((const uint16_t *) p)[i];
                        break;
                case SIDE_TYPE_S16:
-                       sav_elem.u.side_s16 = ((const int16_t *) p)[i];
+                       sav_elem.u.integer_value.side_s16 = ((const int16_t *) p)[i];
                        break;
                case SIDE_TYPE_U32:
-                       sav_elem.u.side_u32 = ((const uint32_t *) p)[i];
+                       sav_elem.u.integer_value.side_u32 = ((const uint32_t *) p)[i];
                        break;
                case SIDE_TYPE_S32:
-                       sav_elem.u.side_s32 = ((const int32_t *) p)[i];
+                       sav_elem.u.integer_value.side_s32 = ((const int32_t *) p)[i];
                        break;
                case SIDE_TYPE_U64:
-                       sav_elem.u.side_u64 = ((const uint64_t *) p)[i];
+                       sav_elem.u.integer_value.side_u64 = ((const uint64_t *) p)[i];
                        break;
                case SIDE_TYPE_S64:
-                       sav_elem.u.side_s64 = ((const int64_t *) p)[i];
+                       sav_elem.u.integer_value.side_s64 = ((const int64_t *) p)[i];
                        break;
                case SIDE_TYPE_BYTE:
                        sav_elem.u.side_byte = ((const uint8_t *) p)[i];
                        break;
                case SIDE_TYPE_POINTER32:
-                       sav_elem.u.side_u32 = ((const uint32_t *) p)[i];
+                       sav_elem.u.integer_value.side_u32 = ((const uint32_t *) p)[i];
                        break;
                case SIDE_TYPE_POINTER64:
-                       sav_elem.u.side_u64 = ((const uint64_t *) p)[i];
+                       sav_elem.u.integer_value.side_u64 = ((const uint64_t *) p)[i];
                        break;
 
                default:
@@ -1810,7 +1810,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                uint8_t v;
 
-               v = item->u.side_basic.u.side_u8;
+               v = item->u.side_basic.u.integer_value.side_u8;
                tracer_print_dynamic_basic_type_header(item);
                switch (base) {
                case TRACER_DISPLAY_BASE_2:
@@ -1834,7 +1834,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                uint16_t v;
 
-               v = item->u.side_basic.u.side_u16;
+               v = item->u.side_basic.u.integer_value.side_u16;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_16(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -1860,7 +1860,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                uint32_t v;
 
-               v = item->u.side_basic.u.side_u32;
+               v = item->u.side_basic.u.integer_value.side_u32;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_32(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -1886,7 +1886,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                uint64_t v;
 
-               v = item->u.side_basic.u.side_u64;
+               v = item->u.side_basic.u.integer_value.side_u64;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_64(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -1912,7 +1912,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                int8_t v;
 
-               v = item->u.side_basic.u.side_s8;
+               v = item->u.side_basic.u.integer_value.side_s8;
                tracer_print_dynamic_basic_type_header(item);
                switch (base) {
                case TRACER_DISPLAY_BASE_2:
@@ -1936,7 +1936,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                int16_t v;
 
-               v = item->u.side_basic.u.side_u16;
+               v = item->u.side_basic.u.integer_value.side_u16;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_16(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -1962,7 +1962,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                int32_t v;
 
-               v = item->u.side_basic.u.side_u32;
+               v = item->u.side_basic.u.integer_value.side_u32;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_32(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -1988,7 +1988,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                int64_t v;
 
-               v = item->u.side_basic.u.side_u64;
+               v = item->u.side_basic.u.integer_value.side_u64;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_64(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -2018,7 +2018,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                uint32_t v;
 
-               v = item->u.side_basic.u.side_u32;
+               v = item->u.side_basic.u.integer_value.side_u32;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_32(v);
                tracer_print_dynamic_basic_type_header(item);
@@ -2030,7 +2030,7 @@ void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
        {
                uint64_t v;
 
-               v = item->u.side_basic.u.side_u64;
+               v = item->u.side_basic.u.integer_value.side_u64;
                if (dynamic_type_to_host_reverse_bo(item))
                        v = side_bswap_64(v);
                tracer_print_dynamic_basic_type_header(item);
This page took 0.041232 seconds and 4 git commands to generate.