projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b6e175
)
(expand_shift): Truncate immediate count if SHIFT_COUNT_TRUNCATED.
author
Torbjorn Granlund
<tege@gnu.org>
Sat, 12 Feb 1994 12:40:58 +0000
(12:40 +0000)
committer
Torbjorn Granlund
<tege@gnu.org>
Sat, 12 Feb 1994 12:40:58 +0000
(12:40 +0000)
From-SVN: r6538
gcc/expmed.c
patch
|
blob
|
history
diff --git
a/gcc/expmed.c
b/gcc/expmed.c
index ccf130e5672ef48d3f869d8d49ed450a48e9d2bb..a4eea00641761b7c94933b5d67e657c0c4db6678 100644
(file)
--- a/
gcc/expmed.c
+++ b/
gcc/expmed.c
@@
-1602,6
+1602,14
@@
expand_shift (code, mode, shifted, amount, target, unsignedp)
op1 = expand_expr (amount, NULL_RTX, VOIDmode, 0);
+#if SHIFT_COUNT_TRUNCATED
+ if (SHIFT_COUNT_TRUNCATED
+ && GET_CODE (op1) == CONST_INT
+ && (unsigned HOST_WIDE_INT) INTVAL (op1) >= GET_MODE_BITSIZE (mode))
+ op1 = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (op1)
+ % GET_MODE_BITSIZE (mode));
+#endif
+
if (op1 == const0_rtx)
return shifted;