diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/math-emu/sp_fdp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/mips/math-emu/sp_fdp.c b/arch/mips/math-emu/sp_fdp.c index 152637093854..3797148893ad 100644 --- a/arch/mips/math-emu/sp_fdp.c +++ b/arch/mips/math-emu/sp_fdp.c | |||
@@ -30,10 +30,11 @@ static inline union ieee754sp ieee754sp_nan_fdp(int xs, u64 xm) | |||
30 | 30 | ||
31 | union ieee754sp ieee754sp_fdp(union ieee754dp x) | 31 | union ieee754sp ieee754sp_fdp(union ieee754dp x) |
32 | { | 32 | { |
33 | union ieee754sp y; | ||
33 | u32 rm; | 34 | u32 rm; |
34 | 35 | ||
35 | COMPXDP; | 36 | COMPXDP; |
36 | union ieee754sp nan; | 37 | COMPYSP; |
37 | 38 | ||
38 | EXPLODEXDP; | 39 | EXPLODEXDP; |
39 | 40 | ||
@@ -46,10 +47,11 @@ union ieee754sp ieee754sp_fdp(union ieee754dp x) | |||
46 | return ieee754sp_nanxcpt(ieee754sp_nan_fdp(xs, xm)); | 47 | return ieee754sp_nanxcpt(ieee754sp_nan_fdp(xs, xm)); |
47 | 48 | ||
48 | case IEEE754_CLASS_QNAN: | 49 | case IEEE754_CLASS_QNAN: |
49 | nan = ieee754sp_nan_fdp(xs, xm); | 50 | y = ieee754sp_nan_fdp(xs, xm); |
50 | if (!ieee754sp_isnan(nan)) | 51 | EXPLODEYSP; |
51 | nan = ieee754sp_indef(); | 52 | if (!ieee754_class_nan(yc)) |
52 | return nan; | 53 | y = ieee754sp_indef(); |
54 | return y; | ||
53 | 55 | ||
54 | case IEEE754_CLASS_INF: | 56 | case IEEE754_CLASS_INF: |
55 | return ieee754sp_inf(xs); | 57 | return ieee754sp_inf(xs); |