[LLVMdev] Troubling promotion of return value to Integer ...
Duncan Sands
baldrick at free.fr
Thu May 15 12:14:51 PDT 2008
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?
Thanks,
Duncan.
More information about the llvm-dev
mailing list