aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-06-10 19:26:38 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-06-10 19:26:38 +0000
commitf3af841462ad6dfc6c2fee5a441400b4bded931c (patch)
tree35d23a6d90d93d0b4eacf8d2904b8978f0f8a440 /llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
parentcbd68ecf04ddba1bc2a1c75ca8fa55b6f472f6ee (diff)
downloadllvm-f3af841462ad6dfc6c2fee5a441400b4bded931c.zip
llvm-f3af841462ad6dfc6c2fee5a441400b4bded931c.tar.gz
llvm-f3af841462ad6dfc6c2fee5a441400b4bded931c.tar.bz2
AMDGPU/SI: Don't use fixup_si_rodata for scratch rsrc relocations
Summary: We need to set the fixup type to FK_Data_4 for the SCRATCH_RSRC_DWORD[01] symbols, since these require absolute relocations, and fixup_si_rodata is for relative relocations. Reviewers: arsenm, kzhuravl Subscribers: arsenm, kzhuravl, llvm-commits Differential Revision: http://reviews.llvm.org/D21153 llvm-svn: 272417
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
index 929cf87..51114b3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
@@ -75,6 +75,7 @@ void AMDGPUMCInstLower::lower(const MachineInstr *MI, MCInst &OutMI) const {
}
case MachineOperand::MO_ExternalSymbol: {
MCSymbol *Sym = Ctx.getOrCreateSymbol(StringRef(MO.getSymbolName()));
+ Sym->setExternal(true);
const MCSymbolRefExpr *Expr = MCSymbolRefExpr::create(Sym, Ctx);
MCOp = MCOperand::createExpr(Expr);
break;