summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/MCTargetDesc
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/MCTargetDesc
parente61c54cb6b220dea243568919a001e5dc7c01303 (diff)
radeon/llvm: Add AsmPrinter
Diffstat (limited to 'src/gallium/drivers/radeon/MCTargetDesc')
-rw-r--r--src/gallium/drivers/radeon/MCTargetDesc/AMDILMCTargetDesc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/MCTargetDesc/AMDILMCTargetDesc.cpp b/src/gallium/drivers/radeon/MCTargetDesc/AMDILMCTargetDesc.cpp
index fd35e9e17d9..24cfb1f5355 100644
--- a/src/gallium/drivers/radeon/MCTargetDesc/AMDILMCTargetDesc.cpp
+++ b/src/gallium/drivers/radeon/MCTargetDesc/AMDILMCTargetDesc.cpp
@@ -1,5 +1,6 @@
#include "AMDILMCTargetDesc.h"
#include "AMDILMCAsmInfo.h"
+#include "InstPrinter/AMDGPUInstPrinter.h"
#include "llvm/MC/MachineLocation.h"
#include "llvm/MC/MCCodeGenInfo.h"
#include "llvm/MC/MCInstrInfo.h"
@@ -46,6 +47,15 @@ static MCCodeGenInfo *createAMDGPUMCCodeGenInfo(StringRef TT, Reloc::Model RM,
return X;
}
+static MCInstPrinter *createAMDGPUMCInstPrinter(const Target &T,
+ unsigned SyntaxVariant,
+ const MCAsmInfo &MAI,
+ const MCInstrInfo &MII,
+ const MCRegisterInfo &MRI,
+ const MCSubtargetInfo &STI) {
+ return new AMDGPUInstPrinter(MAI, MII, MRI);
+}
+
extern "C" void LLVMInitializeAMDGPUTargetMC() {
RegisterMCAsmInfo<AMDILMCAsmInfo> Y(TheAMDGPUTarget);
@@ -58,4 +68,5 @@ extern "C" void LLVMInitializeAMDGPUTargetMC() {
TargetRegistry::RegisterMCSubtargetInfo(TheAMDGPUTarget, createAMDGPUMCSubtargetInfo);
+ TargetRegistry::RegisterMCInstPrinter(TheAMDGPUTarget, createAMDGPUMCInstPrinter);
}