[PATCH] D71129: [ARM][CMSE] Implement CMSE attributes

Momchil Velikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 1 15:12:25 PDT 2020


chill marked 3 inline comments as done.
chill added inline comments.


================
Comment at: clang/include/clang/AST/Type.h:3588
+                      NoCallerSavedRegsMask | NoCfCheckMask | CmseNSCallMask),
       RegParmOffset = 8
     }; // Assumed to be the last field
----------------
snidertm wrote:
> Shouldn't RegParmOffset be updated to 9, I believe it is used to shift the regParm value so that it encoded in the bits above CmseNSCallMask
Hmm, I think 8 is OK, but we should mask it ...


================
Comment at: clang/include/clang/AST/Type.h:3622
     bool getNoCfCheck() const { return Bits & NoCfCheckMask; }
     bool getHasRegParm() const { return (Bits >> RegParmOffset) != 0; }
 
----------------
... here.

   bool getHasRegParm() const { return ((Bits & RegParmMask) >> RegParmOffset) != 0;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71129/new/

https://reviews.llvm.org/D71129





More information about the cfe-commits mailing list