s_ceill.S 603 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Based on code written by J.T. Conklin <[email protected]>.
  3. * Public domain.
  4. */
  5. #include <machine/asm.h>
  6. __FBSDID("$FreeBSD: src/lib/msun/i387/s_ceill.S,v 1.3 2011/01/07 16:13:12 kib Exp $")
  7. ENTRY(ceill)
  8. pushl %ebp
  9. movl %esp,%ebp
  10. subl $8,%esp
  11. fstcw -4(%ebp) /* store fpu control word */
  12. movw -4(%ebp),%dx
  13. orw $0x0800,%dx /* round towards +oo */
  14. andw $0xfbff,%dx
  15. movw %dx,-8(%ebp)
  16. fldcw -8(%ebp) /* load modfied control word */
  17. fldt 8(%ebp) /* round */
  18. frndint
  19. fldcw -4(%ebp) /* restore original control word */
  20. leave
  21. ret
  22. END(ceill)
  23. .section .note.GNU-stack,"",%progbits