[clang] [llvm] [Hexagon] Allow reservation of caller saved registers via -ffixed-rXX (PR #205733)
Abinaya Saravanan via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 20:58:14 PDT 2026
================
@@ -206,6 +206,8 @@ BitVector HexagonRegisterInfo::getReservedRegs(const MachineFunction &MF)
Reserved.set(Reg);
static const MCPhysReg RRegs[] = {
+ Hexagon::R6, Hexagon::R7, Hexagon::R8, Hexagon::R9, Hexagon::R10,
----------------
quic-asaravan wrote:
What happens when a user reserves R6 in one translation unit and it's linked against code compiled without --fifixed-r6? will the callee not clobber R6? Should we provide a diagnostic or warning when the user reserves a caller-saved register? RISC-V backend has `validateCCReservedRegs()` in
`RISCVISelLowering.cpp` that emits a diagnostic error when a user-reserved
register is used for argument passing
https://github.com/llvm/llvm-project/pull/205733
More information about the llvm-commits
mailing list