This is the mail archive of the
mailing list for the GCC project.
Re: x86_64 varargs setup jump table
On Mon, Jul 19, 2010 at 9:09 AM, Andi Kleen <firstname.lastname@example.org> wrote:
> Richard Henderson <email@example.com> writes:
>> On 07/17/2010 07:25 AM, Bernd Schmidt wrote:
>>> ? ? ?leaq ? ?0(,%rax,4), %rcx
>>> ? ? ?movl ? ?$.L2, %eax
>>> ? ? ?subq ? ?%rcx, %rax
>>> ? ? ?jmp ? ? *%rax
>> I've often thought this was over-engineering in the x86_64 abi.
>> This jump table is trading memory bandwidth for unpredictability
>> in the branch target.
> The other problem with the jump is that if you misdeclare
> the prototype and nothing correct is passed in %eax
FWIW, we DON'T support varargs without correct prototype
on x86-64. See AVX support in x86-64 psABI for details.