[PATCH] S390: Do not set FE_INEXACT with feraiseexcept (FE_OWERFLOW|FE_UNDERFLOW).
Stefan Liebler
stli@linux.vnet.ibm.com
Mon Aug 22 07:16:00 GMT 2016
On 08/18/2016 05:59 PM, Joseph Myers wrote:
> On Thu, 18 Aug 2016, Stefan Liebler wrote:
>
>> Hi,
>>
>> on s390 feraiseexcept (FE_OVERFLOW|FE_UNDERFLOW) sets FE_INEXACT, too.
>
> Note that this is permitted by the standards (whereas implicitly setting
> FE_INEXACT is not permitted for fesetexcept, or fesetexceptflag if it
> wasn't set in the saved state).
>
Hi Joseph,
fesetexcept and fesetexceptflag are using the _FPU_SETCW macro to set
the flags. They don't implicitly set FE_INEXACT.
For feraiseexcept I think if the z196-round-instruction is available
with used toolchain then it should be used to avoid FE_INEXACT. Then it
is the same behaviour as on intel.
If it is not available feraiseexcept will use the add/div instructions
as before with the FE_INEXACT flag/exception. And the additional
_FPU_GETCW/SETCW usages are avoided.
What's your suggestion for feraiseexcept?
Bye
Stefan
More information about the Libc-alpha
mailing list