diff mbox

[PULL,17/18] target-alpha: Fix fpcr_flush_to_zero initialization

Message ID 1404922834-28169-18-git-send-email-rth@twiddle.net
State New
Headers show

Commit Message

Richard Henderson July 9, 2014, 4:20 p.m. UTC
The two bits required are UNDZ and UNFD, not UNDZ and DNOD.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-alpha/helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target-alpha/helper.c b/target-alpha/helper.c
index 6bcde21..26d5188 100644
--- a/target-alpha/helper.c
+++ b/target-alpha/helper.c
@@ -159,8 +159,9 @@  void cpu_alpha_store_fpcr (CPUAlphaState *env, uint64_t val)
 
     env->fpcr_dnod = (val & FPCR_DNOD) != 0;
     env->fpcr_undz = (val & FPCR_UNDZ) != 0;
-    env->fpcr_flush_to_zero = env->fpcr_dnod & env->fpcr_undz;
     env->fp_status.flush_inputs_to_zero = (val & FPCR_DNZ) != 0;
+    env->fpcr_flush_to_zero
+      = (val & (FPCR_UNDZ | FPCR_UNFD)) == (FPCR_UNDZ | FPCR_UNFD);
 }
 
 uint64_t helper_load_fpcr(CPUAlphaState *env)