OSDN Git Service

* config/mips/mips.c (mips_va_arg): In the EABI code, apply the
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jan 2003 09:52:15 +0000 (09:52 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jan 2003 09:52:15 +0000 (09:52 +0000)
big-endian correction to indirect arguments too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60990 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 5f9a48f..5eb9fc2 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 6fb7eb4..d5339c7 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