freebsd-dev/lib/msun
Justin Hibbits dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
..
aarch64 Add the fe* symbols to libm for arm64. 2015-03-31 19:07:28 +00:00
amd64 Add asm versions of fmod(), fmodf() and fmodl() on amd64. Add asm 2016-09-04 12:22:14 +00:00
arm Make armv6 hard float abi by default. Kill armv6hf. 2016-05-18 06:01:18 +00:00
bsdsrc
i387 Oops, the previous i386 version of e_fmodf.S and e_fmodl.S was 2016-09-04 15:08:14 +00:00
ld80 libm: remove unused variables 2016-10-05 17:04:58 +00:00
ld128 Rename cpack*() to CMPLX*(). 2014-12-16 09:21:56 +00:00
man Bump .Dd 2015-11-09 10:41:27 +00:00
mips
powerpc Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
riscv Add fenv.c for RISC-V. Copied from MIPS. 2016-01-26 14:40:41 +00:00
sparc64 Remove ia64. 2014-07-07 00:27:09 +00:00
src Don't use fmaxl/fminl on platforms with no long double support, 2016-10-11 20:31:59 +00:00
tests MFhead @ r305314 2016-09-03 00:50:18 +00:00
x86 Merge the 386 and amd64 versions of the fenv.h, to make cc -m32 2013-04-21 13:31:55 +00:00
Makefile Don't use fmaxl/fminl on platforms with no long double support, 2016-10-11 20:31:59 +00:00
Makefile.depend META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
Symbol.map * Makefile: 2014-09-15 23:21:57 +00:00