Switch F3_1 instructions over to use AsmStrings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24740 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index bcf17e9..cedbe3f 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -70,7 +70,7 @@
void emitGlobalConstant(const Constant *CV);
void printConstantPool(MachineConstantPool *MCP);
void printOperand(const MachineInstr *MI, int opNum);
- void printBaseOffsetPair (const MachineInstr *MI, int i, bool brackets=true);
+ void printBaseOffsetPair (const MachineInstr *MI, int i);
void printMachineInstruction(const MachineInstr *MI);
bool printInstruction(const MachineInstr *MI); // autogenerated.
bool runOnMachineFunction(MachineFunction &F);
@@ -474,9 +474,8 @@
/// brackets is true, or may be in the form base - constant, if offset is a
/// negative constant).
///
-void SparcV8AsmPrinter::printBaseOffsetPair (const MachineInstr *MI, int i,
- bool brackets) {
- if (brackets) O << "[";
+void SparcV8AsmPrinter::printBaseOffsetPair (const MachineInstr *MI, int i) {
+ O << "[";
printOperand (MI, i);
if (MI->getOperand (i + 1).isImmediate()) {
int Val = (int) MI->getOperand (i + 1).getImmedValue ();
@@ -488,15 +487,15 @@
O << " + ";
printOperand (MI, i + 1);
}
- if (brackets) O << "]";
+ O << "]";
}
/// printMachineInstruction -- Print out a single SparcV8 LLVM instruction
/// MI in GAS syntax to the current output stream.
///
void SparcV8AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
- if (printInstruction(MI)) return;
O << "\t";
+ if (printInstruction(MI)) return;
unsigned Opcode = MI->getOpcode();
const TargetInstrInfo &TII = *TM.getInstrInfo();
@@ -523,12 +522,6 @@
printBaseOffsetPair (MI, 0);
O << "\n";
return;
- } else if (Opcode == V8::JMPLrr) {
- printBaseOffsetPair (MI, 1, false);
- O << ", ";
- printOperand (MI, 0);
- O << "\n";
- return;
}
// print non-immediate, non-register-def operands