libm: Add .section .note.GNU-stack to all assembly files
[dragonfly.git] / lib / libm / arch / i386 / s_ceilf.S
CommitLineData
b34b60bc
JS
1/*
2 * Written by J.T. Conklin <jtc@NetBSD.org>.
3 * Public domain.
4 *
74dfd0cf 5 * $NetBSD: s_ceilf.S,v 1.9 2011/06/18 21:24:51 joerg Exp $
b34b60bc
JS
6 */
7
8#include <machine/asm.h>
9
10ENTRY(ceilf)
11#ifdef __i386__
12 pushl %ebp
13 movl %esp,%ebp
14 subl $8,%esp
15
16 fstcw -4(%ebp) /* store fpu control word */
17 movw -4(%ebp),%dx
18 orw $0x0800,%dx /* round towards +oo */
19 andw $0xfbff,%dx
20 movw %dx,-8(%ebp)
21 fldcw -8(%ebp) /* load modfied control word */
22
74dfd0cf 23 flds 8(%ebp) /* round */
b34b60bc
JS
24 frndint
25
26 fldcw -4(%ebp) /* restore original control word */
27
28 leave
29#else
30 fstcw -8(%rsp)
31 movw -8(%rsp),%dx
32 orw $0x0800,%dx
33 andw $0xfbff,%dx
34 movw %dx,-12(%rsp)
35 fldcw -12(%rsp)
36 movss %xmm0,-4(%rsp)
37 flds -4(%rsp)
38 frndint
39 fldcw -8(%rsp)
40 fstps -4(%rsp)
41 movss -4(%rsp),%xmm0
42#endif
43 ret
d04e8698 44END(ceilf)
70e34eb2
JM
45
46 .section .note.GNU-stack,"",%progbits