Lines Matching refs:offset

24 WriteInt16(const unsigned char* ptr, unsigned offset, uint16_t value) 
26 *(uint16_t *)(ptr + offset) = value;
29 WriteInt32 (const unsigned char* ptr, unsigned offset, uint32_t value)
31 *(uint32_t *)(ptr + offset) = value;
35 WriteInt64(const unsigned char* ptr, unsigned offset, uint64_t value)
37 *(uint64_t *)(ptr + offset) = value;
41 WriteSwappedInt16(const unsigned char* ptr, unsigned offset, uint16_t value)
43 *(uint16_t *)(ptr + offset) = llvm::ByteSwap_16(value);
47 WriteSwappedInt32 (const unsigned char* ptr, unsigned offset, uint32_t value)
49 *(uint32_t *)(ptr + offset) = llvm::ByteSwap_32(value);
53 WriteSwappedInt64(const unsigned char* ptr, unsigned offset, uint64_t value)
55 *(uint64_t *)(ptr + offset) = llvm::ByteSwap_64(value);
124 // offset into that shared data. Else zero is returned.
177 // a valid offset into "data_sp", then this object will contain no
223 // the offset pointed to by "offset_ptr".
228 DataEncoder::PutU8 (uint32_t offset, uint8_t value)
230 if (ValidOffset(offset))
232 m_start[offset] = value;
233 return offset + 1;
239 DataEncoder::PutU16 (uint32_t offset, uint16_t value)
241 if (ValidOffsetForDataOfSize(offset, sizeof(value)))
244 WriteSwappedInt16 (m_start, offset, value);
246 WriteInt16 (m_start, offset, value);
248 return offset + sizeof (value);
254 DataEncoder::PutU32 (uint32_t offset, uint32_t value)
256 if (ValidOffsetForDataOfSize(offset, sizeof(value)))
259 WriteSwappedInt32 (m_start, offset, value);
261 WriteInt32 (m_start, offset, value);
263 return offset + sizeof (value);
269 DataEncoder::PutU64 (uint32_t offset, uint64_t value)
271 if (ValidOffsetForDataOfSize(offset, sizeof(value)))
274 WriteSwappedInt64 (m_start, offset, value);
276 WriteInt64 (m_start, offset, value);
278 return offset + sizeof (value);
284 // Extract a single integer value from the data and update the offset
294 DataEncoder::PutMaxU64 (uint32_t offset, uint32_t byte_size, uint64_t value)
298 case 1: return PutU8 (offset, value);
299 case 2: return PutU16(offset, value);
300 case 4: return PutU32(offset, value);
301 case 8: return PutU64(offset, value);
310 DataEncoder::PutData (uint32_t offset, const void *src, uint32_t src_len)
313 return offset;
315 if (ValidOffsetForDataOfSize(offset, src_len))
317 memcpy (m_start + offset, src, src_len);
318 return offset + src_len;
324 DataEncoder::PutAddress (uint32_t offset, lldb::addr_t addr)
326 return PutMaxU64 (offset, GetAddressByteSize(), addr);
330 DataEncoder::PutCString (uint32_t offset, const char *cstr)
333 return PutData (offset, cstr, strlen(cstr) + 1);