* [Qemu-devel] [PATCH] fix fp16 tininess
@ 2018-05-10 14:09 Peter Maydell
2018-05-10 14:11 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Peter Maydell @ 2018-05-10 14:09 UTC (permalink / raw)
To: qemu-arm, qemu-devel; +Cc: patches, Alex Bennée, Richard Henderson
In commit d81ce0ef2c4f105 we added an extra float_status field
fp_status_fp16 for Arm, but forgot to initialize it correctly
by setting it to float_tininess_before_rounding. This currently
will only cause problems for the new V8_FP16 feature, since the
float-to-float conversion code doesn't use it yet. The effect
would be that we failed to set the Underflow IEEE exception flag
in all the cases where we should.
Add the missing initialization.
Fixes: d81ce0ef2c4f105
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index d175c5e94f..7939c6b8ae 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -324,6 +324,8 @@ static void arm_cpu_reset(CPUState *s)
&env->vfp.fp_status);
set_float_detect_tininess(float_tininess_before_rounding,
&env->vfp.standard_fp_status);
+ set_float_detect_tininess(float_tininess_before_rounding,
+ &env->vfp.fp_status_f16);
#ifndef CONFIG_USER_ONLY
if (kvm_enabled()) {
kvm_arm_reset_vcpu(cpu);
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-arm] [PATCH] fix fp16 tininess
2018-05-10 14:09 [Qemu-devel] [PATCH] fix fp16 tininess Peter Maydell
@ 2018-05-10 14:11 ` Peter Maydell
2018-05-10 14:34 ` [Qemu-devel] " Richard Henderson
2018-05-10 15:07 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2018-05-10 14:11 UTC (permalink / raw)
To: qemu-arm, QEMU Developers; +Cc: Richard Henderson, patches
On 10 May 2018 at 15:09, Peter Maydell <peter.maydell@linaro.org> wrote:
> In commit d81ce0ef2c4f105 we added an extra float_status field
> fp_status_fp16 for Arm, but forgot to initialize it correctly
> by setting it to float_tininess_before_rounding. This currently
> will only cause problems for the new V8_FP16 feature, since the
> float-to-float conversion code doesn't use it yet. The effect
> would be that we failed to set the Underflow IEEE exception flag
> in all the cases where we should.
Oops, I forgot to fix the patch summary line from my
quick-hack commit. Something like:
target/arm: Fix tininess detection for fp16 arithmetic
would be a bit clearer.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix fp16 tininess
2018-05-10 14:09 [Qemu-devel] [PATCH] fix fp16 tininess Peter Maydell
2018-05-10 14:11 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
@ 2018-05-10 14:34 ` Richard Henderson
2018-05-10 15:07 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2018-05-10 14:34 UTC (permalink / raw)
To: Peter Maydell, qemu-arm, qemu-devel; +Cc: patches, Alex Bennée
On 05/10/2018 07:09 AM, Peter Maydell wrote:
> In commit d81ce0ef2c4f105 we added an extra float_status field
> fp_status_fp16 for Arm, but forgot to initialize it correctly
> by setting it to float_tininess_before_rounding. This currently
> will only cause problems for the new V8_FP16 feature, since the
> float-to-float conversion code doesn't use it yet. The effect
> would be that we failed to set the Underflow IEEE exception flag
> in all the cases where we should.
>
> Add the missing initialization.
>
> Fixes: d81ce0ef2c4f105
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target/arm/cpu.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix fp16 tininess
2018-05-10 14:09 [Qemu-devel] [PATCH] fix fp16 tininess Peter Maydell
2018-05-10 14:11 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-05-10 14:34 ` [Qemu-devel] " Richard Henderson
@ 2018-05-10 15:07 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2018-05-10 15:07 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, qemu-devel, patches, Richard Henderson
Peter Maydell <peter.maydell@linaro.org> writes:
> In commit d81ce0ef2c4f105 we added an extra float_status field
> fp_status_fp16 for Arm, but forgot to initialize it correctly
> by setting it to float_tininess_before_rounding. This currently
> will only cause problems for the new V8_FP16 feature, since the
> float-to-float conversion code doesn't use it yet. The effect
> would be that we failed to set the Underflow IEEE exception flag
> in all the cases where we should.
>
> Add the missing initialization.
>
> Fixes: d81ce0ef2c4f105
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> target/arm/cpu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index d175c5e94f..7939c6b8ae 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -324,6 +324,8 @@ static void arm_cpu_reset(CPUState *s)
> &env->vfp.fp_status);
> set_float_detect_tininess(float_tininess_before_rounding,
> &env->vfp.standard_fp_status);
> + set_float_detect_tininess(float_tininess_before_rounding,
> + &env->vfp.fp_status_f16);
> #ifndef CONFIG_USER_ONLY
> if (kvm_enabled()) {
> kvm_arm_reset_vcpu(cpu);
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-10 15:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 14:09 [Qemu-devel] [PATCH] fix fp16 tininess Peter Maydell
2018-05-10 14:11 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-05-10 14:34 ` [Qemu-devel] " Richard Henderson
2018-05-10 15:07 ` Alex Bennée
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.