ia64.c: Revert 2002-03-01 patch.
authorRichard Henderson <rth@redhat.com>
Tue, 19 Mar 2002 22:16:10 +0000 (14:16 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 19 Mar 2002 22:16:10 +0000 (14:16 -0800)
        * config/ia64/ia64.c: Revert 2002-03-01 patch.
        * config/ia64/ia64.h (INIT_EXPANDERS): New.

From-SVN: r51048

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h

index 979e2e6ac166f033cb6481e37f5d8eaab215ef58..60bb8246d0d8ab4209104334cdfc6f53c2ba439e 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-19  Richard Henderson  <rth@redhat.com>
+
+       * config/ia64/ia64.c: Revert 2002-03-01 patch.
+       * config/ia64/ia64.h (INIT_EXPANDERS): New.
+
 2002-03-19  Jim Blandy  <jimb@redhat.com>
 
        * cppmacro.c (cpp_macro_definition): Emit a space after the macro
index d42a01f73ace3bf7b2eae42415c380ddbbdbccde..a9ea756d37a0b33a68f995603c103fd825910dd4 100644 (file)
@@ -1671,9 +1671,10 @@ ia64_initial_elimination_offset (from, to)
       /* Arguments start above the 16 byte save area, unless stdarg
         in which case we store through the 16 byte save area.  */
       if (to == HARD_FRAME_POINTER_REGNUM)
-       offset = 16;
+       offset = 16 - current_function_pretend_args_size;
       else if (to == STACK_POINTER_REGNUM)
-       offset = current_frame_info.total_size + 16;
+       offset = (current_frame_info.total_size
+                 + 16 - current_function_pretend_args_size);
       else
        abort ();
       break;
@@ -3226,7 +3227,7 @@ ia64_va_start (stdarg_p, valist, nextarg)
   else
     ofs = (arg_words >= MAX_ARGUMENT_SLOTS ? -UNITS_PER_WORD : 0);
 
-  nextarg = plus_constant (nextarg, ofs - current_function_pretend_args_size);
+  nextarg = plus_constant (nextarg, ofs);
   std_expand_builtin_va_start (1, valist, nextarg);
 }
 
index b8f2449f91a4be5accdf8ccf31e566f19d7c65ec..c0d81ec69f152c7793a26dc35b5f79af7129f666 100644 (file)
@@ -1145,6 +1145,14 @@ enum reg_class
    in it.  */
 #define ARG_POINTER_REGNUM R_GR(0)
 
+/* Due to the way varargs and argument spilling happens, the argument
+   pointer is not 16-byte aligned like the stack pointer.  */
+#define INIT_EXPANDERS                                 \
+  do {                                                 \
+    if (cfun && cfun->emit->regno_pointer_align)       \
+      REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) = 64;   \
+  } while (0)
+
 /* The register number for the return address register.  For IA-64, this
    is not actually a pointer as the name suggests, but that's a name that
    gen_rtx_REG already takes care to keep unique.  We modify