[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~
- Re: [PATCH 07/21] target/xtensa: move FSR/FCR register accessors, (continued)
- [PATCH 05/21] target/xtensa: support copying registers up to 64 bits wide, Max Filippov, 2020/07/06
- [PATCH 08/21] target/xtensa: don't access BR regfile directly, Max Filippov, 2020/07/06
- [PATCH 10/21] target/xtensa: implement FPU division and square root, Max Filippov, 2020/07/06
- [PATCH 11/21] tests/tcg/xtensa: fix test execution on ISS, Max Filippov, 2020/07/06
- [PATCH 12/21] tests/tcg/xtensa: update test_fp0_arith for DFPU, Max Filippov, 2020/07/06
- [PATCH 09/21] target/xtensa: add DFP option, registers and opcodes, Max Filippov, 2020/07/06
- Re: [PATCH 09/21] target/xtensa: add DFP option, registers and opcodes,
Richard Henderson <=
[PATCH 15/21] tests/tcg/xtensa: update test_fp1 for DFPU, Max Filippov, 2020/07/06
[PATCH 13/21] tests/tcg/xtensa: expand madd tests, Max Filippov, 2020/07/06
[PATCH 14/21] tests/tcg/xtensa: update test_fp0_conv for DFPU, Max Filippov, 2020/07/06
[PATCH 16/21] tests/tcg/xtensa: update test_lsc for DFPU, Max Filippov, 2020/07/06
[PATCH 18/21] tests/tcg/xtensa: test double precision load/store, Max Filippov, 2020/07/06
[PATCH 19/21] tests/tcg/xtensa: add DFP0 arith tests, Max Filippov, 2020/07/06
[PATCH 17/21] tests/tcg/xtensa: add fp0 div and sqrt tests, Max Filippov, 2020/07/06