diff options
author | Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> | 2009-06-19 21:22:44 +0000 |
---|---|---|
committer | Ramana Radhakrishnan <ramana@gcc.gnu.org> | 2009-06-19 21:22:44 +0000 |
commit | ce41c38bfcb5f4f45791fd13b52dcd687834c818 (patch) | |
tree | 984352a3384c1c85751c41fc88bf7dca7027c364 /gcc/config/arm | |
parent | d130ae115657aa4e4c4dab6e56f3c08d44bcdfa8 (diff) | |
download | gcc-ce41c38bfcb5f4f45791fd13b52dcd687834c818.zip gcc-ce41c38bfcb5f4f45791fd13b52dcd687834c818.tar.gz gcc-ce41c38bfcb5f4f45791fd13b52dcd687834c818.tar.bz2 |
Fix PR 40482 2009-06-19 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Fix PR 40482
2009-06-19 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/40482
* config/arm/arm.c (thumb_shiftable_const): Truncate val to
32 bits.
* config/arm/arm.md: Likewise.
2009-06-19 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/40482
* gcc.target/arm/pr40482.c: New test.
From-SVN: r148728
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 1 | ||||
-rw-r--r-- | gcc/config/arm/arm.md | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a51cbb1..b629794 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -17515,6 +17515,7 @@ thumb_shiftable_const (unsigned HOST_WIDE_INT val) unsigned HOST_WIDE_INT mask = 0xff; int i; + val = val & (unsigned HOST_WIDE_INT)0xffffffffu; if (val == 0) /* XXX */ return 0; diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index fc2ce3c9..0f04e46 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -5166,7 +5166,7 @@ (set (match_dup 0) (ashift:SI (match_dup 0) (match_dup 2)))] " { - unsigned HOST_WIDE_INT val = INTVAL (operands[1]); + unsigned HOST_WIDE_INT val = INTVAL (operands[1]) & 0xffffffffu; unsigned HOST_WIDE_INT mask = 0xff; int i; |