4 ms·
The related article about using CPU alignment checking for "type checking" tagged pointers is quite interesting. I wonder if this technique has been used before
by exDM69 7y ago
The related article about using CPU alignment checking for "type checking" tagged pointers is quite interesting. I wonder if this technique has been used before (in lisp machines or something?). I'd be interested in hearing about practical matters like performance and CPU support too.
https://weinholt.se/articles/alignment-check/ https://weinholt.se/articles/alignment-check/
- crististm 7y agoLisp machines used tag bits
- rjsw 7y agoThe SPARC CPU was designed to make use of this. Alignment checking was enabled by default, the tagged add/sub instructions required that the tag in the lower two bits for an integer was 0, tags for pointers were expected to be 3. Lisp Machines were word addressed so the technique wouldn't work for them.