Skip to content

Commit c9719ea

Browse files
lenaryquic-seaswara
authored andcommitted
[RISCV] Rename Relocation QC_E_JUMP_PLT to QC_E_CALL_PLT
The semantics and definition of this relocation are unchanged. The new name reflects that instructions with the relocation should be assumed to clobber non-callee-saved registers, as with the R_RISCV_CALL_PLT relocation. The name was changed in v0.2 of the ABI Extensions: https://github.com/quic/riscv-elf-psabi-quic-extensions/releases/tag/v0.2 The corresponding llvm change is llvm/llvm-project#143998 Signed-off-by: Sam Elliott <[email protected]>
1 parent b9d7416 commit c9719ea

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

lib/Target/RISCV/RISCVRelocationInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ RISCVRelocationMap RISCVRelocs = {
615615
/*.VerifyAlignment = */ false,
616616
/*.Signed = */ true,
617617
/*.Size = */ 48}},
618-
{eld::ELF::riscv::internal::R_RISCV_QC_E_JUMP_PLT,
619-
{/*.Name = */ "R_RISCV_QC_E_JUMP_PLT",
620-
/*.Type = */ eld::ELF::riscv::internal::R_RISCV_QC_E_JUMP_PLT,
618+
{eld::ELF::riscv::internal::R_RISCV_QC_E_CALL_PLT,
619+
{/*.Name = */ "R_RISCV_QC_E_CALL_PLT",
620+
/*.Type = */ eld::ELF::riscv::internal::R_RISCV_QC_E_CALL_PLT,
621621
/*EncodingType = */ EncTy_QC_EJ,
622622
/*.Alignment = */ 2,
623623
/*.shift = */ 1,

lib/Target/RISCV/RISCVRelocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ RelocationDescMap RelocDescs = {
144144
INTERNAL_RELOC_DESC_ENTRY(R_RISCV_QC_ABS20_U, applyAbs),
145145
INTERNAL_RELOC_DESC_ENTRY(R_RISCV_QC_E_BRANCH, applyJumpOrCall),
146146
INTERNAL_RELOC_DESC_ENTRY(R_RISCV_QC_E_32, applyAbs),
147-
INTERNAL_RELOC_DESC_ENTRY(R_RISCV_QC_E_JUMP_PLT, applyJumpOrCall),
147+
INTERNAL_RELOC_DESC_ENTRY(R_RISCV_QC_E_CALL_PLT, applyJumpOrCall),
148148
};
149149

150150
#undef INTERNAL_RELOC_DESC_ENTRY
@@ -571,7 +571,7 @@ void RISCVRelocator::scanGlobalReloc(InputFile &pInputFile, Relocation &pReloc,
571571

572572
case llvm::ELF::R_RISCV_CALL:
573573
case llvm::ELF::R_RISCV_CALL_PLT:
574-
case eld::ELF::riscv::internal::R_RISCV_QC_E_JUMP_PLT: {
574+
case eld::ELF::riscv::internal::R_RISCV_QC_E_CALL_PLT: {
575575
std::lock_guard<std::mutex> relocGuard(m_RelocMutex);
576576
if (rsym->reserved() & ReservePLT)
577577
return;

test/RISCV/standalone/Relocs/R_RISCV_QC_E_JUMP_PLT/R_RISCV_QC_E_JUMP_PLT.test renamed to test/RISCV/standalone/Relocs/R_RISCV_QC_E_CALL_PLT/R_RISCV_QC_E_CALL_PLT.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#---R_RISCV_QC_E_JUMP_PLT.test------------------ Executable------------#
1+
#---R_RISCV_QC_E_CALL_PLT.test------------------ Executable------------#
22
#BEGIN_COMMENT
3-
# Check that R_RISCV_QC_E_JUMP_PLT is correctly implemented.
3+
# Check that R_RISCV_QC_E_CALL_PLT is correctly implemented.
44
# It fills in specific bits of `QC.EJ-type` instructions, and
55
# Can reach any 32-bit address.
66
#--------------------------------------------------------------------

0 commit comments

Comments
 (0)