mlibc
mlibc copied to clipboard
aarch64: mcontext_t struct is wrong in the mlibc ABI
Wrong in what way?
The struct is defined here: https://github.com/managarm/mlibc/blob/a53280ab5fa0a851b62abcbf77bf0c41707199a1/abis/mlibc/signal.h#L160-L168
AArch64 has 31 GPRs, PC (in this case stored in LR, aka X30), SP, 32 vector registers (which are 128 bits wide each), and 2 64-bit FP/SIMD control registers.
As per the discussion on Discord, this can be changed without a formal ABI break (but it might be a good idea to grep managarm sources for uses of this struct).