77 #define PTRTAG __attribute__((aligned(4)))
90 static inline void *
ptrtag(
void *ptr, uint8_t tag)
92 uintptr_t tmp = (uintptr_t)ptr;
94 assert((tag < 4) && !(tmp & 0x3));
95 return (
void *)(tmp | tag);
105 uintptr_t tagged = (uintptr_t)tagged_ptr;
106 const uintptr_t mask = 0x3;
107 return (
void *)(tagged & (~mask));
117 uintptr_t tagged = (uintptr_t)tagged_ptr;