combine.c (force_to_mode): Avoid undefined behaviour due to negative shift amount.
* combine.c (force_to_mode) [LSHIFTRT]: Avoid undefined behaviour due to negative shift amount. From-SVN: r189347
This commit is contained in:
parent
755e0546bc
commit
f99391fe45
|
@ -1,3 +1,8 @@
|
|||
2012-07-07 Ulrich Weigand <ulrich.weigand@linaro.org>
|
||||
|
||||
* combine.c (force_to_mode) [LSHIFTRT]: Avoid undefined behaviour
|
||||
due to negative shift amount.
|
||||
|
||||
2012-07-07 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
Fix configure test for "stack protector support in target C library".
|
||||
|
|
|
@ -8433,6 +8433,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask,
|
|||
in OP_MODE. */
|
||||
|
||||
if (CONST_INT_P (XEXP (x, 1))
|
||||
&& INTVAL (XEXP (x, 1)) >= 0
|
||||
&& INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
|
||||
&& HWI_COMPUTABLE_MODE_P (op_mode))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue