diff mbox

[PULL,14/18] target-alpha: Suppress underflow from CVTTQ if DNZ

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

Commit Message

Richard Henderson July 9, 2014, 4:20 p.m. UTC
I.e. respect flush_inputs_to_zero.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-alpha/fpu_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target-alpha/fpu_helper.c b/target-alpha/fpu_helper.c
index cf6c44a..796d907 100644
--- a/target-alpha/fpu_helper.c
+++ b/target-alpha/fpu_helper.c
@@ -725,7 +725,7 @@  static inline uint64_t inline_cvttq(CPUAlphaState *env, uint64_t a,
     frac = a & 0xfffffffffffffull;
 
     if (exp == 0) {
-        if (unlikely(frac != 0)) {
+        if (unlikely(frac != 0) && !env->fp_status.flush_inputs_to_zero) {
             goto do_underflow;
         }
     } else if (exp == 0x7ff) {