[LLVMdev] Troubling promotion of return value to Integer ...
Evan Cheng
evan.cheng at apple.com
Fri May 16 09:50:48 PDT 2008
On May 15, 2008, at 12:14 PM, Duncan Sands wrote:
> Hi Evan,
>
>> If you are using a non-C ABI, then you may not need to do the
>> promotion at all. However, if you do need to do the promotion, you
>> need to know the type of "int".
>
> how does this work for parameters. Suppose I have an i1 parameter.
> The AMD64 ABI says it is passed in one of %rsi, %rdx, %rcx, %r8 and
> %r9 registers. In the case of _Bool (i1) it says that the upper 63
> bits will be zero. How does this work? I thought i1 would be
> legalized
> to i8 (which is legal, right?). Due to being marked zext, the upper
> 7 bits of the i8 will be zero. But where does it get extended to
> an i64 with upper 63 bits zero?
X86ISelLowering will promote the i8 parameters to i32.
Evan
>
>
> Thanks,
>
> Duncan.
More information about the llvm-dev
mailing list