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~