From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: BALATON Zoltan via <qemu-devel@nongnu.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH] linux-user/mips: Low down switchable NaN2008 requirement
Date: Tue, 7 Mar 2023 15:18:32 +0100 [thread overview]
Message-ID: <88ec0341-92fb-f3b5-796e-23a0c6f8c390@vivier.eu> (raw)
In-Reply-To: <AB7D213A-2A88-42E5-B142-BA6127103FCF@flygoat.com>
Phil (or someone else that knows mips), could you review?
With one review I will apply to my linux-user branch.
Thanks,
Laurent
Le 22/02/2023 à 11:28, Jiaxun Yang a écrit :
> Ping?
>
>> 2023年2月11日 17:34,Jiaxun Yang <jiaxun.yang@flygoat.com> 写道:
>>
>> Previously switchable NaN2008 requires fcsr31.nan2008 to be writable
>> for guest. However as per MIPS arch spec this bit can never be writable.
>> This cause NaN2008 ELF to be rejected by QEMU.
>>
>> NaN2008 can be enabled on R2~R5 processors, just make it available
>> unconditionally.
>>
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>> ---
>> linux-user/mips/cpu_loop.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c
>> index d5c1c7941d..b5c2ca4a3e 100644
>> --- a/linux-user/mips/cpu_loop.c
>> +++ b/linux-user/mips/cpu_loop.c
>> @@ -301,8 +301,7 @@ void target_cpu_copy_regs(CPUArchState *env, struct target_pt_regs *regs)
>> }
>> if (((info->elf_flags & EF_MIPS_NAN2008) != 0) !=
>> ((env->active_fpu.fcr31 & (1 << FCR31_NAN2008)) != 0)) {
>> - if ((env->active_fpu.fcr31_rw_bitmask &
>> - (1 << FCR31_NAN2008)) == 0) {
>> + if (!(env->insn_flags & ISA_MIPS_R2)) {
>> fprintf(stderr, "ELF binary's NaN mode not supported by CPU\n");
>> exit(1);
>> }
>> --
>> 2.37.1 (Apple Git-137.1)
>>
>
>
next prev parent reply other threads:[~2023-03-07 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 17:34 [PATCH] linux-user/mips: Low down switchable NaN2008 requirement Jiaxun Yang
2023-02-22 10:28 ` Jiaxun Yang
2023-03-07 14:18 ` Laurent Vivier [this message]
2023-03-09 12:32 ` Philippe Mathieu-Daudé
2023-03-11 12:39 ` Jiaxun Yang
2023-03-15 8:18 ` Philippe Mathieu-Daudé
2023-03-21 9:23 ` Jiaxun Yang
2023-03-21 16:14 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=88ec0341-92fb-f3b5-796e-23a0c6f8c390@vivier.eu \
--to=laurent@vivier.eu \
--cc=jiaxun.yang@flygoat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).