glibc/sysdeps/m68k
Szabolcs Nagy 424c4f60ed Add new pow implementation
The algorithm is exp(y * log(x)), where log(x) is computed with about
1.3*2^-68 relative error (1.5*2^-68 without fma), returning the result
in two doubles, and the exp part uses the same algorithm (and lookup
tables) as exp, but takes the input as two doubles and a sign (to handle
negative bases with odd integer exponent).  The __exp1 internal symbol
is no longer necessary.

There is separate code path when fma is not available but the worst case
error is about 0.54 ULP in both cases.  The lookup table and consts for
log are 4168 bytes.  The .rodata+.text is decreased by 37908 bytes on
aarch64.  The non-nearest rounding error is less than 1 ULP.

Improvements on Cortex-A72 compared to current glibc master:
pow thruput: 2.40x in [0.01 11.1]x[0.01 11.1]
pow latency: 1.84x in [0.01 11.1]x[0.01 11.1]

Tested on
aarch64-linux-gnu (defined __FP_FAST_FMA, TOINT_INTRINSICS) and
arm-linux-gnueabihf (!defined __FP_FAST_FMA, !TOINT_INTRINSICS) and
x86_64-linux-gnu (!defined __FP_FAST_FMA, !TOINT_INTRINSICS) and
powerpc64le-linux-gnu (defined __FP_FAST_FMA, !TOINT_INTRINSICS) targets.

	* NEWS: Mention pow improvements.
	* math/Makefile (type-double-routines): Add e_pow_log_data.
	* sysdeps/generic/math_private.h (__exp1): Remove.
	* sysdeps/i386/fpu/e_pow_log_data.c: New file.
	* sysdeps/ia64/fpu/e_pow_log_data.c: New file.
	* sysdeps/ieee754/dbl-64/Makefile (CFLAGS-e_pow.c): Allow fma
	contraction.
	* sysdeps/ieee754/dbl-64/e_exp.c (__exp1): Remove.
	(exp_inline): Remove.
	(__ieee754_exp): Only single double input is handled.
	* sysdeps/ieee754/dbl-64/e_pow.c: Rewrite.
	* sysdeps/ieee754/dbl-64/e_pow_log_data.c: New file.
	* sysdeps/ieee754/dbl-64/math_config.h (issignaling_inline): Define.
	(__pow_log_data): Define.
	* sysdeps/ieee754/dbl-64/upow.h: Remove.
	* sysdeps/ieee754/dbl-64/upow.tbl: Remove.
	* sysdeps/m68k/m680x0/fpu/e_pow_log_data.c: New file.
	* sysdeps/x86_64/fpu/multiarch/Makefile (CFLAGS-e_pow-fma.c): Allow fma
	contraction.
	(CFLAGS-e_pow-fma4.c): Likewise.
2018-09-19 10:04:51 +01:00
..
bits Unify and simplify bits/byteswap.h, bits/byteswap-16.h headers (bug 14508, bug 15512, bug 17082, bug 20530). 2018-02-06 21:55:08 +00:00
coldfire Use rint functions not __rint functions in glibc libm. 2018-09-14 13:10:39 +00:00
fpu Fix m68k bits/fenv.h for no-FPU ColdFire. 2018-02-01 20:48:22 +00:00
m680x0 Add new pow implementation 2018-09-19 10:04:51 +01:00
nptl hurd: add gscope support 2018-03-11 13:06:33 +01:00
sys Drop fpregset unused symbol exposition 2018-04-20 01:27:13 +02:00
Implies Move m68k from ports to libc 2014-02-10 20:22:40 +01:00
Makefile Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Versions Move m68k from ports to libc 2014-02-10 20:22:40 +01:00
__longjmp.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
abort-instr.h Move m68k from ports to libc 2014-02-10 20:22:40 +01:00
asm-syntax.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bsd-_setjmp.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bsd-setjmp.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
crti.S Mark _init and _fini as hidden [BZ #23145] 2018-06-08 10:28:52 -07:00
crtn.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-machine.h elf: Unify symbol address run-time calculation [BZ #19818] 2018-04-04 23:09:37 +01:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
preconfigure Remove --with-fp / --without-fp. 2017-12-12 13:56:47 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setjmp.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strchrnul.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
symbol-hacks.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tls-macros.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcpcpy.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcpcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00