mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-02 09:33:59 +00:00
Fix shift overflow bug that would occur when a field was a full 32-bits
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
This commit is contained in:
parent
834eb40f44
commit
1cfa0776c3
@ -191,7 +191,7 @@ void CodeEmitterGen::run(std::ostream &o) {
|
|||||||
gotOp = true;
|
gotOp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned opMask = (1 << N) - 1;
|
unsigned opMask = ~0U >> (32-N);
|
||||||
int opShift = beginVarBit - N + 1;
|
int opShift = beginVarBit - N + 1;
|
||||||
opMask <<= opShift;
|
opMask <<= opShift;
|
||||||
opShift = beginInstBit - beginVarBit;
|
opShift = beginInstBit - beginVarBit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user