summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-08-17 15:52:15 +0000
committerTom Stellard <[email protected]>2012-08-23 15:00:48 +0000
commite30b4644b613a130318cdf240ad237b0afbc525a (patch)
tree4f97417b47aa25c8d7d799534cdb656c5a8f8daf /src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h
parente61c54cb6b220dea243568919a001e5dc7c01303 (diff)
radeon/llvm: Add AsmPrinter
Diffstat (limited to 'src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h')
-rw-r--r--src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h b/src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h
new file mode 100644
index 00000000000..62c1a5ee04f
--- /dev/null
+++ b/src/gallium/drivers/radeon/InstPrinter/AMDGPUInstPrinter.h
@@ -0,0 +1,34 @@
+
+#ifndef AMDGPUINSTPRINTER_H
+#define AMDGPUINSTPRINTER_H
+
+#include "llvm/ADT/StringRef.h"
+#include "llvm/MC/MCInstPrinter.h"
+#include "llvm/Support/raw_ostream.h"
+
+namespace llvm {
+
+class AMDGPUInstPrinter : public MCInstPrinter {
+public:
+ AMDGPUInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
+ const MCRegisterInfo &MRI)
+ : MCInstPrinter(MAI, MII, MRI) {}
+
+ //Autogenerated by tblgen
+ void printInstruction(const MCInst *MI, raw_ostream &O);
+ static const char *getRegisterName(unsigned RegNo);
+
+// virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
+ virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot);
+
+private:
+ void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
+// void printUnsignedImm(const MCInst *MI, int OpNo, raw_ostream &O);
+ void printMemOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
+
+
+};
+
+} // End namespace llvm
+
+#endif // AMDGPUINSTRPRINTER_H