Question about pointer tagging: I really need 17 bits for my tag but it won't fit into the 16 available high bits on Aarch64. Now I'm wondering about combining high/low bits in a single tag: shift 8- or 16-byte-aligned address right 3 or 4 bits, then use the high 19 or 20 bits for the tag, then shift and mask to use the pointer. Has anyone done anything like this before?
=> More informations about this toot | More toots from tobinbaker@discuss.systems
@tobinbaker Been there, done that. aarch64's instructions can do this reasonably efficiently. Storing the pointer bits unshifted in the tagged representation is convenient for debuggability: it's easier for humans to recognize that there is an address inside the value. But sometimes it is more efficient to store it differently to optimize the instruction sequences.
=> More informations about this toot | More toots from gparker@discuss.systems This content has been proxied by September (ba2dc).Proxy Information
text/gemini