This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Add generic HAVE_RM_CTX implementation


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).

Attachment: Enable-HAVE_RM_CTX-using-generic-implementation.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]