kernel_optimize_test/arch/mips/math-emu
Paul Burton 597ce1723e MIPS: Support for 64-bit FP with O32 binaries
CPUs implementing MIPS32 R2 may include a 64-bit FPU, just as MIPS64 CPUs
do. In order to preserve backwards compatibility a 64-bit FPU will act
like a 32-bit FPU (by accessing doubles from the least significant 32
bits of an even-odd pair of FP registers) when the Status.FR bit is
zero, again just like a mips64 CPU. The standard O32 ABI is defined
expecting a 32-bit FPU, however recent toolchains support use of a
64-bit FPU from an O32 MIPS32 executable. When an ELF executable is
built to use a 64-bit FPU a new flag (EF_MIPS_FP64) is set in the ELF
header.

With this patch the kernel will check the EF_MIPS_FP64 flag when
executing an O32 binary, and set Status.FR accordingly. The addition
of O32 64-bit FP support lessens the opportunity for optimisation in
the FPU emulator, so a CONFIG_MIPS_O32_FP64_SUPPORT Kconfig option is
introduced to allow this support to be disabled for those that don't
require it.

Inspired by an earlier patch by Leonid Yegoshin, but implemented more
cleanly & correctly.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Paul Burton <paul.burton@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/6154/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-01-13 23:40:56 +01:00
..
cp1emu.c MIPS: Support for 64-bit FP with O32 binaries 2014-01-13 23:40:56 +01:00
dp_add.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
dp_cmp.c
dp_div.c
dp_fint.c
dp_flong.c
dp_frexp.c
dp_fsp.c
dp_logb.c
dp_modf.c
dp_mul.c
dp_scalb.c
dp_simple.c
dp_sqrt.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
dp_sub.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
dp_tint.c
dp_tlong.c
dsemul.c MIPS: microMIPS: Floating point support. 2013-05-09 17:55:18 +02:00
ieee754.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ieee754.h
ieee754d.c
ieee754dp.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ieee754dp.h
ieee754int.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ieee754m.c
ieee754sp.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ieee754sp.h
ieee754xcpt.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
kernel_linkage.c MIPS: Support for 64-bit FP with O32 binaries 2014-01-13 23:40:56 +01:00
Makefile MIPS: Nuke empty lines at end of files. 2013-02-01 10:00:22 +01:00
sp_add.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sp_cmp.c
sp_div.c
sp_fdp.c
sp_fint.c
sp_flong.c
sp_frexp.c
sp_logb.c
sp_modf.c
sp_mul.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sp_scalb.c
sp_simple.c
sp_sqrt.c
sp_sub.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sp_tint.c
sp_tlong.c