diff options
| -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 2da0549d77b..772b5e0a50a 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 500bd72ed7c..d776766dc7f 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; |

