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 target/26553] PIC stubs vs regparm


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26553

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |fxcoudert at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
The compiler doesn't do that anymore, since at least 4.8. For example, in 4.8,
we emit this:

    .text
    .globl _g
_g:
    pushl    %ebp
    movl    %esp, %ebp
    subl    $8, %esp
    movl    $1, %eax
    call    L_f$stub
    leave
    ret
    .section
__IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5
L_f$stub:
    .indirect_symbol _f
    hlt ; hlt ; hlt ; hlt ; hlt
    .subsections_via_symbols


and in trunk:


    .text
    .globl _g
_g:
LFB0:
    pushl    %ebp
LCFI0:
    movl    %esp, %ebp
LCFI1:
    subl    $8, %esp
    call    ___x86.get_pc_thunk.ax
L1$pb:
    movl    $1, %eax
    call    _f
    leave
LCFI2:
    ret
LFE0:
    .section __TEXT,__textcoal_nt,coalesced,pure_instructions
    .weak_definition    ___x86.get_pc_thunk.ax
    .private_extern    ___x86.get_pc_thunk.ax
___x86.get_pc_thunk.ax:
LFB1:
    movl    (%esp), %eax
    ret
LFE1:
    .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
    .set L$set$0,LECIE1-LSCIE1
    .long L$set$0
LSCIE1:
    .long    0
    .byte    0x1
    .ascii "zR\0"
    .byte    0x1
    .byte    0x7c
    .byte    0x8
    .byte    0x1
    .byte    0x10
    .byte    0xc
    .byte    0x5
    .byte    0x4
    .byte    0x88
    .byte    0x1
    .align 2
LECIE1:
LSFDE1:
    .set L$set$1,LEFDE1-LASFDE1
    .long L$set$1
LASFDE1:
    .long    LASFDE1-EH_frame1
    .long    LFB0-.
    .set L$set$2,LFE0-LFB0
    .long L$set$2
    .byte    0
    .byte    0x4
    .set L$set$3,LCFI0-LFB0
    .long L$set$3
    .byte    0xe
    .byte    0x8
    .byte    0x84
    .byte    0x2
    .byte    0x4
    .set L$set$4,LCFI1-LCFI0
    .long L$set$4
    .byte    0xd
    .byte    0x4
    .byte    0x4
    .set L$set$5,LCFI2-LCFI1
    .long L$set$5
    .byte    0xc4
    .byte    0xc
    .byte    0x5
    .byte    0x4
    .align 2
LEFDE1:
LSFDE3:
    .set L$set$6,LEFDE3-LASFDE3
    .long L$set$6
LASFDE3:
    .long    LASFDE3-EH_frame1
    .long    LFB1-.
    .set L$set$7,LFE1-LFB1
    .long L$set$7
    .byte    0
    .align 2
LEFDE3:
    .subsections_via_symbols


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