Skip to content

Commit

Permalink
MIPS: math-emu: Remove unused code.
Browse files Browse the repository at this point in the history
Shrinks the FPU emulator by 4528 bytes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed May 23, 2014
1 parent 1bc3320 commit dfbf42b
Show file tree
Hide file tree
Showing 21 changed files with 6 additions and 699 deletions.
13 changes: 6 additions & 7 deletions arch/mips/math-emu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
# Makefile for the Linux/MIPS kernel FPU emulation.
#

obj-y := cp1emu.o ieee754m.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \
ieee754xcpt.o dp_frexp.o dp_modf.o dp_div.o dp_mul.o dp_sub.o \
dp_add.o dp_fsp.o dp_cmp.o dp_logb.o dp_scalb.o dp_simple.o \
dp_tint.o dp_fint.o dp_tlong.o dp_flong.o sp_frexp.o sp_modf.o \
sp_div.o sp_mul.o sp_sub.o sp_add.o sp_fdp.o sp_cmp.o sp_logb.o \
sp_scalb.o sp_simple.o sp_tint.o sp_fint.o sp_tlong.o sp_flong.o \
dp_sqrt.o sp_sqrt.o kernel_linkage.o dsemul.o
obj-y := cp1emu.o ieee754d.o ieee754dp.o ieee754sp.o ieee754.o \
ieee754xcpt.o dp_div.o dp_mul.o dp_sub.o dp_add.o dp_fsp.o \
dp_cmp.o dp_simple.o dp_tint.o dp_fint.o dp_tlong.o dp_flong.o \
sp_div.o sp_mul.o sp_sub.o sp_add.o sp_fdp.o sp_cmp.o sp_simple.o \
sp_tint.o sp_fint.o sp_tlong.o sp_flong.o dp_sqrt.o sp_sqrt.o \
kernel_linkage.o dsemul.o

obj-$(CONFIG_DEBUG_FS) += me-debugfs.o
8 changes: 0 additions & 8 deletions arch/mips/math-emu/dp_fint.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,3 @@ union ieee754dp ieee754dp_fint(int x)
}
return builddp(xs, xe + DP_EBIAS, xm & ~DP_HIDDEN_BIT);
}

union ieee754dp ieee754dp_funs(unsigned int u)
{
if ((int) u < 0)
return ieee754dp_add(ieee754dp_1e31(),
ieee754dp_fint(u & ~(1 << 31)));
return ieee754dp_fint(u);
}
8 changes: 0 additions & 8 deletions arch/mips/math-emu/dp_flong.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,3 @@ union ieee754dp ieee754dp_flong(s64 x)
}
DPNORMRET1(xs, xe, xm, "dp_flong", x);
}

union ieee754dp ieee754dp_fulong(u64 u)
{
if ((s64) u < 0)
return ieee754dp_add(ieee754dp_1e63(),
ieee754dp_flong(u & ~(1ULL << 63)));
return ieee754dp_flong(u);
}
52 changes: 0 additions & 52 deletions arch/mips/math-emu/dp_frexp.c

This file was deleted.

53 changes: 0 additions & 53 deletions arch/mips/math-emu/dp_logb.c

This file was deleted.

79 changes: 0 additions & 79 deletions arch/mips/math-emu/dp_modf.c

This file was deleted.

57 changes: 0 additions & 57 deletions arch/mips/math-emu/dp_scalb.c

This file was deleted.

8 changes: 0 additions & 8 deletions arch/mips/math-emu/dp_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@

#include "ieee754dp.h"

union ieee754dp ieee754dp_copysign(union ieee754dp x, union ieee754dp y)
{
ieee754_clearcx();
DPSIGN(x) = DPSIGN(y);
return x;
}


union ieee754dp ieee754dp_neg(union ieee754dp x)
{
COMPXDP;
Expand Down
13 changes: 0 additions & 13 deletions arch/mips/math-emu/dp_tint.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,3 @@ int ieee754dp_tint(union ieee754dp x)
else
return xm;
}


unsigned int ieee754dp_tuns(union ieee754dp x)
{
union ieee754dp hb = ieee754dp_1e31();

/* what if x < 0 ?? */
if (ieee754dp_lt(x, hb))
return (unsigned) ieee754dp_tint(x);

return (unsigned) ieee754dp_tint(ieee754dp_sub(x, hb)) |
((unsigned) 1 << 31);
}
13 changes: 0 additions & 13 deletions arch/mips/math-emu/dp_tlong.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,3 @@ s64 ieee754dp_tlong(union ieee754dp x)
else
return xm;
}


u64 ieee754dp_tulong(union ieee754dp x)
{
union ieee754dp hb = ieee754dp_1e63();

/* what if x < 0 ?? */
if (ieee754dp_lt(x, hb))
return (u64) ieee754dp_tlong(x);

return (u64) ieee754dp_tlong(ieee754dp_sub(x, hb)) |
(1ULL << 63);
}
Loading

0 comments on commit dfbf42b

Please sign in to comment.