/src/capstonev5/MathExtras.h
| Line | Count | Source (jump to first uncovered line) | 
| 1 |  | //===-- llvm/Support/MathExtras.h - Useful math functions -------*- C++ -*-===// | 
| 2 |  | // | 
| 3 |  | //                     The LLVM Compiler Infrastructure | 
| 4 |  | // | 
| 5 |  | // This file is distributed under the University of Illinois Open Source | 
| 6 |  | // License. See LICENSE.TXT for details. | 
| 7 |  | // | 
| 8 |  | //===----------------------------------------------------------------------===// | 
| 9 |  | // | 
| 10 |  | // This file contains some functions that are useful for math stuff. | 
| 11 |  | // | 
| 12 |  | //===----------------------------------------------------------------------===// | 
| 13 |  |  | 
| 14 |  | /* Capstone Disassembly Engine */ | 
| 15 |  | /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */ | 
| 16 |  |  | 
| 17 |  | #ifndef CS_LLVM_SUPPORT_MATHEXTRAS_H | 
| 18 |  | #define CS_LLVM_SUPPORT_MATHEXTRAS_H | 
| 19 |  |  | 
| 20 |  | #if defined(_WIN32_WCE) && (_WIN32_WCE < 0x800) | 
| 21 |  | #include "windowsce/intrin.h" | 
| 22 |  | #elif defined(_MSC_VER) | 
| 23 |  | #include <intrin.h> | 
| 24 |  | #endif | 
| 25 |  |  | 
| 26 |  | #ifndef __cplusplus | 
| 27 |  | #if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64) | 
| 28 |  | #define inline /* inline */ | 
| 29 |  | #endif | 
| 30 |  | #endif | 
| 31 |  |  | 
| 32 |  | // NOTE: The following support functions use the _32/_64 extensions instead of | 
| 33 |  | // type overloading so that signed and unsigned integers can be used without | 
| 34 |  | // ambiguity. | 
| 35 |  |  | 
| 36 |  | /// Hi_32 - This function returns the high 32 bits of a 64 bit value. | 
| 37 | 0 | static inline uint32_t Hi_32(uint64_t Value) { | 
| 38 | 0 |   return (uint32_t)(Value >> 32); | 
| 39 | 0 | } Unexecuted instantiation: ARMDisassembler.c:Hi_32Unexecuted instantiation: ARMInstPrinter.c:Hi_32Unexecuted instantiation: AArch64Disassembler.c:Hi_32Unexecuted instantiation: AArch64InstPrinter.c:Hi_32Unexecuted instantiation: MipsDisassembler.c:Hi_32Unexecuted instantiation: PPCDisassembler.c:Hi_32Unexecuted instantiation: PPCInstPrinter.c:Hi_32Unexecuted instantiation: SparcDisassembler.c:Hi_32Unexecuted instantiation: SparcInstPrinter.c:Hi_32Unexecuted instantiation: SystemZDisassembler.c:Hi_32Unexecuted instantiation: SystemZInstPrinter.c:Hi_32Unexecuted instantiation: XCoreDisassembler.c:Hi_32Unexecuted instantiation: XCoreInstPrinter.c:Hi_32Unexecuted instantiation: TMS320C64xDisassembler.c:Hi_32Unexecuted instantiation: TMS320C64xInstPrinter.c:Hi_32Unexecuted instantiation: RISCVDisassembler.c:Hi_32Unexecuted instantiation: TriCoreDisassembler.c:Hi_32Unexecuted instantiation: TriCoreInstPrinter.c:Hi_32 | 
| 40 |  |  | 
| 41 |  | /// Lo_32 - This function returns the low 32 bits of a 64 bit value. | 
| 42 | 0 | static inline uint32_t Lo_32(uint64_t Value) { | 
| 43 | 0 |   return (uint32_t)(Value); | 
| 44 | 0 | } Unexecuted instantiation: ARMDisassembler.c:Lo_32Unexecuted instantiation: ARMInstPrinter.c:Lo_32Unexecuted instantiation: AArch64Disassembler.c:Lo_32Unexecuted instantiation: AArch64InstPrinter.c:Lo_32Unexecuted instantiation: MipsDisassembler.c:Lo_32Unexecuted instantiation: PPCDisassembler.c:Lo_32Unexecuted instantiation: PPCInstPrinter.c:Lo_32Unexecuted instantiation: SparcDisassembler.c:Lo_32Unexecuted instantiation: SparcInstPrinter.c:Lo_32Unexecuted instantiation: SystemZDisassembler.c:Lo_32Unexecuted instantiation: SystemZInstPrinter.c:Lo_32Unexecuted instantiation: XCoreDisassembler.c:Lo_32Unexecuted instantiation: XCoreInstPrinter.c:Lo_32Unexecuted instantiation: TMS320C64xDisassembler.c:Lo_32Unexecuted instantiation: TMS320C64xInstPrinter.c:Lo_32Unexecuted instantiation: RISCVDisassembler.c:Lo_32Unexecuted instantiation: TriCoreDisassembler.c:Lo_32Unexecuted instantiation: TriCoreInstPrinter.c:Lo_32 | 
| 45 |  |  | 
| 46 |  | /// isUIntN - Checks if an unsigned integer fits into the given (dynamic) | 
| 47 |  | /// bit width. | 
| 48 | 0 | static inline bool isUIntN(unsigned N, uint64_t x) { | 
| 49 | 0 |   return x == (x & (~0ULL >> (64 - N))); | 
| 50 | 0 | } Unexecuted instantiation: ARMDisassembler.c:isUIntNUnexecuted instantiation: ARMInstPrinter.c:isUIntNUnexecuted instantiation: AArch64Disassembler.c:isUIntNUnexecuted instantiation: AArch64InstPrinter.c:isUIntNUnexecuted instantiation: MipsDisassembler.c:isUIntNUnexecuted instantiation: PPCDisassembler.c:isUIntNUnexecuted instantiation: PPCInstPrinter.c:isUIntNUnexecuted instantiation: SparcDisassembler.c:isUIntNUnexecuted instantiation: SparcInstPrinter.c:isUIntNUnexecuted instantiation: SystemZDisassembler.c:isUIntNUnexecuted instantiation: SystemZInstPrinter.c:isUIntNUnexecuted instantiation: XCoreDisassembler.c:isUIntNUnexecuted instantiation: XCoreInstPrinter.c:isUIntNUnexecuted instantiation: TMS320C64xDisassembler.c:isUIntNUnexecuted instantiation: TMS320C64xInstPrinter.c:isUIntNUnexecuted instantiation: RISCVDisassembler.c:isUIntNUnexecuted instantiation: TriCoreDisassembler.c:isUIntNUnexecuted instantiation: TriCoreInstPrinter.c:isUIntN | 
| 51 |  |  | 
| 52 |  | /// isIntN - Checks if an signed integer fits into the given (dynamic) | 
| 53 |  | /// bit width. | 
| 54 |  | //static inline bool isIntN(unsigned N, int64_t x) { | 
| 55 |  | //  return N >= 64 || (-(INT64_C(1)<<(N-1)) <= x && x < (INT64_C(1)<<(N-1))); | 
| 56 |  | //} | 
| 57 |  |  | 
| 58 |  | /// isMask_32 - This function returns true if the argument is a sequence of ones | 
| 59 |  | /// starting at the least significant bit with the remainder zero (32 bit | 
| 60 |  | /// version).   Ex. isMask_32(0x0000FFFFU) == true. | 
| 61 | 0 | static inline bool isMask_32(uint32_t Value) { | 
| 62 | 0 |   return Value && ((Value + 1) & Value) == 0; | 
| 63 | 0 | } Unexecuted instantiation: ARMDisassembler.c:isMask_32Unexecuted instantiation: ARMInstPrinter.c:isMask_32Unexecuted instantiation: AArch64Disassembler.c:isMask_32Unexecuted instantiation: AArch64InstPrinter.c:isMask_32Unexecuted instantiation: MipsDisassembler.c:isMask_32Unexecuted instantiation: PPCDisassembler.c:isMask_32Unexecuted instantiation: PPCInstPrinter.c:isMask_32Unexecuted instantiation: SparcDisassembler.c:isMask_32Unexecuted instantiation: SparcInstPrinter.c:isMask_32Unexecuted instantiation: SystemZDisassembler.c:isMask_32Unexecuted instantiation: SystemZInstPrinter.c:isMask_32Unexecuted instantiation: XCoreDisassembler.c:isMask_32Unexecuted instantiation: XCoreInstPrinter.c:isMask_32Unexecuted instantiation: TMS320C64xDisassembler.c:isMask_32Unexecuted instantiation: TMS320C64xInstPrinter.c:isMask_32Unexecuted instantiation: RISCVDisassembler.c:isMask_32Unexecuted instantiation: TriCoreDisassembler.c:isMask_32Unexecuted instantiation: TriCoreInstPrinter.c:isMask_32 | 
| 64 |  |  | 
| 65 |  | /// isMask_64 - This function returns true if the argument is a sequence of ones | 
| 66 |  | /// starting at the least significant bit with the remainder zero (64 bit | 
| 67 |  | /// version). | 
| 68 | 1.05k | static inline bool isMask_64(uint64_t Value) { | 
| 69 | 1.05k |   return Value && ((Value + 1) & Value) == 0; | 
| 70 | 1.05k | } Unexecuted instantiation: ARMDisassembler.c:isMask_64Unexecuted instantiation: ARMInstPrinter.c:isMask_64Unexecuted instantiation: AArch64Disassembler.c:isMask_64AArch64InstPrinter.c:isMask_64| Line | Count | Source |  | 68 | 1.05k | static inline bool isMask_64(uint64_t Value) { |  | 69 | 1.05k |   return Value && ((Value + 1) & Value) == 0; |  | 70 | 1.05k | } | 
Unexecuted instantiation: MipsDisassembler.c:isMask_64Unexecuted instantiation: PPCDisassembler.c:isMask_64Unexecuted instantiation: PPCInstPrinter.c:isMask_64Unexecuted instantiation: SparcDisassembler.c:isMask_64Unexecuted instantiation: SparcInstPrinter.c:isMask_64Unexecuted instantiation: SystemZDisassembler.c:isMask_64Unexecuted instantiation: SystemZInstPrinter.c:isMask_64Unexecuted instantiation: XCoreDisassembler.c:isMask_64Unexecuted instantiation: XCoreInstPrinter.c:isMask_64Unexecuted instantiation: TMS320C64xDisassembler.c:isMask_64Unexecuted instantiation: TMS320C64xInstPrinter.c:isMask_64Unexecuted instantiation: RISCVDisassembler.c:isMask_64Unexecuted instantiation: TriCoreDisassembler.c:isMask_64Unexecuted instantiation: TriCoreInstPrinter.c:isMask_64 | 
| 71 |  |  | 
| 72 |  | /// isShiftedMask_32 - This function returns true if the argument contains a | 
| 73 |  | /// sequence of ones with the remainder zero (32 bit version.) | 
| 74 |  | /// Ex. isShiftedMask_32(0x0000FF00U) == true. | 
| 75 | 0 | static inline bool isShiftedMask_32(uint32_t Value) { | 
| 76 | 0 |   return isMask_32((Value - 1) | Value); | 
| 77 | 0 | } Unexecuted instantiation: ARMDisassembler.c:isShiftedMask_32Unexecuted instantiation: ARMInstPrinter.c:isShiftedMask_32Unexecuted instantiation: AArch64Disassembler.c:isShiftedMask_32Unexecuted instantiation: AArch64InstPrinter.c:isShiftedMask_32Unexecuted instantiation: MipsDisassembler.c:isShiftedMask_32Unexecuted instantiation: PPCDisassembler.c:isShiftedMask_32Unexecuted instantiation: PPCInstPrinter.c:isShiftedMask_32Unexecuted instantiation: SparcDisassembler.c:isShiftedMask_32Unexecuted instantiation: SparcInstPrinter.c:isShiftedMask_32Unexecuted instantiation: SystemZDisassembler.c:isShiftedMask_32Unexecuted instantiation: SystemZInstPrinter.c:isShiftedMask_32Unexecuted instantiation: XCoreDisassembler.c:isShiftedMask_32Unexecuted instantiation: XCoreInstPrinter.c:isShiftedMask_32Unexecuted instantiation: TMS320C64xDisassembler.c:isShiftedMask_32Unexecuted instantiation: TMS320C64xInstPrinter.c:isShiftedMask_32Unexecuted instantiation: RISCVDisassembler.c:isShiftedMask_32Unexecuted instantiation: TriCoreDisassembler.c:isShiftedMask_32Unexecuted instantiation: TriCoreInstPrinter.c:isShiftedMask_32 | 
| 78 |  |  | 
| 79 |  | /// isShiftedMask_64 - This function returns true if the argument contains a | 
| 80 |  | /// sequence of ones with the remainder zero (64 bit version.) | 
| 81 | 1.05k | static inline bool isShiftedMask_64(uint64_t Value) { | 
| 82 | 1.05k |   return isMask_64((Value - 1) | Value); | 
| 83 | 1.05k | } Unexecuted instantiation: ARMDisassembler.c:isShiftedMask_64Unexecuted instantiation: ARMInstPrinter.c:isShiftedMask_64Unexecuted instantiation: AArch64Disassembler.c:isShiftedMask_64AArch64InstPrinter.c:isShiftedMask_64| Line | Count | Source |  | 81 | 1.05k | static inline bool isShiftedMask_64(uint64_t Value) { |  | 82 | 1.05k |   return isMask_64((Value - 1) | Value); |  | 83 | 1.05k | } | 
Unexecuted instantiation: MipsDisassembler.c:isShiftedMask_64Unexecuted instantiation: PPCDisassembler.c:isShiftedMask_64Unexecuted instantiation: PPCInstPrinter.c:isShiftedMask_64Unexecuted instantiation: SparcDisassembler.c:isShiftedMask_64Unexecuted instantiation: SparcInstPrinter.c:isShiftedMask_64Unexecuted instantiation: SystemZDisassembler.c:isShiftedMask_64Unexecuted instantiation: SystemZInstPrinter.c:isShiftedMask_64Unexecuted instantiation: XCoreDisassembler.c:isShiftedMask_64Unexecuted instantiation: XCoreInstPrinter.c:isShiftedMask_64Unexecuted instantiation: TMS320C64xDisassembler.c:isShiftedMask_64Unexecuted instantiation: TMS320C64xInstPrinter.c:isShiftedMask_64Unexecuted instantiation: RISCVDisassembler.c:isShiftedMask_64Unexecuted instantiation: TriCoreDisassembler.c:isShiftedMask_64Unexecuted instantiation: TriCoreInstPrinter.c:isShiftedMask_64 | 
| 84 |  |  | 
| 85 |  | /// isPowerOf2_32 - This function returns true if the argument is a power of | 
| 86 |  | /// two > 0. Ex. isPowerOf2_32(0x00100000U) == true (32 bit edition.) | 
| 87 | 0 | static inline bool isPowerOf2_32(uint32_t Value) { | 
| 88 | 0 |   return Value && !(Value & (Value - 1)); | 
| 89 | 0 | } Unexecuted instantiation: ARMDisassembler.c:isPowerOf2_32Unexecuted instantiation: ARMInstPrinter.c:isPowerOf2_32Unexecuted instantiation: AArch64Disassembler.c:isPowerOf2_32Unexecuted instantiation: AArch64InstPrinter.c:isPowerOf2_32Unexecuted instantiation: MipsDisassembler.c:isPowerOf2_32Unexecuted instantiation: PPCDisassembler.c:isPowerOf2_32Unexecuted instantiation: PPCInstPrinter.c:isPowerOf2_32Unexecuted instantiation: SparcDisassembler.c:isPowerOf2_32Unexecuted instantiation: SparcInstPrinter.c:isPowerOf2_32Unexecuted instantiation: SystemZDisassembler.c:isPowerOf2_32Unexecuted instantiation: SystemZInstPrinter.c:isPowerOf2_32Unexecuted instantiation: XCoreDisassembler.c:isPowerOf2_32Unexecuted instantiation: XCoreInstPrinter.c:isPowerOf2_32Unexecuted instantiation: TMS320C64xDisassembler.c:isPowerOf2_32Unexecuted instantiation: TMS320C64xInstPrinter.c:isPowerOf2_32Unexecuted instantiation: RISCVDisassembler.c:isPowerOf2_32Unexecuted instantiation: TriCoreDisassembler.c:isPowerOf2_32Unexecuted instantiation: TriCoreInstPrinter.c:isPowerOf2_32 | 
| 90 |  |  | 
| 91 |  | /// CountLeadingZeros_32 - this function performs the platform optimal form of | 
| 92 |  | /// counting the number of zeros from the most significant bit to the first one | 
| 93 |  | /// bit.  Ex. CountLeadingZeros_32(0x00F000FF) == 8. | 
| 94 |  | /// Returns 32 if the word is zero. | 
| 95 | 22.5k | static inline unsigned CountLeadingZeros_32(uint32_t Value) { | 
| 96 | 22.5k |   unsigned Count; // result | 
| 97 | 22.5k | #if __GNUC__ >= 4 | 
| 98 |  |   // PowerPC is defined for __builtin_clz(0) | 
| 99 | 22.5k | #if !defined(__ppc__) && !defined(__ppc64__) | 
| 100 | 22.5k |   if (!Value) return 32; | 
| 101 | 22.4k | #endif | 
| 102 | 22.4k |   Count = __builtin_clz(Value); | 
| 103 |  | #else | 
| 104 |  |   unsigned Shift; | 
| 105 |  |   if (!Value) return 32; | 
| 106 |  |   Count = 0; | 
| 107 |  |   // bisection method for count leading zeros | 
| 108 |  |   for (Shift = 32 >> 1; Shift; Shift >>= 1) { | 
| 109 |  |     uint32_t Tmp = Value >> Shift; | 
| 110 |  |     if (Tmp) { | 
| 111 |  |       Value = Tmp; | 
| 112 |  |     } else { | 
| 113 |  |       Count |= Shift; | 
| 114 |  |     } | 
| 115 |  |   } | 
| 116 |  | #endif | 
| 117 | 22.4k |   return Count; | 
| 118 | 22.5k | } Unexecuted instantiation: ARMDisassembler.c:CountLeadingZeros_32ARMInstPrinter.c:CountLeadingZeros_32| Line | Count | Source |  | 95 | 523 | static inline unsigned CountLeadingZeros_32(uint32_t Value) { |  | 96 | 523 |   unsigned Count; // result |  | 97 | 523 | #if __GNUC__ >= 4 |  | 98 |  |   // PowerPC is defined for __builtin_clz(0) |  | 99 | 523 | #if !defined(__ppc__) && !defined(__ppc64__) |  | 100 | 523 |   if (!Value) return 32; |  | 101 | 523 | #endif |  | 102 | 523 |   Count = __builtin_clz(Value); |  | 103 |  | #else |  | 104 |  |   unsigned Shift; |  | 105 |  |   if (!Value) return 32; |  | 106 |  |   Count = 0; |  | 107 |  |   // bisection method for count leading zeros |  | 108 |  |   for (Shift = 32 >> 1; Shift; Shift >>= 1) { |  | 109 |  |     uint32_t Tmp = Value >> Shift; |  | 110 |  |     if (Tmp) { |  | 111 |  |       Value = Tmp; |  | 112 |  |     } else { |  | 113 |  |       Count |= Shift; |  | 114 |  |     } |  | 115 |  |   } |  | 116 |  | #endif |  | 117 | 523 |   return Count; |  | 118 | 523 | } | 
AArch64Disassembler.c:CountLeadingZeros_32| Line | Count | Source |  | 95 | 3.11k | static inline unsigned CountLeadingZeros_32(uint32_t Value) { |  | 96 | 3.11k |   unsigned Count; // result |  | 97 | 3.11k | #if __GNUC__ >= 4 |  | 98 |  |   // PowerPC is defined for __builtin_clz(0) |  | 99 | 3.11k | #if !defined(__ppc__) && !defined(__ppc64__) |  | 100 | 3.11k |   if (!Value) return 32; |  | 101 | 3.11k | #endif |  | 102 | 3.11k |   Count = __builtin_clz(Value); |  | 103 |  | #else |  | 104 |  |   unsigned Shift; |  | 105 |  |   if (!Value) return 32; |  | 106 |  |   Count = 0; |  | 107 |  |   // bisection method for count leading zeros |  | 108 |  |   for (Shift = 32 >> 1; Shift; Shift >>= 1) { |  | 109 |  |     uint32_t Tmp = Value >> Shift; |  | 110 |  |     if (Tmp) { |  | 111 |  |       Value = Tmp; |  | 112 |  |     } else { |  | 113 |  |       Count |= Shift; |  | 114 |  |     } |  | 115 |  |   } |  | 116 |  | #endif |  | 117 | 3.11k |   return Count; |  | 118 | 3.11k | } | 
AArch64InstPrinter.c:CountLeadingZeros_32| Line | Count | Source |  | 95 | 18.8k | static inline unsigned CountLeadingZeros_32(uint32_t Value) { |  | 96 | 18.8k |   unsigned Count; // result |  | 97 | 18.8k | #if __GNUC__ >= 4 |  | 98 |  |   // PowerPC is defined for __builtin_clz(0) |  | 99 | 18.8k | #if !defined(__ppc__) && !defined(__ppc64__) |  | 100 | 18.8k |   if (!Value) return 32; |  | 101 | 18.8k | #endif |  | 102 | 18.8k |   Count = __builtin_clz(Value); |  | 103 |  | #else |  | 104 |  |   unsigned Shift; |  | 105 |  |   if (!Value) return 32; |  | 106 |  |   Count = 0; |  | 107 |  |   // bisection method for count leading zeros |  | 108 |  |   for (Shift = 32 >> 1; Shift; Shift >>= 1) { |  | 109 |  |     uint32_t Tmp = Value >> Shift; |  | 110 |  |     if (Tmp) { |  | 111 |  |       Value = Tmp; |  | 112 |  |     } else { |  | 113 |  |       Count |= Shift; |  | 114 |  |     } |  | 115 |  |   } |  | 116 |  | #endif |  | 117 | 18.8k |   return Count; |  | 118 | 18.8k | } | 
Unexecuted instantiation: MipsDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: PPCDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: PPCInstPrinter.c:CountLeadingZeros_32Unexecuted instantiation: SparcDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: SparcInstPrinter.c:CountLeadingZeros_32Unexecuted instantiation: SystemZDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: SystemZInstPrinter.c:CountLeadingZeros_32Unexecuted instantiation: XCoreDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: XCoreInstPrinter.c:CountLeadingZeros_32Unexecuted instantiation: TMS320C64xDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: TMS320C64xInstPrinter.c:CountLeadingZeros_32Unexecuted instantiation: RISCVDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: TriCoreDisassembler.c:CountLeadingZeros_32Unexecuted instantiation: TriCoreInstPrinter.c:CountLeadingZeros_32 | 
| 119 |  |  | 
| 120 |  | /// CountLeadingOnes_32 - this function performs the operation of | 
| 121 |  | /// counting the number of ones from the most significant bit to the first zero | 
| 122 |  | /// bit.  Ex. CountLeadingOnes_32(0xFF0FFF00) == 8. | 
| 123 |  | /// Returns 32 if the word is all ones. | 
| 124 | 472 | static inline unsigned CountLeadingOnes_32(uint32_t Value) { | 
| 125 | 472 |   return CountLeadingZeros_32(~Value); | 
| 126 | 472 | } Unexecuted instantiation: ARMDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: ARMInstPrinter.c:CountLeadingOnes_32Unexecuted instantiation: AArch64Disassembler.c:CountLeadingOnes_32AArch64InstPrinter.c:CountLeadingOnes_32| Line | Count | Source |  | 124 | 472 | static inline unsigned CountLeadingOnes_32(uint32_t Value) { |  | 125 | 472 |   return CountLeadingZeros_32(~Value); |  | 126 | 472 | } | 
Unexecuted instantiation: MipsDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: PPCDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: PPCInstPrinter.c:CountLeadingOnes_32Unexecuted instantiation: SparcDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: SparcInstPrinter.c:CountLeadingOnes_32Unexecuted instantiation: SystemZDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: SystemZInstPrinter.c:CountLeadingOnes_32Unexecuted instantiation: XCoreDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: XCoreInstPrinter.c:CountLeadingOnes_32Unexecuted instantiation: TMS320C64xDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: TMS320C64xInstPrinter.c:CountLeadingOnes_32Unexecuted instantiation: RISCVDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: TriCoreDisassembler.c:CountLeadingOnes_32Unexecuted instantiation: TriCoreInstPrinter.c:CountLeadingOnes_32 | 
| 127 |  |  | 
| 128 |  | /// CountLeadingZeros_64 - This function performs the platform optimal form | 
| 129 |  | /// of counting the number of zeros from the most significant bit to the first | 
| 130 |  | /// one bit (64 bit edition.) | 
| 131 |  | /// Returns 64 if the word is zero. | 
| 132 | 0 | static inline unsigned CountLeadingZeros_64(uint64_t Value) { | 
| 133 | 0 |   unsigned Count; // result | 
| 134 | 0 | #if __GNUC__ >= 4 | 
| 135 | 0 |   // PowerPC is defined for __builtin_clzll(0) | 
| 136 | 0 | #if !defined(__ppc__) && !defined(__ppc64__) | 
| 137 | 0 |   if (!Value) return 64; | 
| 138 | 0 | #endif | 
| 139 | 0 |   Count = __builtin_clzll(Value); | 
| 140 | 0 | #else | 
| 141 | 0 | #ifndef _MSC_VER | 
| 142 | 0 |   unsigned Shift; | 
| 143 | 0 |   if (sizeof(long) == sizeof(int64_t)) | 
| 144 | 0 |   { | 
| 145 | 0 |     if (!Value) return 64; | 
| 146 | 0 |     Count = 0; | 
| 147 | 0 |     // bisection method for count leading zeros | 
| 148 | 0 |     for (Shift = 64 >> 1; Shift; Shift >>= 1) { | 
| 149 | 0 |       uint64_t Tmp = Value >> Shift; | 
| 150 | 0 |       if (Tmp) { | 
| 151 | 0 |         Value = Tmp; | 
| 152 | 0 |       } else { | 
| 153 | 0 |         Count |= Shift; | 
| 154 | 0 |       } | 
| 155 | 0 |     } | 
| 156 | 0 |   } | 
| 157 | 0 |   else | 
| 158 | 0 | #endif | 
| 159 | 0 |   { | 
| 160 | 0 |     // get hi portion | 
| 161 | 0 |     uint32_t Hi = Hi_32(Value); | 
| 162 | 0 | 
 | 
| 163 | 0 |     // if some bits in hi portion | 
| 164 | 0 |     if (Hi) { | 
| 165 | 0 |       // leading zeros in hi portion plus all bits in lo portion | 
| 166 | 0 |       Count = CountLeadingZeros_32(Hi); | 
| 167 | 0 |     } else { | 
| 168 | 0 |       // get lo portion | 
| 169 | 0 |       uint32_t Lo = Lo_32(Value); | 
| 170 | 0 |       // same as 32 bit value | 
| 171 | 0 |       Count = CountLeadingZeros_32(Lo)+32; | 
| 172 | 0 |     } | 
| 173 | 0 |   } | 
| 174 | 0 | #endif | 
| 175 | 0 |   return Count; | 
| 176 | 0 | } Unexecuted instantiation: ARMDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: ARMInstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: AArch64Disassembler.c:CountLeadingZeros_64Unexecuted instantiation: AArch64InstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: MipsDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: PPCDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: PPCInstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: SparcDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: SparcInstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: SystemZDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: SystemZInstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: XCoreDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: XCoreInstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: TMS320C64xDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: TMS320C64xInstPrinter.c:CountLeadingZeros_64Unexecuted instantiation: RISCVDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: TriCoreDisassembler.c:CountLeadingZeros_64Unexecuted instantiation: TriCoreInstPrinter.c:CountLeadingZeros_64 | 
| 177 |  |  | 
| 178 |  | /// CountLeadingOnes_64 - This function performs the operation | 
| 179 |  | /// of counting the number of ones from the most significant bit to the first | 
| 180 |  | /// zero bit (64 bit edition.) | 
| 181 |  | /// Returns 64 if the word is all ones. | 
| 182 | 0 | static inline unsigned CountLeadingOnes_64(uint64_t Value) { | 
| 183 | 0 |   return CountLeadingZeros_64(~Value); | 
| 184 | 0 | } Unexecuted instantiation: ARMDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: ARMInstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: AArch64Disassembler.c:CountLeadingOnes_64Unexecuted instantiation: AArch64InstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: MipsDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: PPCDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: PPCInstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: SparcDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: SparcInstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: SystemZDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: SystemZInstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: XCoreDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: XCoreInstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: TMS320C64xDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: TMS320C64xInstPrinter.c:CountLeadingOnes_64Unexecuted instantiation: RISCVDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: TriCoreDisassembler.c:CountLeadingOnes_64Unexecuted instantiation: TriCoreInstPrinter.c:CountLeadingOnes_64 | 
| 185 |  |  | 
| 186 |  | /// CountTrailingZeros_32 - this function performs the platform optimal form of | 
| 187 |  | /// counting the number of zeros from the least significant bit to the first one | 
| 188 |  | /// bit.  Ex. CountTrailingZeros_32(0xFF00FF00) == 8. | 
| 189 |  | /// Returns 32 if the word is zero. | 
| 190 | 12.2k | static inline unsigned CountTrailingZeros_32(uint32_t Value) { | 
| 191 | 12.2k | #if __GNUC__ >= 4 | 
| 192 | 12.2k |   return Value ? __builtin_ctz(Value) : 32; | 
| 193 |  | #else | 
| 194 |  |   static const unsigned Mod37BitPosition[] = { | 
| 195 |  |     32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13, | 
| 196 |  |     4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9, | 
| 197 |  |     5, 20, 8, 19, 18 | 
| 198 |  |   }; | 
| 199 |  |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  | 
| 200 |  |   // MSVC warning C4146 | 
| 201 |  |   //    return Mod37BitPosition[(-Value & Value) % 37]; | 
| 202 |  |   return Mod37BitPosition[((1 + ~Value) & Value) % 37]; | 
| 203 |  | #endif | 
| 204 | 12.2k | } ARMDisassembler.c:CountTrailingZeros_32| Line | Count | Source |  | 190 | 2.08k | static inline unsigned CountTrailingZeros_32(uint32_t Value) { |  | 191 | 2.08k | #if __GNUC__ >= 4 |  | 192 | 2.08k |   return Value ? __builtin_ctz(Value) : 32; |  | 193 |  | #else |  | 194 |  |   static const unsigned Mod37BitPosition[] = { |  | 195 |  |     32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13, |  | 196 |  |     4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9, |  | 197 |  |     5, 20, 8, 19, 18 |  | 198 |  |   }; |  | 199 |  |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  |  | 200 |  |   // MSVC warning C4146 |  | 201 |  |   //    return Mod37BitPosition[(-Value & Value) % 37]; |  | 202 |  |   return Mod37BitPosition[((1 + ~Value) & Value) % 37]; |  | 203 |  | #endif |  | 204 | 2.08k | } | 
ARMInstPrinter.c:CountTrailingZeros_32| Line | Count | Source |  | 190 | 9.47k | static inline unsigned CountTrailingZeros_32(uint32_t Value) { |  | 191 | 9.47k | #if __GNUC__ >= 4 |  | 192 | 9.47k |   return Value ? __builtin_ctz(Value) : 32; |  | 193 |  | #else |  | 194 |  |   static const unsigned Mod37BitPosition[] = { |  | 195 |  |     32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13, |  | 196 |  |     4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9, |  | 197 |  |     5, 20, 8, 19, 18 |  | 198 |  |   }; |  | 199 |  |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  |  | 200 |  |   // MSVC warning C4146 |  | 201 |  |   //    return Mod37BitPosition[(-Value & Value) % 37]; |  | 202 |  |   return Mod37BitPosition[((1 + ~Value) & Value) % 37]; |  | 203 |  | #endif |  | 204 | 9.47k | } | 
Unexecuted instantiation: AArch64Disassembler.c:CountTrailingZeros_32AArch64InstPrinter.c:CountTrailingZeros_32| Line | Count | Source |  | 190 | 700 | static inline unsigned CountTrailingZeros_32(uint32_t Value) { |  | 191 | 700 | #if __GNUC__ >= 4 |  | 192 | 700 |   return Value ? __builtin_ctz(Value) : 32; |  | 193 |  | #else |  | 194 |  |   static const unsigned Mod37BitPosition[] = { |  | 195 |  |     32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13, |  | 196 |  |     4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9, |  | 197 |  |     5, 20, 8, 19, 18 |  | 198 |  |   }; |  | 199 |  |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  |  | 200 |  |   // MSVC warning C4146 |  | 201 |  |   //    return Mod37BitPosition[(-Value & Value) % 37]; |  | 202 |  |   return Mod37BitPosition[((1 + ~Value) & Value) % 37]; |  | 203 |  | #endif |  | 204 | 700 | } | 
Unexecuted instantiation: MipsDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: PPCDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: PPCInstPrinter.c:CountTrailingZeros_32Unexecuted instantiation: SparcDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: SparcInstPrinter.c:CountTrailingZeros_32Unexecuted instantiation: SystemZDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: SystemZInstPrinter.c:CountTrailingZeros_32Unexecuted instantiation: XCoreDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: XCoreInstPrinter.c:CountTrailingZeros_32Unexecuted instantiation: TMS320C64xDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: TMS320C64xInstPrinter.c:CountTrailingZeros_32Unexecuted instantiation: RISCVDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: TriCoreDisassembler.c:CountTrailingZeros_32Unexecuted instantiation: TriCoreInstPrinter.c:CountTrailingZeros_32 | 
| 205 |  |  | 
| 206 |  | /// CountTrailingOnes_32 - this function performs the operation of | 
| 207 |  | /// counting the number of ones from the least significant bit to the first zero | 
| 208 |  | /// bit.  Ex. CountTrailingOnes_32(0x00FF00FF) == 8. | 
| 209 |  | /// Returns 32 if the word is all ones. | 
| 210 | 586 | static inline unsigned CountTrailingOnes_32(uint32_t Value) { | 
| 211 | 586 |   return CountTrailingZeros_32(~Value); | 
| 212 | 586 | } Unexecuted instantiation: ARMDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: ARMInstPrinter.c:CountTrailingOnes_32Unexecuted instantiation: AArch64Disassembler.c:CountTrailingOnes_32AArch64InstPrinter.c:CountTrailingOnes_32| Line | Count | Source |  | 210 | 586 | static inline unsigned CountTrailingOnes_32(uint32_t Value) { |  | 211 | 586 |   return CountTrailingZeros_32(~Value); |  | 212 | 586 | } | 
Unexecuted instantiation: MipsDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: PPCDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: PPCInstPrinter.c:CountTrailingOnes_32Unexecuted instantiation: SparcDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: SparcInstPrinter.c:CountTrailingOnes_32Unexecuted instantiation: SystemZDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: SystemZInstPrinter.c:CountTrailingOnes_32Unexecuted instantiation: XCoreDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: XCoreInstPrinter.c:CountTrailingOnes_32Unexecuted instantiation: TMS320C64xDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: TMS320C64xInstPrinter.c:CountTrailingOnes_32Unexecuted instantiation: RISCVDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: TriCoreDisassembler.c:CountTrailingOnes_32Unexecuted instantiation: TriCoreInstPrinter.c:CountTrailingOnes_32 | 
| 213 |  |  | 
| 214 |  | /// CountTrailingZeros_64 - This function performs the platform optimal form | 
| 215 |  | /// of counting the number of zeros from the least significant bit to the first | 
| 216 |  | /// one bit (64 bit edition.) | 
| 217 |  | /// Returns 64 if the word is zero. | 
| 218 | 68 | static inline unsigned CountTrailingZeros_64(uint64_t Value) { | 
| 219 | 68 | #if __GNUC__ >= 4 | 
| 220 | 68 |   return Value ? __builtin_ctzll(Value) : 64; | 
| 221 |  | #else | 
| 222 |  |   static const unsigned Mod67Position[] = { | 
| 223 |  |     64, 0, 1, 39, 2, 15, 40, 23, 3, 12, 16, 59, 41, 19, 24, 54, | 
| 224 |  |     4, 64, 13, 10, 17, 62, 60, 28, 42, 30, 20, 51, 25, 44, 55, | 
| 225 |  |     47, 5, 32, 65, 38, 14, 22, 11, 58, 18, 53, 63, 9, 61, 27, | 
| 226 |  |     29, 50, 43, 46, 31, 37, 21, 57, 52, 8, 26, 49, 45, 36, 56, | 
| 227 |  |     7, 48, 35, 6, 34, 33, 0 | 
| 228 |  |   }; | 
| 229 |  |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  | 
| 230 |  |   // MSVC warning C4146 | 
| 231 |  |   //    return Mod67Position[(-Value & Value) % 67]; | 
| 232 |  |   return Mod67Position[((1 + ~Value) & Value) % 67]; | 
| 233 |  | #endif | 
| 234 | 68 | } Unexecuted instantiation: ARMDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: ARMInstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: AArch64Disassembler.c:CountTrailingZeros_64Unexecuted instantiation: AArch64InstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: MipsDisassembler.c:CountTrailingZeros_64PPCDisassembler.c:CountTrailingZeros_64| Line | Count | Source |  | 218 | 68 | static inline unsigned CountTrailingZeros_64(uint64_t Value) { |  | 219 | 68 | #if __GNUC__ >= 4 |  | 220 | 68 |   return Value ? __builtin_ctzll(Value) : 64; |  | 221 |  | #else |  | 222 |  |   static const unsigned Mod67Position[] = { |  | 223 |  |     64, 0, 1, 39, 2, 15, 40, 23, 3, 12, 16, 59, 41, 19, 24, 54, |  | 224 |  |     4, 64, 13, 10, 17, 62, 60, 28, 42, 30, 20, 51, 25, 44, 55, |  | 225 |  |     47, 5, 32, 65, 38, 14, 22, 11, 58, 18, 53, 63, 9, 61, 27, |  | 226 |  |     29, 50, 43, 46, 31, 37, 21, 57, 52, 8, 26, 49, 45, 36, 56, |  | 227 |  |     7, 48, 35, 6, 34, 33, 0 |  | 228 |  |   }; |  | 229 |  |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  |  | 230 |  |   // MSVC warning C4146 |  | 231 |  |   //    return Mod67Position[(-Value & Value) % 67]; |  | 232 |  |   return Mod67Position[((1 + ~Value) & Value) % 67]; |  | 233 |  | #endif |  | 234 | 68 | } | 
Unexecuted instantiation: PPCInstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: SparcDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: SparcInstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: SystemZDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: SystemZInstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: XCoreDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: XCoreInstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: TMS320C64xDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: TMS320C64xInstPrinter.c:CountTrailingZeros_64Unexecuted instantiation: RISCVDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: TriCoreDisassembler.c:CountTrailingZeros_64Unexecuted instantiation: TriCoreInstPrinter.c:CountTrailingZeros_64 | 
| 235 |  |  | 
| 236 |  | /// CountTrailingOnes_64 - This function performs the operation | 
| 237 |  | /// of counting the number of ones from the least significant bit to the first | 
| 238 |  | /// zero bit (64 bit edition.) | 
| 239 |  | /// Returns 64 if the word is all ones. | 
| 240 | 0 | static inline unsigned CountTrailingOnes_64(uint64_t Value) { | 
| 241 | 0 |   return CountTrailingZeros_64(~Value); | 
| 242 | 0 | } Unexecuted instantiation: ARMDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: ARMInstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: AArch64Disassembler.c:CountTrailingOnes_64Unexecuted instantiation: AArch64InstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: MipsDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: PPCDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: PPCInstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: SparcDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: SparcInstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: SystemZDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: SystemZInstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: XCoreDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: XCoreInstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: TMS320C64xDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: TMS320C64xInstPrinter.c:CountTrailingOnes_64Unexecuted instantiation: RISCVDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: TriCoreDisassembler.c:CountTrailingOnes_64Unexecuted instantiation: TriCoreInstPrinter.c:CountTrailingOnes_64 | 
| 243 |  |  | 
| 244 |  | /// CountPopulation_32 - this function counts the number of set bits in a value. | 
| 245 |  | /// Ex. CountPopulation(0xF000F000) = 8 | 
| 246 |  | /// Returns 0 if the word is zero. | 
| 247 | 0 | static inline unsigned CountPopulation_32(uint32_t Value) { | 
| 248 | 0 | #if __GNUC__ >= 4 | 
| 249 | 0 |   return __builtin_popcount(Value); | 
| 250 | 0 | #else | 
| 251 | 0 |   uint32_t v = Value - ((Value >> 1) & 0x55555555); | 
| 252 | 0 |   v = (v & 0x33333333) + ((v >> 2) & 0x33333333); | 
| 253 | 0 |   return (((v + (v >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24; | 
| 254 | 0 | #endif | 
| 255 | 0 | } Unexecuted instantiation: ARMDisassembler.c:CountPopulation_32Unexecuted instantiation: ARMInstPrinter.c:CountPopulation_32Unexecuted instantiation: AArch64Disassembler.c:CountPopulation_32Unexecuted instantiation: AArch64InstPrinter.c:CountPopulation_32Unexecuted instantiation: MipsDisassembler.c:CountPopulation_32Unexecuted instantiation: PPCDisassembler.c:CountPopulation_32Unexecuted instantiation: PPCInstPrinter.c:CountPopulation_32Unexecuted instantiation: SparcDisassembler.c:CountPopulation_32Unexecuted instantiation: SparcInstPrinter.c:CountPopulation_32Unexecuted instantiation: SystemZDisassembler.c:CountPopulation_32Unexecuted instantiation: SystemZInstPrinter.c:CountPopulation_32Unexecuted instantiation: XCoreDisassembler.c:CountPopulation_32Unexecuted instantiation: XCoreInstPrinter.c:CountPopulation_32Unexecuted instantiation: TMS320C64xDisassembler.c:CountPopulation_32Unexecuted instantiation: TMS320C64xInstPrinter.c:CountPopulation_32Unexecuted instantiation: RISCVDisassembler.c:CountPopulation_32Unexecuted instantiation: TriCoreDisassembler.c:CountPopulation_32Unexecuted instantiation: TriCoreInstPrinter.c:CountPopulation_32 | 
| 256 |  |  | 
| 257 |  | /// CountPopulation_64 - this function counts the number of set bits in a value, | 
| 258 |  | /// (64 bit edition.) | 
| 259 | 0 | static inline unsigned CountPopulation_64(uint64_t Value) { | 
| 260 | 0 | #if __GNUC__ >= 4 | 
| 261 | 0 |   return __builtin_popcountll(Value); | 
| 262 | 0 | #else | 
| 263 | 0 |   uint64_t v = Value - ((Value >> 1) & 0x5555555555555555ULL); | 
| 264 | 0 |   v = (v & 0x3333333333333333ULL) + ((v >> 2) & 0x3333333333333333ULL); | 
| 265 | 0 |   v = (v + (v >> 4)) & 0x0F0F0F0F0F0F0F0FULL; | 
| 266 | 0 |   return (uint64_t)((v * 0x0101010101010101ULL) >> 56); | 
| 267 | 0 | #endif | 
| 268 | 0 | } Unexecuted instantiation: ARMDisassembler.c:CountPopulation_64Unexecuted instantiation: ARMInstPrinter.c:CountPopulation_64Unexecuted instantiation: AArch64Disassembler.c:CountPopulation_64Unexecuted instantiation: AArch64InstPrinter.c:CountPopulation_64Unexecuted instantiation: MipsDisassembler.c:CountPopulation_64Unexecuted instantiation: PPCDisassembler.c:CountPopulation_64Unexecuted instantiation: PPCInstPrinter.c:CountPopulation_64Unexecuted instantiation: SparcDisassembler.c:CountPopulation_64Unexecuted instantiation: SparcInstPrinter.c:CountPopulation_64Unexecuted instantiation: SystemZDisassembler.c:CountPopulation_64Unexecuted instantiation: SystemZInstPrinter.c:CountPopulation_64Unexecuted instantiation: XCoreDisassembler.c:CountPopulation_64Unexecuted instantiation: XCoreInstPrinter.c:CountPopulation_64Unexecuted instantiation: TMS320C64xDisassembler.c:CountPopulation_64Unexecuted instantiation: TMS320C64xInstPrinter.c:CountPopulation_64Unexecuted instantiation: RISCVDisassembler.c:CountPopulation_64Unexecuted instantiation: TriCoreDisassembler.c:CountPopulation_64Unexecuted instantiation: TriCoreInstPrinter.c:CountPopulation_64 | 
| 269 |  |  | 
| 270 |  | /// Log2_32 - This function returns the floor log base 2 of the specified value, | 
| 271 |  | /// -1 if the value is zero. (32 bit edition.) | 
| 272 |  | /// Ex. Log2_32(32) == 5, Log2_32(1) == 0, Log2_32(0) == -1, Log2_32(6) == 2 | 
| 273 | 10.1k | static inline unsigned Log2_32(uint32_t Value) { | 
| 274 | 10.1k |   return 31 - CountLeadingZeros_32(Value); | 
| 275 | 10.1k | } Unexecuted instantiation: ARMDisassembler.c:Log2_32Unexecuted instantiation: ARMInstPrinter.c:Log2_32Unexecuted instantiation: AArch64Disassembler.c:Log2_32AArch64InstPrinter.c:Log2_32| Line | Count | Source |  | 273 | 10.1k | static inline unsigned Log2_32(uint32_t Value) { |  | 274 | 10.1k |   return 31 - CountLeadingZeros_32(Value); |  | 275 | 10.1k | } | 
Unexecuted instantiation: MipsDisassembler.c:Log2_32Unexecuted instantiation: PPCDisassembler.c:Log2_32Unexecuted instantiation: PPCInstPrinter.c:Log2_32Unexecuted instantiation: SparcDisassembler.c:Log2_32Unexecuted instantiation: SparcInstPrinter.c:Log2_32Unexecuted instantiation: SystemZDisassembler.c:Log2_32Unexecuted instantiation: SystemZInstPrinter.c:Log2_32Unexecuted instantiation: XCoreDisassembler.c:Log2_32Unexecuted instantiation: XCoreInstPrinter.c:Log2_32Unexecuted instantiation: TMS320C64xDisassembler.c:Log2_32Unexecuted instantiation: TMS320C64xInstPrinter.c:Log2_32Unexecuted instantiation: RISCVDisassembler.c:Log2_32Unexecuted instantiation: TriCoreDisassembler.c:Log2_32Unexecuted instantiation: TriCoreInstPrinter.c:Log2_32 | 
| 276 |  |  | 
| 277 |  | /// Log2_64 - This function returns the floor log base 2 of the specified value, | 
| 278 |  | /// -1 if the value is zero. (64 bit edition.) | 
| 279 | 0 | static inline unsigned Log2_64(uint64_t Value) { | 
| 280 | 0 |   return 63 - CountLeadingZeros_64(Value); | 
| 281 | 0 | } Unexecuted instantiation: ARMDisassembler.c:Log2_64Unexecuted instantiation: ARMInstPrinter.c:Log2_64Unexecuted instantiation: AArch64Disassembler.c:Log2_64Unexecuted instantiation: AArch64InstPrinter.c:Log2_64Unexecuted instantiation: MipsDisassembler.c:Log2_64Unexecuted instantiation: PPCDisassembler.c:Log2_64Unexecuted instantiation: PPCInstPrinter.c:Log2_64Unexecuted instantiation: SparcDisassembler.c:Log2_64Unexecuted instantiation: SparcInstPrinter.c:Log2_64Unexecuted instantiation: SystemZDisassembler.c:Log2_64Unexecuted instantiation: SystemZInstPrinter.c:Log2_64Unexecuted instantiation: XCoreDisassembler.c:Log2_64Unexecuted instantiation: XCoreInstPrinter.c:Log2_64Unexecuted instantiation: TMS320C64xDisassembler.c:Log2_64Unexecuted instantiation: TMS320C64xInstPrinter.c:Log2_64Unexecuted instantiation: RISCVDisassembler.c:Log2_64Unexecuted instantiation: TriCoreDisassembler.c:Log2_64Unexecuted instantiation: TriCoreInstPrinter.c:Log2_64 | 
| 282 |  |  | 
| 283 |  | /// Log2_32_Ceil - This function returns the ceil log base 2 of the specified | 
| 284 |  | /// value, 32 if the value is zero. (32 bit edition). | 
| 285 |  | /// Ex. Log2_32_Ceil(32) == 5, Log2_32_Ceil(1) == 0, Log2_32_Ceil(6) == 3 | 
| 286 | 0 | static inline unsigned Log2_32_Ceil(uint32_t Value) { | 
| 287 | 0 |   return 32-CountLeadingZeros_32(Value-1); | 
| 288 | 0 | } Unexecuted instantiation: ARMDisassembler.c:Log2_32_CeilUnexecuted instantiation: ARMInstPrinter.c:Log2_32_CeilUnexecuted instantiation: AArch64Disassembler.c:Log2_32_CeilUnexecuted instantiation: AArch64InstPrinter.c:Log2_32_CeilUnexecuted instantiation: MipsDisassembler.c:Log2_32_CeilUnexecuted instantiation: PPCDisassembler.c:Log2_32_CeilUnexecuted instantiation: PPCInstPrinter.c:Log2_32_CeilUnexecuted instantiation: SparcDisassembler.c:Log2_32_CeilUnexecuted instantiation: SparcInstPrinter.c:Log2_32_CeilUnexecuted instantiation: SystemZDisassembler.c:Log2_32_CeilUnexecuted instantiation: SystemZInstPrinter.c:Log2_32_CeilUnexecuted instantiation: XCoreDisassembler.c:Log2_32_CeilUnexecuted instantiation: XCoreInstPrinter.c:Log2_32_CeilUnexecuted instantiation: TMS320C64xDisassembler.c:Log2_32_CeilUnexecuted instantiation: TMS320C64xInstPrinter.c:Log2_32_CeilUnexecuted instantiation: RISCVDisassembler.c:Log2_32_CeilUnexecuted instantiation: TriCoreDisassembler.c:Log2_32_CeilUnexecuted instantiation: TriCoreInstPrinter.c:Log2_32_Ceil | 
| 289 |  |  | 
| 290 |  | /// Log2_64_Ceil - This function returns the ceil log base 2 of the specified | 
| 291 |  | /// value, 64 if the value is zero. (64 bit edition.) | 
| 292 | 0 | static inline unsigned Log2_64_Ceil(uint64_t Value) { | 
| 293 | 0 |   return 64-CountLeadingZeros_64(Value-1); | 
| 294 | 0 | } Unexecuted instantiation: ARMDisassembler.c:Log2_64_CeilUnexecuted instantiation: ARMInstPrinter.c:Log2_64_CeilUnexecuted instantiation: AArch64Disassembler.c:Log2_64_CeilUnexecuted instantiation: AArch64InstPrinter.c:Log2_64_CeilUnexecuted instantiation: MipsDisassembler.c:Log2_64_CeilUnexecuted instantiation: PPCDisassembler.c:Log2_64_CeilUnexecuted instantiation: PPCInstPrinter.c:Log2_64_CeilUnexecuted instantiation: SparcDisassembler.c:Log2_64_CeilUnexecuted instantiation: SparcInstPrinter.c:Log2_64_CeilUnexecuted instantiation: SystemZDisassembler.c:Log2_64_CeilUnexecuted instantiation: SystemZInstPrinter.c:Log2_64_CeilUnexecuted instantiation: XCoreDisassembler.c:Log2_64_CeilUnexecuted instantiation: XCoreInstPrinter.c:Log2_64_CeilUnexecuted instantiation: TMS320C64xDisassembler.c:Log2_64_CeilUnexecuted instantiation: TMS320C64xInstPrinter.c:Log2_64_CeilUnexecuted instantiation: RISCVDisassembler.c:Log2_64_CeilUnexecuted instantiation: TriCoreDisassembler.c:Log2_64_CeilUnexecuted instantiation: TriCoreInstPrinter.c:Log2_64_Ceil | 
| 295 |  |  | 
| 296 |  | /// GreatestCommonDivisor64 - Return the greatest common divisor of the two | 
| 297 |  | /// values using Euclid's algorithm. | 
| 298 | 0 | static inline uint64_t GreatestCommonDivisor64(uint64_t A, uint64_t B) { | 
| 299 | 0 |   while (B) { | 
| 300 | 0 |     uint64_t T = B; | 
| 301 | 0 |     B = A % B; | 
| 302 | 0 |     A = T; | 
| 303 | 0 |   } | 
| 304 | 0 |   return A; | 
| 305 | 0 | } Unexecuted instantiation: ARMDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: ARMInstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: AArch64Disassembler.c:GreatestCommonDivisor64Unexecuted instantiation: AArch64InstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: MipsDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: PPCDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: PPCInstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: SparcDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: SparcInstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: SystemZDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: SystemZInstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: XCoreDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: XCoreInstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: TMS320C64xDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: TMS320C64xInstPrinter.c:GreatestCommonDivisor64Unexecuted instantiation: RISCVDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: TriCoreDisassembler.c:GreatestCommonDivisor64Unexecuted instantiation: TriCoreInstPrinter.c:GreatestCommonDivisor64 | 
| 306 |  |  | 
| 307 |  | /// BitsToDouble - This function takes a 64-bit integer and returns the bit | 
| 308 |  | /// equivalent double. | 
| 309 | 0 | static inline double BitsToDouble(uint64_t Bits) { | 
| 310 | 0 |   union { | 
| 311 | 0 |     uint64_t L; | 
| 312 | 0 |     double D; | 
| 313 | 0 |   } T; | 
| 314 | 0 |   T.L = Bits; | 
| 315 | 0 |   return T.D; | 
| 316 | 0 | } Unexecuted instantiation: ARMDisassembler.c:BitsToDoubleUnexecuted instantiation: ARMInstPrinter.c:BitsToDoubleUnexecuted instantiation: AArch64Disassembler.c:BitsToDoubleUnexecuted instantiation: AArch64InstPrinter.c:BitsToDoubleUnexecuted instantiation: MipsDisassembler.c:BitsToDoubleUnexecuted instantiation: PPCDisassembler.c:BitsToDoubleUnexecuted instantiation: PPCInstPrinter.c:BitsToDoubleUnexecuted instantiation: SparcDisassembler.c:BitsToDoubleUnexecuted instantiation: SparcInstPrinter.c:BitsToDoubleUnexecuted instantiation: SystemZDisassembler.c:BitsToDoubleUnexecuted instantiation: SystemZInstPrinter.c:BitsToDoubleUnexecuted instantiation: XCoreDisassembler.c:BitsToDoubleUnexecuted instantiation: XCoreInstPrinter.c:BitsToDoubleUnexecuted instantiation: TMS320C64xDisassembler.c:BitsToDoubleUnexecuted instantiation: TMS320C64xInstPrinter.c:BitsToDoubleUnexecuted instantiation: RISCVDisassembler.c:BitsToDoubleUnexecuted instantiation: TriCoreDisassembler.c:BitsToDoubleUnexecuted instantiation: TriCoreInstPrinter.c:BitsToDouble | 
| 317 |  |  | 
| 318 |  | /// BitsToFloat - This function takes a 32-bit integer and returns the bit | 
| 319 |  | /// equivalent float. | 
| 320 | 0 | static inline float BitsToFloat(uint32_t Bits) { | 
| 321 | 0 |   union { | 
| 322 | 0 |     uint32_t I; | 
| 323 | 0 |     float F; | 
| 324 | 0 |   } T; | 
| 325 | 0 |   T.I = Bits; | 
| 326 | 0 |   return T.F; | 
| 327 | 0 | } Unexecuted instantiation: ARMDisassembler.c:BitsToFloatUnexecuted instantiation: ARMInstPrinter.c:BitsToFloatUnexecuted instantiation: AArch64Disassembler.c:BitsToFloatUnexecuted instantiation: AArch64InstPrinter.c:BitsToFloatUnexecuted instantiation: MipsDisassembler.c:BitsToFloatUnexecuted instantiation: PPCDisassembler.c:BitsToFloatUnexecuted instantiation: PPCInstPrinter.c:BitsToFloatUnexecuted instantiation: SparcDisassembler.c:BitsToFloatUnexecuted instantiation: SparcInstPrinter.c:BitsToFloatUnexecuted instantiation: SystemZDisassembler.c:BitsToFloatUnexecuted instantiation: SystemZInstPrinter.c:BitsToFloatUnexecuted instantiation: XCoreDisassembler.c:BitsToFloatUnexecuted instantiation: XCoreInstPrinter.c:BitsToFloatUnexecuted instantiation: TMS320C64xDisassembler.c:BitsToFloatUnexecuted instantiation: TMS320C64xInstPrinter.c:BitsToFloatUnexecuted instantiation: RISCVDisassembler.c:BitsToFloatUnexecuted instantiation: TriCoreDisassembler.c:BitsToFloatUnexecuted instantiation: TriCoreInstPrinter.c:BitsToFloat | 
| 328 |  |  | 
| 329 |  | /// DoubleToBits - This function takes a double and returns the bit | 
| 330 |  | /// equivalent 64-bit integer.  Note that copying doubles around | 
| 331 |  | /// changes the bits of NaNs on some hosts, notably x86, so this | 
| 332 |  | /// routine cannot be used if these bits are needed. | 
| 333 | 0 | static inline uint64_t DoubleToBits(double Double) { | 
| 334 | 0 |   union { | 
| 335 | 0 |     uint64_t L; | 
| 336 | 0 |     double D; | 
| 337 | 0 |   } T; | 
| 338 | 0 |   T.D = Double; | 
| 339 | 0 |   return T.L; | 
| 340 | 0 | } Unexecuted instantiation: ARMDisassembler.c:DoubleToBitsUnexecuted instantiation: ARMInstPrinter.c:DoubleToBitsUnexecuted instantiation: AArch64Disassembler.c:DoubleToBitsUnexecuted instantiation: AArch64InstPrinter.c:DoubleToBitsUnexecuted instantiation: MipsDisassembler.c:DoubleToBitsUnexecuted instantiation: PPCDisassembler.c:DoubleToBitsUnexecuted instantiation: PPCInstPrinter.c:DoubleToBitsUnexecuted instantiation: SparcDisassembler.c:DoubleToBitsUnexecuted instantiation: SparcInstPrinter.c:DoubleToBitsUnexecuted instantiation: SystemZDisassembler.c:DoubleToBitsUnexecuted instantiation: SystemZInstPrinter.c:DoubleToBitsUnexecuted instantiation: XCoreDisassembler.c:DoubleToBitsUnexecuted instantiation: XCoreInstPrinter.c:DoubleToBitsUnexecuted instantiation: TMS320C64xDisassembler.c:DoubleToBitsUnexecuted instantiation: TMS320C64xInstPrinter.c:DoubleToBitsUnexecuted instantiation: RISCVDisassembler.c:DoubleToBitsUnexecuted instantiation: TriCoreDisassembler.c:DoubleToBitsUnexecuted instantiation: TriCoreInstPrinter.c:DoubleToBits | 
| 341 |  |  | 
| 342 |  | /// FloatToBits - This function takes a float and returns the bit | 
| 343 |  | /// equivalent 32-bit integer.  Note that copying floats around | 
| 344 |  | /// changes the bits of NaNs on some hosts, notably x86, so this | 
| 345 |  | /// routine cannot be used if these bits are needed. | 
| 346 | 0 | static inline uint32_t FloatToBits(float Float) { | 
| 347 | 0 |   union { | 
| 348 | 0 |     uint32_t I; | 
| 349 | 0 |     float F; | 
| 350 | 0 |   } T; | 
| 351 | 0 |   T.F = Float; | 
| 352 | 0 |   return T.I; | 
| 353 | 0 | } Unexecuted instantiation: ARMDisassembler.c:FloatToBitsUnexecuted instantiation: ARMInstPrinter.c:FloatToBitsUnexecuted instantiation: AArch64Disassembler.c:FloatToBitsUnexecuted instantiation: AArch64InstPrinter.c:FloatToBitsUnexecuted instantiation: MipsDisassembler.c:FloatToBitsUnexecuted instantiation: PPCDisassembler.c:FloatToBitsUnexecuted instantiation: PPCInstPrinter.c:FloatToBitsUnexecuted instantiation: SparcDisassembler.c:FloatToBitsUnexecuted instantiation: SparcInstPrinter.c:FloatToBitsUnexecuted instantiation: SystemZDisassembler.c:FloatToBitsUnexecuted instantiation: SystemZInstPrinter.c:FloatToBitsUnexecuted instantiation: XCoreDisassembler.c:FloatToBitsUnexecuted instantiation: XCoreInstPrinter.c:FloatToBitsUnexecuted instantiation: TMS320C64xDisassembler.c:FloatToBitsUnexecuted instantiation: TMS320C64xInstPrinter.c:FloatToBitsUnexecuted instantiation: RISCVDisassembler.c:FloatToBitsUnexecuted instantiation: TriCoreDisassembler.c:FloatToBitsUnexecuted instantiation: TriCoreInstPrinter.c:FloatToBits | 
| 354 |  |  | 
| 355 |  | /// MinAlign - A and B are either alignments or offsets.  Return the minimum | 
| 356 |  | /// alignment that may be assumed after adding the two together. | 
| 357 | 0 | static inline uint64_t MinAlign(uint64_t A, uint64_t B) { | 
| 358 | 0 |   // The largest power of 2 that divides both A and B. | 
| 359 | 0 |   // | 
| 360 | 0 |   // Replace "-Value" by "1+~Value" in the following commented code to avoid  | 
| 361 | 0 |   // MSVC warning C4146 | 
| 362 | 0 |   //    return (A | B) & -(A | B); | 
| 363 | 0 |   return (A | B) & (1 + ~(A | B)); | 
| 364 | 0 | } Unexecuted instantiation: ARMDisassembler.c:MinAlignUnexecuted instantiation: ARMInstPrinter.c:MinAlignUnexecuted instantiation: AArch64Disassembler.c:MinAlignUnexecuted instantiation: AArch64InstPrinter.c:MinAlignUnexecuted instantiation: MipsDisassembler.c:MinAlignUnexecuted instantiation: PPCDisassembler.c:MinAlignUnexecuted instantiation: PPCInstPrinter.c:MinAlignUnexecuted instantiation: SparcDisassembler.c:MinAlignUnexecuted instantiation: SparcInstPrinter.c:MinAlignUnexecuted instantiation: SystemZDisassembler.c:MinAlignUnexecuted instantiation: SystemZInstPrinter.c:MinAlignUnexecuted instantiation: XCoreDisassembler.c:MinAlignUnexecuted instantiation: XCoreInstPrinter.c:MinAlignUnexecuted instantiation: TMS320C64xDisassembler.c:MinAlignUnexecuted instantiation: TMS320C64xInstPrinter.c:MinAlignUnexecuted instantiation: RISCVDisassembler.c:MinAlignUnexecuted instantiation: TriCoreDisassembler.c:MinAlignUnexecuted instantiation: TriCoreInstPrinter.c:MinAlign | 
| 365 |  |  | 
| 366 |  | /// NextPowerOf2 - Returns the next power of two (in 64-bits) | 
| 367 |  | /// that is strictly greater than A.  Returns zero on overflow. | 
| 368 | 0 | static inline uint64_t NextPowerOf2(uint64_t A) { | 
| 369 | 0 |   A |= (A >> 1); | 
| 370 | 0 |   A |= (A >> 2); | 
| 371 | 0 |   A |= (A >> 4); | 
| 372 | 0 |   A |= (A >> 8); | 
| 373 | 0 |   A |= (A >> 16); | 
| 374 | 0 |   A |= (A >> 32); | 
| 375 | 0 |   return A + 1; | 
| 376 | 0 | } Unexecuted instantiation: ARMDisassembler.c:NextPowerOf2Unexecuted instantiation: ARMInstPrinter.c:NextPowerOf2Unexecuted instantiation: AArch64Disassembler.c:NextPowerOf2Unexecuted instantiation: AArch64InstPrinter.c:NextPowerOf2Unexecuted instantiation: MipsDisassembler.c:NextPowerOf2Unexecuted instantiation: PPCDisassembler.c:NextPowerOf2Unexecuted instantiation: PPCInstPrinter.c:NextPowerOf2Unexecuted instantiation: SparcDisassembler.c:NextPowerOf2Unexecuted instantiation: SparcInstPrinter.c:NextPowerOf2Unexecuted instantiation: SystemZDisassembler.c:NextPowerOf2Unexecuted instantiation: SystemZInstPrinter.c:NextPowerOf2Unexecuted instantiation: XCoreDisassembler.c:NextPowerOf2Unexecuted instantiation: XCoreInstPrinter.c:NextPowerOf2Unexecuted instantiation: TMS320C64xDisassembler.c:NextPowerOf2Unexecuted instantiation: TMS320C64xInstPrinter.c:NextPowerOf2Unexecuted instantiation: RISCVDisassembler.c:NextPowerOf2Unexecuted instantiation: TriCoreDisassembler.c:NextPowerOf2Unexecuted instantiation: TriCoreInstPrinter.c:NextPowerOf2 | 
| 377 |  |  | 
| 378 |  | /// Returns the next integer (mod 2**64) that is greater than or equal to | 
| 379 |  | /// \p Value and is a multiple of \p Align. \p Align must be non-zero. | 
| 380 |  | /// | 
| 381 |  | /// Examples: | 
| 382 |  | /// \code | 
| 383 |  | ///   RoundUpToAlignment(5, 8) = 8 | 
| 384 |  | ///   RoundUpToAlignment(17, 8) = 24 | 
| 385 |  | ///   RoundUpToAlignment(~0LL, 8) = 0 | 
| 386 |  | /// \endcode | 
| 387 | 0 | static inline uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align) { | 
| 388 | 0 |   return ((Value + Align - 1) / Align) * Align; | 
| 389 | 0 | } Unexecuted instantiation: ARMDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: ARMInstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: AArch64Disassembler.c:RoundUpToAlignmentUnexecuted instantiation: AArch64InstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: MipsDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: PPCDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: PPCInstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: SparcDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: SparcInstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: SystemZDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: SystemZInstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: XCoreDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: XCoreInstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: TMS320C64xDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: TMS320C64xInstPrinter.c:RoundUpToAlignmentUnexecuted instantiation: RISCVDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: TriCoreDisassembler.c:RoundUpToAlignmentUnexecuted instantiation: TriCoreInstPrinter.c:RoundUpToAlignment | 
| 390 |  |  | 
| 391 |  | /// Returns the offset to the next integer (mod 2**64) that is greater than | 
| 392 |  | /// or equal to \p Value and is a multiple of \p Align. \p Align must be | 
| 393 |  | /// non-zero. | 
| 394 | 0 | static inline uint64_t OffsetToAlignment(uint64_t Value, uint64_t Align) { | 
| 395 | 0 |   return RoundUpToAlignment(Value, Align) - Value; | 
| 396 | 0 | } Unexecuted instantiation: ARMDisassembler.c:OffsetToAlignmentUnexecuted instantiation: ARMInstPrinter.c:OffsetToAlignmentUnexecuted instantiation: AArch64Disassembler.c:OffsetToAlignmentUnexecuted instantiation: AArch64InstPrinter.c:OffsetToAlignmentUnexecuted instantiation: MipsDisassembler.c:OffsetToAlignmentUnexecuted instantiation: PPCDisassembler.c:OffsetToAlignmentUnexecuted instantiation: PPCInstPrinter.c:OffsetToAlignmentUnexecuted instantiation: SparcDisassembler.c:OffsetToAlignmentUnexecuted instantiation: SparcInstPrinter.c:OffsetToAlignmentUnexecuted instantiation: SystemZDisassembler.c:OffsetToAlignmentUnexecuted instantiation: SystemZInstPrinter.c:OffsetToAlignmentUnexecuted instantiation: XCoreDisassembler.c:OffsetToAlignmentUnexecuted instantiation: XCoreInstPrinter.c:OffsetToAlignmentUnexecuted instantiation: TMS320C64xDisassembler.c:OffsetToAlignmentUnexecuted instantiation: TMS320C64xInstPrinter.c:OffsetToAlignmentUnexecuted instantiation: RISCVDisassembler.c:OffsetToAlignmentUnexecuted instantiation: TriCoreDisassembler.c:OffsetToAlignmentUnexecuted instantiation: TriCoreInstPrinter.c:OffsetToAlignment | 
| 397 |  |  | 
| 398 |  | /// abs64 - absolute value of a 64-bit int.  Not all environments support | 
| 399 |  | /// "abs" on whatever their name for the 64-bit int type is.  The absolute | 
| 400 |  | /// value of the largest negative number is undefined, as with "abs". | 
| 401 | 0 | static inline int64_t abs64(int64_t x) { | 
| 402 | 0 |   return (x < 0) ? -x : x; | 
| 403 | 0 | } Unexecuted instantiation: ARMDisassembler.c:abs64Unexecuted instantiation: ARMInstPrinter.c:abs64Unexecuted instantiation: AArch64Disassembler.c:abs64Unexecuted instantiation: AArch64InstPrinter.c:abs64Unexecuted instantiation: MipsDisassembler.c:abs64Unexecuted instantiation: PPCDisassembler.c:abs64Unexecuted instantiation: PPCInstPrinter.c:abs64Unexecuted instantiation: SparcDisassembler.c:abs64Unexecuted instantiation: SparcInstPrinter.c:abs64Unexecuted instantiation: SystemZDisassembler.c:abs64Unexecuted instantiation: SystemZInstPrinter.c:abs64Unexecuted instantiation: XCoreDisassembler.c:abs64Unexecuted instantiation: XCoreInstPrinter.c:abs64Unexecuted instantiation: TMS320C64xDisassembler.c:abs64Unexecuted instantiation: TMS320C64xInstPrinter.c:abs64Unexecuted instantiation: RISCVDisassembler.c:abs64Unexecuted instantiation: TriCoreDisassembler.c:abs64Unexecuted instantiation: TriCoreInstPrinter.c:abs64 | 
| 404 |  |  | 
| 405 |  | /// \brief Sign extend number in the bottom B bits of X to a 32-bit int. | 
| 406 |  | /// Requires 0 < B <= 32. | 
| 407 | 46.6k | static inline int32_t SignExtend32(uint32_t X, unsigned B) { | 
| 408 | 46.6k |   return (int32_t)(X << (32 - B)) >> (32 - B); | 
| 409 | 46.6k | } ARMDisassembler.c:SignExtend32| Line | Count | Source |  | 407 | 15.4k | static inline int32_t SignExtend32(uint32_t X, unsigned B) { |  | 408 | 15.4k |   return (int32_t)(X << (32 - B)) >> (32 - B); |  | 409 | 15.4k | } | 
Unexecuted instantiation: ARMInstPrinter.c:SignExtend32Unexecuted instantiation: AArch64Disassembler.c:SignExtend32Unexecuted instantiation: AArch64InstPrinter.c:SignExtend32MipsDisassembler.c:SignExtend32| Line | Count | Source |  | 407 | 16.8k | static inline int32_t SignExtend32(uint32_t X, unsigned B) { |  | 408 | 16.8k |   return (int32_t)(X << (32 - B)) >> (32 - B); |  | 409 | 16.8k | } | 
Unexecuted instantiation: PPCDisassembler.c:SignExtend32PPCInstPrinter.c:SignExtend32| Line | Count | Source |  | 407 | 3.88k | static inline int32_t SignExtend32(uint32_t X, unsigned B) { |  | 408 | 3.88k |   return (int32_t)(X << (32 - B)) >> (32 - B); |  | 409 | 3.88k | } | 
SparcDisassembler.c:SignExtend32| Line | Count | Source |  | 407 | 1.43k | static inline int32_t SignExtend32(uint32_t X, unsigned B) { |  | 408 | 1.43k |   return (int32_t)(X << (32 - B)) >> (32 - B); |  | 409 | 1.43k | } | 
SparcInstPrinter.c:SignExtend32| Line | Count | Source |  | 407 | 9.02k | static inline int32_t SignExtend32(uint32_t X, unsigned B) { |  | 408 | 9.02k |   return (int32_t)(X << (32 - B)) >> (32 - B); |  | 409 | 9.02k | } | 
Unexecuted instantiation: SystemZDisassembler.c:SignExtend32Unexecuted instantiation: SystemZInstPrinter.c:SignExtend32Unexecuted instantiation: XCoreDisassembler.c:SignExtend32Unexecuted instantiation: XCoreInstPrinter.c:SignExtend32Unexecuted instantiation: TMS320C64xDisassembler.c:SignExtend32Unexecuted instantiation: TMS320C64xInstPrinter.c:SignExtend32Unexecuted instantiation: RISCVDisassembler.c:SignExtend32Unexecuted instantiation: TriCoreDisassembler.c:SignExtend32Unexecuted instantiation: TriCoreInstPrinter.c:SignExtend32 | 
| 410 |  |  | 
| 411 |  | /// \brief Sign extend number in the bottom B bits of X to a 64-bit int. | 
| 412 |  | /// Requires 0 < B <= 64. | 
| 413 | 26.9k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { | 
| 414 | 26.9k |   return (int64_t)(X << (64 - B)) >> (64 - B); | 
| 415 | 26.9k | } Unexecuted instantiation: ARMDisassembler.c:SignExtend64Unexecuted instantiation: ARMInstPrinter.c:SignExtend64Unexecuted instantiation: AArch64Disassembler.c:SignExtend64AArch64InstPrinter.c:SignExtend64| Line | Count | Source |  | 413 | 1.51k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { |  | 414 | 1.51k |   return (int64_t)(X << (64 - B)) >> (64 - B); |  | 415 | 1.51k | } | 
MipsDisassembler.c:SignExtend64| Line | Count | Source |  | 413 | 1.87k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { |  | 414 | 1.87k |   return (int64_t)(X << (64 - B)) >> (64 - B); |  | 415 | 1.87k | } | 
PPCDisassembler.c:SignExtend64| Line | Count | Source |  | 413 | 11.0k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { |  | 414 | 11.0k |   return (int64_t)(X << (64 - B)) >> (64 - B); |  | 415 | 11.0k | } | 
PPCInstPrinter.c:SignExtend64| Line | Count | Source |  | 413 | 4.03k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { |  | 414 | 4.03k |   return (int64_t)(X << (64 - B)) >> (64 - B); |  | 415 | 4.03k | } | 
Unexecuted instantiation: SparcDisassembler.c:SignExtend64Unexecuted instantiation: SparcInstPrinter.c:SignExtend64SystemZDisassembler.c:SignExtend64| Line | Count | Source |  | 413 | 5.41k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { |  | 414 | 5.41k |   return (int64_t)(X << (64 - B)) >> (64 - B); |  | 415 | 5.41k | } | 
Unexecuted instantiation: SystemZInstPrinter.c:SignExtend64Unexecuted instantiation: XCoreDisassembler.c:SignExtend64Unexecuted instantiation: XCoreInstPrinter.c:SignExtend64Unexecuted instantiation: TMS320C64xDisassembler.c:SignExtend64Unexecuted instantiation: TMS320C64xInstPrinter.c:SignExtend64RISCVDisassembler.c:SignExtend64| Line | Count | Source |  | 413 | 3.06k | static inline int64_t SignExtend64(uint64_t X, unsigned B) { |  | 414 | 3.06k |   return (int64_t)(X << (64 - B)) >> (64 - B); |  | 415 | 3.06k | } | 
Unexecuted instantiation: TriCoreDisassembler.c:SignExtend64Unexecuted instantiation: TriCoreInstPrinter.c:SignExtend64 | 
| 416 |  |  | 
| 417 |  | /// \brief Count number of 0's from the most significant bit to the least | 
| 418 |  | ///   stopping at the first 1. | 
| 419 |  | /// | 
| 420 |  | /// Only unsigned integral types are allowed. | 
| 421 |  | /// | 
| 422 |  | /// \param ZB the behavior on an input of 0. Only ZB_Width and ZB_Undefined are | 
| 423 |  | ///   valid arguments. | 
| 424 |  | static inline unsigned int countLeadingZeros(int x) | 
| 425 | 0 | { | 
| 426 | 0 |   int i; | 
| 427 | 0 |   const unsigned bits = sizeof(x) * 8; | 
| 428 | 0 |   unsigned count = bits; | 
| 429 | 0 | 
 | 
| 430 | 0 |   if (x < 0) { | 
| 431 | 0 |     return 0; | 
| 432 | 0 |   } | 
| 433 | 0 |   for (i = bits; --i; ) { | 
| 434 | 0 |     if (x == 0) break; | 
| 435 | 0 |     count--; | 
| 436 | 0 |     x >>= 1; | 
| 437 | 0 |   } | 
| 438 | 0 | 
 | 
| 439 | 0 |   return count; | 
| 440 | 0 | } Unexecuted instantiation: ARMDisassembler.c:countLeadingZerosUnexecuted instantiation: ARMInstPrinter.c:countLeadingZerosUnexecuted instantiation: AArch64Disassembler.c:countLeadingZerosUnexecuted instantiation: AArch64InstPrinter.c:countLeadingZerosUnexecuted instantiation: MipsDisassembler.c:countLeadingZerosUnexecuted instantiation: PPCDisassembler.c:countLeadingZerosUnexecuted instantiation: PPCInstPrinter.c:countLeadingZerosUnexecuted instantiation: SparcDisassembler.c:countLeadingZerosUnexecuted instantiation: SparcInstPrinter.c:countLeadingZerosUnexecuted instantiation: SystemZDisassembler.c:countLeadingZerosUnexecuted instantiation: SystemZInstPrinter.c:countLeadingZerosUnexecuted instantiation: XCoreDisassembler.c:countLeadingZerosUnexecuted instantiation: XCoreInstPrinter.c:countLeadingZerosUnexecuted instantiation: TMS320C64xDisassembler.c:countLeadingZerosUnexecuted instantiation: TMS320C64xInstPrinter.c:countLeadingZerosUnexecuted instantiation: RISCVDisassembler.c:countLeadingZerosUnexecuted instantiation: TriCoreDisassembler.c:countLeadingZerosUnexecuted instantiation: TriCoreInstPrinter.c:countLeadingZeros | 
| 441 |  |  | 
| 442 |  | #endif |