diff options
author | Alex Bradbury <asb@lowrisc.org> | 2019-04-02 12:47:20 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2019-04-02 12:47:20 +0000 |
commit | f8078f6b1d913cc7db12b2a1e7807db07eb41793 (patch) | |
tree | f0ae007ec38f9e4a55a78ebca90b1e45fb3ef29c /llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | |
parent | 3cee663e71f6d90ed48eeb5e37de70d14b661eab (diff) | |
download | bcm5719-llvm-f8078f6b1d913cc7db12b2a1e7807db07eb41793.tar.gz bcm5719-llvm-f8078f6b1d913cc7db12b2a1e7807db07eb41793.zip |
[RISCV] Support assembling @plt symbol operands
This patch allows symbols appended with @plt to parse and assemble with the
R_RISCV_CALL_PLT relocation.
Differential Revision: https://reviews.llvm.org/D55335
Patch by Lewis Revill.
llvm-svn: 357470
Diffstat (limited to 'llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp')
-rw-r--r-- | llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp index 883ec4d9b7c..692398ea955 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp @@ -242,6 +242,10 @@ unsigned RISCVMCCodeEmitter::getImmOpValue(const MCInst &MI, unsigned OpNo, FixupKind = RISCV::fixup_riscv_call; RelaxCandidate = true; break; + case RISCVMCExpr::VK_RISCV_CALL_PLT: + FixupKind = RISCV::fixup_riscv_call_plt; + RelaxCandidate = true; + break; } } else if (Kind == MCExpr::SymbolRef && cast<MCSymbolRefExpr>(Expr)->getKind() == MCSymbolRefExpr::VK_None) { |