[PATCH] S390: Do not set FE_INEXACT with feraiseexcept (FE_OWERFLOW|FE_UNDERFLOW).

Stefan Liebler stli@linux.vnet.ibm.com
Tue Aug 23 06:59:00 GMT 2016


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.

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20160823_feraiseexception.patch
Type: text/x-patch
Size: 6837 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160823/0ad4e2a0/attachment.bin>


More information about the Libc-alpha mailing list