What is Nostr?
Caleb James DeLisle /
npub1mh5…233h
2025-01-25 10:14:59
in reply to nevent1q…zfcf

Caleb James DeLisle on Nostr: The problem with most 32 bit is it's a compatibility layer for old binaries, so it's ...

The 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.
Author Public Key
npub1mh5a6mhm4u78glqxhltq7uexv6kddphycthlguvn0ux8ch72tc8q6q233h