home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / ndp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  2.8 KB  |  100 lines

  1. /*
  2.  *    @(#) ndp.h 2.3 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  *  NDP Hardware DEFINES
  13.  */
  14.  
  15. /* 
  16.  * Status word defines
  17.  */
  18. #define    NDPSW_IE    0x0001        /* invalid operation */
  19. #define    NDPSW_DE    0x0002        /* denormalized operand */
  20. #define    NDPSW_ZE    0x0004        /* zero divide */
  21. #define    NDPSW_OE    0x0008        /* overflow */
  22. #define    NDPSW_UE    0x0010        /* underflow */
  23. #define    NDPSW_PE    0x0020        /* precision */
  24. #define    NDPSW_ES    0x0080        /* error summary status */
  25. #define    NDPSW_CC    0x4700        /* NPX condition code mask */
  26. #define    NDPSW_ST    0x1800        /* Stack top pointer mask */
  27. #define    NDPSW_NB    0x8000        /* NEU busy */
  28.  
  29. #define     NDPSW_ERR    (NDPSW_PE | NDPSW_UE | NDPSW_OE | NDPSW_ZE \
  30.                     | NDPSW_DE | NDPSW_IE)
  31.  
  32. /*
  33.  * Control Word Defines
  34.  */
  35. #define    NDPCW_IM    0x0001        /* invalid operation */
  36. #define    NDPCW_DM    0x0002        /* denormalized operaand */
  37. #define    NDPCW_ZM    0x0004        /* zero divide */
  38. #define    NDPCW_OM    0x0008        /* overflow */
  39. #define    NDPCW_UM    0x0010        /* underflow */
  40. #define    NDPCW_PM    0x0020        /* precision */
  41. #define    NDPCW_PC    0x0300        /* precision control mask */
  42. #define    NDPCW_RC    0x0C00        /* rounding control mask */
  43. #define    NDPCW_IC    0x1000        /* infinity control 
  44.                         0 = projective, 1= affine */
  45.  
  46. /*
  47.  * Precision control
  48.  */
  49. #define    NDPPC_24    0x0000        /* 24 bit significand */
  50. #define    NDPPC_RES    0x0100        /* reserved */
  51. #define    NDPPC_52    0x0200        /* 52 bit significand */
  52. #define    NDPPC_64    0x0300        /* 64 bit significand */
  53.  
  54. /*
  55.  * Rounding control
  56.  */
  57. #define    NDPRC_NE    0x0000        /* round to Nearest or Even */
  58. #define    NDPRC_RD    0x0400        /* Round Doun  (toward -infinity) */
  59. #define    NDPRC_RU    0x0800        /* Round Up (toward +infinity) */
  60. #define    NDPRC_CH    0x0C00        /* CHop (truncate toward zero) */
  61.  
  62. /*
  63.  * NDP software defines for fp_type
  64.  */
  65.  
  66. #ifdef M_KERNEL
  67.  
  68. #define    FP_HW    0x01            /* have fp hardware */
  69. #define    FP_287    0x02            /* have 80287 */
  70. #define    FP_387    0x04            /* have 80387 */
  71. #define    FP_NOEX    0x08            /* no emulator for except. handling */
  72. #define    FP_EM    0            /* have fp emulation */
  73. #define    FP_NO    -1            /* have no fp */
  74.  
  75. #else
  76.  
  77. #define FP_NO   0       /* no fp chip, no emulator (no fp support)      */
  78. #define FP_SW   1       /* no fp chip, using software emulator          */
  79. #define FP_HW   2       /* chip present bit                             */
  80. #define FP_287  2       /* 80287 chip present                           */
  81. #define FP_387  3       /* 80387 chip present                           */
  82.  
  83. #endif
  84.  
  85. /*
  86.  * defines for emulator
  87.  */
  88.  
  89. #define EMUL_START    0x15        /* address for emulation */
  90. #define EMUL_EXCEPT    0x1A        /* address for exception handling */
  91.  
  92. #ifdef M_I386
  93. /*
  94.  * externals used for fpu support
  95.  */
  96.  
  97. extern struct proc *fp_task;
  98. extern int fp_type;
  99. #endif
  100.