]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86_64/fpu/e_powl.S
Fix typo in x86-64 powl
[thirdparty/glibc.git] / sysdeps / x86_64 / fpu / e_powl.S
CommitLineData
c9cf6dde 1/* ix87 specific implementation of pow function.
8db73634 2 Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2007, 2011
8f3edfee 3 Free Software Foundation, Inc.
c9cf6dde
AJ
4 This file is part of the GNU C Library.
5 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
6
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, write to the Free
19 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA. */
21
22#include <machine/asm.h>
23
24#ifdef __ELF__
25 .section .rodata
26#else
27 .text
28#endif
29
30 .align ALIGNARG(4)
31 ASM_TYPE_DIRECTIVE(infinity,@object)
32inf_zero:
33infinity:
34 .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
35 ASM_SIZE_DIRECTIVE(infinity)
36 ASM_TYPE_DIRECTIVE(zero,@object)
37zero: .double 0.0
38 ASM_SIZE_DIRECTIVE(zero)
39 ASM_TYPE_DIRECTIVE(minf_mzero,@object)
40minf_mzero:
41minfinity:
42 .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
43mzero:
44 .byte 0, 0, 0, 0, 0, 0, 0, 0x80
45 ASM_SIZE_DIRECTIVE(minf_mzero)
46 ASM_TYPE_DIRECTIVE(one,@object)
47one: .double 1.0
48 ASM_SIZE_DIRECTIVE(one)
49 ASM_TYPE_DIRECTIVE(limit,@object)
50limit: .double 0.29
51 ASM_SIZE_DIRECTIVE(limit)
164f863e
UD
52 ASM_TYPE_DIRECTIVE(p63,@object)
53p63:
54 .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
55 ASM_SIZE_DIRECTIVE(p63)
c9cf6dde
AJ
56
57#ifdef PIC
58#define MO(op) op##(%rip)
59#else
60#define MO(op) op
61#endif
62
63 .text
64ENTRY(__ieee754_powl)
65 fldt 24(%rsp) // y
66 fxam
67
68
69 fnstsw
70 movb %ah, %dl
71 andb $0x45, %ah
72 cmpb $0x40, %ah // is y == 0 ?
73 je 11f
74
75