Add constpool lowering / printing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76016 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2009-07-16 14:19:35 +00:00
parent 0e31d5cf80
commit ae53567de1
4 changed files with 35 additions and 2 deletions

View File

@@ -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);