diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-04-15 17:51:30 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-04-15 17:51:30 +0000 |
commit | bf1efe642111043eeb7ccaf3da759f4d2d1e4647 (patch) | |
tree | 269831e403fca490d6275de0c5d4fe102dcc3a34 /lib | |
parent | 3a63bf27c54e0975a219f723381494f2be52c7e2 (diff) | |
download | external_llvm-bf1efe642111043eeb7ccaf3da759f4d2d1e4647.zip external_llvm-bf1efe642111043eeb7ccaf3da759f4d2d1e4647.tar.gz external_llvm-bf1efe642111043eeb7ccaf3da759f4d2d1e4647.tar.bz2 |
R600/SI: Emit configuration value in the .AMDGPU.config ELF section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179545 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/R600/AMDGPUAsmPrinter.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/R600/AMDGPUAsmPrinter.cpp b/lib/Target/R600/AMDGPUAsmPrinter.cpp index dacb033..72f98ee 100644 --- a/lib/Target/R600/AMDGPUAsmPrinter.cpp +++ b/lib/Target/R600/AMDGPUAsmPrinter.cpp @@ -21,7 +21,10 @@ #include "AMDGPU.h" #include "SIMachineFunctionInfo.h" #include "SIRegisterInfo.h" +#include "llvm/MC/MCContext.h" +#include "llvm/MC/MCSectionELF.h" #include "llvm/MC/MCStreamer.h" +#include "llvm/Support/ELF.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Target/TargetLoweringObjectFile.h" @@ -50,10 +53,15 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) { if (OutStreamer.hasRawTextSupport()) { OutStreamer.EmitRawText("@" + MF.getName() + ":"); } - OutStreamer.SwitchSection(getObjFileLowering().getTextSection()); if (STM.device()->getGeneration() > AMDGPUDeviceInfo::HD6XXX) { + const MCSectionELF *ConfigSection = getObjFileLowering().getContext() + .getELFSection(".AMDGPU.config", + ELF::SHT_NULL, 0, + SectionKind::getReadOnly()); + OutStreamer.SwitchSection(ConfigSection); EmitProgramInfo(MF); } + OutStreamer.SwitchSection(getObjFileLowering().getTextSection()); EmitFunctionBody(); return false; } |