================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to