specreg.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * Xtensa Special Register symbolic names
  3. */
  4. /* $Id: //depot/rel/Eaglenest/Xtensa/OS/include/xtensa/specreg.h#2 $ */
  5. /*
  6. * Copyright (c) 2005-2011 Tensilica Inc.
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining
  9. * a copy of this software and associated documentation files (the
  10. * "Software"), to deal in the Software without restriction, including
  11. * without limitation the rights to use, copy, modify, merge, publish,
  12. * distribute, sublicense, and/or sell copies of the Software, and to
  13. * permit persons to whom the Software is furnished to do so, subject to
  14. * the following conditions:
  15. *
  16. * The above copyright notice and this permission notice shall be included
  17. * in all copies or substantial portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  20. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  21. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  22. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  23. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  24. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  25. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. */
  27. #ifndef XTENSA_SPECREG_H
  28. #define XTENSA_SPECREG_H
  29. /* Special registers: */
  30. #define LBEG 0
  31. #define LEND 1
  32. #define LCOUNT 2
  33. #define SAR 3
  34. #define BR 4
  35. #define LITBASE 5
  36. #define SCOMPARE1 12
  37. #define ACCLO 16
  38. #define ACCHI 17
  39. #define MR_0 32
  40. #define MR_1 33
  41. #define MR_2 34
  42. #define MR_3 35
  43. #define PREFCTL 40
  44. #define WINDOWBASE 72
  45. #define WINDOWSTART 73
  46. #define PTEVADDR 83
  47. #define RASID 90
  48. #define ITLBCFG 91
  49. #define DTLBCFG 92
  50. #define IBREAKENABLE 96
  51. #define MEMCTL 97
  52. #define CACHEATTR 98
  53. #define ATOMCTL 99
  54. #define DDR 104
  55. #define MECR 110
  56. #define IBREAKA_0 128
  57. #define IBREAKA_1 129
  58. #define DBREAKA_0 144
  59. #define DBREAKA_1 145
  60. #define DBREAKC_0 160
  61. #define DBREAKC_1 161
  62. #define CONFIGID0 176
  63. #define EPC_1 177
  64. #define EPC_2 178
  65. #define EPC_3 179
  66. #define EPC_4 180
  67. #define EPC_5 181
  68. #define EPC_6 182
  69. #define EPC_7 183
  70. #define DEPC 192
  71. #define EPS_2 194
  72. #define EPS_3 195
  73. #define EPS_4 196
  74. #define EPS_5 197
  75. #define EPS_6 198
  76. #define EPS_7 199
  77. #define CONFIGID1 208
  78. #define EXCSAVE_1 209
  79. #define EXCSAVE_2 210
  80. #define EXCSAVE_3 211
  81. #define EXCSAVE_4 212
  82. #define EXCSAVE_5 213
  83. #define EXCSAVE_6 214
  84. #define EXCSAVE_7 215
  85. #define CPENABLE 224
  86. #define INTERRUPT 226
  87. #define INTREAD INTERRUPT /* alternate name for backward compatibility */
  88. #define INTSET INTERRUPT /* alternate name for backward compatibility */
  89. #define INTCLEAR 227
  90. #define INTENABLE 228
  91. #define PS 230
  92. #define VECBASE 231
  93. #define EXCCAUSE 232
  94. #define DEBUGCAUSE 233
  95. #define CCOUNT 234
  96. #define PRID 235
  97. #define ICOUNT 236
  98. #define ICOUNTLEVEL 237
  99. #define EXCVADDR 238
  100. #define CCOMPARE_0 240
  101. #define CCOMPARE_1 241
  102. #define CCOMPARE_2 242
  103. #define MISC_REG_0 244
  104. #define MISC_REG_1 245
  105. #define MISC_REG_2 246
  106. #define MISC_REG_3 247
  107. /* Special cases (bases of special register series): */
  108. #define MR 32
  109. #define IBREAKA 128
  110. #define DBREAKA 144
  111. #define DBREAKC 160
  112. #define EPC 176
  113. #define EPS 192
  114. #define EXCSAVE 208
  115. #define CCOMPARE 240
  116. #define MISC_REG 244
  117. /* Tensilica-defined user registers: */
  118. #if 0
  119. /*#define ... 21..24 */ /* (545CK) */
  120. /*#define ... 140..143 */ /* (545CK) */
  121. #define EXPSTATE 230 /* Diamond */
  122. #define THREADPTR 231 /* threadptr option */
  123. #define FCR 232 /* FPU */
  124. #define FSR 233 /* FPU */
  125. #define AE_OVF_SAR 240 /* HiFi2 */
  126. #define AE_BITHEAD 241 /* HiFi2 */
  127. #define AE_TS_FTS_BU_BP 242 /* HiFi2 */
  128. #define AE_SD_NO 243 /* HiFi2 */
  129. #define VSAR 240 /* VectraLX */
  130. #define ROUND_LO 242 /* VectraLX */
  131. #define ROUND_HI 243 /* VectraLX */
  132. #define CBEGIN 246 /* VectraLX */
  133. #define CEND 247 /* VectraLX */
  134. #endif
  135. #endif /* XTENSA_SPECREG_H */