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.
Published at
2025-01-25 10:14:59Event JSON
{
"id": "1b801df4541d1a3896f2bbe31aeea923ebd06db90fdbbcb515992337beb365de",
"pubkey": "dde9dd6efbaf3c747c06bfd60f732666acd686e4c2eff471937f0c7c5fca5e0e",
"created_at": 1737800099,
"kind": 1,
"tags": [
[
"p",
"dde9dd6efbaf3c747c06bfd60f732666acd686e4c2eff471937f0c7c5fca5e0e",
"wss://relay.mostr.pub"
],
[
"e",
"23de9d88c6044f552bbf9a858ffc54596739d1f15228389ad7f84fe9f2aaa124",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://pkteerium.xyz/objects/671f2733-66d2-4d93-a265-ee661ef40ca9",
"activitypub"
]
],
"content": "The problem with most 32 bit is it's a compatibility layer for old binaries, so it's an older / trashier instruction set.\n\nWhat 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.\n\nIt looks like this is possible already, and it's just ABI/compiler/loader shit to make it work.\n\nmmap() already has a flag MAP_32BIT to require that the mapping goes in the lower 32 bits.\n\nIt'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.",
"sig": "43c01d1fec82183b78046c971c373607593108a0aec6f5f850640da3e3b2a6131848ae14cc4c523dd931797aa61fac630900fb1e8341a552415f61b68c6a8f90"
}