This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Set/restore rounding mode only when needed
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 5 Jun 2013 18:27:28 +0530
- Subject: Re: [PATCH] Set/restore rounding mode only when needed
- References: <20130605110719 dot GU13968 at spoyarek dot pnq dot redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1306051237290 dot 20264 at digraph dot polyomino dot org dot uk>
On Wed, Jun 05, 2013 at 12:38:48PM +0000, Joseph S. Myers wrote:
> Could you explain further why you need new interfaces for this - why you
> can't just generally make the code setting the rounding mode (both
> internally in glibc, and the public fesetround etc.) check whether it
> would be changing anything before executing the store?
I could, but I would be limited to avoiding the store for the 'set'
phase. To avoid the 'restore' phase when it's not necessary
(i.e. when the 'set' did not change anything), I need to pass a
context to the 'set' functions that decides whether the corresponding
restore is needed. I cannot do this with just the existing
interfaces.
Siddhesh