Add __int128 support
[libside.git] / include / side / abi / type-value.h
index d445e26706707640211af459af57ba3794b5ed38..fddc3c8bc09c62928ce8b38da63a421613769ad2 100644 (file)
@@ -39,6 +39,20 @@ enum side_type_label_byte_order {
        SIDE_TYPE_BYTE_ORDER_BE = 1,
 };
 
+#if (SIDE_BYTE_ORDER == SIDE_LITTLE_ENDIAN)
+enum side_integer128_split_index {
+       SIDE_INTEGER128_SPLIT_LOW = 0,
+       SIDE_INTEGER128_SPLIT_HIGH = 1,
+       NR_SIDE_INTEGER128_SPLIT,
+};
+#else
+enum side_integer128_split_index {
+       SIDE_INTEGER128_SPLIT_HIGH = 0,
+       SIDE_INTEGER128_SPLIT_LOW = 1,
+       NR_SIDE_INTEGER128_SPLIT,
+};
+#endif
+
 union side_integer_value {
        uint8_t side_u8;
        uint16_t side_u16;
@@ -49,6 +63,13 @@ union side_integer_value {
        int32_t side_s32;
        int64_t side_s64;
        uintptr_t side_uptr;
+       /* Indexed with enum side_integer128_split_index */
+       uint64_t side_u128_split[NR_SIDE_INTEGER128_SPLIT];
+       int64_t side_s128_split[NR_SIDE_INTEGER128_SPLIT];
+#ifdef __SIZEOF_INT128__
+       unsigned __int128 side_u128;
+       __int128 side_s128;
+#endif
        side_padding(32);
 } SIDE_PACKED;
 side_check_size(union side_integer_value, 32);
This page took 0.024259 seconds and 4 git commands to generate.