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]
Other format: [Raw text]

Re: [PATCH] Fix PR23783 on ARM


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)

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