mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Avoid isMoveInstr when printing XCore pseudo-moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -264,15 +264,13 @@ bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
|||||||
void XCoreAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
void XCoreAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||||
SmallString<128> Str;
|
SmallString<128> Str;
|
||||||
raw_svector_ostream O(Str);
|
raw_svector_ostream O(Str);
|
||||||
|
|
||||||
// Check for mov mnemonic
|
// Check for mov mnemonic
|
||||||
unsigned src, dst, srcSR, dstSR;
|
if (MI->getOpcode() == XCore::ADD_2rus && !MI->getOperand(2).getImm())
|
||||||
if (TM.getInstrInfo()->isMoveInstr(*MI, src, dst, srcSR, dstSR)) {
|
O << "\tmov " << getRegisterName(MI->getOperand(0).getReg()) << ", "
|
||||||
O << "\tmov " << getRegisterName(dst) << ", ";
|
<< getRegisterName(MI->getOperand(1).getReg());
|
||||||
O << getRegisterName(src);
|
else
|
||||||
} else {
|
|
||||||
printInstruction(MI, O);
|
printInstruction(MI, O);
|
||||||
}
|
|
||||||
OutStreamer.EmitRawText(O.str());
|
OutStreamer.EmitRawText(O.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user