[PATCH] Fix undefined behaviour in rl78 port

[PATCH] Fix undefined behaviour in rl78 port
        * config/rl78/rl78-expand.md (movqi): Fix undefined left shift
        behaviour.

From-SVN: r228252
This commit is contained in:
Jeff Law 2015-09-29 10:28:51 -06:00 committed by Jeff Law
parent 3ea7f8e524
commit 187a0dd603
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2015-09-29 Jeff Law <law@redhat.com>
* config/rl78/rl78-expand.md (movqi): Fix undefined left shift
behaviour.
* config/msp430/msp430.c (msp430_legitimate_constant): Fix undefined
left shift behaviour.
* config/msp430/constraints.md ('L' constraint): Similarly.

View File

@ -48,7 +48,7 @@
&& ! REG_P (operands[0]))
operands[1] = copy_to_mode_reg (QImode, operands[1]);
if (CONST_INT_P (operands[1]) && ! IN_RANGE (INTVAL (operands[1]), (-1 << 8) + 1, (1 << 8) - 1))
if (CONST_INT_P (operands[1]) && ! IN_RANGE (INTVAL (operands[1]), (HOST_WIDE_INT_M1U << 8) + 1, (1 << 8) - 1))
FAIL;
}
)