#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"
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;
}
; RUN: llc < %s -march=r600 -mcpu=SI -filetype=obj | llvm-readobj -s - | FileCheck %s
; CHECK: Format: ELF32
+; CHECK: Name: .AMDGPU.config
define void @test(i32 %p) {
%i = add i32 %p, 2
%r = bitcast i32 %i to float