This is the mail archive of the gcc@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]

Re: Where is setup for "goto" in nested function created?


I already have nonlocal_goto, and nonlocal_goto_receiver.

These expect saved frame pointer to be virtual_stack_vars_rtx+1.

For setjmp the value is determined by targetm.builtin_setjmp_frame_value - which I defined and is correct.

But for goto the value is created by some other code - which appears to be wrong but I can't find!




-----Original Message----- From: David Daney <ddaney@avtrex.com> To: hutchinsonandy@aim.com Cc: gcc@gcc.gnu.org Sent: Thu, 22 May 2008 1:16 pm Subject: Re: Where is setup for "goto" in nested function created?


hutchinsonandy@aim.com wrote:Â
During the process of fixing setjmp for AVR target, I needed to
define > targetm.builtin_setjmp_frame_value () to be used inÂ
expand_builtin_setjmp_setup().Â
> This sets the value of the Frame pointer stored in jump buffer.Â
> I set this "value" to virtual_stack_vars_rtx+1 (==frame_pointer)Â
Receiver defined in target latter restores frame pointer using >
virtual_stack_vars_rtx = value - 1Â
> This produce correct code as expected and avoids run-time add/sub
of > offsets. (setjmp works!)Â
> However, for a normal goto used inside a nested function, a
different > part of gcc creates the code to store frame pointer (not > expand_builtin_setjmp_setup). I can't find this code.Â
> The issue I have is that this "goto_setup" code does NOT use >
targetm.builtin_setjmp_frame_value - but seems to use > value=virtual_stack_vars_rtx, which is incompatible with my target > receiver.Â
> So where is the goto setup code created? And is there a bug here?Â
Â
Perhaps you need to implement one or more of: save_stack_nonlocal, restore_stack_nonlocal, nonlocal_goto, and/or nonlocal_goto_receiver.Â
Â
David DaneyÂ



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