[llvm-commits] [llvm] r108566 - /llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jul 16 15:35:37 PDT 2010
Author: stoklund
Date: Fri Jul 16 17:35:37 2010
New Revision: 108566
URL: http://llvm.org/viewvc/llvm-project?rev=108566&view=rev
Log:
Avoid isMoveInstr when printing XCore pseudo-moves.
Modified:
llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp?rev=108566&r1=108565&r2=108566&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Fri Jul 16 17:35:37 2010
@@ -264,15 +264,13 @@
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());
}
More information about the llvm-commits
mailing list