As part of a struct(let's call it ASM) in a header file there are declared four uint32_t ints.
uint32_t Result1;
uint32_t Result2;
uint32_t Result3;
uint32_t Result4;
I want to access these like this: ASM->Result1, ASM->Result2
etc and combine them into one 128 bit int with Result1 being bits 0-31 from the left, so in the end I'd have:
return 128bitint = Result1Result2Result3Result4;
How can this be done?
I'd use union:
This gives:
as a result on intel (little-endian) architecture.