mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
print instructions through the mcstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db0273184b
commit
850d2e2a1b
@ -83,10 +83,6 @@ namespace {
|
|||||||
return "ARM Assembly Printer";
|
return "ARM Assembly Printer";
|
||||||
}
|
}
|
||||||
|
|
||||||
void printMCInst(const MCInst *MI) {
|
|
||||||
ARMInstPrinter(O, *MAI, VerboseAsm).printInstruction(MI);
|
|
||||||
}
|
|
||||||
|
|
||||||
void printInstructionThroughMCStreamer(const MachineInstr *MI);
|
void printInstructionThroughMCStreamer(const MachineInstr *MI);
|
||||||
|
|
||||||
|
|
||||||
@ -1176,7 +1172,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
|
AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
|
||||||
AddInst.addOperand(MCOperand::CreateReg(ARM::PC));
|
AddInst.addOperand(MCOperand::CreateReg(ARM::PC));
|
||||||
AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg()));
|
AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg()));
|
||||||
printMCInst(&AddInst);
|
OutStreamer.EmitInstruction(AddInst);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case ARM::CONSTPOOL_ENTRY: { // FIXME: Remove asm string from td file.
|
case ARM::CONSTPOOL_ENTRY: { // FIXME: Remove asm string from td file.
|
||||||
@ -1217,8 +1213,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
||||||
|
|
||||||
TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out
|
TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out
|
||||||
printMCInst(&TmpInst);
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
O << '\n';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -1232,7 +1227,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
||||||
|
|
||||||
TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out
|
TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out
|
||||||
printMCInst(&TmpInst);
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1251,8 +1246,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
|
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
|
||||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
||||||
|
|
||||||
printMCInst(&TmpInst);
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
O << '\n';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -1266,7 +1260,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
|
TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm()));
|
||||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg()));
|
||||||
|
|
||||||
printMCInst(&TmpInst);
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -1275,8 +1269,7 @@ void ARMAsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
|||||||
|
|
||||||
MCInst TmpInst;
|
MCInst TmpInst;
|
||||||
MCInstLowering.Lower(MI, TmpInst);
|
MCInstLowering.Lower(MI, TmpInst);
|
||||||
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
printMCInst(&TmpInst);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user