summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
index 9ec58816df4..f778197be70 100644
--- a/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
+++ b/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
@@ -144,6 +144,9 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
SetupMachineFunction(MF);
O << "\n\n";
+ // Print out constants referenced by the function
+ EmitConstantPool(MF.getConstantPool());
+
// Print the 'header' of function
emitFunctionHeader(MF);
@@ -258,6 +261,12 @@ void SystemZAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
<< MO.getIndex();
return;
+ case MachineOperand::MO_ConstantPoolIndex:
+ O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() << '_'
+ << MO.getIndex();
+
+ printOffset(MO.getOffset());
+ break;
case MachineOperand::MO_GlobalAddress: {
const GlobalValue *GV = MO.getGlobal();
std::string Name = Mang->getValueName(GV);
OpenPOWER on IntegriCloud