aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/sp_tlong.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-18 18:36:32 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-21 05:12:57 -0400
commit9e8bad1f9c0370b2635175b34d6151b90a53da5c (patch)
tree0971254e7d21761a5dec3f946e2f65c9fd43e844 /arch/mips/math-emu/sp_tlong.c
parentbee1653593b39ac85b45a057bb8c22dc1489cf6a (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_tlong.c')
-rw-r--r--arch/mips/math-emu/sp_tlong.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/math-emu/sp_tlong.c b/arch/mips/math-emu/sp_tlong.c
index da412d38d5ef..a05d09318fb1 100644
--- a/arch/mips/math-emu/sp_tlong.c
+++ b/arch/mips/math-emu/sp_tlong.c
@@ -30,7 +30,7 @@ s64 ieee754sp_tlong(union ieee754sp x)
30{ 30{
31 COMPXDP; /* <-- need 64-bit mantissa tmp */ 31 COMPXDP; /* <-- need 64-bit mantissa tmp */
32 32
33 CLEARCX; 33 ieee754_clearcx();
34 34
35 EXPLODEXSP; 35 EXPLODEXSP;
36 FLUSHXSP; 36 FLUSHXSP;
@@ -39,7 +39,7 @@ s64 ieee754sp_tlong(union ieee754sp x)
39 case IEEE754_CLASS_SNAN: 39 case IEEE754_CLASS_SNAN:
40 case IEEE754_CLASS_QNAN: 40 case IEEE754_CLASS_QNAN:
41 case IEEE754_CLASS_INF: 41 case IEEE754_CLASS_INF:
42 SETCX(IEEE754_INVALID_OPERATION); 42 ieee754_setcx(IEEE754_INVALID_OPERATION);
43 return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x); 43 return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x);
44 case IEEE754_CLASS_ZERO: 44 case IEEE754_CLASS_ZERO:
45 return 0; 45 return 0;
@@ -53,7 +53,7 @@ s64 ieee754sp_tlong(union ieee754sp x)
53 return -0x8000000000000000LL; 53 return -0x8000000000000000LL;
54 /* Set invalid. We will only use overflow for floating 54 /* Set invalid. We will only use overflow for floating
55 point overflow */ 55 point overflow */
56 SETCX(IEEE754_INVALID_OPERATION); 56 ieee754_setcx(IEEE754_INVALID_OPERATION);
57 return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x); 57 return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x);
58 } 58 }
59 /* oh gawd */ 59 /* oh gawd */
@@ -95,11 +95,11 @@ s64 ieee754sp_tlong(union ieee754sp x)
95 } 95 }
96 if ((xm >> 63) != 0) { 96 if ((xm >> 63) != 0) {
97 /* This can happen after rounding */ 97 /* This can happen after rounding */
98 SETCX(IEEE754_INVALID_OPERATION); 98 ieee754_setcx(IEEE754_INVALID_OPERATION);
99 return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x); 99 return ieee754di_xcpt(ieee754di_indef(), "sp_tlong", x);
100 } 100 }
101 if (round || sticky) 101 if (round || sticky)
102 SETCX(IEEE754_INEXACT); 102 ieee754_setcx(IEEE754_INEXACT);
103 } 103 }
104 if (xs) 104 if (xs)
105 return -xm; 105 return -xm;