[llvm-commits] CVS: llvm/utils/TableGen/Record.cpp

Misha Brukman brukman at cs.uiuc.edu
Mon Jun 21 13:09:02 PDT 2004


Changes in directory llvm/utils/TableGen:

Record.cpp updated: 1.31 -> 1.32

---
Log message:

Handle shifts >= 32 bits.


---
Diffs of the changes:  (+2 -2)

Index: llvm/utils/TableGen/Record.cpp
diff -u llvm/utils/TableGen/Record.cpp:1.31 llvm/utils/TableGen/Record.cpp:1.32
--- llvm/utils/TableGen/Record.cpp:1.31	Sat Feb 28 10:31:53 2004
+++ llvm/utils/TableGen/Record.cpp	Mon Jun 21 13:01:47 2004
@@ -61,10 +61,10 @@
 // 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))





More information about the llvm-commits mailing list