[committed] fix thinko in frv_initial_elimination_offset

Richard Sandiford rsandifo@redhat.com
Thu Nov 6 11:07:00 GMT 2003


This patch fixes the sign of the frv fp -> sp elimination offset.
The code in question is effectively dead since we should always
be using a frame pointer whenever we need a frame.  But I noticed
it while making some local changes.

Tested on frv-elf & committed as obviously correct.

Richard


	* config/frv/frv.c (frv_initial_elimination_offset): Remove bogus
	negation.

Index: config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.35
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.35 frv.c
--- config/frv/frv.c	21 Oct 2003 20:22:49 -0000	1.35
+++ config/frv/frv.c	6 Nov 2003 10:16:16 -0000
@@ -1954,7 +1954,7 @@ frv_initial_elimination_offset (from, to
     ret = info->total_size - info->pretend_size;
 
   else if (to == STACK_POINTER_REGNUM && from == FRAME_POINTER_REGNUM)
-    ret = - info->reg_offset[FRAME_POINTER_REGNUM];
+    ret = info->reg_offset[FRAME_POINTER_REGNUM];
 
   else if (to == FRAME_POINTER_REGNUM && from == ARG_POINTER_REGNUM)
     ret = (info->total_size



More information about the Gcc-patches mailing list