glibc/sysdeps/aarch64
Szabolcs Nagy e70c176825 Add new exp and exp2 implementations
Optimized exp and exp2 implementations using a lookup table for
fractional powers of 2.  There are several variants, see e_exp_data.c,
they can be selected by modifying math_config.h allowing different
tradeoffs.

The default selection should be acceptable as generic libm code.
Worst case error is 0.509 ULP for exp and 0.507 ULP for exp2, on
aarch64 the rodata size is 2160 bytes, shared between exp and exp2.
On aarch64 .text + .rodata size decreased by 24912 bytes.

The non-nearest rounding error is less than 1 ULP even on targets
without efficient round implementation (although the error rate is
higher in that case).  Targets with single instruction, rounding mode
independent, to nearest integer rounding and conversion can use them
by setting TOINT_INTRINSICS and adding the necessary code to their
math_private.h.

The __exp1 code uses the same algorithm, so the error bound of pow
increased a bit.

New double precision error handling code was added following the
style of the single precision error handling code.

Improvements on Cortex-A72 compared to current glibc master:
exp thruput: 1.61x in [-9.9 9.9]
exp latency: 1.53x in [-9.9 9.9]
exp thruput: 1.13x in [0.5 1]
exp latency: 1.30x in [0.5 1]
exp2 thruput: 2.03x in [-9.9 9.9]
exp2 latency: 1.64x in [-9.9 9.9]

For small (< 1) inputs the current exp code uses a separate algorithm
so the speed up there is less.

Was tested on
aarch64-linux-gnu (TOINT_INTRINSICS, fma contraction) and
arm-linux-gnueabihf (!TOINT_INTRINSICS, no fma contraction) and
x86_64-linux-gnu (!TOINT_INTRINSICS, no fma contraction) and
powerpc64le-linux-gnu (!TOINT_INTRINSICS, fma contraction) targets,
only non-nearest rounding ulp errors increase and they are within
acceptable bounds (ulp updates are in separate patches).

	* NEWS: Mention exp and exp2 improvements.
	* math/Makefile (libm-support): Remove t_exp.
	(type-double-routines): Add math_err and e_exp_data.
	* sysdeps/aarch64/libm-test-ulps: Update.
	* sysdeps/arm/libm-test-ulps: Update.
	* sysdeps/i386/fpu/e_exp_data.c: New file.
	* sysdeps/i386/fpu/math_err.c: New file.
	* sysdeps/i386/fpu/t_exp.c: Remove.
	* sysdeps/ia64/fpu/e_exp_data.c: New file.
	* sysdeps/ia64/fpu/math_err.c: New file.
	* sysdeps/ia64/fpu/t_exp.c: Remove.
	* sysdeps/ieee754/dbl-64/e_exp.c: Rewrite.
	* sysdeps/ieee754/dbl-64/e_exp2.c: Rewrite.
	* sysdeps/ieee754/dbl-64/e_exp_data.c: New file.
	* sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Update error bound.
	* sysdeps/ieee754/dbl-64/eexp.tbl: Remove.
	* sysdeps/ieee754/dbl-64/math_config.h: New file.
	* sysdeps/ieee754/dbl-64/math_err.c: New file.
	* sysdeps/ieee754/dbl-64/t_exp.c: Remove.
	* sysdeps/ieee754/dbl-64/t_exp2.h: Remove.
	* sysdeps/ieee754/dbl-64/uexp.h: Remove.
	* sysdeps/ieee754/dbl-64/uexp.tbl: Remove.
	* sysdeps/m68k/m680x0/fpu/e_exp_data.c: New file.
	* sysdeps/m68k/m680x0/fpu/math_err.c: New file.
	* sysdeps/m68k/m680x0/fpu/t_exp.c: Remove.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
2018-09-05 16:22:00 +01:00
..
bits
fpu Do not include fenv_private.h in math_private.h. 2018-09-03 21:09:04 +00:00
multiarch [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30
nptl hurd: add gscope support 2018-03-11 13:06:33 +01:00
__longjmp.S
abort-instr.h
atomic-machine.h
bsd-_setjmp.S
bsd-setjmp.S
configure
configure.ac
crti.S Mark _init and _fini as hidden [BZ #23145] 2018-06-08 10:28:52 -07:00
crtn.S
dl-irel.h [BZ #20271] Add newlines in __libc_fatal calls. 2018-08-31 18:04:32 -07:00
dl-link.sym
dl-machine.h elf: Unify symbol address run-time calculation [BZ #19818] 2018-04-04 23:09:37 +01:00
dl-sysdep.h
dl-tls.h
dl-tlsdesc.h
dl-tlsdesc.S
dl-trampoline.S
dl-tunables.list Rename the glibc.tune namespace to glibc.cpu 2018-08-02 23:49:19 +05:30
e_sqrtl.c Remove sysdeps/aarch64/soft-fp directory. 2018-05-22 17:23:34 +00:00
Implies Remove sysdeps/aarch64/soft-fp directory. 2018-05-22 17:23:34 +00:00
jmpbuf-offsets.h
jmpbuf-unwind.h
ldsodefs.h
libc-tls.c
libm-test-ulps Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
libm-test-ulps-name
linkmap.h
machine-gmon.h
Makefile Remove sysdeps/aarch64/soft-fp directory. 2018-05-22 17:23:34 +00:00
math-tests-trap.h Move EXCEPTION_ENABLE_SUPPORTED out of math-tests.h. 2018-08-24 19:18:16 +00:00
mcount.c
memchr.S
memcmp.S
memcpy.S
memmove.S
memset-reg.h
memset.S
memusage.h
preconfigure
rawmemchr.S
setjmp.S
sfp-machine.h Remove sysdeps/aarch64/soft-fp directory. 2018-05-22 17:23:34 +00:00
sotruss-lib.c
stackinfo.h
start.S
stpcpy.S
strchr.S
strchrnul.S
strcmp.S
strcpy.S
string_private.h
strlen.S [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30
strncmp.S aarch64/strncmp: Use lsr instead of mov+lsr 2018-03-15 08:06:21 +05:30
strnlen.S
strrchr.S
sysdep.h
tls-macros.h
tlsdesc.c
tlsdesc.sym
tst-audit.h
Versions