[PATCH] S390: Do not set FE_INEXACT with feraiseexcept (FE_OWERFLOW|FE_UNDERFLOW).
Stefan Liebler
stli@linux.vnet.ibm.com
Tue Aug 30 15:11:00 GMT 2016
On 08/23/2016 08:58 AM, Stefan Liebler wrote:
> On 08/22/2016 12:59 PM, Joseph Myers wrote:
>> On Mon, 22 Aug 2016, Stefan Liebler wrote:
>>
>>> 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?
>>
>> I don't have a suggestion; I was simply observing that extra steps for
>> this case (such as the x86 code does) are not actually needed to conform
>> to the standard.
>>
> Okay. Then I've updated the patch. Now it uses z196-round-instruction if
> available to omit FE_INEXACT. If it is not available the old behaviour
> is used without clearing FE_INEXACT.
>
If there is no objection, I'll commit this patch tomorrow.
> Bye
> Stefan
>
> ChangeLog:
>
> * config.h.in: (HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT)
> New undefine.
> * sysdeps/s390/configure.ac: Add test for z196 zarch support.
> * sysdeps/s390/configure: Regenerated.
> * sysdeps/s390/fpu/fraiseexcpt.c (__feraiseexcept): Use ledbra
> instruction for raising over-/underflow if z196 zarch is
> supported by default.
> * sysdeps/s390/fpu/fsetexcptflg.c (fesetexceptflag):
> Correct comment.
More information about the Libc-alpha
mailing list