glibc/sysdeps/generic
Wilco Dijkstra e6d90d675d Add generic HAVE_RM_CTX implementation
This patch adds a generic implementation of HAVE_RM_CTX using standard
fenv calls. As a result math functions using SET_RESTORE_ROUND* macros
do not suffer from a large slowdown on targets which do not implement
optimized libc_fe*_ctx inline functions. Most of the libc_fe* inline
functions are now unused and could be removed in the future (there are
a few math functions left which use a mixture of standard fenv calls
and libc_fe* inline functions - they could be updated to use
SET_RESTORE_ROUND or improved to avoid expensive fenv manipulations
across just a few FP instructions).

libc_feholdsetround*_noex_ctx is added to enable better optimization of
SET_RESTORE_ROUND_NOEX* implementations.

Performance measurements on ARM and x86 of sin() show significant gains
over the current default, fairly close to a highly optimized fenv_private:

                        ARM   x86
no fenv_private      : 100%  100%
generic HAVE_RM_CTX  : 250%  350%
fenv_private (CTX)   : 250%  450%

2014-06-23  Will Newton  <will.newton@linaro.org>
	    Wilco  <wdijkstr@arm.com>

	* sysdeps/generic/math_private.h: Add generic HAVE_RM_CTX
	implementation.  Include get-rounding-mode.h.
	[!HAVE_RM_CTX]: Define HAVE_RM_CTX to zero.
	[!libc_feholdsetround_noex_ctx]: Define
	libc_feholdsetround_noex_ctx.
	[!libc_feholdsetround_noexf_ctx]: Define
	libc_feholdsetround_noexf_ctx.
	[!libc_feholdsetround_noexl_ctx]: Define
	libc_feholdsetround_noexl_ctx.
	(libc_feholdsetround_ctx): New function.
	(libc_feresetround_ctx): New function.
	(libc_feholdsetround_noex_ctx): New function.
	(libc_feresetround_noex_ctx): New function.
2014-06-23 17:29:00 +01:00
..
bits Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
net Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
netinet Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
nfs Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sys Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
_G_config.h Remove _G_OPEN64, _G_LSEEK64, _G_MMAP64, _G_FSTAT64 from _G_config.h. 2012-10-18 18:50:43 +00:00
_itoa.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
a.out.h
abort-instr.h
aio_misc.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
allocalim.h
asm-syntax.h
confstr.h
device-nrs.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dirstream.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-cache.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-dtprocnum.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-fptr.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-hash.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-irel.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-librecon.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-lookupcfg.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-machine.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-osinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-procinfo.c
dl-procinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-tls.h
dwarf2.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
elide.h Add fallback file for elide.h 2014-06-14 09:27:09 -07:00
eloop-threshold.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
entry.h
errqueue.h
exit-thread.h Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
fd_to_filename.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fips-private.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fork.h
fpu_control.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
frame.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
framestate.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gcc-compat.h ARM: Disable compat mcount code when unneeded. 2014-01-10 13:32:35 -08:00
gccframe.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
get-rounding-mode.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gmp-mparam.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
hp-timing.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ifreq.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ifunc-sel.h Move sysdeps/generic/elf/* to sysdeps/generic 2012-03-19 21:04:21 +01:00
intr-msg.h
inttypes.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ldconfig.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ldsodefs.h Factor mmap/munmap of PT_LOAD segments out of _dl_map_object_from_fd et al. 2014-04-03 10:47:14 -07:00
libc-mmap.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
libcidn.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libm-test-ulps
libnss_compat.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_db.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_dns.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_files.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_hesiod.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_nis.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_nisplus.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
local-setxid.h
localplt.data Move localplt baselines to sysdeps directories. 2012-07-20 19:20:34 +00:00
machine-gmon.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
machine-lock.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
machine-sp.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
malloc-machine.h Avoid comma operator warnings. 2014-02-07 15:26:28 -08:00
malloc-sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
math_ldbl_opt.h
math_ldbl.h
math_private.h Add generic HAVE_RM_CTX implementation 2014-06-23 17:29:00 +01:00
math-tests.h Add fenv test support for targets which don't have FP traps. 2014-04-17 09:39:27 +01:00
memcopy.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memusage.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
not-cancel.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
nscd-types.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pagecopy.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
paths.h generic paths.h: remove old paths from _PATH_STDPATH 2012-11-04 10:11:39 +01:00
profil-counter.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pty-private.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
register-dump.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rtld-lowlevel.h
sigcontextinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
siglist.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sigset-cvt-mask.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stackguard-macros.h BZ #15754: Fix test case for ARM. 2013-09-23 01:44:38 -04:00
stackinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stdint.h S390: Define SIZE_MAX as unsigned long (BZ #16712). 2014-03-24 16:59:01 +01:00
symbol-hacks.h More fixes for unsafe compiler optimization 2014-04-30 08:41:42 -05:00
sysdep-cancel.h
sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testrtsig.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
thread_state.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tininess.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tls-macros.h
tls.h Remove second argument from TLS_INIT_TP macro 2014-05-27 14:48:46 +02:00
tst-audit.h Move testsuite audit definitions to sysdeps tst-audit.h files. 2012-07-26 11:29:07 +00:00
tst-stack-align.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unsecvars.h
unwind-dw2-fde-glibc.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unwind-dw2-fde.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unwind-dw2-fde.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unwind-dw2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unwind-pe.c
unwind-pe.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unwind.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
utmp-equal.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00