s_ceilf.S revision 140195
1140195Sdas/* 2140195Sdas * Written by J.T. Conklin <jtc@netbsd.org>. 3140195Sdas * Public domain. 4140195Sdas */ 5140195Sdas 6140195Sdas#include <machine/asm.h> 7140195Sdas 8140195Sdas__FBSDID("$FreeBSD: head/lib/msun/i387/s_ceilf.S 140195 2005-01-13 18:58:25Z das $"); 9140195Sdas/* RCSID("$NetBSD: s_ceilf.S,v 1.3 1995/05/08 23:52:44 jtc Exp $") */ 10140195Sdas 11140195SdasENTRY(ceilf) 12140195Sdas pushl %ebp 13140195Sdas movl %esp,%ebp 14140195Sdas subl $8,%esp 15140195Sdas 16140195Sdas fstcw -12(%ebp) /* store fpu control word */ 17140195Sdas movw -12(%ebp),%dx 18140195Sdas orw $0x0800,%dx /* round towards +oo */ 19140195Sdas andw $0xfbff,%dx 20140195Sdas movw %dx,-16(%ebp) 21140195Sdas fldcw -16(%ebp) /* load modfied control word */ 22140195Sdas 23140195Sdas flds 8(%ebp); /* round */ 24140195Sdas frndint 25140195Sdas 26140195Sdas fldcw -12(%ebp) /* restore original control word */ 27140195Sdas 28140195Sdas leave 29140195Sdas ret 30