This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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));
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]