Commit 4e671509 by Jeff Law

Re: [PATCH] Fix undefined behaviour in arc port

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.

From-SVN: r228219
parent d95fc584
...@@ -9322,7 +9322,7 @@ arc_legitimize_reload_address (rtx *p, machine_mode mode, int opnum, ...@@ -9322,7 +9322,7 @@ arc_legitimize_reload_address (rtx *p, machine_mode mode, int opnum,
shift = scale >> 1; shift = scale >> 1;
offset_base offset_base
= ((offset + (256 << shift)) = ((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 /* Sometimes the normal form does not suit DImode. We
could avoid that by using smaller ranges, but that could avoid that by using smaller ranges, but that
would give less optimized code when SImode is would give less optimized code when SImode is
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
"@internal "@internal
Unconditional two-address add / sub constant" Unconditional two-address add / sub constant"
(and (match_code "const_int") (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 >= -0x4000 && ival <= 0x4000
&& ((ival >= 0 ? ival : -ival) && ((ival >= 0 ? ival : -ival)
<= 0x7ff * (ival & -ival)))"))) <= 0x7ff * (ival & -ival)))")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment