mlibc icon indicating copy to clipboard operation
mlibc copied to clipboard

aarch64: mcontext_t struct is wrong in the mlibc ABI

Open 64 opened this issue 3 years ago • 3 comments

64 avatar Jun 26 '22 22:06 64

Wrong in what way?

avdgrinten avatar Jun 28 '22 07:06 avdgrinten

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.

qookei avatar Jun 28 '22 09:06 qookei

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).

64 avatar Jun 28 '22 12:06 64