Warner Losh 6b72948d73 Better check for floating point type.
Use __riscv_flen instead of __riscv_float_abi_soft. While the latter works for
userland (and one could argue it's more correct), it fails for the kernel. We
compile the kernel with -mabi=lp64 (eg soft float abi) to avoid floating point
instructions in the kernel. We also compile the kernel -march=rv64imafdc for
hard float kernels (eg those with options FPE), but with -march=rv64imac for
softfloat kernels (eg those with FPE). Since we do this, in the kernel (as in
userland) __riscv_flen will be defined for 'riscv64' and not for 'riscv64sf'.

This also removes the -DMACHINE_ARCH hack now that it's no longer needed.

Longer term, we should return the ABI from the sysctl hw.machine_arch like on
amd64 for i386 binaries.

Suggested by: mhorne@
Differential Revision: https://reviews.freebsd.org/D23813
2020-02-27 15:34:30 +00:00
..
2020-02-02 08:27:20 +00:00
2020-02-27 15:34:30 +00:00
2020-02-03 17:35:11 +00:00
2020-02-02 08:27:20 +00:00
2019-11-21 18:14:26 +00:00
2018-11-01 23:11:47 +00:00
2018-11-01 23:11:47 +00:00
2020-02-02 08:27:08 +00:00
2020-02-03 17:35:11 +00:00
2020-02-02 04:53:27 +00:00
2020-02-02 08:27:14 +00:00
2020-01-23 13:56:12 +00:00