qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/21] target/xtensa: add DFP option, registers and opcodes


From: Richard Henderson
Subject: Re: [PATCH 09/21] target/xtensa: add DFP option, registers and opcodes
Date: Wed, 8 Jul 2020 09:25:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 7/6/20 4:47 PM, Max Filippov wrote:
> +float64 HELPER(add_d)(CPUXtensaState *env, float64 a, float64 b)
> +{
> +    set_use_first_nan(true, &env->fp_status);
> +    return float64_add(a, b, &env->fp_status);
> +}
> +
>  float32 HELPER(add_s)(CPUXtensaState *env, float32 a, float32 b)
>  {
> +    set_use_first_nan(env->config->use_first_nan, &env->fp_status);
>      return float32_add(a, b, &env->fp_status);
>  }

I think you can do better than to set the use_first_nan flag before every
operation.

E.g. the translator could remember the previous setting within the TB, only
changing when necessary.  E.g. if env->config->use_first_nan, then set it
during reset and never change it again.  Similarly if DFP is not enabled.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]