http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51784
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |mrs at gcc dot gnu.org
Component|middle-end |target
--- Comment #19 from Iain Sandoe <iains at gcc dot gnu.org> 2012-01-14 10:02:25
UTC ---
(In reply to comment #18)
> Probably for TARGET_MACHO && !TARGET_64BIT && flag_pic you want to define
> "nonlocal_goto_receiver" pattern that would compute the right PIC pointer
> value
> at that point (not sure if the assembler/linker would be happy by doing
> something like
> call ___x86.get_pc_thunk.bx
> L1:
> add $(L00000000002$pb-L1), %ebx
> in the nonlocal goto receiver.
I concur with the observation that we are not restoring the PIC reg (and we
need to).
[with a very quick look, we seem to be trampling on it anyway in the nested
func, even without gcov]
Thus changing to target bug.
I suppose the subtraction in your example should be feasible with a scattered
reloc on ia32, but I'd have to check.
(on x86-64 this is not relevant since we work %rip as per linux).
Have to add it to the TODO - unless Mike has any immediate ideas?