]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/i386/fpu/e_powl.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / i386 / fpu / e_powl.S
CommitLineData
6bc31da0 1/* ix87 specific implementation of pow function.
b168057a 2 Copyright (C) 1996-2015 Free Software Foundation, Inc.
6bc31da0
UD
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
41bdb6e2
AJ
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.
6bc31da0
UD
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
41bdb6e2 14 Lesser General Public License for more details.
6bc31da0 15
41bdb6e2 16 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
6bc31da0
UD
19
20#include <machine/asm.h>
21
0ac5ae23 22 .section .rodata.cst8,"aM",@progbits,8
622c86f4 23
0ac5ae23 24 .p2align 3
b67e9372 25 .type one,@object
0ac5ae23
UD
26one: .double 1.0
27 ASM_SIZE_DIRECTIVE(one)
1bead169
JM
28 .type p3,@object
29p3: .byte 0, 0, 0, 0, 0, 0, 0x20, 0x40
30 ASM_SIZE_DIRECTIVE(p3)
b67e9372 31 .type p63,@object
0ac5ae23
UD
32p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
33 ASM_SIZE_DIRECTIVE(p63)
b67e9372 34 .type p64,@object
2460d3aa
JM
35p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
36 ASM_SIZE_DIRECTIVE(p64)
b67e9372 37 .type p78,@object
8f9a2fae
JM
38p78: .byte 0, 0, 0, 0, 0, 0, 0xd0, 0x44
39 ASM_SIZE_DIRECTIVE(p78)
60e235ee
JM
40 .type pm79,@object
41pm79: .byte 0, 0, 0, 0, 0, 0, 0, 0x3b
42 ASM_SIZE_DIRECTIVE(pm79)
6bc31da0 43
0ac5ae23 44 .section .rodata.cst16,"aM",@progbits,16
622c86f4 45
0ac5ae23 46 .p2align 3
b67e9372 47 .type infinity,@object
0d8733c4
UD
48inf_zero:
49infinity:
50 .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
51 ASM_SIZE_DIRECTIVE(infinity)
b67e9372 52 .type zero,@object
0d8733c4
UD
53zero: .double 0.0
54 ASM_SIZE_DIRECTIVE(zero)
b67e9372 55 .type minf_mzero,@object
0d8733c4
UD
56minf_mzero:
57minfinity:
58 .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
59mzero:
60 .byte 0, 0, 0, 0, 0, 0, 0, 0x80
61 ASM_SIZE_DIRECTIVE(minf_mzero)
6bc31da0
UD
62
63#ifdef PIC
0ac5ae23
UD
64# define MO(op) op##@GOTOFF(%ecx)
65# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
6bc31da0 66#else
0ac5ae23
UD
67# define MO(op) op
68# define MOX(op,x,f) op(,x,f)
6bc31da0
UD
69#endif
70
71 .text
72ENTRY(__ieee754_powl)
0d8733c4
UD
73 fldt 16(%esp) // y
74 fxam
e61abf83
UD
75
76#ifdef PIC
fee732e5 77 LOAD_PIC_REG (cx)
e61abf83
UD
78#endif
79
0d8733c4
UD
80 fnstsw
81 movb %ah, %dl
82 andb $0x45, %ah
83 cmpb $0x40, %ah // is y == 0 ?
84 je 11f
85
86