improved i960 builtin setjmp/longjmp handling

Richard Henderson rth@cygnus.com
Thu Apr 23 23:53:00 GMT 1998


> ! #if defined (HAVE_nonlocal_goto) && defined (NEED_HARD_FRAME_FOR_NONLOCAL_GOTO)
> !   if (HAVE_nonlocal_goto && NEED_HARD_FRAME_FOR_NONLOCAL_GOTO)
> !     /* We store the frame pointer and the address of lab1 in the buffer
> !        and use the rest of it for the stack save area, which is
> !        machine-dependent.  */
> !     emit_move_insn (gen_rtx_MEM (Pmode, buf_addr),
> ! 		    hard_frame_pointer_rtx);
> !   else
> ! #endif
> !     /* We store the frame pointer and the address of lab1 in the buffer
> !        and use the rest of it for the stack save area, which is
> !        machine-dependent.  */
> !     emit_move_insn (gen_rtx_MEM (Pmode, buf_addr),
> ! 		    virtual_stack_vars_rtx);
> ! 

I would suggest one of two alternate courses:

  (1) Define builtin_setjmp_setup to store the hard frame pointer, either
      on top of the v_s_v_rtx, or in unused slots 4 or 5.

  (2) Define a macro that is an expression that evaluates to an rtx to
      use, and default that macro to v_s_v_rtx.  The i960 header can then
      define it to h_f_p_rtx directly.


r~



More information about the Gcc mailing list