[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/11] target/rx: Handle the FPSW.DN bit in helper_set_fpsw
From: |
Yoshinori Sato |
Subject: |
Re: [PATCH 06/11] target/rx: Handle the FPSW.DN bit in helper_set_fpsw |
Date: |
Sat, 29 May 2021 00:34:55 +0900 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/27 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Thu, 27 May 2021 13:14:00 +0900,
Richard Henderson wrote:
>
> Both input and output denormals flush to zero when DN is set.
>
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewd-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
> target/rx/op_helper.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c
> index ef904eb5f9..2139def3b2 100644
> --- a/target/rx/op_helper.c
> +++ b/target/rx/op_helper.c
> @@ -127,13 +127,20 @@ void helper_set_fpsw(CPURXState *env, uint32_t val)
> float_round_down,
> };
> uint32_t fpsw = env->fpsw;
> + bool dn;
> +
> fpsw |= 0x7fffff03;
> val &= ~0x80000000;
> fpsw &= val;
> FIELD_DP32(fpsw, FPSW, FS, FIELD_EX32(fpsw, FPSW, FLAGS) != 0);
> env->fpsw = fpsw;
> - set_float_rounding_mode(roundmode[FIELD_EX32(env->fpsw, FPSW, RM)],
> +
> + set_float_rounding_mode(roundmode[FIELD_EX32(fpsw, FPSW, RM)],
> &env->fp_status);
> +
> + dn = FIELD_EX32(env->fpsw, FPSW, DN);
> + set_flush_to_zero(dn, &env->fp_status);
> + set_flush_inputs_to_zero(dn, &env->fp_status);
> }
>
> #define FLOATOP(op, func) \
> --
> 2.25.1
>
>
- [PATCH 00/11] softfloat: Improve denormal handling, Richard Henderson, 2021/05/27
- [PATCH 03/11] softfloat: Introduce float_flag_inorm_denormal, Richard Henderson, 2021/05/27
- [PATCH 01/11] softfloat: Rename float_flag_input_denormal to float_flag_iflush_denormal, Richard Henderson, 2021/05/27
- [PATCH 07/11] target/rx: Use FloatRoundMode in helper_set_fpsw, Richard Henderson, 2021/05/27
- [PATCH 02/11] softfloat: Rename float_flag_output_denormal to float_flag_oflush_denormal, Richard Henderson, 2021/05/27
- [PATCH 06/11] target/rx: Handle the FPSW.DN bit in helper_set_fpsw, Richard Henderson, 2021/05/27
- Re: [PATCH 06/11] target/rx: Handle the FPSW.DN bit in helper_set_fpsw,
Yoshinori Sato <=
- [PATCH 08/11] target/rx: Fix setting of FPSW.CE, Richard Henderson, 2021/05/27
- [PATCH 09/11] target/mips: Drop inline markers from msa_helper.c, Richard Henderson, 2021/05/27
- [PATCH 10/11] target/mips: Do not check MSACSR_FS_MASK in update_msacsr, Richard Henderson, 2021/05/27
- [PATCH 04/11] softfloat: Introduce float_flag_result_denormal, Richard Henderson, 2021/05/27
- [PATCH 05/11] target/i386: Use float_flag_inorm_denormal, Richard Henderson, 2021/05/27
- [PATCH 11/11] target/mips: Drop denormal operand to update_msacsr, Richard Henderson, 2021/05/27