summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/math-emu/types.c
diff options
context:
space:
mode:
authorKumar Gala2008-06-04 09:59:29 +0200
committerKumar Gala2008-10-01 15:40:07 +0200
commitd2b194ed820880eb19c43b9c10d9f5f30026ee54 (patch)
tree1ac21746a8c4395c7e7fd73a60202db892fe4d76 /arch/powerpc/math-emu/types.c
parentpowerpc: Correct USB support for GE Fanuc SBC610 (diff)
downloadkernel-qcow2-linux-d2b194ed820880eb19c43b9c10d9f5f30026ee54.tar.gz
kernel-qcow2-linux-d2b194ed820880eb19c43b9c10d9f5f30026ee54.tar.xz
kernel-qcow2-linux-d2b194ed820880eb19c43b9c10d9f5f30026ee54.zip
powerpc/math-emu: Use kernel generic math-emu code
The math emulation code is centered around a set of generic macros that provide the core of the emulation that are shared by the various architectures and other projects (like glibc). Each arch implements its own sfp-machine.h to specific various arch specific details. For historic reasons that are now lost the powerpc math-emu code had its own version of the common headers. This moves us to using the kernel generic version and thus getting fixes when those are updated. Also cleaned up exception/error reporting from the FP emulation functions. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/math-emu/types.c')
-rw-r--r--arch/powerpc/math-emu/types.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/arch/powerpc/math-emu/types.c b/arch/powerpc/math-emu/types.c
deleted file mode 100644
index e1ed15d829db..000000000000
--- a/arch/powerpc/math-emu/types.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "soft-fp.h"
-#include "double.h"
-#include "single.h"
-
-void
-fp_unpack_d(long *_s, unsigned long *_f1, unsigned long *_f0,
- long *_e, long *_c, void *val)
-{
- FP_DECL_D(X);
-
- __FP_UNPACK_RAW_2(D, X, val);
-
- _FP_UNPACK_CANONICAL(D, 2, X);
-
- *_s = X_s;
- *_f1 = X_f1;
- *_f0 = X_f0;
- *_e = X_e;
- *_c = X_c;
-}
-
-int
-fp_pack_d(void *val, long X_s, unsigned long X_f1,
- unsigned long X_f0, long X_e, long X_c)
-{
- int exc;
-
- exc = _FP_PACK_CANONICAL(D, 2, X);
- if (!exc || !__FPU_TRAP_P(exc))
- __FP_PACK_RAW_2(D, val, X);
- return exc;
-}
-
-int
-fp_pack_ds(void *val, long X_s, unsigned long X_f1,
- unsigned long X_f0, long X_e, long X_c)
-{
- FP_DECL_S(__X);
- int exc;
-
- FP_CONV(S, D, 1, 2, __X, X);
- exc = _FP_PACK_CANONICAL(S, 1, __X);
- if (!exc || !__FPU_TRAP_P(exc)) {
- _FP_UNPACK_CANONICAL(S, 1, __X);
- FP_CONV(D, S, 2, 1, X, __X);
- exc |= _FP_PACK_CANONICAL(D, 2, X);
- if (!exc || !__FPU_TRAP_P(exc))
- __FP_PACK_RAW_2(D, val, X);
- }
- return exc;
-}