qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 41/42] tests/acceptance: Test R5900 CPU with BusyBox from


From: Fredrik Noring
Subject: Re: [RFC PATCH 41/42] tests/acceptance: Test R5900 CPU with BusyBox from Sony PS2
Date: Mon, 15 Feb 2021 15:28:09 +0100

On Sun, Feb 14, 2021 at 06:59:11PM +0100, Philippe Mathieu-Daudé wrote:
> Test BusyBox on the R5900 CPU with 2 different binaries:
> 
> - o32 32-bit (statically linked)
> - o32 64-bit (dynamically linked, uses multimedia instructions)

R5900/libc update:

Gnu libc for o32 was merged some time ago so any recent Gentoo etc. will
do fine without patches.

For n32, there's a provisional patch that needs reworking to get merged
(to have libc emulate DMULT etc. rather than the kernel/QEMU).[1]

Musl has a pending patch I posted[2] about a month ago. Musl is o32 only,
for all MIPS, but other than that it's got two significant advantages
over Gnu libc:

1. excellent support for static linking;

2. program sizes are often much smaller, more than 5x smaller observed.

An important detail is that since the R5900 FPU isn't compliant with
the IEEE 754 standard[3] it's normally wholly emulated by either libc or
the kernel, to comply with the MIPS psABI. The R5900 hardware FPU can
perhaps be enabled with a future R5900 ELF ABI annotation extension.[4]

Finally, the situation with the 128-bit R5900 general purpose registers
(GPRs) is not fully resolved with the Linux kernel. The best case
scenario, I believe, would be to have them available at all times.[5]

Fredrik

References:

[1] https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00974.html
[2] https://www.openwall.com/lists/musl/2020/12/24/2
[3] https://github.com/frno7/linux/wiki/R5900-floating-point-unit-(FPU)
[4] https://github.com/frno7/linux/issues/3
[5] https://github.com/frno7/linux/issues/5



reply via email to

[Prev in Thread] Current Thread [Next in Thread]