-
Notifications
You must be signed in to change notification settings - Fork 14.1k
[RISCV] Rename Relocation QC_E_JUMP_PLT to QC_E_CALL_PLT #143998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
@llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-llvm-binary-utilities Author: Sam Elliott (lenary) ChangesThe 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 Full diff: https://github.com/llvm/llvm-project/pull/143998.diff 5 Files Affected:
diff --git a/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV_nonstandard.def b/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV_nonstandard.def
index 7ae3d3f205772..b02462ca89fdd 100644
--- a/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV_nonstandard.def
+++ b/llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV_nonstandard.def
@@ -25,4 +25,4 @@
ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_ABS20_U, 192)
ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_BRANCH, 193)
ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_32, 194)
-ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_JUMP_PLT, 195)
+ELF_RISCV_NONSTANDARD_RELOC(QUALCOMM, R_RISCV_QC_E_CALL_PLT, 195)
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
index 338e5a4772830..2fb8a79ac50ac 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
@@ -86,7 +86,7 @@ MCFixupKindInfo RISCVAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
{"fixup_riscv_qc_e_branch", 0, 48, MCFixupKindInfo::FKF_IsPCRel},
{"fixup_riscv_qc_e_32", 16, 32, 0},
{"fixup_riscv_qc_abs20_u", 12, 20, 0},
- {"fixup_riscv_qc_e_jump_plt", 0, 48, MCFixupKindInfo::FKF_IsPCRel},
+ {"fixup_riscv_qc_e_call_plt", 0, 48, MCFixupKindInfo::FKF_IsPCRel},
};
static_assert((std::size(Infos)) == RISCV::NumTargetFixupKinds,
"Not all fixup kinds added to Infos array");
@@ -553,7 +553,7 @@ static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
Value = (Bit19 << 31) | (Bit14_0 << 16) | (Bit18_15 << 12);
return Value;
}
- case RISCV::fixup_riscv_qc_e_jump_plt: {
+ case RISCV::fixup_riscv_qc_e_call_plt: {
if (!isInt<32>(Value))
Ctx.reportError(Fixup.getLoc(), "fixup value out of range");
if (Value & 0x1)
@@ -648,7 +648,7 @@ void RISCVAsmBackend::maybeAddVendorReloc(const MCFragment &F,
case RISCV::fixup_riscv_qc_e_branch:
case RISCV::fixup_riscv_qc_abs20_u:
case RISCV::fixup_riscv_qc_e_32:
- case RISCV::fixup_riscv_qc_e_jump_plt:
+ case RISCV::fixup_riscv_qc_e_call_plt:
VendorIdentifier = "QUALCOMM";
break;
}
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
index a0bf378f3c767..26636302a5b67 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
@@ -101,8 +101,8 @@ unsigned RISCVELFObjectWriter::getRelocType(const MCFixup &Fixup,
return ELF::R_RISCV_CALL_PLT;
case RISCV::fixup_riscv_qc_e_branch:
return ELF::R_RISCV_QC_E_BRANCH;
- case RISCV::fixup_riscv_qc_e_jump_plt:
- return ELF::R_RISCV_QC_E_JUMP_PLT;
+ case RISCV::fixup_riscv_qc_e_call_plt:
+ return ELF::R_RISCV_QC_E_CALL_PLT;
}
}
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h
index 80fbed8d10f99..8d869a64cde47 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h
@@ -54,7 +54,7 @@ enum Fixups {
// 20-bit fixup for symbol references in the 32-bit qc.li instruction
fixup_riscv_qc_abs20_u,
// 32-bit fixup for symbol references in the 48-bit qc.j/qc.jal instructions
- fixup_riscv_qc_e_jump_plt,
+ fixup_riscv_qc_e_call_plt,
// Used as a sentinel, must be the last
fixup_riscv_invalid,
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
index dd5540038c437..e0a69b705e8e1 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
@@ -645,7 +645,7 @@ uint64_t RISCVMCCodeEmitter::getImmOpValue(const MCInst &MI, unsigned OpNo,
FixupKind = RISCV::fixup_riscv_qc_e_32;
RelaxCandidate = true;
} else if (MIFrm == RISCVII::InstFormatQC_EJ) {
- FixupKind = RISCV::fixup_riscv_qc_e_jump_plt;
+ FixupKind = RISCV::fixup_riscv_qc_e_call_plt;
RelaxCandidate = true;
}
}
|
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 <quic_aelliott@quicinc.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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 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 <quic_aelliott@quicinc.com>
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 <quic_aelliott@quicinc.com>
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 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