2 * Written by J.T. Conklin <jtc@netbsd.org>.
6 #include <machine/asm.h>
8 RCSID("$NetBSD: s_ceil.S,v 1.4 1995/05/08 23:52:13 jtc Exp $")
15 fstcw -4(%ebp) /* store fpu control word */
17 /* We use here %edx although only the low 1 bits are defined.
18 But none of the operations should care and they are faster
19 than the 16 bit operations. */
21 orl $0x0800,%edx /* round towards +oo */
24 fldcw -8(%ebp) /* load modfied control word */
26 fldl 8(%ebp); /* round */
29 fldcw -4(%ebp) /* restore original control word */
34 weak_alias (__ceil, ceil)