aboutsummaryrefslogtreecommitdiff
path: root/fpu/softfloat.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-12-17 17:57:14 +0100
committerCédric Le Goater <clg@kaod.org>2021-12-17 17:57:14 +0100
commite706d4455b8d54252b11fc504c56df060151cb89 (patch)
treef022ce31bc016a7af7a0fa84efaa9444949bebb3 /fpu/softfloat.c
parent81254b02eb2a551d7794d542cbdff03e8349355e (diff)
downloadqemu-e706d4455b8d54252b11fc504c56df060151cb89.zip
qemu-e706d4455b8d54252b11fc504c56df060151cb89.tar.gz
qemu-e706d4455b8d54252b11fc504c56df060151cb89.tar.bz2
softfloat: Add flag specific to signaling nans
PowerPC has this flag, and it's easier to compute it here than after the fact. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211119160502.17432-8-richard.henderson@linaro.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'fpu/softfloat.c')
-rw-r--r--fpu/softfloat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 9a28720..834ed3a 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -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.