[LLVMdev] Structure memory layout

Jin Gu Kang jaykang10 at imrc.kist.re.kr
Thu Oct 21 00:26:12 PDT 2010


Hi Renato,

First, I appreciate your answer again. :)

>> %Char = type { c3, c4, c3, c2 }
>> %Short = type { s3, s4, s3, s2 }
>> %Int = type { i3, i4, i3, i2 }
> See, i is not for int (the C data type) but for every integer type on
> any language/platform combination. Normally, booleans are i1 and char
> i8, in ARM short is 16 and int is 32, and all of them use the 'i'
> notation.

I think you misunderstood our type notation.
By using your suggetion, "s4" means "i4 align short" in our notation.
In "i4 align 2" for "short a:4", I think that "align 2" is already target dependent
because short can be 2 or 4 bytes according to each target.
so I wonder how do you think about "i4 align short" notation.
(Is it impossible to have c specifier in align in order to be consistent with the rest of LLVM?)

Your answer is so helpful to me. :)

Thanks,
Jin-Gu Kang



More information about the llvm-dev mailing list