e_remainder.S 606 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Based on the i387 version written by:
  3. * J.T. Conklin ([email protected])
  4. * Public domain.
  5. */
  6. #include <amd64/bsd_asm.h>
  7. //RCSID("from: FreeBSD: src/lib/msun/i387/e_remainder.S,v 1.8 2005/02/04 14:08:32 das Exp")
  8. //__FBSDID("$FreeBSD: src/lib/msun/amd64/e_remainder.S,v 1.2 2011/01/07 16:13:12 kib Exp $")
  9. ENTRY(remainder)
  10. movsd %xmm0,-8(%rsp)
  11. movsd %xmm1,-16(%rsp)
  12. fldl -16(%rsp)
  13. fldl -8(%rsp)
  14. 1: fprem1
  15. fstsw %ax
  16. testw $0x400,%ax
  17. jne 1b
  18. fstpl -8(%rsp)
  19. movsd -8(%rsp),%xmm0
  20. fstp %st
  21. ret
  22. /* Enable stack protection */
  23. #if defined(__ELF__)
  24. .section .note.GNU-stack,"",%progbits
  25. #endif