diff options
author | Yufeng Zhang <yufeng.zhang@arm.com> | 2013-11-26 16:36:14 +0000 |
---|---|---|
committer | Yufeng Zhang <yufeng@gcc.gnu.org> | 2013-11-26 16:36:14 +0000 |
commit | 97c34bdbe2aa20ef2e74326e0799466176af8c5f (patch) | |
tree | d8984967b38da86b473cf3d7e3a220add54238c5 /gcc/config | |
parent | 635bfae029c7f2849680a7fdecb7ab07e798564b (diff) | |
download | gcc-97c34bdbe2aa20ef2e74326e0799466176af8c5f.zip gcc-97c34bdbe2aa20ef2e74326e0799466176af8c5f.tar.gz gcc-97c34bdbe2aa20ef2e74326e0799466176af8c5f.tar.bz2 |
arm.c (arm_legitimize_address): Check xop1 is not a constant immediate before force_reg.
gcc/
* config/arm/arm.c (arm_legitimize_address): Check xop1 is not
a constant immediate before force_reg.
gcc/testsuite/
* gcc.target/arm/20131120.c: New test.
From-SVN: r205397
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arm/arm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index f88ebbc..129e428 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7118,7 +7118,8 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) if (CONSTANT_P (xop0) && !symbol_mentioned_p (xop0)) xop0 = force_reg (SImode, xop0); - if (CONSTANT_P (xop1) && !symbol_mentioned_p (xop1)) + if (CONSTANT_P (xop1) && !CONST_INT_P (xop1) + && !symbol_mentioned_p (xop1)) xop1 = force_reg (SImode, xop1); if (ARM_BASE_REGISTER_RTX_P (xop0) |