[PATCH] Add generic HAVE_RM_CTX implementation
Wilco
wdijkstr@arm.com
Fri Apr 25 10:39:00 GMT 2014
Ping
-----Original Message-----
From: Wilco [mailto:wdijkstr@arm.com]
Sent: 15 April 2014 14:35
To: 'libc-alpha@sourceware.org'
Subject: [PATCH] Add generic HAVE_RM_CTX implementation
Hi,
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%
Wilco
ChangeLog:
2014-04-15 Wilco <wdijkstr@arm.com>
* sysdeps/generic/math_private.h: Add generic HAVE_RM_CTX
implementation. New function (libc_feholdsetround_noex_ctx).
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Enable-HAVE_RM_CTX-using-generic-implementation.txt
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140425/5b853ec6/attachment.txt>
More information about the Libc-alpha
mailing list