[clang] [llvm] [Hexagon] Fix unusable SCS reg, make it selectable (PR #213820)
Santanu Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 09:54:42 PDT 2026
================
@@ -163,6 +163,38 @@ static std::string describeSanitizeArg(const llvm::opt::Arg *A,
/// Sanitizers set.
static std::string toString(const clang::SanitizerSet &Sanitizers);
+/// Map a Hexagon callee-saved register number (16-27) to its -ffixed-rN
+/// option, used to check that the shadow call stack pointer is reserved.
+static options::ID getHexagonFixedRegOption(unsigned RegNo) {
----------------
quic-santdas wrote:
Since the registers are contiguous, we can probably have a range check like this:
if (RegNo >= 16 && RegNo <= 27)
return options::OPT_ffixed_r16 + (RegNo - 16));
https://github.com/llvm/llvm-project/pull/213820
More information about the llvm-commits
mailing list