(incoming_regs): Only use 16 registers for parameter passing.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 4 Oct 1993 21:47:19 +0000 (17:47 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 4 Oct 1993 21:47:19 +0000 (17:47 -0400)
From-SVN: r5591

gcc/config/a29k/a29k.c

index 7d6e9c0dd9178ca2602ff1b4cf0ba029dd9a3607..631176134af63fa4bd3768491fc0ea82e72cbb93 100644 (file)
@@ -772,9 +772,14 @@ incoming_reg (start, count)
 {
   int i;
 
+  /* We only use 16 argument registers, so truncate at the end of the
+     area.  */
+  if (start + count > 16)
+    count = 16 - start;
+
   if (! TARGET_NO_REUSE_ARGS)
     /* Mark all the used registers as not fixed and saved over calls.  */
-    for (i = R_AR (start); i < R_AR (16) && i < R_AR (start + count); i++)
+    for (i = R_AR (start); i < R_AR (start + count); i++)
       {
        fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 0;
        CLEAR_HARD_REG_BIT (fixed_reg_set, i);