]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/e_powl.S
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / x86_64 / fpu / e_powl.S
CommitLineData
c9cf6dde 1/* ix87 specific implementation of pow function.
2b778ceb 2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
c9cf6dde
AJ
3 This file is part of the GNU C Library.
4 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
59ba27a6 17 License along with the GNU C Library; if not, see
5a82c748 18 <https://www.gnu.org/licenses/>. */
c9cf6dde
AJ
19
20#include <machine/asm.h>
6ace3938 21#include <x86_64-math-asm.h>
220622dd 22#include <libm-alias-finite.h>
c9cf6dde 23
0ac5ae23 24 .section .rodata.cst8,"aM",@progbits,8
622c86f4 25
0ac5ae23 26 .p2align 3
b67e9372 27 .type one,@object
0ac5ae23
UD
28one: .double 1.0
29 ASM_SIZE_DIRECTIVE(one)
c898991d
JM
30 .type p2,@object
31p2: .byte 0, 0, 0, 0, 0, 0, 0x10, 0x40
32 ASM_SIZE_DIRECTIVE(p2)
b67e9372 33 .type p63,@object
0ac5ae23
UD
34p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
35 ASM_SIZE_DIRECTIVE(p63)
b67e9372 36 .type p64,@object
2460d3aa
JM
37p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
38 ASM_SIZE_DIRECTIVE(p64)
b67e9372 39 .type p78,@object
8f9a2fae
JM
40p78: .byte 0, 0, 0, 0, 0, 0, 0xd0, 0x44
41 ASM_SIZE_DIRECTIVE(p78)
60e235ee
JM
42 .type pm79,@object
43pm79: .byte 0, 0, 0, 0, 0, 0, 0, 0x3b
44 ASM_SIZE_DIRECTIVE(pm79)
c9cf6dde 45
0ac5ae23 46 .section .rodata.cst16,"aM",@progbits,16
622c86f4 47
0ac5ae23 48 .p2align 3
b67e9372 49 .type infinity,@object
c9cf6dde
AJ
50inf_zero:
51infinity:
52 .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
53 ASM_SIZE_DIRECTIVE(infinity)
b67e9372 54 .type zero,@object
c9cf6dde
AJ
55zero: .double 0.0
56 ASM_SIZE_DIRECTIVE(zero)
b67e9372 57 .type minf_mzero,@object
c9cf6dde
AJ
58minf_mzero:
59minfinity:
60 .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
61mzero:
62 .byte 0, 0, 0, 0, 0, 0, 0, 0x80
63 ASM_SIZE_DIRECTIVE(minf_mzero)
6ace3938 64DEFINE_LDBL_MIN
c9cf6dde
AJ
65
66#ifdef PIC
0ac5ae23 67# define MO(op) op##(%rip)
c9cf6dde 68#else
0ac5ae23 69# define MO(op) op
c9cf6dde
AJ
70#endif
71
72 .text
73ENTRY(__ieee754_powl)
74 fldt 24(%rsp) // y
75 fxam
76
77
78 fnstsw
79 movb %ah, %dl
80 andb $0x45, %ah
81 cmpb $0x40, %ah // is y == 0 ?
82 je 11f
83
84