unicorn/qemu/target-mips
Leon Alrae 224cbb008a
target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs
MIPS Release 6 and MIPS SIMD Architecture make it mandatory to have IEEE
754-2008 FPU which is indicated by CP1 FIR.HAS2008, FCSR.ABS2008 and
FCSR.NAN2008 bits set to 1.

In QEMU we still keep these bits cleared as there is no 2008-NaN support.
However, this now causes problems preventing from running R6 Linux with
the v4.5 kernel. Kernel refuses to execute 2008-NaN ELFs on a CPU
whose FPU does not support 2008-NaN encoding:

(...)
VFS: Mounted root (ext4 filesystem) readonly on device 8:0.
devtmpfs: mounted
Freeing unused kernel memory: 256K (ffffffff806f0000 - ffffffff80730000)
request_module: runaway loop modprobe binfmt-464c
Starting init: /sbin/init exists but couldn't execute it (error -8)
request_module: runaway loop modprobe binfmt-464c
Starting init: /bin/sh exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

Therefore always indicate presence of 2008-NaN support in R6 as well as in
R5+MSA CPUs, even though this feature is not yet supported by MIPS in QEMU.

Backports commit ba5c79f26221c0fd7139c883a34a4e75d993f732 from qemu
2018-02-22 11:30:08 -05:00
..
cpu-qom.h remove slow cpu QOM casts (#815) 2017-05-02 14:56:39 +08:00
cpu.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
cpu.h target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs 2018-02-22 11:30:08 -05:00
dsp_helper.c mips: Clean up includes 2018-02-19 00:45:08 -05:00
helper.c mips: Clean up includes 2018-02-19 00:45:08 -05:00
helper.h target-mips: add MAAR, MAARI register 2018-02-22 11:00:17 -05:00
lmi_helper.c mips: Clean up includes 2018-02-19 00:45:08 -05:00
Makefile.objs import 2015-08-21 15:04:50 +08:00
mips-defs.h target-mips: fix MIPS64R6-generic configuration 2018-02-17 15:23:21 -05:00
msa_helper.c mips: Clean up includes 2018-02-19 00:45:08 -05:00
op_helper.c target-mips: add MAAR, MAARI register 2018-02-22 11:00:17 -05:00
TODO import 2015-08-21 15:04:50 +08:00
translate.c target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs 2018-02-22 11:30:08 -05:00
translate_init.c target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs 2018-02-22 11:30:08 -05:00
unicorn.c tcg: Make cpu_gpr a TCGv array 2018-02-21 01:02:46 -05:00
unicorn.h armeb: rename arm's and mips's *REGS_STORAGE_SIZE to avoid big-endian and little-endian's duplicated definition. 2017-03-15 22:25:35 +08:00