mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 23:10:06 +00:00
f58e5f4809
This patch continues the preparation for additional _FloatN / _FloatNx function aliases by using libm_alias_ldouble for sysdeps/x86_64/fpu long double functions, so that they can have _Float64x aliases added in future. Tested for x86_64, including build-many-glibcs.py tests that installed stripped shared libraries are unchanged by the patch. * sysdeps/x86_64/fpu/e_expl.S: Include <libm-alias-ldouble.h>. [USE_AS_EXPM1L] (expm1l): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_ceill.S: Include <libm-alias-ldouble.h>. (ceill): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_copysignl.S: Include <libm-alias-ldouble.h>. (copysignl): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_fabsl.S: Include <libm-alias-ldouble.h>. (fabsl): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_floorl.S: Include <libm-alias-ldouble.h>. (floorl): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_fmaxl.S: Include <libm-alias-ldouble.h>. (fmaxl): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_fminl.S: Include <libm-alias-ldouble.h>. (fminl): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_llrintl.S: Include <libm-alias-ldouble.h>. (llrintl): Define using libm_alias_ldouble. (lrintl): Likewise. * sysdeps/x86_64/fpu/s_nearbyintl.S: Include <libm-alias-ldouble.h>. (nearbyintl): Define using libm_alias_ldouble. * sysdeps/x86_64/fpu/s_truncl.S: Include <libm-alias-ldouble.h>. (truncl): Define using libm_alias_ldouble. * sysdeps/x86_64/x32/fpu/s_lrintl.S: Include <libm-alias-ldouble.h>. (lrintl): Define using libm_alias_ldouble.
38 lines
881 B
ArmAsm
38 lines
881 B
ArmAsm
/*
|
|
* Written by J.T. Conklin <jtc@netbsd.org>.
|
|
* Changes for long double by Ulrich Drepper <drepper@cygnus.com>
|
|
* Changes for x86-64 by Andreas Jaeger <aj@suse.de>
|
|
* Public domain.
|
|
*/
|
|
|
|
#include <libm-alias-ldouble.h>
|
|
#include <machine/asm.h>
|
|
|
|
|
|
ENTRY(__ceill)
|
|
fldt 8(%rsp)
|
|
|
|
fnstenv -28(%rsp) /* store fpu environment */
|
|
|
|
/* We use here %edx although only the low 1 bits are defined.
|
|
But none of the operations should care and they are faster
|
|
than the 16 bit operations. */
|
|
movl $0x0800,%edx /* round towards +oo */
|
|
orl -28(%rsp),%edx
|
|
andl $0xfbff,%edx
|
|
movl %edx,-32(%rsp)
|
|
fldcw -32(%rsp) /* load modified control word */
|
|
|
|
frndint /* round */
|
|
|
|
/* Preserve "invalid" exceptions from sNaN input. */
|
|
fnstsw
|
|
andl $0x1, %eax
|
|
orl %eax, -24(%rsp)
|
|
|
|
fldenv -28(%rsp) /* restore original environment */
|
|
|
|
ret
|
|
END (__ceill)
|
|
libm_alias_ldouble (__ceil, ceil)
|