home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / mach / sparc / exception.h < prev    next >
C/C++ Source or Header  |  1997-04-27  |  4KB  |  121 lines

  1. /*
  2.  * Copyright (c) 1994 NeXT Computer, Inc.
  3.  *
  4.  * SPARC Family:    Machine dependent exception codes.
  5.  *
  6.  * HISTORY
  7.  *
  8.  * 21-Apr-1994 Mac Gillon at NeXT
  9.  *    Created.
  10.  */
  11.  
  12. #ifndef    _MACH_SPARC_EXCEPTION_H_
  13. #define    _MACH_SPARC_EXCEPTION_H_
  14.  
  15.  
  16. /*
  17.  *    EXC_BAD_ACCESS
  18.  *    Note: do not conflict with kern_return_t values returned by vm_fault
  19.  */
  20.  
  21. /* to avoid clash with the kern_return.h values */
  22. #define EXC_SPARC_BAD_ACCESS(x)        (0x300+x)
  23.  
  24. #define EXC_SPARC_TEXT_FAULT    EXC_SPARC_BAD_ACCESS(0x01)
  25. /* same value for TEXT_ERROR */ 
  26. #define EXC_SPARC_WIN_OVERFLOW    EXC_SPARC_BAD_ACCESS(0x02)
  27. #define EXC_SPARC_WIN_UNDERFLOW    EXC_SPARC_BAD_ACCESS(0x03)
  28. #define EXC_SPARC_ALIGNMENT    EXC_SPARC_BAD_ACCESS(0x04)
  29. #define EXC_SPARC_DATA_FAULT    EXC_SPARC_BAD_ACCESS(0x05)
  30. /* same value for DATA_ERROR */
  31. #define EXC_SPARC_DATA_STORE    EXC_SPARC_BAD_ACCESS(0x06)
  32. #define EXC_SPARC_DATA_MISS    EXC_SPARC_BAD_ACCESS(0x07)
  33. #define EXC_SPARC_TEXT_MISS    EXC_SPARC_BAD_ACCESS(0x08)
  34.  
  35. #define    EXC_SPARC_BUS_HWERR    EXC_SPARC_BAD_ACCESS(0x09)
  36.             /* misc hardware error (e.g. timeout) */
  37. #define    EXC_SPARC_BUS_ALIGN    EXC_SPARC_BAD_ACCESS(0x0A)    
  38.             /* hardware alignment error */
  39. #define    EXC_SPARC_SEGV_NOMAP    EXC_SPARC_BAD_ACCESS(0x0B)    
  40.             /* no mapping at the fault address */
  41. #define    EXC_SPARC_SEGV_PROT    EXC_SPARC_BAD_ACCESS(0x0C)        
  42.             /* access exceeded protections */
  43. #define    EXC_SPARC_OBJERR    EXC_SPARC_BAD_ACCESS(0x0D)    
  44.             /* object returned errno value */
  45. #define EXC_SPARC_FP_DISABLED    EXC_SPARC_BAD_ACCESS(0x0E)
  46. #define EXC_SPARC_CP_DISABLED    EXC_SPARC_BAD_ACCESS(0x0F)
  47.  
  48. /*
  49.  *    EXC_BAD_INSTRUCTION
  50.  */
  51.  
  52. #define EXC_SPARC_BAD_INST(x)        (0x500+x)
  53.  
  54. #define    EXC_SPARC_ILL_STACK        EXC_SPARC_BAD_INST(0x01)    
  55.                     /* bad stack */
  56. #define    EXC_SPARC_ILL_ILLINSTR_FAULT    EXC_SPARC_BAD_INST(0x02    )
  57.                     /* illegal instruction fault */
  58. #define    EXC_SPARC_ILL_PRIVINSTR_FAULT    EXC_SPARC_BAD_INST(0x03    )
  59.                     /* privileged instruction fault */
  60.  
  61.  
  62.  
  63. #define EXC_SPARC_UNIMP_INSTR        T_UNIMP_INSTR
  64. #define EXC_SPARC_PRIV_INSTR        T_PRIV_INSTR
  65. #define EXC_SPARC_UNIMP_FLUSH        T_UNIMP_FLUSH
  66.  
  67. /*
  68.  *    EXC_ARITHMETIC
  69.  */
  70.  
  71. #define EXC_SPARC_BAD_ARITH(x)        (0x600+x)
  72.  
  73. #define EXC_SPARC_FPE_INTOVF_TRAP    EXC_SPARC_BAD_ARITH(0x04)
  74.                     /* integer overflow */
  75. #define EXC_SPARC_FPE_STARTSIG_TRAP    EXC_SPARC_BAD_ARITH(0x05)
  76.                     /* process using fp */
  77. #define EXC_SPARC_FPE_INTDIV_TRAP    EXC_SPARC_BAD_ARITH(0x06)
  78.                     /* integer divide by zero */
  79. #define EXC_SPARC_FPE_FLTINEX_TRAP    EXC_SPARC_BAD_ARITH(0x07)
  80.                     /* [floating inexact result] */
  81. #define EXC_SPARC_FPE_FLTDIV_TRAP    EXC_SPARC_BAD_ARITH(0x08)
  82.                     /* [floating divide by zero] */
  83. #define    EXC_SPARC_FPE_FLTUND_TRAP    EXC_SPARC_BAD_ARITH(0x09)
  84.                     /* [floating underflow] */
  85. #define    EXC_SPARC_FPE_FLTOPERR_TRAP    EXC_SPARC_BAD_ARITH(0x0A)
  86.                     /* [floating operand error] */
  87. #define    EXC_SPARC_FPE_FLTOVF_TRAP    EXC_SPARC_BAD_ARITH(0x0B)
  88.                     /* [floating overflow] */
  89.  
  90.  
  91. #define EXC_SPARC_CP_EXCEPTION        T_CP_EXCEPTION
  92. #define EXC_SPARC_FP_EXCEPTION        T_FP_EXCEPTION
  93. #define EXC_SPARC_TAG_OVERFLOW    T_TAG_OVERFLOW
  94. #define EXC_SPARC_IDIV0        T_IDIV0
  95.  
  96. /*
  97.  *    EXC_BREAKPOINT
  98.  */
  99.  
  100. #define EXC_SPARC_BREAKPOINT1    T_BREAKPOINT
  101.  
  102. /*
  103.  *    EXC_SOFTWARE
  104.  */
  105.  
  106. #define EXC_SPARC_SYSCALL    T_SYSCALL
  107. #define EXC_SPARC_DIV0        T_DIV0
  108. #define EXC_SPARC_FLUSH_WIN    T_FLUSH_WINDOWS
  109. #define EXC_SPARC_CLEAN_WIN    T_CLEAN_WINDOWS
  110. #define EXC_SPARC_RANGE_CHECK    T_RANGE_CHECK
  111. #define EXC_SPARC_FIX_ALIGN    T_FIX_ALIGN
  112. #define EXC_SPARC_INT_OVERFLOW    T_INT_OVERFLOW
  113. #define EXC_SPARC_GETCC        T_GETCC
  114. #define EXC_SPARC_SETCC        T_SETCC
  115.  
  116. #define EXC_SPARC_BAD_USYSCALL    0x700
  117.  
  118. #define EXC_SPARC_DEBUG        0x800
  119.  
  120. #endif    _MACH_SPARC_EXCEPTION_H_
  121.