diff options
author | Philip Blundell <philb@gnu.org> | 2003-05-15 18:13:41 +0000 |
---|---|---|
committer | Phil Blundell <pb@gcc.gnu.org> | 2003-05-15 18:13:41 +0000 |
commit | c75a3ddc67afe85c5bf177d76a47b487ee6277be (patch) | |
tree | 2759a0cd344f37b8376653711cfc153b3b3f086b | |
parent | dffbbe8019dd880e4dcc4a66670acd7449cede92 (diff) | |
download | gcc-c75a3ddc67afe85c5bf177d76a47b487ee6277be.zip gcc-c75a3ddc67afe85c5bf177d76a47b487ee6277be.tar.gz gcc-c75a3ddc67afe85c5bf177d76a47b487ee6277be.tar.bz2 |
re PR target/10730 ([arm] -O2 generates invalid asm)
2003-05-15 Philip Blundell <philb@gnu.org>
PR target/10730
* config/arm/arm.c (adjacent_mem_locations): Reject offsets
involving invalid constants.
From-SVN: r66838
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2da0549..772b5e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-05-15 Philip Blundell <philb@gnu.org> + + PR target/10730 + * config/arm/arm.c (adjacent_mem_locations): Reject offsets + involving invalid constants. + 2003-05-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * pa.c (hppa_expand_prologue): Remove blockage. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 500bd72..d776766 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -4571,6 +4571,12 @@ adjacent_mem_locations (a, b) else reg1 = REGNO (XEXP (b, 0)); + /* Don't accept any offset that will require multiple instructions to handle, + since this would cause the arith_adjacentmem pattern to output an overlong + sequence. */ + if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1)) + return 0; + return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4); } return 0; |