]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/e_log2l.S
x86-64: Add vector log1p/log1pf implementation to libmvec
[thirdparty/glibc.git] / sysdeps / x86_64 / fpu / e_log2l.S
CommitLineData
c9cf6dde 1/*
c9cf6dde
AJ
2 * Public domain.
3 *
c9cf6dde
AJ
4 */
5
6#include <machine/asm.h>
220622dd 7#include <libm-alias-finite.h>
c9cf6dde 8
0ac5ae23 9 .section .rodata.cst8,"aM",@progbits,8
622c86f4 10
0ac5ae23 11 .p2align 3
b67e9372 12 .type one,@object
c9cf6dde
AJ
13one: .double 1.0
14 ASM_SIZE_DIRECTIVE(one)
15 /* It is not important that this constant is precise. It is only
16 a value which is known to be on the safe side for using the
17 fyl2xp1 instruction. */
b67e9372 18 .type limit,@object
c9cf6dde
AJ
19limit: .double 0.29
20 ASM_SIZE_DIRECTIVE(limit)
21
22
23#ifdef PIC
0ac5ae23 24# define MO(op) op##(%rip)
c9cf6dde 25#else
0ac5ae23 26# define MO(op) op
c9cf6dde
AJ
27#endif
28
29 .text
30ENTRY(__ieee754_log2l)
31 fldl MO(one)
32 fldt 8(%rsp) // x : 1
33 fxam
34 fnstsw
35 fld %st // x : x : 1
6b2665f5 36 testb $1, %ah
c9cf6dde
AJ
37