This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
x86_64 varargs setup jump table
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.
I've often wondered if we'd get better performance if we changed
to a simple comparison against zero. I.e.
test %al,%al
jz 1f
// 8 xmm stores
1:
H.J., do you think you'd be able to measure performance on this?
r~