[PATCH] Set/restore rounding mode only when needed

Siddhesh Poyarekar siddhesh@redhat.com
Wed Jun 5 12:55:00 GMT 2013


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



More information about the Libc-alpha mailing list