mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 17:33:29 +00:00
dont' call getX86RegNum on X86::RIP, it doesn't like that. This
fixes the remaining x86-64 jit failures afaik. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5526b69901
commit
ecfb3c3d66
@ -387,7 +387,9 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
|
||||
// If no BaseReg, issue a RIP relative instruction only if the MCE can
|
||||
// resolve addresses on-the-fly, otherwise use SIB (Intel Manual 2A, table
|
||||
// 2-7) and absolute references.
|
||||
unsigned BaseRegNo = BaseReg != 0 ? getX86RegNum(BaseReg) : -1U;
|
||||
unsigned BaseRegNo = -1U;
|
||||
if (BaseReg != 0 && BaseReg != X86::RIP)
|
||||
BaseRegNo = getX86RegNum(BaseReg);
|
||||
|
||||
if (// The SIB byte must be used if there is an index register.
|
||||
IndexReg.getReg() == 0 &&
|
||||
|
@ -175,8 +175,10 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
|
||||
const MCOperand &Scale = MI.getOperand(Op+1);
|
||||
const MCOperand &IndexReg = MI.getOperand(Op+2);
|
||||
unsigned BaseReg = Base.getReg();
|
||||
unsigned BaseRegNo = BaseReg != 0 ? GetX86RegNum(Base) : -1U;
|
||||
|
||||
unsigned BaseRegNo = -1U;
|
||||
if (BaseReg != 0 && BaseReg != X86::RIP)
|
||||
BaseRegNo = GetX86RegNum(Base);
|
||||
|
||||
// Determine whether a SIB byte is needed.
|
||||
// If no BaseReg, issue a RIP relative instruction only if the MCE can
|
||||
// resolve addresses on-the-fly, otherwise use SIB (Intel Manual 2A, table
|
||||
|
Loading…
Reference in New Issue
Block a user