mips.c (mips_va_arg): In the EABI code, apply the big-endian correction to indirect...
authorRichard Sandiford <rsandifo@redhat.com>
Tue, 7 Jan 2003 09:52:15 +0000 (09:52 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 7 Jan 2003 09:52:15 +0000 (09:52 +0000)
* config/mips/mips.c (mips_va_arg): In the EABI code, apply the
big-endian correction to indirect arguments too.

From-SVN: r60990

gcc/ChangeLog
gcc/config/mips/mips.c

index 5f9a48faa6ce7e6e93e66880b9f21e8a06d58a82..5eb9fc2f93794f8f3d89756904c22451d7a29e45 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-07  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.c (mips_va_arg): In the EABI code, apply the
+       big-endian correction to indirect arguments too.
+
 2003-01-06  Aldy Hernandez  <aldyh@redhat.com>
 
        Segher Boessenkool  <segher@koffie.nl>
index 6fb7eb4057c2216feeecd10b32bd255f09688912..d5339c7b5184850c6287fe8ac612ac9e42630e15 100644 (file)
@@ -4989,6 +4989,8 @@ mips_va_arg (valist, type)
          emit_queue();
          emit_label (lab_over);
        }
+      if (BYTES_BIG_ENDIAN && rsize != size)
+       addr_rtx = plus_constant (addr_rtx, rsize - size);
       if (indirect)
        {
          addr_rtx = force_reg (Pmode, addr_rtx);
@@ -4996,11 +4998,6 @@ mips_va_arg (valist, type)
          set_mem_alias_set (r, get_varargs_alias_set ());
          emit_move_insn (addr_rtx, r);
        }
-      else
-       {
-         if (BYTES_BIG_ENDIAN && rsize != size)
-           addr_rtx = plus_constant (addr_rtx, rsize - size);
-       }
       return addr_rtx;
     }
   else