Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

272 lines
9.8 KiB

  1. // CodeTemplate:gensocpu
  2. //
  3. //soalpha.h -- Generated file. Do not hand edit
  4. //
  5. //
  6. // Thread State offsets
  7. //
  8. #define Eax 0x0
  9. #define Ebx 0xc
  10. #define Ecx 0x4
  11. #define Edx 0x8
  12. #define Esi 0x18
  13. #define Edi 0x1c
  14. #define Ebp 0x14
  15. #define Esp 0x10
  16. #define Eip 0x38
  17. #define CSReg 0x24
  18. #define CpuNotify 0x158
  19. #define fTCUnlocked 0x168
  20. //
  21. // Register mappings
  22. //
  23. #if MIPS
  24. #ifdef _codegen_
  25. // 0-3 are ZERO, at, v0, v1
  26. #define RegArg0 4 // a0 arg register
  27. #define RegArg1 5 // a1 arg register
  28. #define RegArg2 6 // a2 arg register
  29. #define RegArg3 7 // a3 arg register
  30. #define RegTemp0 8 // t0 temp for operand0
  31. #define RegTemp1 9 // t1 temp for operand1
  32. #define RegTemp2 10 // t2 temp for operand2
  33. #define RegTemp3 11 // t3 temp for operand3
  34. #define RegTemp4 12 // t4 temp2 for operand0
  35. #define RegTemp5 13 // t5 temp2 for operand1
  36. #define RegTemp6 14 // t6 temp2 for operand2
  37. #define RegTemp7 15 // t7 temp2 for operand3
  38. #define RegPointer 16 // s0 saved
  39. #define RegEip 17 // s1 saved
  40. #define RegCache0 18 // s2 saved
  41. #define RegCache1 19 // s3 saved
  42. #define RegCache2 20 // s4 saved
  43. #define RegCache3 21 // s5 saved
  44. #define RegCache4 22 // s6 saved
  45. #define RegProcessCpuNotify 23 // s7 saved
  46. #define RegTemp8 24 // t8 temp unused
  47. #define RegTemp 25 // t9 temp
  48. // 26-29 are k0, k1, gp, sp
  49. //#define RegS8 30 // s8 saved (DO NOT USE - USED BY trampln.s FOR EXCEPTION DISPATCHING)
  50. #else
  51. // 0-3 are ZERO, at, v0, v1
  52. #define RegArg0 $4 // a0 arg register
  53. #define RegArg1 $5 // a1 arg register
  54. #define RegArg2 $6 // a2 arg register
  55. #define RegArg3 $7 // a3 arg register
  56. #define RegTemp0 $8 // t0 temp for operand0
  57. #define RegTemp1 $9 // t1 temp for operand1
  58. #define RegTemp2 $10 // t2 temp for operand2
  59. #define RegTemp3 $11 // t3 temp for operand3
  60. #define RegTemp4 $12 // t4 temp2 for operand0
  61. #define RegTemp5 $13 // t5 temp2 for operand1
  62. #define RegTemp6 $14 // t6 temp2 for operand2
  63. #define RegTemp7 $15 // t7 temp2 for operand3
  64. #define RegPointer $16 // s0 saved
  65. #define RegEip $17 // s1 saved
  66. #define RegCache0 $18 // s2 saved
  67. #define RegCache1 $19 // s3 saved
  68. #define RegCache2 $20 // s4 saved
  69. #define RegCache3 $21 // s5 saved
  70. #define RegCache4 $22 // s6 saved
  71. #define RegProcessCpuNotify $23 // s7 saved
  72. #define RegTemp8 $24 // t8 temp unused
  73. #define RegTemp $25 // t9 temp
  74. // 26-29 are k0, k1, gp, sp
  75. //#define RegS8 $30 // s8 saved (DO NOT USE - USED BY trampln.s FOR EXCEPTION DISPATCHING)
  76. #endif
  77. #define NUM_CACHE_REGS 5
  78. #define EXCEPTIONDATA_SIGNATURE 0x12341234
  79. #ifndef _codegen_
  80. //
  81. // asm fragment delcarator and end macro
  82. //
  83. #define FRAGMENT(name) \
  84. .text;\
  85. .globl name;\
  86. .ent name;\
  87. name##:
  88. ;
  89. #define END_FRAGMENT(name) \
  90. .globl _End##name;\
  91. _End##name##:;\
  92. .end name;
  93. #endif
  94. #endif
  95. #if ALPHA
  96. #ifdef _codegen_
  97. //
  98. // Register mappings
  99. //
  100. // 0 is v0
  101. #define RegTemp0 1 // t0 temp for operand1
  102. #define RegTemp1 2 // t1 temp for operand2
  103. #define RegTemp2 3 // t2 temp for operand3
  104. #define RegTemp3 4 // t3 temp1 for operand1
  105. #define RegTemp4 5 // t4 temp1 for operand2
  106. #define RegTemp5 6 // t5 temp1 for operand3
  107. #define RegTemp6 7 // t6 temp2 for operand1 and operand3
  108. #define RegTemp7 8 // t7 temp2 for operand2
  109. // 9-14 are s0-s5
  110. #define RegPointer 9 // s0 saved
  111. #define RegEip 10 // s1 saved
  112. #define RegProcessCpuNotify 11 // s2 saved
  113. #define RegCache0 12 // s3 saved
  114. #define RegCache1 13 // s4 saved
  115. #define RegCache2 14 // s5 saved
  116. // 15 is fp
  117. #define RegArg0 16 // a0 arg register
  118. #define RegArg1 17 // a1 arg register
  119. #define RegArg2 18 // a2 arg register
  120. #define RegArg3 19 // a3 arg register
  121. #define RegArg4 20 // a4 arg register
  122. #define RegArg5 21 // a5 arg register
  123. #define RegTemp8 22 // t8 temp3 for operand1 and operand3
  124. #define RegTemp9 23 // t9 temp3 for operand2
  125. #define RegTemp10 24 // t10 temp4 for operand1 and operand3
  126. #define RegTemp11 25 // t11 temp4 for operand2
  127. // 26 is ra
  128. #define RegTemp 27 // t12 temp
  129. // 28-31 are AT, gp, sp, zero
  130. #else
  131. //
  132. // Register mappings
  133. //
  134. // 0 is v0
  135. #define RegTemp0 $1 // t0 temp for operand1
  136. #define RegTemp1 $2 // t1 temp for operand2
  137. #define RegTemp2 $3 // t2 temp for operand3
  138. #define RegTemp3 $4 // t3 temp1 for operand1
  139. #define RegTemp4 $5 // t4 temp1 for operand2
  140. #define RegTemp5 $6 // t5 temp1 for operand3
  141. #define RegTemp6 $7 // t6 temp2 for operand1 and operand3
  142. #define RegTemp7 $8 // t7 temp2 for operand2
  143. // 9-14 are s0-s5
  144. #define RegPointer $9 // s0 saved
  145. #define RegEip $10 // s1 saved
  146. #define RegProcessCpuNotify $11 // s2 saved
  147. #define RegCache0 $12 // s3 saved
  148. #define RegCache1 $13 // s4 saved
  149. #define RegCache2 $14 // s5 saved
  150. // 15 is fp
  151. #define RegArg0 $16 // a0 arg register
  152. #define RegArg1 $17 // a1 arg register
  153. #define RegArg2 $18 // a2 arg register
  154. #define RegArg3 $19 // a3 arg register
  155. #define RegArg4 $20 // a4 arg register
  156. #define RegArg5 $21 // a5 arg register
  157. #define RegTemp8 $22 // t8 temp3 for operand1 and operand3
  158. #define RegTemp9 $23 // t9 temp3 for operand2
  159. #define RegTemp10 $24 // t10 temp4 for operand1 and operand3
  160. #define RegTemp11 $25 // t11 temp4 for operand2
  161. // 26 is ra
  162. #define RegTemp $27 // t12 temp
  163. // 28-31 are AT, gp, sp, zero
  164. #endif
  165. #define NUM_CACHE_REGS 3
  166. #define EXCEPTIONDATA_SIGNATURE 0x01010101
  167. #ifndef _codegen_
  168. //
  169. // asm fragment delcarator and end macro
  170. //
  171. #define FRAGMENT(name) \
  172. .text;\
  173. .globl name;\
  174. .ent name;\
  175. name##:
  176. ;
  177. #define END_FRAGMENT(name) \
  178. .globl _End##name;\
  179. _End##name##:;\
  180. .end name;
  181. #endif
  182. #endif
  183. #if PPC
  184. #ifdef _codegen_
  185. // r0 is temp unused (reads as zero in some instructions)
  186. // r1 is stack pointer
  187. // r2 is TOC pointer
  188. #define RegArg0 3 // arg register 0
  189. #define RegArg1 4 // arg register 1
  190. #define RegArg2 5 // arg register 2
  191. #define RegArg3 6 // arg register 3
  192. #define RegTemp0 7 // temp for operand1 (acutally arg reg 4)
  193. #define RegTemp1 8 // temp for operand2 (acutally arg reg 5)
  194. #define RegTemp2 9 // temp for operand3 (acutally arg reg 6)
  195. #define RegUt1 10 // temp
  196. #define RegUt2 11 // temp
  197. #define RegUt3 12 // temp
  198. // all registers past r12 must be preserved
  199. // r13 is the TEB pointer, set up by NT and assumed to be valid by C code
  200. #define RegPointer 14 // saved
  201. #define RegEip 15 // saved
  202. #define RegProcessCpuNotify 16 // saved
  203. #define RegCache0 17 // saved
  204. #define RegCache1 18 // saved
  205. #define RegCache2 19 // saved
  206. #define RegCache3 20 // saved
  207. #define RegCache4 21 // saved
  208. #define RegCache5 22 // saved
  209. #define RegTemp 23 // saved
  210. // r24-r31 are unused
  211. #else
  212. // r0 is temp unused (reads as zero in some instructions)
  213. // r1 is stack pointer
  214. // r2 is TOC pointer
  215. #define RegArg0 r3 // arg register 0
  216. #define RegArg1 r4 // arg register 1
  217. #define RegArg2 r5 // arg register 2
  218. #define RegArg3 r6 // arg register 3
  219. #define RegTemp0 r7 // temp for operand1 (acutally arg reg 4)
  220. #define RegTemp1 r8 // temp for operand2 (acutally arg reg 5)
  221. #define RegTemp2 r9 // temp for operand3 (acutally arg reg 6)
  222. #define RegUt1 r10 // temp
  223. #define RegUt2 r11 // temp
  224. #define RegUt3 r12 // temp
  225. // all registers past r12 must be preserved
  226. // r13 is the TEB pointer, set up by NT and assumed to be valid by C code
  227. #define RegPointer r14 // saved
  228. #define RegEip r15 // saved
  229. #define RegProcessCpuNotify r16 // saved
  230. #define RegCache0 r17 // saved
  231. #define RegCache1 r18 // saved
  232. #define RegCache2 r19 // saved
  233. #define RegCache3 r20 // saved
  234. #define RegCache4 r21 // saved
  235. #define RegCache5 r22 // saved
  236. #define RegTemp r23 // saved
  237. // r24-r31 are unused
  238. #endif
  239. #define NUM_CACHE_REGS 6
  240. #define EXCEPTIONDATA_SIGNATURE 0x12341234
  241. #ifndef _codegen_
  242. //
  243. // asm fragment delcarator and end macro
  244. //
  245. #define FRAGMENT(name) \
  246. .text; \
  247. .align 2; \
  248. .globl name; \
  249. name##:
  250. #define END_FRAGMENT(name) \
  251. .globl _End##name; \
  252. _End##name:;
  253. #endif
  254. #endif