[PATCH] Replace uint64_t representation of Features with FeatureBitset (std::bitset) in a few more places

Michael Kuperstein michael.m.kuperstein at intel.com
Sun Jun 28 01:38:54 PDT 2015


Ok, this looks right - with a couple of new nits. :-)


================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:9919
@@ -9918,3 +9918,3 @@
   const ARM::ArchExtKind Kind;
-  const unsigned ArchCheck;
+  const FeatureBitset  ArchCheck;
   const FeatureBitset Features;
----------------
Extra space here?

================
Comment at: lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp:804
@@ -801,4 +803,3 @@
     std::string Msg = "instruction requires:";
-    uint64_t Mask = 1;
-    for (unsigned I = 0; I < sizeof(ErrorInfo) * 8 - 1; ++I) {
-      if (ErrorInfo & Mask) {
+    for (unsigned I = 0; I < ErrorMissingFeature.size()-1; ++I) {
+      if (ErrorMissingFeature[I]) {
----------------
Are you sure about the "-1"?
(Then again, I don't understand why the original -1 was there either...)

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2549
@@ -2544,6 +2548,3 @@
   OS << "instruction requires:";
-  uint64_t Mask = 1;
-  for (unsigned i = 0; i < (sizeof(ErrorInfo)*8-1); ++i) {
-    if (ErrorInfo & Mask)
-      OS << ' ' << getSubtargetFeatureName(ErrorInfo & Mask);
-    Mask <<= 1;
+  for (unsigned i = 0; i < MissingFeature.size()-1; ++i) {
+    if (MissingFeature[i])
----------------
Same as above re -1.

http://reviews.llvm.org/D10542

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list