search for: tailpadded

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

2011 Mar 04
2
[LLVMdev] Structure Types and ABI sizes
...gt;> %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 > 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 -Joch...
2011 Mar 04
0
[LLVMdev] Structure Types and ABI sizes
On 4 March 2011 12:51, Jochen Wilhelmy <j.wilhelmy at arcor.de> wrote: > why would it break C code? of course a C frontend should generate only > tailpadded types. It's not about the size, but the offset. If you had a char field in the 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. &gt...
2011 Mar 04
1
[LLVMdev] Structure Types and ABI sizes
>> why would it break C code? of course a C frontend should generate only >> tailpadded types. >> > It's not about the size, but the offset. If you had a char field in > the 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-...
2011 Feb 24
2
[LLVMdev] Structure Types and ABI sizes
> If you're saying that: > > >> %I = type { i32, i8 }; >> > has size 5, yes, you're missing the alignment. > 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
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