Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | enum Fixups { | ||||
// instructions | // instructions | ||||
fixup_riscv_branch, | fixup_riscv_branch, | ||||
// fixup_riscv_rvc_jump - 11-bit fixup for symbol references in the | // fixup_riscv_rvc_jump - 11-bit fixup for symbol references in the | ||||
// compressed jump instruction | // compressed jump instruction | ||||
fixup_riscv_rvc_jump, | fixup_riscv_rvc_jump, | ||||
// fixup_riscv_rvc_branch - 8-bit fixup for symbol references in the | // fixup_riscv_rvc_branch - 8-bit fixup for symbol references in the | ||||
// compressed branch instruction | // compressed branch instruction | ||||
fixup_riscv_rvc_branch, | fixup_riscv_rvc_branch, | ||||
// fixup_riscv_call - A fixup representing a call attached to the auipc | // fixup_riscv_call - A fixup representing a call attached to the auipc | ||||
asb: The description indicates you'd only want to use the call fixup when relaxation is enabled. But… | |||||
// instruction in a pair composed of adjacent auipc+jalr instructions. | // instruction in a pair composed of adjacent auipc+jalr instructions. | ||||
fixup_riscv_call, | fixup_riscv_call, | ||||
Not Done ReplyInline ActionsMaybe something like "Used to generate an R_RISCV_RELAX relocation type, which indicates the linker may relax the instruction pair." asb: Maybe something like "Used to generate an R_RISCV_RELAX relocation type, which indicates the… | |||||
// fixup_riscv_relax - Used to generate an R_RISCV_RELAX relocation type, | |||||
// which indicates the linker may relax the instruction pair. | |||||
fixup_riscv_relax, | |||||
// fixup_riscv_invalid - used as a sentinel and a marker, must be last fixup | // fixup_riscv_invalid - used as a sentinel and a marker, must be last fixup | ||||
fixup_riscv_invalid, | fixup_riscv_invalid, | ||||
NumTargetFixupKinds = fixup_riscv_invalid - FirstTargetFixupKind | NumTargetFixupKinds = fixup_riscv_invalid - FirstTargetFixupKind | ||||
}; | }; | ||||
} // end namespace RISCV | } // end namespace RISCV | ||||
} // end namespace llvm | } // end namespace llvm | ||||
#endif | #endif |
The description indicates you'd only want to use the call fixup when relaxation is enabled. But there's nothing stopping us from using fixup_riscv_call even when linker relaxation is disabled - it reduces the number of relocations for the linker to process.
How about something like the following, which better explains its use "A fixup representing a call attached to the auipc instruction of an adjacent auipc+pair."