mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Bug fix in creating constants: need 1U << 31, not 1 << 31.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad80db6d7d
commit
940a3a47b0
@ -264,7 +264,7 @@ CreateUIntSetInstruction(const TargetMachine& target,
|
||||
static const uint64_t lo32 = (uint32_t) ~0;
|
||||
if (C <= lo32) // High 32 bits are 0. Set low 32 bits.
|
||||
CreateSETUWConst(target, (uint32_t) C, dest, mvec);
|
||||
else if ((C & ~lo32) == ~lo32 && (C & (1 << 31))) {
|
||||
else if ((C & ~lo32) == ~lo32 && (C & (1U << 31))) {
|
||||
// All high 33 (not 32) bits are 1s: sign-extension will take care
|
||||
// of high 32 bits, so use the sequence for signed int
|
||||
CreateSETSWConst(target, (int32_t) C, dest, mvec);
|
||||
|
Loading…
Reference in New Issue
Block a user