Code for the compiler described in my blog
ARM and x86_64 require "real" pointers to be sign-extended in their top bits. This means a working pointer is guaranteed to have either "11" as leading bits, or "00". So, to tag a "fake" pointer which is an unboxed 32-bit integer, we simply toggle the leading bit. |
||
|---|---|---|
| 01 | ||
| 02 | ||
| 03 | ||
| 04 | ||
| 06 | ||
| 07 | ||
| 08 | ||
| 09 | ||
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | ||
| test.sh | ||