I need a 12 byte or 96 bit unsigned integer to do simple arithmetic operations on it. I tried with the below approach, Since there is no builtin data type in C.
typedef struct
{
__uint128_t i:96;
__uint128_t j:96;
};
__uint128_t __add(__uint128_t a, __uint128_t b) { return a + b; }
But this is not being supported with some older versions of GCC compiler versions,
Hence, a generic implementation is required with a cross compilation support.
According to the answer mentioned here- Any predefined type for unsigned 96 bit integer?
An array of 3 integers, as an alternate solution? How?
Any further help is greatly appreciated !