[PATCH] D35209: [ARM] Unify handling of M-Class system registers

Oliver Stannard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 05:49:19 PDT 2017


olista01 added inline comments.


================
Comment at: lib/Target/ARM/ARMISelDAGToDAG.cpp:3812
 
-  // If it was a read then we won't be expecting flags and so at this point
-  // we can return the mask.
-  if (IsRead) {
-    if (Flags.empty())
-      return SYSmvalue;
-    else
-      return -1;
-  }
+  enum { MaskSYSm        = 0x00FFF, MaskNeedsV7M = 0x01000,
+         MaskNeedsV8M    = 0x02000, MaskNeedsDSP = 0x04000,
----------------
These masks are duplicated in a few different places, would it be better to have a few functions in the ARM/Utils library to check if a register is valid, extract the encoding bits, etc?


https://reviews.llvm.org/D35209





More information about the llvm-commits mailing list