Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfbf42b8 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

MIPS: math-emu: Remove unused code.



Shrinks the FPU emulator by 4528 bytes.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 1bc3320d
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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
+0 −8
Original line number Diff line number Diff line
@@ -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);
}
+0 −8
Original line number Diff line number Diff line
@@ -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);
}

arch/mips/math-emu/dp_frexp.c

deleted100644 → 0
+0 −52
Original line number Diff line number Diff line
/* IEEE754 floating point arithmetic
 * double precision: common utilities
 */
/*
 * MIPS floating point support
 * Copyright (C) 1994-2000 Algorithmics Ltd.
 *
 * ########################################################################
 *
 *  This program is free software; you can distribute it and/or modify it
 *  under the terms of the GNU General Public License (Version 2) as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 *
 * ########################################################################
 */


#include "ieee754dp.h"

/* close to ieeep754dp_logb
*/
union ieee754dp ieee754dp_frexp(union ieee754dp x, int *eptr)
{
	COMPXDP;
	ieee754_clearcx();
	EXPLODEXDP;

	switch (xc) {
	case IEEE754_CLASS_SNAN:
	case IEEE754_CLASS_QNAN:
	case IEEE754_CLASS_INF:
	case IEEE754_CLASS_ZERO:
		*eptr = 0;
		return x;
	case IEEE754_CLASS_DNORM:
		DPDNORMX;
		break;
	case IEEE754_CLASS_NORM:
		break;
	}
	*eptr = xe + 1;
	return builddp(xs, -1 + DP_EBIAS, xm & ~DP_HIDDEN_BIT);
}

arch/mips/math-emu/dp_logb.c

deleted100644 → 0
+0 −53
Original line number Diff line number Diff line
/* IEEE754 floating point arithmetic
 * double precision: common utilities
 */
/*
 * MIPS floating point support
 * Copyright (C) 1994-2000 Algorithmics Ltd.
 *
 * ########################################################################
 *
 *  This program is free software; you can distribute it and/or modify it
 *  under the terms of the GNU General Public License (Version 2) as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 *
 * ########################################################################
 */


#include "ieee754dp.h"

union ieee754dp ieee754dp_logb(union ieee754dp x)
{
	COMPXDP;

	ieee754_clearcx();

	EXPLODEXDP;

	switch (xc) {
	case IEEE754_CLASS_SNAN:
		return ieee754dp_nanxcpt(x, "logb", x);
	case IEEE754_CLASS_QNAN:
		return x;
	case IEEE754_CLASS_INF:
		return ieee754dp_inf(0);
	case IEEE754_CLASS_ZERO:
		return ieee754dp_inf(1);
	case IEEE754_CLASS_DNORM:
		DPDNORMX;
		break;
	case IEEE754_CLASS_NORM:
		break;
	}
	return ieee754dp_fint(xe);
}
Loading