* expr.c (use_group_regs): Don't call use_reg for MEMs.
authorDoug Evans <dje@canuck.cygnus.com>
Sat, 18 Oct 1997 19:48:25 +0000 (19:48 +0000)
committerDoug Evans <devans@gcc.gnu.org>
Sat, 18 Oct 1997 19:48:25 +0000 (19:48 +0000)
From-SVN: r16046

gcc/ChangeLog
gcc/expr.c

index d824c3aeb55cd3baf3fa7288c026abf08cd71107..2f848a65fcafc5c177f201985d702609fd740d75 100644 (file)
@@ -1,3 +1,7 @@
+Sat Oct 18 12:47:31 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * expr.c (use_group_regs): Don't call use_reg for MEMs.
+
 Sat Oct 18 00:43:59 1997  Jeffrey A Law  (law@cygnus.com)
 
        * i386/freebsd.h (ASM_COMMENT_START): Fix.
index 1b5d5091c0281ad8412bcbe73b08ddf07a1c16b5..91d682a93fd8b783b2d90ade00a7c7afc7206848 100644 (file)
@@ -1922,15 +1922,16 @@ use_group_regs (call_fusage, regs)
 {
   int i;
 
-  /* Check for a NULL entry, used to indicate that the parameter goes
-     both on the stack and in registers.  */
-  if (XEXP (XVECEXP (regs, 0, 0), 0))
-    i = 0;
-  else
-    i = 1;
+  for (i = 0; i < XVECLEN (regs, 0); i++)
+    {
+      rtx reg = XEXP (XVECEXP (regs, 0, i), 0);
 
-  for (; i < XVECLEN (regs, 0); i++)
-    use_reg (call_fusage, XEXP (XVECEXP (regs, 0, i), 0));
+      /* A NULL entry means the parameter goes both on the stack and in
+        registers.  This can also be a MEM for targets that pass values
+        partially on the stack and partially in registers.  */
+      if (reg && GET_CODE (reg) == REG)
+       use_reg (call_fusage, reg);
+    }
 }
 \f
 /* Generate several move instructions to clear LEN bytes of block TO.