This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix setup_incoming_promotions for sparc64


Hi!

Without this, promoted_input_arg never succeeds on SPARC and thus really
many things are not optimized by the combiner.

1999-11-26  Jakub Jelinek  <jakub@redhat.com>

	* combine.c(setup_incoming_promotions): Pass an outgoing
	regno to FUNCTION_ARG_REGNO_P which it expects.

--- combine.c.jj5	Wed Nov 24 16:03:21 1999
+++ combine.c	Fri Nov 26 16:09:55 1999
@@ -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


Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]