[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2406272053180.43454@angie.orcam.me.uk>
Date: Thu, 27 Jun 2024 20:54:39 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Jiaxun Yang <jiaxun.yang@...goat.com>
cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
Philippe Mathieu-Daudé <philmd@...aro.org>
Subject: Re: [PATCH v3] MIPS: Implement ieee754 NAN2008 emulation mode
On Thu, 27 Jun 2024, Jiaxun Yang wrote:
> >> @@ -318,6 +318,10 @@ void mips_set_personality_nan(struct arch_elf_state *state)
> >> t->thread.fpu.fcr31 = c->fpu_csr31;
> >> switch (state->nan_2008) {
> >> case 0:
> >> + if (!(c->fpu_msk31 & FPU_CSR_NAN2008))
> >> + t->thread.fpu.fcr31 &= ~FPU_CSR_NAN2008;
> >> + if (!(c->fpu_msk31 & FPU_CSR_ABS2008))
> >> + t->thread.fpu.fcr31 &= ~FPU_CSR_ABS2008;
> >
> > why is this needed?
>
> Because t->thread.fpu.fcr31 comes from c->fpu_csr31, in this case we the default
> value of c->fpu_csr31 is read from hardware and we don't know what would that be.
But it has always been like this. What has changed with your patch that
you need to mask the bit out now?
Maciej
Powered by blists - more mailing lists