]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/e_log10l.S
[BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483,...
[thirdparty/glibc.git] / sysdeps / x86_64 / fpu / e_log10l.S
CommitLineData
c9cf6dde
AJ
1/*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 *
5 * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
6 *
7 * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
8 * Adapted for x86-64 by Andreas Jaeger <aj@suse.de>.
9 */
10
11#include <machine/asm.h>
12
13RCSID("$NetBSD: $")
14
15#ifdef __ELF__
16 .section .rodata
17#else
18 .text
19#endif
20 .align ALIGNARG(4)
21 ASM_TYPE_DIRECTIVE(one,@object)
22one: .double 1.0
23 ASM_SIZE_DIRECTIVE(one)
24 /* It is not important that this constant is precise. It is only
25 a value which is known to be on the safe side for using the
26 fyl2xp1 instruction. */
27 ASM_TYPE_DIRECTIVE(limit,@object)
28limit: .double 0.29
29 ASM_SIZE_DIRECTIVE(limit)
30
31
32#ifdef PIC
33#define MO(op) op##(%rip)
34#else
35#define MO(op) op
36#endif
37
38 .text
39ENTRY(__ieee754_log10l)
40 fldlg2 // log10(2)
41 fldt 8(%rsp) // x : log10(2)
42 fxam
43 fnstsw
44 fld %st // x : x : log10(2)
11bf311e 45 andb $1,%ah
c9cf6dde
AJ
46