11 #ifndef STM_ITM2STM_UTILITIES_H
12 #define STM_ITM2STM_UTILITIES_H
25 const uintptr_t MASK =
static_cast<uintptr_t
>(
sizeof(
void*) - 1);
26 const uintptr_t offset =
reinterpret_cast<uintptr_t
>(address) & MASK;
27 return static_cast<size_t>(offset);
38 const uintptr_t MASK = ~static_cast<uintptr_t>(
sizeof(
void*) - 1);
39 const uintptr_t base =
reinterpret_cast<uintptr_t
>(address) & MASK;
40 return reinterpret_cast<void**
>(base);
45 const uint8_t* temp =
reinterpret_cast<const uint8_t*
>(address) + bytes;
46 address =
reinterpret_cast<const void*
>(temp);
51 uint8_t* temp =
reinterpret_cast<uint8_t*
>(address) + bytes;
52 address =
reinterpret_cast<void*
>(temp);
66 uintptr_t mask = ~(uintptr_t)0;
67 mask = mask >> (8 * (
sizeof(
void*) - j));
68 mask = mask << (8 * i);
73 #endif // STM_ITM2STM_UTILITIES_H
uintptr_t make_mask(size_t i, size_t j)
Definition: Utilities.h:64
void ** base_of(const void *const address)
Definition: Utilities.h:37
size_t offset_of(const void *const address)
Definition: Utilities.h:24
void add_bytes(const void *&address, size_t bytes)
Definition: Utilities.h:44