diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-13 20:08:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-13 20:08:00 +0000 |
commit | 05af2616d0df19638e799d3e7afadea26d96a4ba (patch) | |
tree | 0b4164b49f9e83b80011a87da298b77e0c3ba7f0 /lib | |
parent | f806c23a9a297e0b6d19d82ed23c6c5921d6ecd9 (diff) | |
download | external_llvm-05af2616d0df19638e799d3e7afadea26d96a4ba.zip external_llvm-05af2616d0df19638e799d3e7afadea26d96a4ba.tar.gz external_llvm-05af2616d0df19638e799d3e7afadea26d96a4ba.tar.bz2 |
make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp | 6 | ||||
-rw-r--r-- | lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h | 2 | ||||
-rw-r--r-- | lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h | 5 | ||||
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h | 2 | ||||
-rw-r--r-- | lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 2 |
13 files changed, 29 insertions, 4 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index 745faa7..876c4c8 100644 --- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -146,6 +146,8 @@ namespace { void PrintGlobalVariable(const GlobalVariable* GVar); void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + void printMachineInstruction(const MachineInstr *MI); bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); diff --git a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp index f0b7fd7..74d398b 100644 --- a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp +++ b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp @@ -49,6 +49,8 @@ namespace { return "Alpha Assembly Printer"; } void printInstruction(const MachineInstr *MI); + const char *getRegisterName(unsigned RegNo) const; + void printOp(const MachineOperand &MO, bool IsCallOp = false); void printOperand(const MachineInstr *MI, int opNum); void printBaseOffsetPair(const MachineInstr *MI, int i, bool brackets=true); diff --git a/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp b/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp index d83d914..96f4e78 100644 --- a/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp +++ b/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp @@ -51,6 +51,8 @@ namespace { void printOperand(const MachineInstr *MI, int opNum); void printMemoryOperand(const MachineInstr *MI, int opNum); void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + void emitLinkage(const std::string &n, GlobalValue::LinkageTypes l); bool runOnMachineFunction(MachineFunction &F); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, diff --git a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp index cc320e5..21e9be4 100644 --- a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp +++ b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp @@ -66,10 +66,10 @@ namespace { } /// printInstruction - This method is automatically generated by tablegen - /// from the instruction set description. This method returns true if the - /// machine instruction was sufficiently described to print it, otherwise it - /// returns false. + /// from the instruction set description. void printInstruction(const MachineInstr *MI); + const char *getRegisterName(unsigned RegNo) const; + void printMachineInstruction(const MachineInstr *MI); void printOp(const MachineOperand &MO); diff --git a/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp b/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp index cd0eb9c..c82f96d 100644 --- a/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp +++ b/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp @@ -58,6 +58,8 @@ namespace { const char* Modifier = 0); void printCCOperand(const MachineInstr *MI, int OpNum); void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + void printMachineInstruction(const MachineInstr * MI); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp index f4a9b36..b9d543e 100644 --- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp @@ -82,6 +82,8 @@ namespace { void emitFrameDirective(MachineFunction &MF); void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); }; diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h index 8510eaa..e671feb 100644 --- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h +++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h @@ -45,6 +45,8 @@ namespace llvm { void printOperand(const MachineInstr *MI, int opNum); void printCCOperand(const MachineInstr *MI, int opNum); void printInstruction(const MachineInstr *MI); // definition autogenerated. + const char *getRegisterName(unsigned RegNo) const; + bool printMachineInstruction(const MachineInstr *MI); void EmitFunctionDecls (Module &M); void EmitUndefinedVars (Module &M); diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index f21d371..658ac31 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -120,6 +120,8 @@ namespace { /// machine instruction was sufficiently described to print it, otherwise it /// returns false. void printInstruction(const MachineInstr *MI); + const char *getRegisterName(unsigned RegNo) const; + void printMachineInstruction(const MachineInstr *MI); void printOp(const MachineOperand &MO); diff --git a/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp b/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp index 0d5b70d..15e7fb0 100644 --- a/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp @@ -68,6 +68,8 @@ namespace { void printCCOperand(const MachineInstr *MI, int opNum); void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + bool runOnMachineFunction(MachineFunction &F); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp index 8289010..64843c9 100644 --- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp +++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp @@ -67,6 +67,8 @@ namespace { } void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + void printMachineInstruction(const MachineInstr * MI); void emitFunctionHeader(const MachineFunction &MF); diff --git a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h index 76f151d..4460e4b 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h +++ b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h @@ -28,8 +28,11 @@ class X86ATTInstPrinter { public: X86ATTInstPrinter(raw_ostream &o, const MCAsmInfo *mai, const TargetRegisterInfo *tri) : O(o), MAI(mai), TRI(tri) {} - + + // Autogenerated by tblgen. void printInstruction(const MCInst *MI); + const char *getRegisterName(unsigned RegNo) const; + void printOperand(const MCInst *MI, unsigned OpNo, const char *Modifier = 0); diff --git a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h index 30505bf..222d229 100644 --- a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h +++ b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h @@ -38,6 +38,8 @@ struct VISIBILITY_HIDDEN X86IntelAsmPrinter : public AsmPrinter { /// machine instruction was sufficiently described to print it, otherwise it /// returns false. void printInstruction(const MachineInstr *MI); + const char *getRegisterName(unsigned RegNo) const; + // This method is used by the tablegen'erated instruction printer. void printOperand(const MachineInstr *MI, unsigned OpNo, diff --git a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp index bdb44ef..5fe9b2b 100644 --- a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp +++ b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp @@ -80,6 +80,8 @@ namespace { void emitFunctionEnd(MachineFunction &MF); void printInstruction(const MachineInstr *MI); // autogenerated. + const char *getRegisterName(unsigned RegNo) const; + void printMachineInstruction(const MachineInstr *MI); bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); |