Searched refs:bit_offset (Results 1 – 4 of 4) sorted by relevance
/art/runtime/ |
D | bit_memory_region.h | 29 ALWAYS_INLINE BitMemoryRegion(MemoryRegion region, size_t bit_offset, size_t bit_size) { in BitMemoryRegion() argument 30 bit_start_ = bit_offset % kBitsPerByte; in BitMemoryRegion() 31 const size_t start = bit_offset / kBitsPerByte; in BitMemoryRegion() 32 const size_t end = (bit_offset + bit_size + kBitsPerByte - 1) / kBitsPerByte; in BitMemoryRegion() 43 ALWAYS_INLINE BitMemoryRegion Subregion(size_t bit_offset, size_t bit_size) const { in Subregion() argument 44 return BitMemoryRegion(region_, bit_start_ + bit_offset, bit_size); in Subregion() 49 ALWAYS_INLINE bool LoadBit(uintptr_t bit_offset) const { in LoadBit() argument 50 return region_.LoadBit(bit_offset + bit_start_); in LoadBit() 53 ALWAYS_INLINE void StoreBit(uintptr_t bit_offset, bool value) const { in StoreBit() argument 54 region_.StoreBit(bit_offset + bit_start_, value); in StoreBit() [all …]
|
D | memory_region_test.cc | 66 for (size_t bit_offset = 0; bit_offset < 2 * kBitsPerByte; ++bit_offset) { in TEST() local 70 BitMemoryRegion bmr(region, bit_offset, length); in TEST() 71 region.StoreBits(bit_offset, masked_value, length); in TEST() 72 EXPECT_EQ(region.LoadBits(bit_offset, length), masked_value); in TEST() 75 EXPECT_EQ(region.LoadBits(0, bit_offset), (1u << bit_offset) - 1); in TEST() 76 EXPECT_EQ(region.LoadBits(bit_offset + length, length), length_mask); in TEST() 77 region.StoreBits(bit_offset, length_mask, length); in TEST() 82 EXPECT_EQ(region.LoadBits(0, bit_offset), (1u << bit_offset) - 1); in TEST() 83 EXPECT_EQ(region.LoadBits(bit_offset + length, length), length_mask); in TEST() 84 region.StoreBits(bit_offset, length_mask, length); in TEST()
|
D | memory_region.cc | 32 void MemoryRegion::StoreBits(uintptr_t bit_offset, uint32_t value, size_t length) { in StoreBits() argument 35 DCHECK_LE(bit_offset + length, size_in_bits()); in StoreBits() 41 uint8_t* out = ComputeInternalPointer<uint8_t>(bit_offset >> kBitsPerByteLog2); in StoreBits() 44 uintptr_t bit_remainder = bit_offset % kBitsPerByte; in StoreBits() 61 DCHECK_EQ(LoadBits(bit_offset, orig_len), orig_value) << bit_offset << " " << orig_len; in StoreBits()
|
D | memory_region.h | 114 ALWAYS_INLINE bool LoadBit(uintptr_t bit_offset) const { in LoadBit() argument 116 uint8_t byte = *ComputeBitPointer(bit_offset, &bit_mask); in LoadBit() 120 ALWAYS_INLINE void StoreBit(uintptr_t bit_offset, bool value) const { in StoreBit() argument 122 uint8_t* byte = ComputeBitPointer(bit_offset, &bit_mask); in StoreBit() 134 ALWAYS_INLINE uint32_t LoadBits(uintptr_t bit_offset, size_t length) const { in LoadBits() argument 136 DCHECK_LE(bit_offset + length, size_in_bits()); in LoadBits() 141 const uint8_t* address = begin() + bit_offset / kBitsPerByte; in LoadBits() 142 const uint32_t shift = bit_offset & (kBitsPerByte - 1); in LoadBits() 162 DCHECK_EQ((value >> i) & 1, LoadBit(bit_offset + i)); in LoadBits() 171 void StoreBits(uintptr_t bit_offset, uint32_t value, size_t length); [all …]
|