This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/30506] not sibcalling a function



------- 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    memset@PLT
        xorl    %edi, %edi
        addq    $131080, %rsp
        .cfi_def_cfa_offset 8
        jmp     _Z1fc@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    memset@PLT
        movl    $0, (%esp)
        call    _Z1fc@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]