(gen_shifty_op): Truncate VALUE to avoid out of bounds array access.
From-SVN: r11947
This commit is contained in:
parent
d2cba896e1
commit
cff3d762dc
@ -901,6 +901,9 @@ gen_shifty_op (code, operands)
|
||||
int value = INTVAL (operands[2]);
|
||||
int max, i;
|
||||
|
||||
/* Truncate the shift count in case it is out of bounds. */
|
||||
value = value & 0x1f;
|
||||
|
||||
if (value == 31)
|
||||
{
|
||||
if (code == LSHIFTRT)
|
||||
|
Loading…
Reference in New Issue
Block a user