]> git.proxmox.com Git - mirror_qemu.git/blobdiff - fpu/softfloat.c
softfloat: Add flag specific to signaling nans
[mirror_qemu.git] / fpu / softfloat.c
index 9a28720d82a5bc87c5fc05677695aad1674854b0..834ed3a054f7727a8e788022a9d2a94e4cc58581 100644 (file)
@@ -2543,8 +2543,10 @@ floatx80 floatx80_mod(floatx80 a, floatx80 b, float_status *status)
 static void parts_float_to_ahp(FloatParts64 *a, float_status *s)
 {
     switch (a->cls) {
-    case float_class_qnan:
     case float_class_snan:
+        float_raise(float_flag_invalid_snan, s);
+        /* fall through */
+    case float_class_qnan:
         /*
          * There is no NaN in the destination format.  Raise Invalid
          * and return a zero with the sign of the input NaN.