search for: tailpadding

Displaying 8 results from an estimated 8 matches for "tailpadding".

2011 Mar 04
2
[LLVMdev] Structure Types and ABI sizes
...te only tailpadded types. > I don't see a way of specifying two structures, but I like the idea of > using a packed structure for inheritance and the "normal" one for > types. > or something like %J = type { inherit %I, i8 } the inherit keyword before %I removes the tailpadding -Jochen
2011 Mar 04
0
[LLVMdev] Structure Types and ABI sizes
...e inherited class: %I' = type { %I, i8, tailpad}; The offset of that i8 has to be 8, not 5. If all structures are packed, that would be 5, which 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
2011 Mar 04
1
[LLVMdev] Structure Types and ABI sizes
...> > %I' = type { %I, i8, tailpad}; > > The offset of that i8 has to be 8, not 5. If all structures are > packed, that would be 5, which is correct for non-POD in C++ but wrong > for everything else. > I know therefore in this case %I has to tailpadded. but packing and tailpadding are different things, aren't they? in a packet type {i8, i32} the i32 type has offset 1 while in a non-tailpadded type it still has offset 4. >> %J = type { inherit %I, i8 } >> >> the inherit keyword before %I removes the tailpadding >> > That's what the pa...
2011 Feb 24
2
[LLVMdev] Structure Types and ABI sizes
...Ah, now I see. But I didn't say that %I = type { i32, i8 }; has 5 bytes (because it has 8) but I thought that it has 5 bytes when being a member of %J, i.e. %J = type { %I, i8 } In this case %I also has 8 bytes right? I was thinking too much in terms of C++ inheritance. Then perhaps the tailpadding should be specified explicitly ;-) %I = type { i32, i8 }; // 5 bytes %I' = type { %I, tailpad}; // 8 bytes %J = type { %I, i8 } // 6 bytes -Jochen
2011 Feb 24
0
[LLVMdev] Structure Types and ABI sizes
On 24 February 2011 16:27, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote: > %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). I don't see a way of specifying two structures, but I like the idea of using a packed structure for inheritance and the
2011 Feb 24
2
[LLVMdev] Structure Types and ABI sizes
> If %I is not a "POD for the purposes of layout" type, that it's tail > padding MUST be overlapped when inherited from. In this case, we > end up creating two types for %I, %I and %I' and use %I' as the > type when it is inherited from. > But this is the question why two types in this case. if %I = type { i32, i8 }; then %I has 8 bytes if used directly
2011 Feb 24
0
[LLVMdev] Structure Types and ABI sizes
On 24 February 2011 15:13, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote: > but I don't see the point of this since %I already does the job > or do I miss something? If you're saying that: > %I = type { i32, i8 }; has size 5, yes, you're missing the alignment. According to the standard, the alignment of a structure is the alignment of its most-aligned member (and
2003 Jan 18
1
SAS transport files and the foreign package
Even though the FDA has no policies at all that limit our choices of statistical software, there is one defacto standard in place: reliance of the SAS transport file format for data submission (even though this format is deficient for this purpose, e.g., it does not even document value labels or units of measurement in a self-contained way). Because of the widespread use of SAS transport files in