[BOLT][NFC] Delimit bytes in MCAnnotation bitmask

Summary: Show individual bytes in the annotation mask.

Test Plan: ninja llvm-bolt

Reviewers: maksfb

FBD30026393
This commit is contained in:
Amir Ayupov 2021-07-29 17:29:32 -07:00
parent a9cd49d50e
commit 7a403436db

View File

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