combine.c (setup_incoming_promotions): Pass an outgoing regno to FUNCTION_ARG_REGNO_P...
authorJakub Jelinek <jakub@redhat.com>
Sun, 28 Nov 1999 08:08:02 +0000 (09:08 +0100)
committerJeff Law <law@gcc.gnu.org>
Sun, 28 Nov 1999 08:08:02 +0000 (01:08 -0700)
        * combine.c (setup_incoming_promotions): Pass an outgoing
        regno to FUNCTION_ARG_REGNO_P which it expects.

From-SVN: r30685

gcc/ChangeLog
gcc/combine.c

index 5ec82b69d3d3423c26a196dd99c6fac800391687..1dbf3127b0c44657efcb5e3da8040414e48ad6bb 100644 (file)
@@ -1,3 +1,8 @@
+1999-11-28  Jakub Jelinek  <jakub@redhat.com>
+
+       * combine.c (setup_incoming_promotions): Pass an outgoing
+       regno to FUNCTION_ARG_REGNO_P which it expects.
+
 1999-11-28  Andreas Jaeger  <aj@suse.de>
 
        * mips/linux.h (CPP_PREDEFINES): Undefine before redefining.
index d028a93f9dc9ca5734818a09b25e1fd235ea83e1..8f14d7df92746509a13ba64459d6ee5580cd70e8 100644 (file)
@@ -768,8 +768,14 @@ setup_incoming_promotions ()
   int unsignedp;
   rtx first = get_insns ();
 
+#ifndef OUTGOING_REGNO
+#define OUTGOING_REGNO(N) N
+#endif
   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
-    if (FUNCTION_ARG_REGNO_P (regno)
+    /* Check whether this register can hold an incoming pointer
+       argument.  FUNCTION_ARG_REGNO_P tests outgoing register
+       numbers, so translate if necessary due to register windows.  */
+    if (FUNCTION_ARG_REGNO_P (OUTGOING_REGNO (regno))
        && (reg = promoted_input_arg (regno, &mode, &unsignedp)) != 0)
       {
        record_value_for_reg