Ralf Baechle
f71baa1168
MIPS: math-emu: Inline ieee754sp_issnan and ieee754dp_issnan.
...
Shaves another 16 bytes off but more importantly avoids function calls.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:14 +02:00
Ralf Baechle
dfbf42b844
MIPS: math-emu: Remove unused code.
...
Shrinks the FPU emulator by 4528 bytes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:14 +02:00
Ralf Baechle
1bc3320d95
MIPS: math-emu: Remove unused ieee754sp_bestnan() and ieee754dp_bestnan().
...
Both are unused since lmo commit fdffbafbb38723618626c70ffdc6ff9175cdffa2
[Lots of FPU bug fixes from Kjeld Borch Egevang.]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:13 +02:00
Ralf Baechle
3a33db2321
MIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite().
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:13 +02:00
Ralf Baechle
b3a7ad2b0c
MIPS: math-emu: Eleminate duplicate definitions of identical macros.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:13 +02:00
Ralf Baechle
3e160aad0f
MIPS: math-emu: Use SPSIGN() rather than DPSIGN() in ieee754sp_sub().
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:13 +02:00
Ralf Baechle
ad8fb5537a
MIPS: math-emu: Replace DP_MBITS with DP_FBITS and SP_MBITS with SP_FBITS.
...
Both were defined as 23 rsp. 52 though the mentissa is actually a bit more
than the fraction.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:13 +02:00
Ralf Baechle
f5410d19b0
MIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:12 +02:00
Ralf Baechle
1eaf198d3a
MIPS: math-emu: Cleanup stdarg usage including apparently bogus comment.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:12 +02:00
Ralf Baechle
08f1faa02a
MIPS: math-emu: Remove #if 1 and dead code from its #else branch.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:12 +02:00
Ralf Baechle
e812a73932
MIPS: math-emu: Cleanup ieee754si_indef() / ieee754di_indef().
...
LONG_LONG_MAX is a symbol defined in <limits.h> which may not be available
so better rely on something provided by a kernel header. While at it,
turn these function-like macros into inline functions.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:08 +02:00
Ralf Baechle
92df0f8b35
MIPS: math-emu: Convert debug printks to pr_debug getting.
...
And another bunch of #ifdefs bite the dust.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:04 +02:00
Ralf Baechle
fcfe2285e5
MIPS: math-emu: Get rid of unuable extended precision support.
...
No usable functionality and nothig does ever define IEEE854_XP anyway.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:11:02 +02:00
Ralf Baechle
66b047dc9c
MIPS: IP22: This platform may come with either MIPS III or MIPS IV CPUs.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-23 15:10:59 +02:00
Ralf Baechle
08a07904e1
MIPS: math-emu: Remove most ifdefery.
...
Most of these tests should be runtime tests. This also finally means
that on a MIPS III systems MIPS IV opcodes are going to result in an
exception as they're supposed to.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:58 +02:00
Ralf Baechle
9e8bad1f9c
MIPS: math-emu: Turn macros into functions where possible.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:57 +02:00
Ralf Baechle
bee1653593
MIPS: math-emu: Harden ieee754int.h against multiple inclusion.
...
The header file had no include guards; this only happened to work because
the file only contains macro definitions and protypes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:56 +02:00
Ralf Baechle
47fa0c0251
MIPS: math-emu: Reformat code according to coding style.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:56 +02:00
Ralf Baechle
85c51c511d
MIPS: math-emu: Move all debug fs code to a separate file.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:55 +02:00
Ralf Baechle
6d18b6246d
MIPS: math-emu: Remove fine example of cargo cult programming.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:54 +02:00
Ralf Baechle
cd8ee345e8
MIPS: math-emu: Header file weeding.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:53 +02:00
Ralf Baechle
5160d45dd2
MIPS: branch: Make inclusion of <asm/branch.h> safe.
...
It was relying on other headers having been included before.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:53 +02:00
Ralf Baechle
e7e9cae5db
MIPS: math-emu: Use helpers to manipulate CAUSEF_BD flag.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:51 +02:00
Ralf Baechle
5a7ebbf893
MIPS: branch: New helpers to modify branch delay slot flag in struct pt_regs
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:49 +02:00
Ralf Baechle
2209bcb131
MIPS: math-emu: Get rid of typedefs.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-05-21 11:12:48 +02:00