1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Avoid isMoveInstr when printing XCore pseudo-moves.

llvm-svn: 108566
This commit is contained in:
Jakob Stoklund Olesen 2010-07-16 22:35:37 +00:00
parent c73aa71e90
commit 24994a5d4c

View File

@ -264,15 +264,13 @@ bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
void XCoreAsmPrinter::EmitInstruction(const MachineInstr *MI) {
SmallString<128> Str;
raw_svector_ostream O(Str);
// Check for mov mnemonic
unsigned src, dst, srcSR, dstSR;
if (TM.getInstrInfo()->isMoveInstr(*MI, src, dst, srcSR, dstSR)) {
O << "\tmov " << getRegisterName(dst) << ", ";
O << getRegisterName(src);
} else {
if (MI->getOpcode() == XCore::ADD_2rus && !MI->getOperand(2).getImm())
O << "\tmov " << getRegisterName(MI->getOperand(0).getReg()) << ", "
<< getRegisterName(MI->getOperand(1).getReg());
else
printInstruction(MI, O);
}
OutStreamer.EmitRawText(O.str());
}