summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-06-21 18:01:47 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-06-21 18:01:47 +0000
commit294984cecbe1e5abbe37dc38bf2941f2804b13ca (patch)
treea994d6ff156e84f896e1a4a1c988145a57cd43a2 /utils/TableGen/Record.cpp
parenta2916ce49a9c7c2e0c6d8b91467baaca61a5f77e (diff)
downloadllvm-294984cecbe1e5abbe37dc38bf2941f2804b13ca.tar.gz
llvm-294984cecbe1e5abbe37dc38bf2941f2804b13ca.tar.bz2
llvm-294984cecbe1e5abbe37dc38bf2941f2804b13ca.tar.xz
Handle shifts >= 32 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.cpp')
-rw-r--r--utils/TableGen/Record.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp
index 1a60ac489e..3fc14c59ed 100644
--- a/utils/TableGen/Record.cpp
+++ b/utils/TableGen/Record.cpp
@@ -61,10 +61,10 @@ Init *BitsRecTy::convertValue(BitInit *UI) {
// appropriate bits...
//
Init *BitsRecTy::convertValue(IntInit *II) {
- int Value = II->getValue();
+ int64_t Value = II->getValue();
// Make sure this bitfield is large enough to hold the integer value...
if (Value >= 0) {
- if (Value & ~((1 << Size)-1))
+ if (Value & ~((1LL << Size)-1))
return 0;
} else {
if ((Value >> Size) != -1 || ((Value & (1 << Size-1)) == 0))