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]

[committed] fix thinko in frv_initial_elimination_offset


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


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