[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: arm64 pointer tagging, VA-bits, the end of the world...



On 17/08/16 17:06, Leif Lindholm wrote:
Indeed. And we need to stay on the ball with that, and try to ensure
any changes we do from this point onwards are at least 56-bit
safe. And start agitating against pointer tagging in general.

AIUI a big problem is that some systems (in particular javascript engines), don't merely want to tag pointers, they want to create a 64-bit "compact variant" that stores multiple different types of data including double precision integers and pointers (possiblly even more than one type of pointer) using non-overlapping bit patterns.

This is possible due to the fact that the double precision floating point format reserves a large chunk of code space (2^53 bit patterns) for NaNs and infinities. Assuming your application doesn't need a crazy number of different NaNs these bit patterns can be repurposed for other things.

If your pointers are 48 bit then it's no problem to store multiple different types of pointer and other values in the NaN-space. On the other hand if your pointers are 56 bit then you have a serious problem.

Alignment considerations mean that if the compact variant had to grow beyond 64 bit it would probablly end up being 128 bit which is a fairly steep penalty on memory usage.


Reply to: