Lines Matching refs:offset
36 const uint8_t *GetPointer(int32_t offset) const
39 return pc_ + offset;
63 T Read(size_t offset) const
66 return *reinterpret_cast<unaligned_type *>(GetPointer(offset));
69 void Write(uint32_t value, uint32_t offset, uint32_t width)
71 auto *dst = const_cast<uint8_t *>(GetPointer(offset));
73 LOG(FATAL, PANDAFILE) << "Cannot write value : " << value << "at the dst offset : " << offset;
77 uint8_t ReadByte(size_t offset) const
79 return Read<uint8_t>(offset);
83 inline auto ReadHelper(size_t byteoffset, size_t bytecount, size_t offset, size_t width) const
87 size_t right_shift = offset % BYTE_WIDTH;
107 template <size_t offset, size_t width, bool is_signed = false>
111 constexpr size_t BYTE_OFFSET = offset / BYTE_WIDTH;
112 constexpr size_t BYTE_OFFSET_END = (offset + width + BYTE_WIDTH - 1) / BYTE_WIDTH;
118 return ReadHelper<return_type, storage_type>(BYTE_OFFSET, BYTE_COUNT, offset, width);
122 inline auto Read64(size_t offset, size_t width) const
127 ASSERT((offset % BYTE_WIDTH) + width <= BIT64);
129 size_t byteoffset = offset / BYTE_WIDTH;
130 size_t byteoffset_end = (offset + width + BYTE_WIDTH - 1) / BYTE_WIDTH;
136 return ReadHelper<return_type, storage_type>(byteoffset, bytecount, offset, width);