glibc/sysdeps
Adhemerval Zanella 4854ddd874 alpha: Remove s_ceil{f} and s_floor{f} implementation (BZ#22665)
As discussed in libc-alpha [1], alpha ceil{f} and floor{f}
implementation uses cvttq/svm and although the Alpha Architecture
Handbook version 3 states that that CVTfi OUTPUT Exceptions
(B.3 Mapping to IEEE Standard) should not generate Inexact if INE
bit is set on fpcr, the Alpha 21264 [1] chip manual (A.8 IEEE
Floating-Point Conformance) states that CVTfi and CVTif OUTPUT
does generate inexact exception for inexact result regardless.

As Joseph noted [2] to correctly fix it on alpha we need to either
avoid the instruction or avoid any inexact bit from it being set
on return from the function (while preserving the inexact bit that
might be set on the entry to the function).  The later will result
mf_fpcr followed by a mt_fpcr to get and set the fpcr which will
defeat the optimization itself.

So the patch just remove the alpha optimized and rely on generic
implementation.  It fixes the math/test-*-{ceil,floor} on alpha.

	[BZ #15479]
	[BZ #22665]
	* sysdeps/alpha/fpu/s_ceil.c: Remove file.
	* sysdeps/alpha/fpu/s_ceilf.c: Likewise.
	* sysdeps/alpha/fpu/s_floor.c: Likewise.
	* sysdeps/alpha/fpu/s_floorf.c: Likewise.

[1] https://www.star.bnl.gov/public/daq/HARDWARE/21264_data_sheet.pdf
[2] https://sourceware.org/ml/libc-alpha/2018-01/msg00086.html

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2018-01-04 17:49:17 -02:00
..
aarch64 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
alpha alpha: Remove s_ceil{f} and s_floor{f} implementation (BZ#22665) 2018-01-04 17:49:17 -02:00
arm Update ARM libm-test-ulps. 2018-01-02 18:37:06 +00:00
generic Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gnu Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
hppa Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
i386 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ia64 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ieee754 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
m68k Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mach Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
microblaze Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mips Update MIPS libm-test-ulps. 2018-01-02 21:55:15 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
nptl Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
posix Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
powerpc Update powerpc-nofpu libm-test-ulps. 2018-01-02 18:38:45 +00:00
pthread Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
s390 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sparc Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tile Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
unix i386: In makecontext, align the stack before calling exit [BZ #22667] 2018-01-04 18:47:35 +01:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
x86 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
x86_64 Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00