From ebfcd719cf1ca5c186befb9ea013add7342b1cb2 Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Wed, 2 Oct 2013 10:05:43 +0000 Subject: [PATCH] arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used. 2013-10-02 Kyrylo Tkachov * config/arm/arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used. From-SVN: r203106 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e0b30a373eb..7dc504bbf3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-10-02 Kyrylo Tkachov + + * config/arm/arm.c (arm_legitimize_reload_address): Explain why + plus_constant is not used. + 2013-10-01 Wei Mi * config/i386/x86-tune.def (DEF_TUNE): Remove diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index cc3eec767ae..f0a7deae67d 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)), -- 2.30.2