[BOLT][NFC] Delimit bytes in MCAnnotation bitmask
authorAmir Ayupov <aaupov@fb.com>
Fri, 30 Jul 2021 00:29:32 +0000 (17:29 -0700)
committerAmir Ayupov <aaupov@fb.com>
Tue, 18 Jan 2022 21:25:45 +0000 (13:25 -0800)
Summary: Show individual bytes in the annotation mask.

Test Plan: ninja llvm-bolt

Reviewers: maksfb

FBD30026393

bolt/include/bolt/Core/MCPlusBuilder.h

index 8a4497b..f527860 100644 (file)
@@ -78,7 +78,7 @@ private:
     assert(Index < 256 && "annotation index max value exceeded");
     assert((Value == (Value << 8) >> 8) && "annotation value out of range");
 
-    Value &= 0xffffffffffffff;
+    Value &= 0xff'ffff'ffff'ffff;
     Value |= (int64_t)Index << 56;
 
     return Value;
@@ -91,7 +91,7 @@ private:
 
   /// Extract annotation value from immediate operand value.
   static int64_t extractAnnotationValue(int64_t ImmValue) {
-    ImmValue &= 0xffffffffffffff;
+    ImmValue &= 0xff'ffff'ffff'ffff;
     return (ImmValue << 8) >> 8;
   }