aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d028a93..8f14d7d 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -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