1145171Sdas/* 2145171Sdas * Based on code written by J.T. Conklin <jtc@NetBSD.org>. 3145171Sdas * Public domain. 4145171Sdas */ 5145171Sdas 6145171Sdas#include <machine/asm.h> 7145171Sdas__FBSDID("$FreeBSD: releng/11.0/lib/msun/i387/s_ceill.S 217108 2011-01-07 16:13:12Z kib $") 8145171Sdas 9145171SdasENTRY(ceill) 10145171Sdas pushl %ebp 11145171Sdas movl %esp,%ebp 12145171Sdas subl $8,%esp 13145171Sdas 14145171Sdas fstcw -4(%ebp) /* store fpu control word */ 15145171Sdas movw -4(%ebp),%dx 16145171Sdas orw $0x0800,%dx /* round towards +oo */ 17145171Sdas andw $0xfbff,%dx 18145171Sdas movw %dx,-8(%ebp) 19145171Sdas fldcw -8(%ebp) /* load modfied control word */ 20145171Sdas 21145171Sdas fldt 8(%ebp) /* round */ 22145171Sdas frndint 23145171Sdas 24145171Sdas fldcw -4(%ebp) /* restore original control word */ 25145171Sdas 26145171Sdas leave 27145171Sdas ret 28192760SattilioEND(ceill) 29217108Skib 30217108Skib .section .note.GNU-stack,"",%progbits 31