diff options
author | Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> | 1998-10-27 23:35:41 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-27 16:35:41 -0700 |
commit | c47f5ea57b48aec483b5e0566817143411100171 (patch) | |
tree | ccb44a4109a98b769d6fb90622684a2ed1c3eea0 /gcc/reload1.c | |
parent | 0304f7877c4c65d129ea00cc2964a0998b9031ce (diff) | |
download | gcc-c47f5ea57b48aec483b5e0566817143411100171.zip gcc-c47f5ea57b48aec483b5e0566817143411100171.tar.gz gcc-c47f5ea57b48aec483b5e0566817143411100171.tar.bz2 |
reload1.c (verify_initial_offsets): New function.
* reload1.c (verify_initial_offsets): New function.
(reload): Call it after reload_as_needed. Also verify that the frame
size stays constant during reload_as_needed.
* i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Undo Jul 26 change.
From-SVN: r23378
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 7e702d3..959233b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -377,6 +377,7 @@ static int eliminate_regs_in_insn PROTO((rtx, int)); static void update_eliminable_offsets PROTO((void)); static void mark_not_eliminable PROTO((rtx, rtx)); static void set_initial_elim_offsets PROTO((void)); +static void verify_initial_elim_offsets PROTO((void)); static void init_elim_table PROTO((void)); static void update_eliminables PROTO((HARD_REG_SET *)); static void spill_hard_reg PROTO((int, FILE *, int)); @@ -970,7 +971,17 @@ reload (first, global, dumpfile) if (insns_need_reload != 0 || something_needs_elimination || something_needs_operands_changed) - reload_as_needed (global); + { + int old_frame_size = get_frame_size (); + + reload_as_needed (global); + + if (old_frame_size != get_frame_size ()) + abort (); + + if (num_eliminable) + verify_initial_elim_offsets (); + } /* If we were able to eliminate the frame pointer, show that it is no longer live at the start of any basic block. If it ls live by @@ -3422,6 +3433,31 @@ mark_not_eliminable (dest, x) } } +/* Verify that the initial elimination offsets did not change since the + last call to set_initial_elim_offsets. This is used to catch cases + where something illegal happened during reload_as_needed that could + cause incorrect code to be generated if we did not check for it. */ +static void +verify_initial_elim_offsets () +{ + int t; + +#ifdef ELIMINABLE_REGS + struct elim_table *ep; + + for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) + { + INITIAL_ELIMINATION_OFFSET (ep->from, ep->to, t); + if (t != ep->initial_offset) + abort (); + } +#else + INITIAL_FRAME_POINTER_OFFSET (t); + if (t != reg_eliminate[0].initial_offset) + abort (); +#endif +} + /* Reset all offsets on eliminable registers to their initial values. */ static void set_initial_elim_offsets () |