aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2013-10-02 10:05:43 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2013-10-02 10:05:43 +0000
commitebfcd719cf1ca5c186befb9ea013add7342b1cb2 (patch)
tree36f9dfa8d5dcbac856548933ae0a89a0c2ac9a61
parent2303ffb96961198c3252f68ee8196ff399e05ac7 (diff)
downloadgcc-ebfcd719cf1ca5c186befb9ea013add7342b1cb2.zip
gcc-ebfcd719cf1ca5c186befb9ea013add7342b1cb2.tar.gz
gcc-ebfcd719cf1ca5c186befb9ea013add7342b1cb2.tar.bz2
arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used.
2013-10-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/arm/arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used. From-SVN: r203106
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/arm.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e0b30a3..7dc504b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/arm/arm.c (arm_legitimize_reload_address): Explain why
+ plus_constant is not used.
+
2013-10-01 Wei Mi <wmi@google.com>
* config/i386/x86-tune.def (DEF_TUNE): Remove
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index cc3eec7..f0a7dea 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -7015,7 +7015,11 @@ arm_legitimize_reload_address (rtx *p,
return false;
/* Reload the high part into a base reg; leave the low part
- in the mem. */
+ in the mem.
+ Note that replacing this gen_rtx_PLUS with plus_constant is
+ wrong in this case because we rely on the
+ (plus (plus reg c1) c2) structure being preserved so that
+ XEXP (*p, 0) in push_reload below uses the correct term. */
*p = gen_rtx_PLUS (GET_MODE (*p),
gen_rtx_PLUS (GET_MODE (*p), XEXP (*p, 0),
GEN_INT (high)),