(gen_shifty_op): Truncate VALUE to avoid out of bounds array access.

From-SVN: r11947
This commit is contained in:
Jim Wilson 1996-05-06 16:39:46 -07:00
parent d2cba896e1
commit cff3d762dc
1 changed files with 3 additions and 0 deletions

View File

@ -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)