Re: [PATCH v3] MIPS: Implement ieee754 NAN2008 emulation mode

From: Maciej W. Rozycki
Date: Wed Jul 10 2024 - 05:21:39 EST


On Wed, 10 Jul 2024, Thomas Bogendoerfer wrote:

> > > I'm considering to apply your patch, how much testing/verification did
> > > this patch see ? Do have some test binaries ?
> >
> > It has been tested against Debian rootfs. There is no need to test againt special binary,
> > but you need NaN2008 hardware such as Loongson 3A4000.
>
> that's just one case, what about NaN2008 binaries on a legacy MIPS CPU ?

It would be good to check with hard-float QEMU configured for writable
FCSR.NAN2008 (which is one way original code was verified) that things
have not regressed. And also what happens if once our emulation has
triggered for the unsupported FCSR.NAN2008 mode, an attempt is made to
flip the mode bit via ptrace(2), e.g. under GDB, which I reckon our
emulation permits for non-legacy CPUs (and which I think should not be
allowed under the new setting).

Maciej