[MIPS 19/30] Fix bogus SAVE/RESTORE offset calculation

Richard Sandiford rsandifo@nildram.co.uk
Fri Oct 19 09:48:00 GMT 2007


mips16e_build_save_restore had a bogus *OFFSET_PTR calculation
(where *OFFSET_PTR is the offset to use for registers that the
SAVE and RESTORE cannot handle itself).  Dunno how that happened,
sorry, but the fault is definitely mine...

Richard


gcc/
	* config/mips/mips.c (mips16e_build_save_restore): Fix *OFFSET_PTR
	calculation.

Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2007-10-18 11:07:12.000000000 +0100
+++ gcc/config/mips/mips.c	2007-10-18 11:07:13.000000000 +0100
@@ -7526,7 +7526,7 @@ mips16e_build_save_restore (bool restore
     }
 
   /* Tell the caller what offset it should use for the remaining registers.  */
-  *offset_ptr = size + (offset - top_offset) + size;
+  *offset_ptr = size + (offset - top_offset);
 
   gcc_assert (n == XVECLEN (pattern, 0));
 



More information about the Gcc-patches mailing list