glibc/sysdeps/arm
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
..
armv6 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
armv6t2 arm: Remove ununsed ARM code in optimized implementation 2018-04-16 17:24:31 -03:00
armv7 arm: Remove ununsed ARM code in optimized implementation 2018-04-16 17:24:31 -03:00
bits Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
include/bits Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
nofpu Move EXCEPTION_TESTS_* out of math-tests.h 2018-08-23 23:41:13 +00: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 Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07:00
Makefile Enable unwind info in libc-start.c and backtrace.c 2017-09-19 15:07:58 +01:00
Versions Use -Werror=undef for assembly code. 2015-02-12 13:57:32 -08:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
abi-note.S Fix whitespace in ARM files to allow move. 2014-02-08 01:52:38 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_assert.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_atexit.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_errno_addr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_lcsts.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_localeconv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_math.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_mb_cur_max.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_memclr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_memcpy.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_memmove.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_memset.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_sighandlers.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aeabi_unwind_cpp_pr1.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
arm-features.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
arm-ifunc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
arm-mcount.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
arm-unwind-resume.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
atomic-machine.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.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
configure Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
configure.ac Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +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-irel.h [BZ #20271] Add newlines in __libc_fatal calls. 2018-08-31 18:04:32 -07:00
dl-lookupcfg.h 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-sysdep.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-tlsdesc.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
e_sqrt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
e_sqrtf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fenv_private.h Split fenv_private.h out of math_private.h more consistently. 2018-08-28 20:48:49 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
find_exidx.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fix-fp-int-convert-overflow.h 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
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
framestate.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gcc-compat.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
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gmp-mparam.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
ldbl-classify-compat.h Move LDBL_CLASSIFY_COMPAT to its own header. 2018-02-01 21:01:00 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-aeabi_read_tp.S ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libm-test-ulps Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
math-tests-trap.h Move EXCEPTION_ENABLE_SUPPORTED out of math-tests.h. 2018-08-24 19:18:16 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset.S 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
nptl-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
preconfigure Add sysdeps/ieee754/soft-fp. 2017-12-12 23:35:21 +00:00
preconfigure.ac Add sysdeps/ieee754/soft-fp. 2017-12-12 23:35:21 +00:00
pt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rt-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
rt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rtld-global-offsets.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sfp-machine.h Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07: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
static-stubs.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sub_n.S Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
submul_1.S 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
test-fpucw.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tls-macros.h ARM: Rewrite sysdeps/arm/tls-macros.h 2015-03-13 10:10:09 -07:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tlsdesc.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tst-armtlsdescextlazy.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextlazymod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnow.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnowmod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescloc.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-armtlsdesclocmod.c 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
unwind-dw2-fde-glibc.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
unwind-pe.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
unwind-resume.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
unwind.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00