diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp index 798a908c65a..9a591a17c4b 100644 --- a/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPC32AsmPrinter.cpp @@ -18,8 +18,7 @@ #define DEBUG_TYPE "asmprinter" #include "PowerPC.h" -#include "PowerPCInstrInfo.h" -#include "PowerPCTargetMachine.h" +#include "PPC32TargetMachine.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" @@ -29,7 +28,6 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/ValueTypes.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Support/Mangler.h" #include "Support/CommandLine.h" #include "Support/Debug.h" @@ -41,11 +39,11 @@ using namespace llvm; namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); - struct PowerPCAsmPrinter : public AsmPrinter { + struct PPC32AsmPrinter : public AsmPrinter { std::set<std::string> FnStubs, GVStubs, LinkOnceStubs; std::set<std::string> Strings; - PowerPCAsmPrinter(std::ostream &O, TargetMachine &TM) + PPC32AsmPrinter(std::ostream &O, TargetMachine &TM) : AsmPrinter(O, TM), LabelNumber(0) { UsesUnderscorePrefix = 1; } @@ -55,11 +53,11 @@ namespace { unsigned LabelNumber; virtual const char *getPassName() const { - return "PowerPC Assembly Printer"; + return "PPC32 Assembly Printer"; } - PowerPCTargetMachine &getTM() { - return static_cast<PowerPCTargetMachine&>(TM); + PPC32TargetMachine &getTM() { + return static_cast<PPC32TargetMachine&>(TM); } /// printInstruction - This method is automatically generated by tablegen @@ -101,8 +99,8 @@ namespace { /// using the given target machine description. This should work /// regardless of whether the function is in SSA form or not. /// -FunctionPass *llvm::createPPCAsmPrinter(std::ostream &o,TargetMachine &tm) { - return new PowerPCAsmPrinter(o, tm); +FunctionPass *llvm::createPPC32AsmPrinter(std::ostream &o, TargetMachine &tm) { + return new PPC32AsmPrinter(o, tm); } // Include the auto-generated portion of the assembly writer @@ -151,7 +149,7 @@ static void printAsCString(std::ostream &O, const ConstantArray *CVA) { // Print a constant value or values, with the appropriate storage class as a // prefix. -void PowerPCAsmPrinter::emitGlobalConstant(const Constant *CV) { +void PPC32AsmPrinter::emitGlobalConstant(const Constant *CV) { const TargetData &TD = TM.getTargetData(); if (CV->isNullValue()) { @@ -275,7 +273,7 @@ void PowerPCAsmPrinter::emitGlobalConstant(const Constant *CV) { /// used to print out constants which have been "spilled to memory" by /// the code generator. /// -void PowerPCAsmPrinter::printConstantPool(MachineConstantPool *MCP) { +void PPC32AsmPrinter::printConstantPool(MachineConstantPool *MCP) { const std::vector<Constant*> &CP = MCP->getConstants(); const TargetData &TD = TM.getTargetData(); @@ -294,7 +292,7 @@ void PowerPCAsmPrinter::printConstantPool(MachineConstantPool *MCP) { /// runOnMachineFunction - This uses the printMachineInstruction() /// method to print assembly for each instruction. /// -bool PowerPCAsmPrinter::runOnMachineFunction(MachineFunction &MF) { +bool PPC32AsmPrinter::runOnMachineFunction(MachineFunction &MF) { setupMachineFunction(MF); O << "\n\n"; @@ -326,8 +324,8 @@ bool PowerPCAsmPrinter::runOnMachineFunction(MachineFunction &MF) { return false; } -void PowerPCAsmPrinter::printOp(const MachineOperand &MO, - bool LoadAddrOp /* = false */) { +void PPC32AsmPrinter::printOp(const MachineOperand &MO, + bool LoadAddrOp /* = false */) { const MRegisterInfo &RI = *TM.getRegisterInfo(); int new_symbol; @@ -408,7 +406,7 @@ void PowerPCAsmPrinter::printOp(const MachineOperand &MO, } } -void PowerPCAsmPrinter::printImmOp(const MachineOperand &MO, unsigned ArgType) { +void PPC32AsmPrinter::printImmOp(const MachineOperand &MO, unsigned ArgType) { int Imm = MO.getImmedValue(); if (ArgType == PPCII::Simm16 || ArgType == PPCII::Disimm16) { O << (short)Imm; @@ -420,7 +418,7 @@ void PowerPCAsmPrinter::printImmOp(const MachineOperand &MO, unsigned ArgType) { /// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to /// the current output stream. /// -void PowerPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) { +void PPC32AsmPrinter::printMachineInstruction(const MachineInstr *MI) { ++EmittedInsts; if (printInstruction(MI)) return; // Printer was automatically generated @@ -550,7 +548,7 @@ static void SwitchSection(std::ostream &OS, std::string &CurSection, } } -bool PowerPCAsmPrinter::doFinalization(Module &M) { +bool PPC32AsmPrinter::doFinalization(Module &M) { const TargetData &TD = TM.getTargetData(); std::string CurSection; |

