[cfe-dev] Why does ABI on amd64 require bit extension of function arguments smaller than 32 bits?
Joerg Sonnenberger via cfe-dev
cfe-dev at lists.llvm.org
Fri Nov 4 18:04:06 PDT 2016
On Fri, Nov 04, 2016 at 05:59:07PM -0700, Yuri via cfe-dev wrote:
> On 11/04/2016 16:37, Joerg Sonnenberger via cfe-dev wrote:
> > The calle is required to do the expansion. The attributes just reflect
> > what the content is the registers are supposed to be.
>
>
> Yes, signext and zeroext require the caller to do the expansion. I am asking
> why it's not the callee who should do the expansion. It seems that it would
> have been more efficient if callee did the expansion.
Nope, since the expansion is normally implied. E.g. movl %eax, %ebx will
be implicitly the same as movzlq %eax, %rbx.
Joerg
More information about the cfe-dev
mailing list