Re: [PATCH v2] tools/nolibc: MIPS: fix clobbers of 'lo' and 'hi' registers on different ISAs

From: Willy Tarreau

Date: Sun Mar 22 2026 - 04:50:14 EST


On Tue, Mar 17, 2026 at 09:40:36AM +0100, Thomas Weißschuh wrote:
> All MIPS ISAs before r6 use the 'lo' and 'hi' special registers.
> These are clobbered by system calls and need to be marked as such to
> avoid miscompilations. Currently nolibc ties the clobbers to the ABI.
> But this is wrong and leads to ISA<->ABI combinations which are not
> handled correctly, leading to compiler errors or miscompilations.
>
> Handle all different combinations of ABI and ISA.
>
> Fixes: a6a2a8a42972 ("tools/nolibc: MIPS: add support for N64 and N32 ABIs")
> Fixes: 66b6f755ad45 ("rcutorture: Import a copy of nolibc")
> Suggested-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
> Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.2603141744240.55200@xxxxxxxxxxxxxxxxx/
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

Looks clean, thank you Thomas & Maciej!

Acked-by: Willy Tarreau <w@xxxxxx>

Willy