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

Stefan Liebler stli@linux.vnet.ibm.com
Thu Aug 18 14:14:00 GMT 2016


Hi,

on s390 feraiseexcept (FE_OVERFLOW|FE_UNDERFLOW) sets FE_INEXACT, too.
This patch uses z196 zarch load rounded instruction which can suppress
FE_INEXACT exception.
If gcc has no z196 support in used configuration, FE_INEXACT flag is
cleared if it was set before.
The gcc support is tested in a new configure-check.

A comment in fsetexcptflg.c is corrected as new exceptions are not
executed with the next floating-point instruction if fpc is set with
_FPU_SETCW macro. It seems the comment was copied e.g. from
sysdeps/x86_64/fpu/fsetexcptflg.c file.

Ok to commit?

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 or clear inexact flag.
	* sysdeps/s390/fpu/fsetexcptflg.c (fesetexceptflag):
	Correct comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20160818_feraiseexception.patch
Type: text/x-patch
Size: 7690 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160818/fbacdd25/attachment.bin>


More information about the Libc-alpha mailing list