[migrated to blacksky.co.uk] on Nostr: Caleb James DeLisle you know what :scholar: x86 is not fucked up enough ...
Caleb James DeLisle (nprofile…mj4q)
you know what
x86 is not fucked up enough
you know what
x86 is not fucked up enough
quoting nevent1q…kntwThe problem with most 32 bit is it's a compatibility layer for old binaries, so it's an older / trashier instruction set.
What I want is 64 bit registers, 64 bit syscalls, entire system is 64 bit, but, you know that you're never going to have a pointer above 2**32 so you can encode pointers as 32 bit values.
It looks like this is possible already, and it's just ABI/compiler/loader shit to make it work.
mmap() already has a flag MAP_32BIT to require that the mapping goes in the lower 32 bits.
It's probably possible to compile libc/linker/loader with like __INTPTR_WIDTH__ 32 and so on, but telling the compiler to make 64 bit assembly 😈 , and then just patch in a syscall shim so that syscalls are done correctly with 64 bit words.