corebits.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef XTENSA_COREBITS_H
  2. #define XTENSA_COREBITS_H
  3. /*
  4. * THIS FILE IS GENERATED -- DO NOT MODIFY BY HAND
  5. *
  6. * xtensa/corebits.h - Xtensa Special Register field positions and masks.
  7. *
  8. * (In previous releases, these were defined in specreg.h, a generated file.
  9. * This file is not generated, i.e. it is processor configuration independent.)
  10. */
  11. /* EXCCAUSE register fields: */
  12. #define EXCCAUSE_EXCCAUSE_SHIFT 0
  13. #define EXCCAUSE_EXCCAUSE_MASK 0x3F
  14. /* Exception causes (mostly incomplete!): */
  15. #define EXCCAUSE_ILLEGAL 0
  16. #define EXCCAUSE_SYSCALL 1
  17. #define EXCCAUSE_IFETCHERROR 2
  18. #define EXCCAUSE_LOADSTOREERROR 3
  19. #define EXCCAUSE_LEVEL1INTERRUPT 4
  20. #define EXCCAUSE_ALLOCA 5
  21. /* PS register fields: */
  22. #define PS_WOE_SHIFT 18
  23. #define PS_WOE_MASK 0x00040000
  24. #define PS_WOE PS_WOE_MASK
  25. #define PS_CALLINC_SHIFT 16
  26. #define PS_CALLINC_MASK 0x00030000
  27. #define PS_CALLINC(n) (((n)&3)<<PS_CALLINC_SHIFT) /* n = 0..3 */
  28. #define PS_OWB_SHIFT 8
  29. #define PS_OWB_MASK 0x00000F00
  30. #define PS_OWB(n) (((n)&15)<<PS_OWB_SHIFT) /* n = 0..15 (or 0..7) */
  31. #define PS_RING_SHIFT 6
  32. #define PS_RING_MASK 0x000000C0
  33. #define PS_RING(n) (((n)&3)<<PS_RING_SHIFT) /* n = 0..3 */
  34. #define PS_UM_SHIFT 5
  35. #define PS_UM_MASK 0x00000020
  36. #define PS_UM PS_UM_MASK
  37. #define PS_EXCM_SHIFT 4
  38. #define PS_EXCM_MASK 0x00000010
  39. #define PS_EXCM PS_EXCM_MASK
  40. #define PS_INTLEVEL_SHIFT 0
  41. #define PS_INTLEVEL_MASK 0x0000000F
  42. #define PS_INTLEVEL(n) ((n)&PS_INTLEVEL_MASK) /* n = 0..15 */
  43. /* Backward compatibility (deprecated): */
  44. #define PS_PROGSTACK_SHIFT PS_UM_SHIFT
  45. #define PS_PROGSTACK_MASK PS_UM_MASK
  46. #define PS_PROG_SHIFT PS_UM_SHIFT
  47. #define PS_PROG_MASK PS_UM_MASK
  48. #define PS_PROG PS_UM
  49. /* DBREAKCn register fields: */
  50. #define DBREAKC_MASK_SHIFT 0
  51. #define DBREAKC_MASK_MASK 0x0000003F
  52. #define DBREAKC_LOADBREAK_SHIFT 30
  53. #define DBREAKC_LOADBREAK_MASK 0x40000000
  54. #define DBREAKC_STOREBREAK_SHIFT 31
  55. #define DBREAKC_STOREBREAK_MASK 0x80000000
  56. /* DEBUGCAUSE register fields: */
  57. #define DEBUGCAUSE_DEBUGINT_SHIFT 5
  58. #define DEBUGCAUSE_DEBUGINT_MASK 0x20 /* debug interrupt */
  59. #define DEBUGCAUSE_BREAKN_SHIFT 4
  60. #define DEBUGCAUSE_BREAKN_MASK 0x10 /* BREAK.N instruction */
  61. #define DEBUGCAUSE_BREAK_SHIFT 3
  62. #define DEBUGCAUSE_BREAK_MASK 0x08 /* BREAK instruction */
  63. #define DEBUGCAUSE_DBREAK_SHIFT 2
  64. #define DEBUGCAUSE_DBREAK_MASK 0x04 /* DBREAK match */
  65. #define DEBUGCAUSE_IBREAK_SHIFT 1
  66. #define DEBUGCAUSE_IBREAK_MASK 0x02 /* IBREAK match */
  67. #define DEBUGCAUSE_ICOUNT_SHIFT 0
  68. #define DEBUGCAUSE_ICOUNT_MASK 0x01 /* ICOUNT would increment to zero */
  69. #endif /*XTENSA_COREBITS_H*/