diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-04-18 18:36:32 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-21 05:12:57 -0400 |
commit | 9e8bad1f9c0370b2635175b34d6151b90a53da5c (patch) | |
tree | 0971254e7d21761a5dec3f946e2f65c9fd43e844 /arch/mips/math-emu/sp_sqrt.c | |
parent | bee1653593b39ac85b45a057bb8c22dc1489cf6a (diff) |
MIPS: math-emu: Turn macros into functions where possible.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/sp_sqrt.c')
-rw-r--r-- | arch/mips/math-emu/sp_sqrt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/math-emu/sp_sqrt.c b/arch/mips/math-emu/sp_sqrt.c index 4c60d91961f4..7e87f469b979 100644 --- a/arch/mips/math-emu/sp_sqrt.c +++ b/arch/mips/math-emu/sp_sqrt.c | |||
@@ -35,7 +35,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) | |||
35 | /* take care of Inf and NaN */ | 35 | /* take care of Inf and NaN */ |
36 | 36 | ||
37 | EXPLODEXSP; | 37 | EXPLODEXSP; |
38 | CLEARCX; | 38 | ieee754_clearcx(); |
39 | FLUSHXSP; | 39 | FLUSHXSP; |
40 | 40 | ||
41 | /* x == INF or NAN? */ | 41 | /* x == INF or NAN? */ |
@@ -44,7 +44,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) | |||
44 | /* sqrt(Nan) = Nan */ | 44 | /* sqrt(Nan) = Nan */ |
45 | return ieee754sp_nanxcpt(x, "sqrt"); | 45 | return ieee754sp_nanxcpt(x, "sqrt"); |
46 | case IEEE754_CLASS_SNAN: | 46 | case IEEE754_CLASS_SNAN: |
47 | SETCX(IEEE754_INVALID_OPERATION); | 47 | ieee754_setcx(IEEE754_INVALID_OPERATION); |
48 | return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); | 48 | return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); |
49 | case IEEE754_CLASS_ZERO: | 49 | case IEEE754_CLASS_ZERO: |
50 | /* sqrt(0) = 0 */ | 50 | /* sqrt(0) = 0 */ |
@@ -52,7 +52,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) | |||
52 | case IEEE754_CLASS_INF: | 52 | case IEEE754_CLASS_INF: |
53 | if (xs) { | 53 | if (xs) { |
54 | /* sqrt(-Inf) = Nan */ | 54 | /* sqrt(-Inf) = Nan */ |
55 | SETCX(IEEE754_INVALID_OPERATION); | 55 | ieee754_setcx(IEEE754_INVALID_OPERATION); |
56 | return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); | 56 | return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); |
57 | } | 57 | } |
58 | /* sqrt(+Inf) = Inf */ | 58 | /* sqrt(+Inf) = Inf */ |
@@ -61,7 +61,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) | |||
61 | case IEEE754_CLASS_NORM: | 61 | case IEEE754_CLASS_NORM: |
62 | if (xs) { | 62 | if (xs) { |
63 | /* sqrt(-x) = Nan */ | 63 | /* sqrt(-x) = Nan */ |
64 | SETCX(IEEE754_INVALID_OPERATION); | 64 | ieee754_setcx(IEEE754_INVALID_OPERATION); |
65 | return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); | 65 | return ieee754sp_nanxcpt(ieee754sp_indef(), "sqrt"); |
66 | } | 66 | } |
67 | break; | 67 | break; |
@@ -99,7 +99,7 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | if (ix != 0) { | 101 | if (ix != 0) { |
102 | SETCX(IEEE754_INEXACT); | 102 | ieee754_setcx(IEEE754_INEXACT); |
103 | switch (ieee754_csr.rm) { | 103 | switch (ieee754_csr.rm) { |
104 | case IEEE754_RP: | 104 | case IEEE754_RP: |
105 | q += 2; | 105 | q += 2; |