search for: tailpad

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

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...
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....
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 n...
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 "normal" one for types. cheers, --renato
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
...c" "numeric" "numeric" "numeric" $TEST$width [1] 3 4 8 8 8 $TEST$index [1] 1 2 3 4 5 $TEST$position [1] 0 3 7 15 23 $TEST$name [1] "RACE" "AGE" "D1" "DT1" "T1" $TEST$sexptype [1] 14 14 14 14 14 $TEST$tailpad [1] 18 $TEST$length [1] 2 > lookup.xport('test2.xpt') Same output except tailpad=76, length=124, second dataset ignored. > read.xport('test.xpt') RACE AGE D1 DT1 T1 1 2.000063 30.00000 15402 1330767062 40425 2 4.000063 31.00000 15494 1338716527 4045...