From 235318a578b3d7772a60590c7e76791ed6d1a78e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 17 Aug 2012 19:42:11 +0000 Subject: radeon/llvm: Use the MCCodeEmitter for SI --- src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeon/radeon_llvm_emit.cpp') diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index eef55a8e93a..1b67bfea685 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -52,6 +52,7 @@ using namespace llvm; #ifndef EXTERNAL_LLVM extern "C" { +void LLVMInitializeAMDGPUAsmPrinter(void); void LLVMInitializeAMDGPUTargetMC(void); void LLVMInitializeAMDGPUTarget(void); void LLVMInitializeAMDGPUTargetInfo(void); @@ -93,6 +94,7 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, LLVMInitializeAMDGPUTargetInfo(); LLVMInitializeAMDGPUTarget(); LLVMInitializeAMDGPUTargetMC(); + LLVMInitializeAMDGPUAsmPrinter(); #endif std::string err; const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err); @@ -132,7 +134,7 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, formatted_raw_ostream out(oStream); /* Optional extra paramater true / false to disable verify */ - if (AMDGPUTargetMachine.addPassesToEmitFile(PM, out, TargetMachine::CGFT_AssemblyFile, + if (AMDGPUTargetMachine.addPassesToEmitFile(PM, out, TargetMachine::CGFT_ObjectFile, true)){ fprintf(stderr, "AddingPasses failed.\n"); return 1; -- cgit v1.2.3