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?

regards
Andy

Reply via email to