This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix setup_incoming_promotions for sparc64
- To: gcc-patches at egcs dot cygnus dot com
- Subject: [PATCH] Fix setup_incoming_promotions for sparc64
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 26 Nov 1999 16:30:53 +0100
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)
___________________________________________________________________