[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] linux-user/mips: Low down switchable NaN2008 requirement
From: |
Jiaxun Yang |
Subject: |
Re: [PATCH] linux-user/mips: Low down switchable NaN2008 requirement |
Date: |
Wed, 22 Feb 2023 10:28:31 +0000 |
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)
>