about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/s_nearbyintl.S
blob: 80508bdbee1049312e63abe93b8c98c67ac78fab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Written by J.T. Conklin <jtc@netbsd.org>.
 * Public domain.
 */
/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.  */

#include <libm-alias-ldouble.h>
#include <machine/asm.h>

ENTRY(__nearbyintl)
	fldt	8(%rsp)
	fnstenv	-28(%rsp)
	frndint
	fnstsw
	andl	$0x1, %eax
	orl	%eax, -24(%rsp)
	fldenv	-28(%rsp)
	ret
END (__nearbyintl)
libm_alias_ldouble (__nearbyint, nearbyint)