1
0

setprec.688 789 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Set 68881/2 floating point rounding precision */
  2. /* Reference: MC68881/MC68882 Floating-Point Coprocessor */
  3. /* User's Manual, Motorola, Prentice-Hall, 1987 (First Edition) */
  4. /* Pages 1-14, 2-3, 4-68. */
  5. /* FPcr code $80 sets the 68882 coprocessor to */
  6. /* rounding precision = 53 bits */
  7. /* rounding mode = nearest or even */
  8. /* all exceptions (bits 8-15) disabled */
  9. /* The instruction is */
  10. /* FMOVE.L #$80,Fcr */
  11. /* if the assembler will understand it. */
  12. .align 2
  13. .text
  14. /* set to single precision */
  15. .globl _sprec
  16. _sprec
  17. .word 0xf23c,0x9000,0x0000,0x0040
  18. rts
  19. /* set to double precision */
  20. .globl _dprec
  21. _dprec:
  22. .word 0xf23c,0x9000,0x0000,0x0080
  23. rts
  24. /* set to extended (long double) precision */
  25. .globl _ldprec
  26. _ldprec:
  27. .word 0xf23c,0x9000,0x0000,0x0000
  28. rts