diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-28 19:27:29 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-28 19:27:29 +0000 |
commit | 28b6dd02a1ff3cad8c40f27a1590030a5680699f (patch) | |
tree | 74ec0b78a9025d3c4db06d929e7df4060ef11f11 | |
parent | ec6135cea6817a82d78a7e7ad1945c1f0335c8b1 (diff) | |
download | gcc-28b6dd02a1ff3cad8c40f27a1590030a5680699f.tar.gz |
Re: [PATCH] Fix undefined behaviour in arc port
* config/arc/arc.c (arc_legitimize_reload_address): Fix stupid
thinko in last change.
* config/arc/constraints.md (C2a): Fix typos in last change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228219 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/config/arc/arc.c | 2 | ||||
-rw-r--r-- | gcc/config/arc/constraints.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 4d731b53f6c..a6a1921267d 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -9322,7 +9322,7 @@ arc_legitimize_reload_address (rtx *p, machine_mode mode, int opnum, shift = scale >> 1; offset_base = ((offset + (256 << shift)) - & ((HOST_WIDE_INT)(-512U << shift))); + & ((HOST_WIDE_INT)((unsigned HOST_WIDE_INT) -512 << shift))); /* Sometimes the normal form does not suit DImode. We could avoid that by using smaller ranges, but that would give less optimized code when SImode is diff --git a/gcc/config/arc/constraints.md b/gcc/config/arc/constraints.md index b3ea115fc03..3d0db360557 100644 --- a/gcc/config/arc/constraints.md +++ b/gcc/config/arc/constraints.md @@ -195,7 +195,7 @@ "@internal Unconditional two-address add / sub constant" (and (match_code "const_int") - (match_test "ival == HOST_WIDE_INT (HOST_WIDE_INT_M1U << 31) + (match_test "ival == (HOST_WIDE_INT) (HOST_WIDE_INT_M1U << 31) || (ival >= -0x4000 && ival <= 0x4000 && ((ival >= 0 ? ival : -ival) <= 0x7ff * (ival & -ival)))"))) |