mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Don't assume constant operand can only be in position 1!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1308 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c5fe2d3ed
commit
ecd5813639
@ -333,9 +333,9 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
|
||||
int64_t immedValue;
|
||||
MachineOperand::MachineOperandType opType =
|
||||
ChooseRegOrImmed(opValue, minstr->getOpCode(), target,
|
||||
/*canUseImmed*/ (op == 1),
|
||||
(target.getInstrInfo().getImmmedConstantPos(minstr->getOpCode()) == (int) op),
|
||||
machineRegNum, immedValue);
|
||||
|
||||
|
||||
if (opType == MachineOperand::MO_MachineRegister)
|
||||
minstr->SetMachineOperand(op, machineRegNum);
|
||||
else if (opType == MachineOperand::MO_VirtualRegister)
|
||||
|
@ -333,9 +333,9 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
|
||||
int64_t immedValue;
|
||||
MachineOperand::MachineOperandType opType =
|
||||
ChooseRegOrImmed(opValue, minstr->getOpCode(), target,
|
||||
/*canUseImmed*/ (op == 1),
|
||||
(target.getInstrInfo().getImmmedConstantPos(minstr->getOpCode()) == (int) op),
|
||||
machineRegNum, immedValue);
|
||||
|
||||
|
||||
if (opType == MachineOperand::MO_MachineRegister)
|
||||
minstr->SetMachineOperand(op, machineRegNum);
|
||||
else if (opType == MachineOperand::MO_VirtualRegister)
|
||||
|
Loading…
Reference in New Issue
Block a user