1140195Sdas/*
2140195Sdas * Written by J.T. Conklin <jtc@netbsd.org>.
3140195Sdas * Public domain.
4140195Sdas */
5140195Sdas
6140195Sdas#include <machine/asm.h>
7140195Sdas
8140195Sdas__FBSDID("$FreeBSD$");
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
16145969Sdeischen	fstcw	-4(%ebp)		/* store fpu control word */
17145969Sdeischen	movw	-4(%ebp),%dx
18140195Sdas	orw	$0x0800,%dx		/* round towards +oo */
19140195Sdas	andw	$0xfbff,%dx
20145969Sdeischen	movw	%dx,-8(%ebp)
21145969Sdeischen	fldcw	-8(%ebp)		/* load modfied control word */
22140195Sdas
23140195Sdas	flds	8(%ebp);		/* round */
24140195Sdas	frndint
25140195Sdas
26145969Sdeischen	fldcw	-4(%ebp)		/* restore original control word */
27140195Sdas
28140195Sdas	leave
29140195Sdas	ret
30192760SattilioEND(ceilf)
31217108Skib
32217108Skib	.section .note.GNU-stack,"",%progbits
33