From 8a0ae9e9ca918808d29379b92e245944eff70dd7 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Sun, 27 Jun 2004 22:50:44 +0000 Subject: [PATCH] Support printing constant pool indices. If we see an "unknown operand", abort so it's easier to fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14441 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcAsmPrinter.cpp | 5 ++++- lib/Target/SparcV8/SparcV8AsmPrinter.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index 2e0785ce8b0..46b0d4fff08 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -412,8 +412,11 @@ void V8Printer::printOperand(const MachineInstr *MI, int opNum) { case MachineOperand::MO_ExternalSymbol: O << MO.getSymbolName(); break; + case MachineOperand::MO_ConstantPoolIndex: + O << ".CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); + break; default: - O << ""; break; + O << ""; abort (); break; } if (CloseParen) O << ")"; } diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index 2e0785ce8b0..46b0d4fff08 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp @@ -412,8 +412,11 @@ void V8Printer::printOperand(const MachineInstr *MI, int opNum) { case MachineOperand::MO_ExternalSymbol: O << MO.getSymbolName(); break; + case MachineOperand::MO_ConstantPoolIndex: + O << ".CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); + break; default: - O << ""; break; + O << ""; abort (); break; } if (CloseParen) O << ")"; }