diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arc/arc.c | 24 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 16 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 14 | ||||
-rw-r--r-- | gcc/config/pa/pa.md | 7 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 12 | ||||
-rw-r--r-- | gcc/config/vax/vax.c | 10 | ||||
-rw-r--r-- | gcc/config/xtensa/xtensa.c | 2 |
7 files changed, 3 insertions, 82 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 2a530de..89f69c79 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -689,8 +689,6 @@ static rtx arc_legitimize_address_0 (rtx, rtx, machine_mode mode); #undef TARGET_MODES_TIEABLE_P #define TARGET_MODES_TIEABLE_P arc_modes_tieable_p -#undef TARGET_BUILTIN_SETJMP_FRAME_VALUE -#define TARGET_BUILTIN_SETJMP_FRAME_VALUE arc_builtin_setjmp_frame_value /* Try to keep the (mov:DF _, reg) as early as possible so that the d<add/sub/mul>h-lr insns appear together and can @@ -10960,28 +10958,6 @@ compact_memory_operand_p (rtx op, machine_mode mode, return false; } -/* Return the frame pointer value to be backed up in the setjmp buffer. */ - -static rtx -arc_builtin_setjmp_frame_value (void) -{ - /* We always want to preserve whatever value is currently in the frame - pointer register. For frames that are using the frame pointer the new - value of the frame pointer register will have already been computed - (as part of the prologue). For frames that are not using the frame - pointer it is important that we backup whatever value is in the frame - pointer register, as earlier (more outer) frames may have placed a - value into the frame pointer register. It might be tempting to try - and use `frame_pointer_rtx` here, however, this is not what we want. - For frames that are using the frame pointer this will give the - correct value. However, for frames that are not using the frame - pointer this will still give the value that _would_ have been the - frame pointer value for this frame (if the use of the frame pointer - had not been removed). We really do want the raw frame pointer - register value. */ - return gen_raw_REG (Pmode, HARD_FRAME_POINTER_REGNUM); -} - /* Return nonzero if a jli call should be generated for a call from the current function to DECL. */ diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index a9f72b3..f3896f7 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1302,22 +1302,6 @@ avr_build_builtin_va_list (void) } -/* Implement `TARGET_BUILTIN_SETJMP_FRAME_VALUE'. */ -/* Actual start of frame is virtual_stack_vars_rtx this is offset from - frame pointer by +TARGET_STARTING_FRAME_OFFSET. - Using saved frame = virtual_stack_vars_rtx - TARGET_STARTING_FRAME_OFFSET - avoids creating add/sub of offset in nonlocal goto and setjmp. */ - -static rtx -avr_builtin_setjmp_frame_value (void) -{ - rtx xval = gen_reg_rtx (Pmode); - emit_insn (gen_subhi3 (xval, virtual_stack_vars_rtx, - gen_int_mode (avr_starting_frame_offset (), Pmode))); - return xval; -} - - /* Return contents of MEM at frame pointer + stack size + 1 (+2 if 3-byte PC). This is return address of function. */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 76ac5bb..649a7e4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5788,17 +5788,6 @@ ix86_initial_elimination_offset (int from, int to) } } -/* In a dynamically-aligned function, we can't know the offset from - stack pointer to frame pointer, so we must ensure that setjmp - eliminates fp against the hard fp (%ebp) rather than trying to - index from %esp up to the top of the frame across a gap that is - of unknown (at compile-time) size. */ -static rtx -ix86_builtin_setjmp_frame_value (void) -{ - return stack_realign_fp ? hard_frame_pointer_rtx : virtual_stack_vars_rtx; -} - /* Emits a warning for unsupported msabi to sysv pro/epilogues. */ void warn_once_call_ms2sysv_xlogues (const char *feature) { @@ -22767,9 +22756,6 @@ ix86_run_selftests (void) #undef TARGET_MACHINE_DEPENDENT_REORG #define TARGET_MACHINE_DEPENDENT_REORG ix86_reorg -#undef TARGET_BUILTIN_SETJMP_FRAME_VALUE -#define TARGET_BUILTIN_SETJMP_FRAME_VALUE ix86_builtin_setjmp_frame_value - #undef TARGET_BUILD_BUILTIN_VA_LIST #define TARGET_BUILD_BUILTIN_VA_LIST ix86_build_builtin_va_list diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 84630ad..a568e79 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -6909,10 +6909,7 @@ lab = copy_to_reg (lab); - /* Restore the stack and frame pointers. The virtual_stack_vars_rtx - is saved instead of the hard_frame_pointer_rtx in the save area. - As a result, an extra instruction is needed to adjust for the offset - of the virtual stack variables and the hard frame pointer. */ + /* Restore the stack and frame pointers. */ fp = copy_to_reg (fp); emit_stack_restore (SAVE_NONLOCAL, stack); @@ -6920,7 +6917,7 @@ emit_insn (gen_blockage ()); emit_clobber (hard_frame_pointer_rtx); emit_clobber (frame_pointer_rtx); - emit_move_insn (hard_frame_pointer_rtx, plus_constant (Pmode, fp, -8)); + emit_move_insn (hard_frame_pointer_rtx, fp); emit_use (hard_frame_pointer_rtx); emit_use (stack_pointer_rtx); diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 6d52f83..0227a53 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -679,7 +679,6 @@ static void sparc_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; static void sparc_file_end (void); static bool sparc_frame_pointer_required (void); static bool sparc_can_eliminate (const int, const int); -static rtx sparc_builtin_setjmp_frame_value (void); static void sparc_conditional_register_usage (void); static bool sparc_use_pseudo_pic_reg (void); static void sparc_init_pic_reg (void); @@ -878,9 +877,6 @@ char sparc_hard_reg_printed[8]; #undef TARGET_FRAME_POINTER_REQUIRED #define TARGET_FRAME_POINTER_REQUIRED sparc_frame_pointer_required -#undef TARGET_BUILTIN_SETJMP_FRAME_VALUE -#define TARGET_BUILTIN_SETJMP_FRAME_VALUE sparc_builtin_setjmp_frame_value - #undef TARGET_CAN_ELIMINATE #define TARGET_CAN_ELIMINATE sparc_can_eliminate @@ -13003,14 +12999,6 @@ sparc_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to) return to == HARD_FRAME_POINTER_REGNUM || !sparc_frame_pointer_required (); } -/* Return the hard frame pointer directly to bypass the stack bias. */ - -static rtx -sparc_builtin_setjmp_frame_value (void) -{ - return hard_frame_pointer_rtx; -} - /* If !TARGET_FPU, then make the fp registers and fp cc regs fixed so that they won't be allocated. */ diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 547a7e0..9559ffb 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -59,7 +59,6 @@ static rtx vax_function_arg (cumulative_args_t, machine_mode, static void vax_function_arg_advance (cumulative_args_t, machine_mode, const_tree, bool); static rtx vax_struct_value_rtx (tree, int); -static rtx vax_builtin_setjmp_frame_value (void); static void vax_asm_trampoline_template (FILE *); static void vax_trampoline_init (rtx, tree, rtx); static poly_int64 vax_return_pops_args (tree, tree, poly_int64); @@ -99,9 +98,6 @@ static HOST_WIDE_INT vax_starting_frame_offset (void); #undef TARGET_STRUCT_VALUE_RTX #define TARGET_STRUCT_VALUE_RTX vax_struct_value_rtx -#undef TARGET_BUILTIN_SETJMP_FRAME_VALUE -#define TARGET_BUILTIN_SETJMP_FRAME_VALUE vax_builtin_setjmp_frame_value - #undef TARGET_LRA_P #define TARGET_LRA_P hook_bool_void_false @@ -1067,12 +1063,6 @@ vax_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED, return gen_rtx_REG (Pmode, VAX_STRUCT_VALUE_REGNUM); } -static rtx -vax_builtin_setjmp_frame_value (void) -{ - return hard_frame_pointer_rtx; -} - /* Worker function for NOTICE_UPDATE_CC. */ void diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index ee56124..2b97fa2 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -2739,7 +2739,7 @@ xtensa_frame_pointer_required (void) This seems wrong but maybe it's necessary for other architectures. This function is derived from the i386 code. */ - if (cfun->machine->accesses_prev_frame) + if (cfun->machine->accesses_prev_frame || cfun->has_nonlocal_label) return true; return false; |