So I noticed that on OSX 12.0 we get warnings about deprecated custom atomic code (CPU_CAS, cpu_atomic_add). Since C++11 provides <atomic>, we should replace occurrences of those with the new library where relevant.
Sadly, that code is used in lib/ which has mostly remained untouched since 2010 when jan stopped codding, and it's generally written in C-style and it's honestly full of weird uncommented design decisions (there's actually a lot of comments but I find them rather unuseful…)
I have a patch that seems to work for that, but there's one first commit I'd like separately: removing UniqueRange. It seems it's supposed to replace unique_ptr with a custom deleter, but for some reason jan used a bit-trick to get a pointer to the custom deleter instead of something straightforward (all to save one dword of memory??). Anyways the VM code also seems unused... And there was a weird atomic call in the middle.
Anyways. What I did is typedef this to unique_ptr with a custom deleter, and replaced appropriate code.