ipiq: Add simple IPI latency measure sysctls (2)
[dragonfly.git] / lib / libm / i386 / s_ceill.S
CommitLineData
b34b60bc 1/*
6ff43c94 2 * Based on code written by J.T. Conklin <jtc@NetBSD.org>.
b34b60bc
JS
3 * Public domain.
4 *
6ff43c94 5 * $FreeBSD: head/lib/msun/i387/s_ceill.S 217108 2011-01-07 16:13:12Z kib $
b34b60bc
JS
6 */
7
8#include <machine/asm.h>
9
6ff43c94 10ENTRY(ceill)
b34b60bc
JS
11 pushl %ebp
12 movl %esp,%ebp
13 subl $8,%esp
14
15 fstcw -4(%ebp) /* store fpu control word */
16 movw -4(%ebp),%dx
17 orw $0x0800,%dx /* round towards +oo */
18 andw $0xfbff,%dx
19 movw %dx,-8(%ebp)
20 fldcw -8(%ebp) /* load modfied control word */
21
6ff43c94 22 fldt 8(%ebp) /* round */
b34b60bc
JS
23 frndint
24
25 fldcw -4(%ebp) /* restore original control word */
26
27 leave
b34b60bc 28 ret
6ff43c94 29END(ceill)
70e34eb2
JM
30
31 .section .note.GNU-stack,"",%progbits