home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / fp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.1 KB  |  79 lines

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