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/51784] PIC register not correctly preserved in nested funcs / with non-local goto


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51784

--- Comment #27 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-14 11:48:37 UTC ---
(In reply to comment #25)
> BTW what happens on i?86-linux-* with -fpic?

You haven't read #c17, right?

But if you want even further details:
Both x and y there have:
        call    __x86.get_pc_thunk.bx
        addl    $_GLOBAL_OFFSET_TABLE_, %ebx
i.e. %ebx after these two insns doesn't contain some address within the
function,
but address of the _GLOBAL_OFFSET_TABLE_ symbol in the current shared library
or binary.  So, there is no need to restore anything, as nonlocal goto can only
be from a nested function to a function within the same translation unit and
thus shared library or binary, thus they have the same %ebx value.


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