mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Fix the JIT failures from last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e41419f51e
commit
e54645a6fb
@ -242,11 +242,12 @@ int PPCCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) {
|
|||||||
unsigned index = MO.getConstantPoolIndex();
|
unsigned index = MO.getConstantPoolIndex();
|
||||||
unsigned Opcode = MI.getOpcode();
|
unsigned Opcode = MI.getOpcode();
|
||||||
rv = MCE.getConstantPoolEntryAddress(index);
|
rv = MCE.getConstantPoolEntryAddress(index);
|
||||||
if (Opcode == PPC::LIS) {
|
if (Opcode == PPC::LIS || Opcode == PPC::ADDIS) {
|
||||||
// lis wants hi16(addr)
|
// lis wants hi16(addr)
|
||||||
if ((short)rv < 0) rv += 1 << 16;
|
if ((short)rv < 0) rv += 1 << 16;
|
||||||
rv >>= 16;
|
rv >>= 16;
|
||||||
} else if (Opcode == PPC::LWZ || Opcode == PPC::LA ||
|
} else if (Opcode == PPC::LWZ || Opcode == PPC::LA ||
|
||||||
|
Opcode == PPC::LI ||
|
||||||
Opcode == PPC::LFS || Opcode == PPC::LFD) {
|
Opcode == PPC::LFS || Opcode == PPC::LFD) {
|
||||||
// These load opcodes want lo16(addr)
|
// These load opcodes want lo16(addr)
|
||||||
rv &= 0xffff;
|
rv &= 0xffff;
|
||||||
|
Loading…
Reference in New Issue
Block a user