mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Handle shifts >= 32 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a2916ce49a
commit
294984cecb
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user