InstructionUtils.h (276479) | InstructionUtils.h (280031) |
---|---|
1//===-- InstructionUtils.h --------------------------------------*- 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//===----------------------------------------------------------------------===// --- 6 unchanged lines hidden (view full) --- 15namespace lldb_private { 16 17// Return the bit field(s) from the most significant bit (msbit) to the 18// least significant bit (lsbit) of a 64-bit unsigned value. 19static inline uint64_t 20Bits64 (const uint64_t bits, const uint32_t msbit, const uint32_t lsbit) 21{ 22 assert(msbit < 64 && lsbit <= msbit); | 1//===-- InstructionUtils.h --------------------------------------*- 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//===----------------------------------------------------------------------===// --- 6 unchanged lines hidden (view full) --- 15namespace lldb_private { 16 17// Return the bit field(s) from the most significant bit (msbit) to the 18// least significant bit (lsbit) of a 64-bit unsigned value. 19static inline uint64_t 20Bits64 (const uint64_t bits, const uint32_t msbit, const uint32_t lsbit) 21{ 22 assert(msbit < 64 && lsbit <= msbit); |
23 return (bits >> lsbit) & ((1u << (msbit - lsbit + 1)) - 1); | 23 return (bits >> lsbit) & ((1ull << (msbit - lsbit + 1)) - 1); |
24} 25 26// Return the bit field(s) from the most significant bit (msbit) to the 27// least significant bit (lsbit) of a 32-bit unsigned value. 28static inline uint32_t 29Bits32 (const uint32_t bits, const uint32_t msbit, const uint32_t lsbit) 30{ 31 assert(msbit < 32 && lsbit <= msbit); --- 107 unchanged lines hidden --- | 24} 25 26// Return the bit field(s) from the most significant bit (msbit) to the 27// least significant bit (lsbit) of a 32-bit unsigned value. 28static inline uint32_t 29Bits32 (const uint32_t bits, const uint32_t msbit, const uint32_t lsbit) 30{ 31 assert(msbit < 32 && lsbit <= msbit); --- 107 unchanged lines hidden --- |