mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 08:36:52 +00:00
Expand the repertoire of the forms we can print and encode.
llvm-svn: 11537
This commit is contained in:
parent
029dec8f3e
commit
c4ea4d12bf
@ -699,17 +699,16 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
|
||||
//
|
||||
assert(MI->getOperand(0).isRegister() &&
|
||||
(MI->getNumOperands() == 1+4 && isMem(MI, 1)) ||
|
||||
(MI->getNumOperands() == 2+4 && MI->getOperand(1).isRegister() &&
|
||||
isMem(MI, 2))
|
||||
(MI->getNumOperands() == 2+4 && MI->getOperand(5).isImmediate() && isMem(MI, 1))
|
||||
&& "Bad format for MRMSrcMem!");
|
||||
if (MI->getNumOperands() == 2+4 &&
|
||||
MI->getOperand(0).getReg() != MI->getOperand(1).getReg())
|
||||
O << "**";
|
||||
|
||||
O << TII.getName(MI->getOpcode()) << " ";
|
||||
printOp(MI->getOperand(0));
|
||||
O << ", " << sizePtr(Desc) << " ";
|
||||
printMemReference(MI, MI->getNumOperands()-4);
|
||||
printMemReference(MI, 1);
|
||||
if (MI->getNumOperands() == 2+4) {
|
||||
O << ", ";
|
||||
printOp(MI->getOperand(5));
|
||||
}
|
||||
O << "\n";
|
||||
return;
|
||||
}
|
||||
|
@ -574,8 +574,9 @@ void Emitter::emitInstruction(MachineInstr &MI) {
|
||||
|
||||
case X86II::MRMSrcMem:
|
||||
MCE.emitByte(BaseOpcode);
|
||||
emitMemModRMByte(MI, MI.getNumOperands()-4,
|
||||
getX86RegNum(MI.getOperand(0).getReg()));
|
||||
emitMemModRMByte(MI, 1, getX86RegNum(MI.getOperand(0).getReg()));
|
||||
if (MI.getNumOperands() == 2+4)
|
||||
emitConstant(MI.getOperand(5).getImmedValue(), sizeOfPtr(Desc));
|
||||
break;
|
||||
|
||||
case X86II::MRMS0r: case X86II::MRMS1r:
|
||||
|
Loading…
Reference in New Issue
Block a user