softfloat: Add flag specific to sqrt(-x)

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-6-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
Richard Henderson 2021-12-17 17:57:14 +01:00 committed by Cédric Le Goater
parent 10cc964030
commit f8718aab89
2 changed files with 2 additions and 1 deletions

View File

@ -869,7 +869,7 @@ static void partsN(sqrt)(FloatPartsN *a, float_status *status,
return; return;
d_nan: d_nan:
float_raise(float_flag_invalid, status); float_raise(float_flag_invalid | float_flag_invalid_sqrt, status);
parts_default_nan(a, status); parts_default_nan(a, status);
} }

View File

@ -156,6 +156,7 @@ enum {
float_flag_invalid_imz = 0x0100, /* inf * 0 */ float_flag_invalid_imz = 0x0100, /* inf * 0 */
float_flag_invalid_idi = 0x0200, /* inf / inf */ float_flag_invalid_idi = 0x0200, /* inf / inf */
float_flag_invalid_zdz = 0x0400, /* 0 / 0 */ float_flag_invalid_zdz = 0x0400, /* 0 / 0 */
float_flag_invalid_sqrt = 0x0800, /* sqrt(-x) */
}; };
/* /*