search for: basep

Displaying 3 results from an estimated 3 matches for "basep".

Did you mean: base
2011 Mar 04
1
[LLVMdev] LLVMdev Digest, Vol 81, Issue 5
Renato, On Mar 4, 2011, at 10:00 AM, llvmdev-request at cs.uiuc.edu wrote: > That's what the packed is for. > > %Base = type { i32, i8 }; // size = 8 > %POSDerived = type { %Base, i8 }; // i8 offset = 8, size 12 > > %Basep = packed type { i32, i8 }; // size = 5 > %nonPOSDerived = type { %Basep, i8 }; // i8 offset = 5, size 8 > > cheers, > --renato does't the %nonPOSDerived type have to be packed for its non-Natural size 5 member to end up with only 5 bytes within its encompassing struct... sure...
2011 Mar 04
2
[LLVMdev] Structure Types and ABI sizes
>> %I = type { i32, i8 }; // 5 bytes >> %I' = type { %I, tailpad}; // 8 bytes >> %J = type { %I, i8 } // 6 bytes >> > That would break C code (and whatever else relies on alignment). > why would it break C code? of course a C frontend should generate only tailpadded types. > I don't see a way of specifying two structures, but I like the idea of
2011 Mar 04
0
[LLVMdev] Structure Types and ABI sizes
...h is correct for non-POD in C++ but wrong for everything else. > %J = type { inherit %I, i8 } > > the inherit keyword before %I removes the tailpadding That's what the packed is for. %Base = type { i32, i8 }; // size = 8 %POSDerived = type { %Base, i8 }; // i8 offset = 8, size 12 %Basep = packed type { i32, i8 }; // size = 5 %nonPOSDerived = type { %Basep, i8 }; // i8 offset = 5, size 8 cheers, --renato