Annotation of src/lib/libm/arch/i387/s_ceil.S, Revision 1.3
1.1 jtc 1: /*
1.3 ! jtc 2: * Written by J.T. Conklin <jtc@netbsd.org>.
! 3: * Public domain.
1.1 jtc 4: */
5:
6: #include <machine/asm.h>
7:
1.3 ! jtc 8: RCSID("$Id: s_ceil.S,v 1.2 1994/03/12 01:30:35 jtc Exp $")
1.2 jtc 9:
1.1 jtc 10: ENTRY(ceil)
11: pushl %ebp
12: movl %esp,%ebp
13: subl $8,%esp
14:
15: fstcw -12(%ebp) /* store fpu control word */
16: movw -12(%ebp),%dx
17: orw $0x0800,%dx /* round towards +oo */
18: andw $0xfbff,%dx
19: movw %dx,-16(%ebp)
20: fldcw -16(%ebp) /* load modfied control word */
21:
22: fldl 8(%ebp); /* round */
23: frndint
24:
25: fldcw -12(%ebp) /* restore original control word */
26:
27: leave
28: ret
CVSweb <webmaster@jp.NetBSD.org>