5.out.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #define NSNAME 8
  10. #define NSYM 50
  11. #define NREG 16
  12. #define NOPROF (1<<0)
  13. #define DUPOK (1<<1)
  14. #define ALLTHUMBS (1<<2)
  15. #define REGRET 0
  16. #define REGARG 0
  17. /* compiler allocates R1 up as temps */
  18. /* compiler allocates register variables R2 up */
  19. #define REGMIN 2
  20. #define REGMAX 8
  21. #define REGEXT 10
  22. /* compiler allocates external registers R10 down */
  23. #define REGTMP 11
  24. #define REGSB 12
  25. #define REGSP 13
  26. #define REGLINK 14
  27. #define REGPC 15
  28. #define REGTMPT 7 /* used by the loader for thumb code */
  29. #define NFREG 8
  30. #define FREGRET 0
  31. #define FREGEXT 7
  32. #define FREGTMP 15
  33. /* compiler allocates register variables F0 up */
  34. /* compiler allocates external registers F7 down */
  35. enum as
  36. {
  37. AXXX,
  38. AAND,
  39. AEOR,
  40. ASUB,
  41. ARSB,
  42. AADD,
  43. AADC,
  44. ASBC,
  45. ARSC,
  46. ATST,
  47. ATEQ,
  48. ACMP,
  49. ACMN,
  50. AORR,
  51. ABIC,
  52. AMVN,
  53. AB,
  54. ABL,
  55. /*
  56. * Do not reorder or fragment the conditional branch
  57. * opcodes, or the predication code will break
  58. */
  59. ABEQ,
  60. ABNE,
  61. ABCS,
  62. ABHS,
  63. ABCC,
  64. ABLO,
  65. ABMI,
  66. ABPL,
  67. ABVS,
  68. ABVC,
  69. ABHI,
  70. ABLS,
  71. ABGE,
  72. ABLT,
  73. ABGT,
  74. ABLE,
  75. AMOVWD,
  76. AMOVWF,
  77. AMOVDW,
  78. AMOVFW,
  79. AMOVFD,
  80. AMOVDF,
  81. AMOVF,
  82. AMOVD,
  83. ACMPF,
  84. ACMPD,
  85. AADDF,
  86. AADDD,
  87. ASUBF,
  88. ASUBD,
  89. AMULF,
  90. AMULD,
  91. ADIVF,
  92. ADIVD,
  93. // ASQRTF,
  94. // ASQRTD,
  95. ASRL,
  96. ASRA,
  97. ASLL,
  98. AMULU,
  99. ADIVU,
  100. AMUL,
  101. ADIV,
  102. AMOD,
  103. AMODU,
  104. AMOVB,
  105. AMOVBU,
  106. AMOVH,
  107. AMOVHU,
  108. AMOVW,
  109. AMOVM,
  110. ASWPBU,
  111. ASWPW,
  112. ANOP,
  113. ARFE,
  114. ASWI,
  115. AMULA,
  116. ADATA,
  117. AGLOBL,
  118. AGOK,
  119. AHISTORY,
  120. ANAME,
  121. ARET,
  122. ATEXT,
  123. AWORD,
  124. ADYNT,
  125. AINIT,
  126. ABCASE,
  127. ACASE,
  128. AEND,
  129. AMULL,
  130. AMULAL,
  131. AMULLU,
  132. AMULALU,
  133. ABX,
  134. ABXRET,
  135. ADWORD,
  136. ASIGNAME,
  137. /* moved here to preserve values of older identifiers */
  138. ASQRTF,
  139. ASQRTD,
  140. ALDREX,
  141. ASTREX,
  142. ALDREXD,
  143. ASTREXD,
  144. ALAST,
  145. };
  146. /* scond byte */
  147. #define C_SCOND ((1<<4)-1)
  148. #define C_SBIT (1<<4)
  149. #define C_PBIT (1<<5)
  150. #define C_WBIT (1<<6)
  151. #define C_FBIT (1<<7) /* psr flags-only */
  152. #define C_UBIT (1<<7) /* up bit */
  153. /* type/name */
  154. #define D_GOK 0
  155. #define D_NONE 1
  156. /* type */
  157. #define D_BRANCH (D_NONE+1)
  158. #define D_OREG (D_NONE+2)
  159. #define D_CONST (D_NONE+7)
  160. #define D_FCONST (D_NONE+8)
  161. #define D_SCONST (D_NONE+9)
  162. #define D_PSR (D_NONE+10)
  163. #define D_REG (D_NONE+12)
  164. #define D_FREG (D_NONE+13)
  165. #define D_FILE (D_NONE+16)
  166. #define D_OCONST (D_NONE+17)
  167. #define D_FILE1 (D_NONE+18)
  168. #define D_SHIFT (D_NONE+19)
  169. #define D_FPCR (D_NONE+20)
  170. #define D_REGREG (D_NONE+21)
  171. #define D_ADDR (D_NONE+22)
  172. /* name */
  173. #define D_EXTERN (D_NONE+3)
  174. #define D_STATIC (D_NONE+4)
  175. #define D_AUTO (D_NONE+5)
  176. #define D_PARAM (D_NONE+6)
  177. /*
  178. * this is the ranlib header
  179. */
  180. #define SYMDEF "__.SYMDEF"
  181. /*
  182. * this is the simulated IEEE floating point
  183. */
  184. typedef struct ieee Ieee;
  185. struct ieee
  186. {
  187. long l; /* contains ls-man 0xffffffff */
  188. long h; /* contains sign 0x80000000
  189. exp 0x7ff00000
  190. ms-man 0x000fffff */
  191. };