mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Watch out for variable_ops instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3530bafe00
commit
48ff2fb129
@ -493,7 +493,7 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
|
||||
emitRegModRMByte(MI.getOperand(CurOp++).getReg(),
|
||||
(Desc.TSFlags & X86II::FormMask)-X86II::MRM0r);
|
||||
|
||||
if (CurOp != MI.getNumOperands())
|
||||
if (CurOp != MI.getNumOperands() && MI.getOperand(CurOp).isImmediate())
|
||||
emitConstant(MI.getOperand(CurOp++).getImm(), sizeOfImm(Desc));
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user