------- Comment #5 from pluto at agmk dot net 2010-03-11 09:40 -------
recent 4.5.0 sibcalls this on x86-64 only:
/opt/gcc45/bin/g++45 t.cpp -O2 -S -m64 -fpie -o t64.s
_Z1gc:
.cfi_startproc
subq $131080, %rsp
.cfi_def_cfa_offset 131088
movl $131072, %edx
xorl %esi, %esi
movq %rsp, %rdi
call mem...@plt
xorl %edi, %edi
addq $131080, %rsp
.cfi_def_cfa_offset 8
jmp _z...@plt
/opt/gcc45/bin/g++45 t.cpp -O2 -S -m32 -fpie -o t32.s
_Z1gc:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
movl %esp, %ebp
.cfi_offset 5, -8
.cfi_def_cfa_register 5
pushl %ebx
.cfi_offset 3, -12
call __i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
subl $131092, %esp
leal -131080(%ebp), %eax
movl $131072, 8(%esp)
movl $0, 4(%esp)
movl %eax, (%esp)
call mem...@plt
movl $0, (%esp)
call _z...@plt
addl $131092, %esp
popl %ebx
.cfi_restore 3
popl %ebp
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30506