projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2cba89
)
(gen_shifty_op): Truncate VALUE to avoid out of bounds array access.
author
Jim Wilson
<wilson@gcc.gnu.org>
Mon, 6 May 1996 23:39:46 +0000
(16:39 -0700)
committer
Jim Wilson
<wilson@gcc.gnu.org>
Mon, 6 May 1996 23:39:46 +0000
(16:39 -0700)
From-SVN: r11947
gcc/config/sh/sh.c
patch
|
blob
|
history
diff --git
a/gcc/config/sh/sh.c
b/gcc/config/sh/sh.c
index 764bf31d5e8203b1ee4ca2df3f4f6860c685f641..1f3e43c39c4faf710eda4aa3f0237af7f71a1caa 100644
(file)
--- a/
gcc/config/sh/sh.c
+++ b/
gcc/config/sh/sh.c
@@
-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)