This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR23783 on ARM
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 06 Oct 2005 11:44:23 -0400
- Subject: Re: [PATCH] Fix PR23783 on ARM
- References: <1128602870.5300.23.camel@pc960.cambridge.arm.com>
Hi Richard,
2005-10-06 Richard Earnshaw <richard.earnshaw@arm.com>
PR target/23783
* arm.md (call): If the address isn't a SYMBOL_REF or a register,
then force it into a register.
(call_value): Likewise.
Do we still need the attached patch?
Now that you fix the address of a call at expand time, we may not actually get
to plus_constant, but it still seems to be a good idea to avoid generating
non-cannonical rtx like (plus (reg) (const_int 0)).
By the way, tested on arm-none-eabi.
Kazu Hirata
Index: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.479
diff -u -d -p -r1.479 arm.c
--- config/arm/arm.c 10 Sep 2005 08:28:28 -0000 1.479
+++ config/arm/arm.c 5 Oct 2005 19:24:09 -0000
@@ -3780,7 +3780,7 @@ arm_legitimize_address (rtx x, rtx orig_
index -= mask;
}
base_reg = force_reg (SImode, GEN_INT (base));
- x = gen_rtx_PLUS (SImode, base_reg, GEN_INT (index));
+ x = plus_constant (base_reg, index);
}
if (flag_pic)