mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-21 19:20:28 +00:00
Don't assume constant operand can only be in position 1!
llvm-svn: 1308
This commit is contained in:
parent
3baa8cefc0
commit
a8f8fd19c0
@ -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