(INITIAL_ELIMINATION_OFFSET): For 64 bit ABI...
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 14 Aug 1995 01:34:08 +0000 (21:34 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 14 Aug 1995 01:34:08 +0000 (21:34 -0400)
(INITIAL_ELIMINATION_OFFSET): For 64 bit ABI, subtract
current_function_pretend_args_size when converting from argument
pointer.

From-SVN: r10229

gcc/config/mips/mips.h

index 7d6fe47c7cf26b8a77ca68e342ef9b6bce009560..e1bf692ba4c8237c1c3c4c7ee932718cb0187243 100644 (file)
@@ -1751,15 +1751,17 @@ extern struct mips_frame_info current_frame_info;
 {  compute_frame_size (get_frame_size ());                              \
   if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)   \
     (OFFSET) = 0;                                                       \
-  else if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM) \
-    (OFFSET) = current_frame_info.total_size;                           \
-  else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \
-    (OFFSET) = current_frame_info.total_size;                           \
+  else if ((FROM) == ARG_POINTER_REGNUM                                         \
+           && ((TO) == FRAME_POINTER_REGNUM                             \
+               || (TO) == STACK_POINTER_REGNUM))                        \
+    (OFFSET) = (current_frame_info.total_size                           \
+               - (ABI_64BIT && mips_isa >= 3                            \
+                  ? current_function_pretend_args_size                  \
+                  : 0));                                                \
   else                                                                  \
     abort ();                                                           \
 }
 
-
 /* If we generate an insn to push BYTES bytes,
    this says how many the stack pointer really advances by.
    On the vax, sp@- in a byte insn really pushes a word.  */