6/3/2026 at 10:33:23 AM
> You will also need to be aware of minor differences between the Darwin ABI and other platform ABIs. A notable example is that the x18 register is reserved by the Darwin ABI and is explicitly zeroed on context switches in some cases. This register is also reserved on Android, but not on GNU/Linux or Alpine.x18 is "the platform register", reserved for the OS. The ISA manual says not to touch it unless you know what you're doing. Also, I don't know but I could believe that android and non-googly linux use different ABIs (but probably not because everyone uses pretty much the same ABI on aarch64 from what I've seen), but surely Alpine is linux and has the same ABI as other linuxes.
by t-3
6/3/2026 at 3:34:13 PM
You know, it always rubs me wrong when I'm reading an ISA manual and it tells me how I am supposed to use general-purpose registers. Why do ISA designers even believe they're in a place to design the user-level ABIs? Like, sure, you've hardwired BL and RET to use x30, that's fine. But every other register? If I want to pass return values in x21 and x23, that's none of your business.by Joker_vD