diff options
author | Nicolas Pitre <nico@cam.org> | 2005-09-02 19:09:33 +0000 |
---|---|---|
committer | Nicolas Pitre <nico@gcc.gnu.org> | 2005-09-02 19:09:33 +0000 |
commit | b107d7437b09d209d217b102c40ca45f81bc844b (patch) | |
tree | 2b34334371f8af8bee8bb139f6edbe090ec2d583 | |
parent | da6110588f226bf6107910b7630451e736328a1b (diff) | |
download | gcc-b107d7437b09d209d217b102c40ca45f81bc844b.zip gcc-b107d7437b09d209d217b102c40ca45f81bc844b.tar.gz gcc-b107d7437b09d209d217b102c40ca45f81bc844b.tar.bz2 |
arm.c (arm_legitimize_address): Limit the value passed to bit_count to 32 bits.
* config/arm/arm.c (arm_legitimize_address): Limit the value passed
to bit_count to 32 bits.
From-SVN: r103792
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7dccbd..50ac07f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-09-02 Nicolas Pitre <nico@cam.org> + + * config/arm/arm.c (arm_legitimize_address): Limit the value passed + to bit_count to 32 bits. + 2005-08-31 Mark Mitchell <mark@codesourcery.com> PR c++/23167 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 128edb6..7df3aba 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3772,7 +3772,7 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) mask = (1 << bits) - 1; base = INTVAL (x) & ~mask; index = INTVAL (x) & mask; - if (bit_count (base) > (32 - bits)/2) + if (bit_count (base & 0xffffffff) > (32 - bits)/2) { /* It'll most probably be more efficient to generate the base with more bits set and use a negative index instead. */ |