[llvm] 90dbd58 - [MC] Remove FK_Data_6b
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 13:51:14 PDT 2023
Author: Fangrui Song
Date: 2023-08-09T13:51:09-07:00
New Revision: 90dbd5860bf650c769e84172e0835901396d81a2
URL: https://github.com/llvm/llvm-project/commit/90dbd5860bf650c769e84172e0835901396d81a2
DIFF: https://github.com/llvm/llvm-project/commit/90dbd5860bf650c769e84172e0835901396d81a2.diff
LOG: [MC] Remove FK_Data_6b
D58335 introduced FK_Data_6b for emitting R_RISCV_SET6/R_RISCV_SUB6 in
.eh_frame/.debug_frame.
This is no longer needed after commit
c8ed138c34ddb22610f18468c1b7938f9e2abae5 removed unneeded fixup kinds
for R_RISCV_{SET,ADD,SUB}* and getKindForSizeInBits.
Added:
Modified:
llvm/include/llvm/MC/MCFixup.h
llvm/lib/MC/MCAsmBackend.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCFixup.h b/llvm/include/llvm/MC/MCFixup.h
index 069ca058310fcc..919a00373ac285 100644
--- a/llvm/include/llvm/MC/MCFixup.h
+++ b/llvm/include/llvm/MC/MCFixup.h
@@ -24,7 +24,6 @@ enum MCFixupKind {
FK_Data_2, ///< A two-byte fixup.
FK_Data_4, ///< A four-byte fixup.
FK_Data_8, ///< A eight-byte fixup.
- FK_Data_6b, ///< A six-bits fixup.
FK_PCRel_1, ///< A one-byte pc relative fixup.
FK_PCRel_2, ///< A two-byte pc relative fixup.
FK_PCRel_4, ///< A four-byte pc relative fixup.
@@ -120,26 +119,6 @@ class MCFixup {
}
}
- /// Return the generic fixup kind for a value with the given size in bits.
- /// It is an error to pass an unsupported size.
- static MCFixupKind getKindForSizeInBits(unsigned Size, bool IsPCRel) {
- switch (Size) {
- default:
- llvm_unreachable("Invalid generic fixup size!");
- case 6:
- assert(!IsPCRel && "Invalid pc-relative fixup size!");
- return FK_Data_6b;
- case 8:
- return IsPCRel ? FK_PCRel_1 : FK_Data_1;
- case 16:
- return IsPCRel ? FK_PCRel_2 : FK_Data_2;
- case 32:
- return IsPCRel ? FK_PCRel_4 : FK_Data_4;
- case 64:
- return IsPCRel ? FK_PCRel_8 : FK_Data_8;
- }
- }
-
SMLoc getLoc() const { return Loc; }
};
diff --git a/llvm/lib/MC/MCAsmBackend.cpp b/llvm/lib/MC/MCAsmBackend.cpp
index 64bbc63719c7f7..c2e89f4dfa5dba 100644
--- a/llvm/lib/MC/MCAsmBackend.cpp
+++ b/llvm/lib/MC/MCAsmBackend.cpp
@@ -88,7 +88,6 @@ const MCFixupKindInfo &MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
{"FK_Data_2", 0, 16, 0},
{"FK_Data_4", 0, 32, 0},
{"FK_Data_8", 0, 64, 0},
- {"FK_Data_6b", 0, 6, 0},
{"FK_PCRel_1", 0, 8, MCFixupKindInfo::FKF_IsPCRel},
{"FK_PCRel_2", 0, 16, MCFixupKindInfo::FKF_IsPCRel},
{"FK_PCRel_4", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
index 1c4f81eb730b76..ca5aeb943c3be7 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
@@ -395,7 +395,6 @@ static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
case FK_Data_2:
case FK_Data_4:
case FK_Data_8:
- case FK_Data_6b:
return Value;
case RISCV::fixup_riscv_lo12_i:
case RISCV::fixup_riscv_pcrel_lo12_i:
More information about the llvm-commits
mailing list