libm: Add .section .note.GNU-stack to all assembly files
[dragonfly.git] / lib / libm / arch / i386 / s_copysign.S
CommitLineData
b34b60bc
JS
1/*
2 * Written by J.T. Conklin <jtc@NetBSD.org>.
3 * Public domain.
4 *
74dfd0cf 5 * $NetBSD: s_copysign.S,v 1.7 2011/06/18 20:49:26 joerg Exp
b34b60bc
JS
6 */
7
8/*
9 * XXXfvdl might as well split this file.
10 */
11
12#include <machine/asm.h>
13
14#ifdef __x86_64__
15.Lpos:
16 .quad 0x8000000000000000
17.Lneg:
18 .quad 0x7fffffffffffffff
19#endif
20
21
22ENTRY(copysign)
23#ifdef __i386__
24 movl 16(%esp),%edx
25 andl $0x80000000,%edx
26 movl 8(%esp),%eax
27 andl $0x7fffffff,%eax
28 orl %edx,%eax
29 movl %eax,8(%esp)
30 fldl 4(%esp)
31#else
b34b60bc
JS
32 movq .Lpos(%rip),%xmm2
33 movq .Lneg(%rip),%xmm3
34 pand %xmm2,%xmm1
35 pand %xmm3,%xmm0
36 por %xmm1,%xmm0
b34b60bc
JS
37#endif
38 ret
d04e8698 39END(copysign)
70e34eb2
JM
40
41 .section .note.GNU-stack,"",%progbits