[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9cc26415-9cbc-47fa-a132-7d8c000874a4@app.fastmail.com>
Date: Thu, 27 Jun 2024 12:21:40 +0100
From: "Jiaxun Yang" <jiaxun.yang@...goat.com>
To: "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>
Cc: "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
在2024年6月27日六月 上午11:58,Thomas Bogendoerfer写道:
> On Wed, Jun 12, 2024 at 09:38:19AM +0100, Jiaxun Yang wrote:
>> +++ b/arch/mips/kernel/elf.c
>> @@ -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.
Thanks
>
> Thomas.
>
> --
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea. [ RFC1925, 2.3 ]
--
- Jiaxun
Powered by blists - more mailing lists