home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / fp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  3.0 KB  |  75 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. /*    Copyright (c) 1987, 1988 Microsoft Corporation    */
  9. /*      All Rights Reserved    */
  10.  
  11. /*    This Module contains Proprietary Information of Microsoft  */
  12. /*    Corporation and should be treated as Confidential.       */
  13.  
  14. #ident    "@(#)head.sys:fp.h    1.3.1.3"
  15.  
  16. /*
  17.  * 80287/80387 floating point processor definitions
  18.  */
  19.  
  20. /*
  21.  * values that go into fp_kind
  22.  */
  23. #define FP_NO   0       /* no fp chip, no emulator (no fp support)      */
  24. #define FP_SW   1       /* no fp chip, using software emulator          */
  25. #define FP_HW   2       /* chip present bit                             */
  26. #define FP_287  2       /* 80287 chip present                           */
  27. #define FP_387  3       /* 80387 chip present                           */
  28.  
  29. /*
  30.  * masks for 80387 control word
  31.  */
  32. #define FPINV   0x00000001      /* invalid operation                    */
  33. #define FPDNO   0x00000002      /* denormalized operand                 */
  34. #define FPZDIV  0x00000004      /* zero divide                          */
  35. #define FPOVR   0x00000008      /* overflow                             */
  36. #define FPUNR   0x00000010      /* underflow                            */
  37. #define FPPRE   0x00000020      /* precision                            */
  38. #define FPPC    0x00000300      /* precision control                    */
  39. #define FPRC    0x00000C00      /* rounding control                     */
  40. #define FPIC    0x00001000      /* infinity control                     */
  41. #define WFPDE   0x00000080      /* data chain exception                 */
  42.  
  43. /*
  44.  * precision, rounding, and infinity options in control word
  45.  */
  46. #define FPSIG24 0x00000000      /* 24-bit significand precision (short) */
  47. #define FPSIG53 0x00000200      /* 53-bit significand precision (long)  */
  48. #define FPSIG64 0x00000300      /* 64-bit significand precision (temp)  */
  49. #define FPRTN   0x00000000      /* round to nearest or even             */
  50. #define FPRD    0x00000400      /* round down                           */
  51. #define FPRU    0x00000800      /* round up                             */
  52. #define FPCHOP  0x00000C00      /* chop (truncate toward zero)          */
  53. #define FPP     0x00000000      /* projective infinity                  */
  54. #define FPA     0x00001000      /* affine infinity                      */
  55. #define WFPB17  0x00020000      /* bit 17                               */
  56. #define WFPB24  0x01000000      /* bit 24                               */
  57.  
  58. /*
  59.  * masks for 80387 status word
  60.  */
  61. #define FPS_ES    0x00000080      /* error summary bit                    */
  62.  
  63. extern char fp_kind;            /* kind of fp support                   */
  64. extern struct proc *fp_proc;    /* process that owns the fp unit        */
  65.  
  66. /*
  67.  * values for fp_vers
  68.  */
  69. #define    FP_COFF        1
  70. #define    FP_XOUT        2
  71.  
  72. extern char fp_vers;        /* used to indicate how to map u-area    */
  73.  
  74. #define EMUL_START    0x15
  75.