soft-fp: split FP_INIT_EXCEPTIONS from FP_INIT_ROUNDMODE
David Miller
davem@davemloft.net
Thu Oct 10 04:04:00 GMT 2013
From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Wed, 9 Oct 2013 22:04:42 +0000
> Some soft-fp functions only need exception handling and not rounding,
> because their results are always exact (but signaling NaNs, if nothing
> else, may still result in exceptions) or do not depend on the rounding
> mode (e.g. comparisons and conversions to integers). For these, it's
> misleading to use FP_INIT_ROUNDMODE; on architectures where the state
> in question is only used for rounding and not for exceptions, it's
> also suboptimal. Thus, this patch defines a separate macro
> FP_INIT_EXCEPTIONS, defaulting to FP_INIT_ROUNDMODE, and uses it in
> the floating-point extensions that are the existing uses of
> FP_INIT_ROUNDMODE that can change.
This looks fine to me.
More information about the Libc-alpha
mailing list