aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/math-emu
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-04-22 16:52:01 +0200
committerRalf Baechle <ralf@linux-mips.org>2014-05-23 15:11:13 +0200
commit3a33db2321759975dba3e6156459c3eeb3f6c1e2 (patch)
tree43d693b331d9d8b2bb29bb4809b25bece7af60d3 /arch/mips/math-emu
parentb3a7ad2b0c48e046ff8a7934f3aa55fc06c54762 (diff)
MIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu')
-rw-r--r--arch/mips/math-emu/dp_simple.c5
-rw-r--r--arch/mips/math-emu/ieee754.h2
-rw-r--r--arch/mips/math-emu/ieee754dp.h5
-rw-r--r--arch/mips/math-emu/ieee754sp.h5
-rw-r--r--arch/mips/math-emu/sp_simple.c5
5 files changed, 10 insertions, 12 deletions
diff --git a/arch/mips/math-emu/dp_simple.c b/arch/mips/math-emu/dp_simple.c
index c116502a00b..cae11b0454c 100644
--- a/arch/mips/math-emu/dp_simple.c
+++ b/arch/mips/math-emu/dp_simple.c
@@ -26,11 +26,6 @@
#include "ieee754dp.h"
-int ieee754dp_finite(union ieee754dp x)
-{
- return DPBEXP(x) != DP_EMAX + 1 + DP_EBIAS;
-}
-
union ieee754dp ieee754dp_copysign(union ieee754dp x, union ieee754dp y)
{
ieee754_clearcx();
diff --git a/arch/mips/math-emu/ieee754.h b/arch/mips/math-emu/ieee754.h
index 6d9a89051b2..7466230da5b 100644
--- a/arch/mips/math-emu/ieee754.h
+++ b/arch/mips/math-emu/ieee754.h
@@ -68,7 +68,6 @@ union ieee754sp {
/*
* single precision (often aka float)
*/
-int ieee754sp_finite(union ieee754sp x);
int ieee754sp_class(union ieee754sp x);
union ieee754sp ieee754sp_abs(union ieee754sp x);
@@ -112,7 +111,6 @@ union ieee754sp ieee754sp_sqrt(union ieee754sp x);
/*
* double precision (often aka double)
*/
-int ieee754dp_finite(union ieee754dp x);
int ieee754dp_class(union ieee754dp x);
/* x with sign of y */
diff --git a/arch/mips/math-emu/ieee754dp.h b/arch/mips/math-emu/ieee754dp.h
index 216bab308dc..c755e1fc855 100644
--- a/arch/mips/math-emu/ieee754dp.h
+++ b/arch/mips/math-emu/ieee754dp.h
@@ -44,6 +44,11 @@
#define DPBEXP(dp) (dp.parts.bexp)
#define DPMANT(dp) (dp.parts.mant)
+static inline int ieee754dp_finite(union ieee754dp x)
+{
+ return DPBEXP(x) != DP_EMAX + 1 + DP_EBIAS;
+}
+
/* 3bit extended double precision sticky right shift */
#define XDPSRS(v,rs) \
((rs > (DP_FBITS+3))?1:((v) >> (rs)) | ((v) << (64-(rs)) != 0))
diff --git a/arch/mips/math-emu/ieee754sp.h b/arch/mips/math-emu/ieee754sp.h
index a28ced853f2..45a2de38eb4 100644
--- a/arch/mips/math-emu/ieee754sp.h
+++ b/arch/mips/math-emu/ieee754sp.h
@@ -44,6 +44,11 @@
#define SPBEXP(sp) (sp.parts.bexp)
#define SPMANT(sp) (sp.parts.mant)
+static inline int ieee754sp_finite(union ieee754sp x)
+{
+ return SPBEXP(x) != SP_EMAX + 1 + SP_EBIAS;
+}
+
/* 3bit extended single precision sticky right shift */
#define SPXSRSXn(rs) \
(xe += rs, \
diff --git a/arch/mips/math-emu/sp_simple.c b/arch/mips/math-emu/sp_simple.c
index 4da597b6a1f..b63e9fb7ef4 100644
--- a/arch/mips/math-emu/sp_simple.c
+++ b/arch/mips/math-emu/sp_simple.c
@@ -26,11 +26,6 @@
#include "ieee754sp.h"
-int ieee754sp_finite(union ieee754sp x)
-{
- return SPBEXP(x) != SP_EMAX + 1 + SP_EBIAS;
-}
-
union ieee754sp ieee754sp_copysign(union ieee754sp x, union ieee754sp y)
{
ieee754_clearcx();