projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
834eb40
)
Fix shift overflow bug that would occur when a field was a full 32-bits
author
Chris Lattner
<sabre@nondot.org>
Sun, 5 Oct 2008 18:31:58 +0000
(18:31 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 5 Oct 2008 18:31:58 +0000
(18:31 +0000)
in tblgen. This is PR2827, thanks to Waldemar Knorr for tracking this
down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57124
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/CodeEmitterGen.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/CodeEmitterGen.cpp
b/utils/TableGen/CodeEmitterGen.cpp
index 62df686ea28b5e37d1cf9b7fd7277ee083d349ac..ae4a6aa445b1ca0f80316202f0a61b2f0751f8e5 100644
(file)
--- a/
utils/TableGen/CodeEmitterGen.cpp
+++ b/
utils/TableGen/CodeEmitterGen.cpp
@@
-191,7
+191,7
@@
void CodeEmitterGen::run(std::ostream &o) {
gotOp = true;
}
- unsigned opMask =
(1 << N) - 1
;
+ unsigned opMask =
~0U >> (32-N)
;
int opShift = beginVarBit - N + 1;
opMask <<= opShift;
opShift = beginInstBit - beginVarBit;