Skip to content

Commit

Permalink
MIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite().
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed May 23, 2014
1 parent b3a7ad2 commit 3a33db2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
5 changes: 0 additions & 5 deletions arch/mips/math-emu/dp_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/math-emu/ieee754.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down
5 changes: 5 additions & 0 deletions arch/mips/math-emu/ieee754dp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 5 additions & 0 deletions arch/mips/math-emu/ieee754sp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/math-emu/sp_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3a33db2

Please sign in to comment.