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.

484 lines
21 KiB

  1. /* asmtabtb.c -- microsoft 80x86 assembler
  2. **
  3. ** microsoft (r) macro assembler
  4. ** copyright (c) microsoft corp 1986. all rights reserved
  5. **
  6. ** randy nevin
  7. **
  8. ** 10/90 - Quick conversion to 32 bit by Jeff Spencer
  9. */
  10. #include <stdio.h>
  11. #include "asm86.h"
  12. #include "asmfcn.h"
  13. #include "asmopcod.h"
  14. #include "asmctype.h"
  15. #include "asmindex.h"
  16. #include "asmtab.h" /* common between asmtab.c and asmtabtb.c */
  17. #ifndef V386
  18. #define P386 0
  19. #endif
  20. /* first token table */
  21. struct pseudo FAR dir1tok[] = {
  22. /* I_TASSUME */ { TASSUME, NL },
  23. /* I_TCOMMENT */ { TCOMMENT, NL },
  24. /* I_TDB */ { TDB, NL },
  25. /* I_TDD */ { TDD, NL },
  26. /* I_TDQ */ { TDQ, NL },
  27. /* I_TDT */ { TDT, NL },
  28. /* I_TDW */ { TDW, NL },
  29. /* I_TELSE */ { TELSE, CONDBEG },
  30. /* I_TEND */ { TEND, NL },
  31. /* I_TENDIF */ { TENDIF, CONDBEG },
  32. /* I_TENDM */ { TENDM, NL },
  33. /* I_TERR */ { TERR, NL },
  34. /* I_TERR1 */ { TERR1, NL },
  35. /* I_TERR2 */ { TERR2, NL },
  36. /* I_TERRB */ { TERRB, NL },
  37. /* I_TERRDEF */ { TERRDEF, NL },
  38. /* I_TERRDIF */ { TERRDIF, NL },
  39. /* I_TERRE */ { TERRE, NL },
  40. /* I_TERRNZ */ { TERRNZ, NL },
  41. /* I_TERRIDN */ { TERRIDN, NL },
  42. /* I_TERRNB */ { TERRNB, NL },
  43. /* I_TERRNDEF */ { TERRNDEF, NL },
  44. /* I_TEVEN */ { TEVEN, NL },
  45. /* I_TEXITM */ { TEXITM, NL },
  46. /* I_TEXTRN */ { TEXTRN, NL },
  47. /* I_TIF */ { TIF, CONDBEG },
  48. /* I_TIF1 */ { TIF1, CONDBEG },
  49. /* I_TIF2 */ { TIF2, CONDBEG },
  50. /* I_TIFB */ { TIFB, CONDBEG },
  51. /* I_TIFDEF */ { TIFDEF, CONDBEG },
  52. /* I_TIFDIF */ { TIFDIF, CONDBEG },
  53. /* I_TIFE */ { TIFE, CONDBEG },
  54. /* I_TIFIDN */ { TIFIDN, CONDBEG },
  55. /* I_TIFNB */ { TIFNB, CONDBEG },
  56. /* I_TIFNDEF */ { TIFNDEF, CONDBEG },
  57. /* I_TINCLUDE */ { TINCLUDE, NL },
  58. /* I_TIRP */ { TIRP, BLKBEG },
  59. /* I_TIRPC */ { TIRPC, BLKBEG },
  60. /* I_TLOCAL */ { TLOCAL, NL },
  61. /* I_TNAME */ { TNAME, NL },
  62. /* I_TORG */ { TORG, NL },
  63. /* I_TPAGE */ { TPAGE, NL },
  64. /* I_TPUBLIC */ { TPUBLIC, NL },
  65. /* I_TPURGE */ { TPURGE, NL },
  66. /* I_TREPT */ { TREPT, BLKBEG },
  67. /* I_TSUBTTL */ { TSUBTTL, NL },
  68. /* I_TTITLE */ { TTITLE, NL },
  69. /* I_TCREF */ { TCREF, NL },
  70. /* I_TLALL */ { TLALL, NL },
  71. /* I_TLFCOND */ { TLFCOND, NL },
  72. /* I_TLIST */ { TLIST, NL },
  73. /* I_TRADIX */ { TRADIX, NL },
  74. /* I_TSALL */ { TSALL, NL },
  75. /* I_TSFCOND */ { TSFCOND, NL },
  76. /* I_TTFCOND */ { TTFCOND, NL },
  77. /* I_TXALL */ { TXALL, NL },
  78. /* I_TXCREF */ { TXCREF, NL },
  79. /* I_TXLIST */ { TXLIST, NL },
  80. /* I_TOUT */ { TOUT, NL },
  81. /* I_TALIGN */ { TALIGN, NL },
  82. /* I_T8086 */ { T8086, NL },
  83. /* I_T8087 */ { T8087, NL },
  84. /* I_T287 */ { T287, NL },
  85. /* I_T186 */ { T186, NL },
  86. /* I_T286C */ { T286C, NL },
  87. /* I_T286P */ { T286P, NL },
  88. /* I_TINCLIB */ { TINCLIB, NL },
  89. /* I_TMSTACK */ { TMSTACK, NL },
  90. /* I_TDOSSEG */ { TDOSSEG, NL },
  91. /* I_TMODEL */ { TMODEL, NL },
  92. /* I_TCODE */ { TMSEG, 0 },
  93. /* I_TDATA */ { TMSEG, 1 },
  94. /* I_TDATAQ */ { TMSEG, 2 },
  95. /* I_TCONST */ { TMSEG, 3 },
  96. /* I_TFARDATA */ { TMSEG, 5 },
  97. /* I_TFARDATAQ*/ { TMSEG, 6 },
  98. /* I_TSEQ */ { TSEQ, NL },
  99. /* I_TALPHA */ { TALPHA, NL },
  100. /* I_TCOMM */ { TCOMM, NL },
  101. /* I_TIFDIFI */ { TIFDIF, CONDBEG | IGNORECASE},
  102. /* I_TIFIDNI */ { TIFIDN, CONDBEG | IGNORECASE},
  103. /* I_TERRDIFI */ { TERRDIF, NL | IGNORECASE},
  104. /* I_TERRIDNI */ { TERRIDN, NL | IGNORECASE},
  105. /* I_TELSEIF */ { TIF, (char)(CONDBEG | CONDCONT) },
  106. /* I_TELSEIF1 */ { TIF1, (char)(CONDBEG | CONDCONT) },
  107. /* I_TELSEIF2 */ { TIF2, (char)(CONDBEG | CONDCONT) },
  108. /* I_TELSEIFB */ { TIFB, (char)(CONDBEG | CONDCONT) },
  109. /* I_TELSEIFDEF */ { TIFDEF, (char)(CONDBEG | CONDCONT) },
  110. /* I_TELSEIFDIF */ { TIFDIF, (char)(CONDBEG | CONDCONT) },
  111. /* I_TELSEIFE */ { TIFE, (char)(CONDBEG | CONDCONT) },
  112. /* I_TELSEIFIDN */ { TIFIDN, (char)(CONDBEG | CONDCONT) },
  113. /* I_TELSEIFNB */ { TIFNB, (char)(CONDBEG | CONDCONT) },
  114. /* I_TELSEIFNDEF */ { TIFNDEF, (char)(CONDBEG | CONDCONT) },
  115. /* I_TELSEIFDIFI */ { TIFDIF, (char)(CONDBEG | CONDCONT | IGNORECASE)},
  116. /* I_TELSEIFIDNI */ { TIFIDN, (char)(CONDBEG | CONDCONT | IGNORECASE)},
  117. #ifdef V386
  118. /* I_T386C */ { T386C, NL },
  119. /* I_T386P */ { T386P, NL },
  120. /* I_T387 */ { T387, NL },
  121. /* I_TDF */ { TDF, NL },
  122. #endif
  123. /* I_TFPO */ { TFPO, NL },
  124. };
  125. /* second token table */
  126. struct pseudo FAR dir2tok[] = {
  127. /* I2_TDB */ { TDB, NL },
  128. /* I2_TDD */ { TDD, NL },
  129. /* I2_TDQ */ { TDQ, NL },
  130. /* I2_TDT */ { TDT, NL },
  131. /* I2_TDW */ { TDW, NL },
  132. /* I2_TENDP */ { TENDP, NL },
  133. /* I2_TENDS */ { TENDS, NL },
  134. /* I2_TEQU */ { TEQU, NL },
  135. /* I2_TSUBSTR */ { TSUBSTR, NL },
  136. /* I2_TCATSTR */ { TCATSTR, NL },
  137. /* I2_TSIZESTR */ { TSIZESTR, NL },
  138. /* I2_TINSTR */ { TINSTR, NL },
  139. /* I2_TGROUP */ { TGROUP, NL },
  140. /* I2_TLABEL */ { TLABEL, NL },
  141. /* I2_TMACRO */ { TMACRO, BLKBEG },
  142. /* I2_TPROC */ { TPROC, NL },
  143. /* I2_TRECORD */ { TRECORD, NL },
  144. /* I2_TSEGMENT */ { TSEGMENT, NL },
  145. /* I2_TSTRUC */ { TSTRUC, NL },
  146. #ifdef V386
  147. /* I2_TDF */ { TDF, NL },
  148. #endif
  149. };
  150. /* precedence tables */
  151. UCHAR opprec[] = {
  152. 11, 11, 11, 11, 9, 9, 9,
  153. 1, 9, 8, 8, 4, 1,
  154. 3, 5, 5, 5, 5, 5, 7, 5, 2, 9,
  155. 7, 7, 2, 0, 0,
  156. 11, 11, 11, 11, 11, 11, 10, 10, 7, 7, 6, 6
  157. };
  158. /* segment parameter names */
  159. /* opcode table */
  160. struct opcentry FAR opctab[] = { /* order must match I_xxx in asmindex.h */
  161. { O_AAA, 0, PNOARGS, P86|P186|P286|P386 },
  162. { O_AAD, R_AAD, PNOARGS, P86|P186|P286|P386 },
  163. { O_AAM, R_AAM, PNOARGS, P86|P186|P286|P386 },
  164. { O_AAS, 0, PNOARGS, P86|P186|P286|P386 },
  165. { O_ADC, 0, PGENARG, F_W|P86|P186|P286|P386 },
  166. { O_ADD, 0, PGENARG, F_W|P86|P186|P286|P386 },
  167. { O_AND, 0, PGENARG, F_W|P86|P186|P286|P386 },
  168. { O_CALL, 0, PCALL, P86|P186|P286|P386 },
  169. { O_CBW, 2, PNOARGS, P86|P186|P286|P386 },
  170. { O_CLC, 0, PNOARGS, P86|P186|P286|P386 },
  171. { O_CLD, 0, PNOARGS, P86|P186|P286|P386 },
  172. { O_CLI, 0, PNOARGS, P86|P186|P286|P386 },
  173. { O_CMC, 0, PNOARGS, P86|P186|P286|P386 },
  174. { O_CMP, 0, PGENARG, P86|P186|P286|P386 },
  175. { O_CMPS, 0, PSTR, P86|P186|P286|P386 },
  176. { O_CMPSB, 0, PNOARGS, P86|P186|P286|P386 },
  177. { O_CMPSW, 2, PNOARGS, P86|P186|P286|P386 },
  178. { O_CWD, 2, PNOARGS, P86|P186|P286|P386 },
  179. { O_DAA, 0, PNOARGS, P86|P186|P286|P386 },
  180. { O_DAS, 0, PNOARGS, P86|P186|P286|P386 },
  181. { O_DEC, 0, PINCDEC, F_W|P86|P186|P286|P386 },
  182. { O_DIV, R_DIV, PARITH, P86|P186|P286|P386 },
  183. { O_ESC, 0, PESC, P86|P186|P286|P386 },
  184. { O_HLT, 0, PNOARGS, P86|P186|P286|P386 },
  185. { O_IDIV, R_IDIV, PARITH, P86|P186|P286|P386 },
  186. { O_IMUL, R_IMUL, PARITH, P86|P186|P286|P386 },
  187. { O_IN, 0, PINOUT, P86|P186|P286|P386 },
  188. { O_INC, 0, PINCDEC, F_W|P86|P186|P286|P386 },
  189. { O_INT, 0, PINT, P86|P186|P286|P386 },
  190. { O_INTO, 0, PNOARGS, P86|P186|P286|P386 },
  191. { O_IRET, 2, PNOARGS, P86|P186|P286|P386 },
  192. { O_JA, 0, PRELJMP, P86|P186|P286|P386 },
  193. { O_JAE, 0, PRELJMP, P86|P186|P286|P386 },
  194. { O_JB, 0, PRELJMP, P86|P186|P286|P386 },
  195. { O_JBE, 0, PRELJMP, P86|P186|P286|P386 },
  196. { O_JC, 0, PRELJMP, P86|P186|P286|P386 },
  197. { O_JCXZ, 2, PRELJMP, P86|P186|P286|P386 },
  198. { O_JE, 0, PRELJMP, P86|P186|P286|P386 },
  199. { O_JG, 0, PRELJMP, P86|P186|P286|P386 },
  200. { O_JGE, 0, PRELJMP, P86|P186|P286|P386 },
  201. { O_JL, 0, PRELJMP, P86|P186|P286|P386 },
  202. { O_JLE, 0, PRELJMP, P86|P186|P286|P386 },
  203. { O_JMP, 0, PJUMP, P86|P186|P286|P386 },
  204. { O_JNA, 0, PRELJMP, P86|P186|P286|P386 },
  205. { O_JNAE, 0, PRELJMP, P86|P186|P286|P386 },
  206. { O_JNB, 0, PRELJMP, P86|P186|P286|P386 },
  207. { O_JNBE, 0, PRELJMP, P86|P186|P286|P386 },
  208. { O_JNC, 0, PRELJMP, P86|P186|P286|P386 },
  209. { O_JNE, 0, PRELJMP, P86|P186|P286|P386 },
  210. { O_JNG, 0, PRELJMP, P86|P186|P286|P386 },
  211. { O_JNGE, 0, PRELJMP, P86|P186|P286|P386 },
  212. { O_JNL, 0, PRELJMP, P86|P186|P286|P386 },
  213. { O_JNLE, 0, PRELJMP, P86|P186|P286|P386 },
  214. { O_JNO, 0, PRELJMP, P86|P186|P286|P386 },
  215. { O_JNP, 0, PRELJMP, P86|P186|P286|P386 },
  216. { O_JNS, 0, PRELJMP, P86|P186|P286|P386 },
  217. { O_JNZ, 0, PRELJMP, P86|P186|P286|P386 },
  218. { O_JO, 0, PRELJMP, P86|P186|P286|P386 },
  219. { O_JP, 0, PRELJMP, P86|P186|P286|P386 },
  220. { O_JPE, 0, PRELJMP, P86|P186|P286|P386 },
  221. { O_JPO, 0, PRELJMP, P86|P186|P286|P386 },
  222. { O_JS, 0, PRELJMP, P86|P186|P286|P386 },
  223. { O_JZ, 0, PRELJMP, P86|P186|P286|P386 },
  224. { O_LAHF, 0, PNOARGS, P86|P186|P286|P386 },
  225. { O_LEA, 0, PLOAD, P86|P186|P286|P386 },
  226. { O_LES, 0, PLOAD, P86|P186|P286|P386 },
  227. { O_LDS, 0, PLOAD, P86|P186|P286|P386 },
  228. { O_LOCK, 0, PREPEAT, P86|P186|P286|P386 },
  229. { O_LODS, 0, PSTR, P86|P186|P286|P386 },
  230. { O_LODSB, 0, PNOARGS, P86|P186|P286|P386 },
  231. { O_LODSW, 2, PNOARGS, P86|P186|P286|P386 },
  232. { O_LOOP, 0, PRELJMP, P86|P186|P286|P386 },
  233. { O_LOOPE, 0, PRELJMP, P86|P186|P286|P386 },
  234. { O_LOOPNE, 0, PRELJMP, P86|P186|P286|P386 },
  235. { O_LOOPNZ, 0, PRELJMP, P86|P186|P286|P386 },
  236. { O_LOOPZ, 0, PRELJMP, P86|P186|P286|P386 },
  237. { O_MOV, 0, PMOV, F_W|P86|P186|P286|P386 },
  238. { O_MOVS, 0, PSTR, P86|P186|P286|P386 },
  239. { O_MOVSB, 0, PNOARGS, P86|P186|P286|P386 },
  240. { O_MOVSW, 2, PNOARGS, P86|P186|P286|P386 },
  241. { O_MUL, R_MUL, PARITH, P86|P186|P286|P386 },
  242. { O_NEG, R_NEG, PARITH, F_W|P86|P186|P286|P386 },
  243. { O_NOP, 0, PNOARGS, P86|P186|P286|P386 },
  244. { O_NOT, R_NOT, PARITH, F_W|P86|P186|P286|P386 },
  245. { O_OR, 0, PGENARG, F_W|P86|P186|P286|P386 },
  246. { O_OUT, 0, PINOUT, P86|P186|P286|P386 },
  247. { O_POP, 0, PSTACK, F_W|P86|P186|P286|P386 },
  248. { O_POPF, 2, PNOARGS, P86|P186|P286|P386 },
  249. { O_PUSH, 0, PSTACK, P86|P186|P286|P386 },
  250. { O_PUSHF, 2, PNOARGS, P86|P186|P286|P386 },
  251. { O_RCL, R_RCL, PSHIFT, F_W|P86|P186|P286|P386 },
  252. { O_RCR, R_RCR, PSHIFT, F_W|P86|P186|P286|P386 },
  253. { O_REP, 0, PREPEAT, P86|P186|P286|P386 },
  254. { O_REPE, 0, PREPEAT, P86|P186|P286|P386 },
  255. { O_REPNE, 0, PREPEAT, P86|P186|P286|P386 },
  256. { O_REPNZ, 0, PREPEAT, P86|P186|P286|P386 },
  257. { O_REPZ, 0, PREPEAT, P86|P186|P286|P386 },
  258. { O_RET, 0, PRETURN, P86|P186|P286|P386 },
  259. { O_ROL, R_ROL, PSHIFT, F_W|P86|P186|P286|P386 },
  260. { O_ROR, R_ROR, PSHIFT, F_W|P86|P186|P286|P386 },
  261. { O_SAHF, 0, PNOARGS, P86|P186|P286|P386 },
  262. { O_SAL, R_SAL, PSHIFT, F_W|P86|P186|P286|P386 },
  263. { O_SAR, R_SAR, PSHIFT, F_W|P86|P186|P286|P386 },
  264. { O_SBB, 0, PGENARG, F_W|P86|P186|P286|P386 },
  265. { O_SCAS, 0, PSTR, P86|P186|P286|P386 },
  266. { O_SCASB, 0, PNOARGS, P86|P186|P286|P386 },
  267. { O_SCASW, 2, PNOARGS, P86|P186|P286|P386 },
  268. { O_SHL, R_SHL, PSHIFT, F_W|P86|P186|P286|P386 },
  269. { O_SHR, R_SHR, PSHIFT, F_W|P86|P186|P286|P386 },
  270. { O_STC, 0, PNOARGS, P86|P186|P286|P386 },
  271. { O_STD, 0, PNOARGS, P86|P186|P286|P386 },
  272. { O_STI, 0, PNOARGS, P86|P186|P286|P386 },
  273. { O_STOS, 0, PSTR, P86|P186|P286|P386 },
  274. { O_STOSB, 0, PNOARGS, P86|P186|P286|P386 },
  275. { O_STOSW, 2, PNOARGS, P86|P186|P286|P386 },
  276. { O_SUB, 0, PGENARG, F_W|P86|P186|P286|P386 },
  277. { O_TEST, 0, PGENARG, P86|P186|P286|P386 },
  278. { O_WAIT, 0, PNOARGS, P86|P186|P286|P386 },
  279. { O_XCHG, 0, PXCHG, F_W|S_W|P86|P186|P286|P386 },
  280. { O_XLAT, 0, PXLAT, P86|P186|P286|P386 },
  281. { O_XLATB, 0, PXLAT, P86|P186|P286|P386 },
  282. { O_XOR, 0, PGENARG, F_W|P86|P186|P286|P386 },
  283. { O_ARPL, 0, PARPL, (char)(F_W| P286|P386|PROT) },
  284. { O_BOUND, 0, PBOUND, P186|P286|P386 },
  285. { O_CLTS, R_CLTS, PCLTS, (char)(P286|P386|PROT) },
  286. { O_ENTER, 0, PENTER, P186|P286|P386 },
  287. { O_INS, 0, PSTR, P186|P286|P386 },
  288. { O_INSB, 0, PNOARGS, P186|P286|P386 },
  289. { O_INSW, 2, PNOARGS, P186|P286|P386 },
  290. { O_LAR, R_LAR, PARSL, (char)(P286|P386|PROT) },
  291. { O_LEAVE, 0, PNOARGS, P186|P286|P386 },
  292. { O_LGDT, R_LGDT, PDESCRTBL, (char)(P286|P386|PROT) },
  293. { O_LIDT, R_LIDT, PDESCRTBL, (char)(P286|P386|PROT) },
  294. { O_LLDT, R_LLDT, PDTTRSW, (char)(P286|P386|PROT) },
  295. { O_LMSW, R_LMSW, PDTTRSW, (char)(P286|P386|PROT) },
  296. { O_LSL, R_LSL, PARSL, (char)(P286|P386|PROT) },
  297. { O_LTR, R_LTR, PDTTRSW, (char)(P286|P386|PROT) },
  298. { O_OUTS, 0, PSTR, P186|P286|P386 },
  299. { O_OUTSB, 0, PNOARGS, P186|P286|P386 },
  300. { O_OUTSW, 2, PNOARGS, P186|P286|P386 },
  301. { O_POPA, 2, PNOARGS, F_W| P186|P286|P386 },
  302. { O_PUSHA, 2, PNOARGS, P186|P286|P386 },
  303. { O_SGDT, R_SGDT, PDESCRTBL, (char)(F_W| P286|P386|PROT) },
  304. { O_SIDT, R_SIDT, PDESCRTBL, (char)(F_W| P286|P386|PROT) },
  305. { O_SLDT, R_SLDT, PDTTRSW, (char)(F_W| P286|P386|PROT) },
  306. { O_SMSW, R_SMSW, PDTTRSW, (char)(F_W| P286|P386|PROT) },
  307. { O_STR, R_STR, PDTTRSW, (char)(F_W| P286|P386|PROT) },
  308. { O_VERR, R_VERR, PVER, (char)(P286|P386|PROT) },
  309. { O_VERW, R_VERW, PVER, (char)(P286|P386|PROT) },
  310. { O_F2XM1, R_F2XM1, FNOARGS, P86|P186|P286|P386 },
  311. { O_FABS, R_FABS, FNOARGS, P86|P186|P286|P386 },
  312. { O_FADD, R_FADD, F2MEMSTK, P86|P186|P286|P386 },
  313. { O_FADDP, R_FADDP, FSTKS, P86|P186|P286|P386 },
  314. { O_FBLD, R_FBLD, FBCDMEM, P86|P186|P286|P386 },
  315. { O_FBSTP, R_FBSTP, FBCDMEM, F_W|P86|P186|P286|P386 },
  316. { O_FCHS, R_FCHS, FNOARGS, P86|P186|P286|P386 },
  317. { O_FCLEX, R_FCLEX, FNOARGS, FORCEWAIT|P86|P186|P286|P386 },
  318. { O_FCOM, R_FCOM, FMEMSTK, P86|P186|P286|P386 },
  319. { O_FCOMP, R_FCOMP, FMEMSTK, P86|P186|P286|P386 },
  320. { O_FCOMPP, R_FCOMPP, FNOARGS, P86|P186|P286|P386 },
  321. { O_FDECSTP, R_FDECSTP, FNOARGS, FORCEWAIT|P86|P186|P286|P386 },
  322. { O_FDISI, R_FDISI, FNOARGS, P86|P186|P286|P386 },
  323. { O_FDIV, R_FDIV, F2MEMSTK, P86|P186|P286|P386 },
  324. { O_FDIVP, R_FDIVP, FSTKS, P86|P186|P286|P386 },
  325. { O_FDIVR, R_FDIVR, F2MEMSTK, P86|P186|P286|P386 },
  326. { O_FDIVRP, R_FDIVRP, FSTKS, P86|P186|P286|P386 },
  327. { O_FENI, R_FENI, FNOARGS, P86|P186|P286|P386 },
  328. { O_FFREE, R_FFREE, FSTK, FORCEWAIT|P86|P186|P286|P386 },
  329. { O_FIADD, R_FIADD, FMEM42, P86|P186|P286|P386 },
  330. { O_FICOM, R_FICOM, FMEM42, P86|P186|P286|P386 },
  331. { O_FICOMP, R_FICOMP, FMEM42, P86|P186|P286|P386 },
  332. { O_FIDIV, R_FIDIV, FMEM42, P86|P186|P286|P386 },
  333. { O_FIDIVR, R_FIDIVR, FMEM42, P86|P186|P286|P386 },
  334. { O_FILD, R_FILD, FMEM842, P86|P186|P286|P386 },
  335. { O_FIMUL, R_FIMUL, FMEM42, P86|P186|P286|P386 },
  336. { O_FINCSTP, R_FINCSTP, FNOARGS, FORCEWAIT|P86|P186|P286|P386 },
  337. { O_FINIT, R_FINIT, FNOARGS, FORCEWAIT|P86|P186|P286|P386 },
  338. { O_FIST, R_FIST, FMEM42, F_W|P86|P186|P286|P386 },
  339. { O_FISTP, R_FISTP, FMEM842, F_W|P86|P186|P286|P386 },
  340. { O_FISUB, R_FISUB, FMEM42, P86|P186|P286|P386 },
  341. { O_FISUBR, R_FISUBR, FMEM42, P86|P186|P286|P386 },
  342. { O_FLD, R_FLD, FMEM4810, P86|P186|P286|P386 },
  343. { O_FLD1, R_FLD1, FNOARGS, P86|P186|P286|P386 },
  344. { O_FLDCW, R_FLDCW, FMEM2, FORCEWAIT|P86|P186|P286|P386 },
  345. { O_FLDENV, R_FLDENV, FMEM14, FORCEWAIT|P86|P186|P286|P386 },
  346. { O_FLDL2E, R_FLDL2E, FNOARGS, P86|P186|P286|P386 },
  347. { O_FLDL2T, R_FLDL2T, FNOARGS, P86|P186|P286|P386 },
  348. { O_FLDLG2, R_FLDLG2, FNOARGS, P86|P186|P286|P386 },
  349. { O_FLDLN2, R_FLDLN2, FNOARGS, P86|P186|P286|P386 },
  350. { O_FLDPI, R_FLDPI, FNOARGS, P86|P186|P286|P386 },
  351. { O_FLDZ, R_FLDZ, FNOARGS, P86|P186|P286|P386 },
  352. { O_FMUL, R_FMUL, F2MEMSTK, P86|P186|P286|P386 },
  353. { O_FMULP, R_FMULP, FSTKS, P86|P186|P286|P386 },
  354. { O_FNCLEX, R_FNCLEX, FNOARGS, P86|P186|P286|P386 },
  355. { O_FNDISI, R_FNDISI, FNOARGS, P86|P186|P286|P386 },
  356. { O_FNENI, R_FNENI, FNOARGS, P86|P186|P286|P386 },
  357. { O_FNINIT, R_FNINIT, FNOARGS, P86|P186|P286|P386 },
  358. { O_FNOP, R_FNOP, FNOARGS, FORCEWAIT|P86|P186|P286|P386 },
  359. { O_FNSAVE, R_FNSAVE, FMEM94, F_W|P86|P186|P286|P386 },
  360. { O_FNSTCW, R_FNSTCW, FMEM2, F_W|P86|P186|P286|P386 },
  361. { O_FNSTENV, R_FNSTENV, FMEM14, F_W|P86|P186|P286|P386 },
  362. { O_FNSTSW, R_FNSTSW, FMEM2, F_W|P86|P186|P286|P386 },
  363. { O_FPATAN, R_FPATAN, FNOARGS, P86|P186|P286|P386 },
  364. { O_FPREM, R_FPREM, FNOARGS, P86|P186|P286|P386 },
  365. { O_FPTAN, R_FPTAN, FNOARGS, P86|P186|P286|P386 },
  366. { O_FRNDINT, R_FRNDINT, FNOARGS, P86|P186|P286|P386 },
  367. { O_FRSTOR, R_FRSTOR, FMEM94, FORCEWAIT|P86|P186|P286|P386 },
  368. { O_FSAVE, R_FSAVE, FMEM94, F_W|FORCEWAIT|P86|P186|P286|P386 },
  369. { O_FSCALE, R_FSCALE, FNOARGS, P86|P186|P286|P386 },
  370. { O_FSQRT, R_FSQRT, FNOARGS, P86|P186|P286|P386 },
  371. { O_FST, R_FST, FMEMSTK, F_W|P86|P186|P286|P386 },
  372. { O_FSTCW, R_FSTCW, FMEM2, F_W|FORCEWAIT|P86|P186|P286|P386 },
  373. { O_FSTENV, R_FSTENV, FMEM14, F_W|FORCEWAIT|P86|P186|P286|P386 },
  374. { O_FSTP, R_FSTP, FMEM4810, F_W|P86|P186|P286|P386 },
  375. { O_FSTSW, R_FSTSW, FMEM2, F_W|FORCEWAIT|P86|P186|P286|P386 },
  376. { O_FSETPM, R_FSETPM, FNOARGS, (char)(FORCEWAIT|P286|P386|PROT) },
  377. { O_FSUB, R_FSUB, F2MEMSTK, P86|P186|P286|P386 },
  378. { O_FSUBP, R_FSUBP, FSTKS, P86|P186|P286|P386 },
  379. { O_FSUBR, R_FSUBR, F2MEMSTK, P86|P186|P286|P386 },
  380. { O_FSUBRP, R_FSUBRP, FSTKS, P86|P186|P286|P386 },
  381. { O_FTST, R_FTST, FNOARGS, P86|P186|P286|P386 },
  382. { O_FWAIT, R_FWAIT, FWAIT, FORCEWAIT|P86|P186|P286|P386 },
  383. { O_FXAM, R_FXAM, FNOARGS, P86|P186|P286|P386 },
  384. { O_FXCH, R_FXCH, FSTK, P86|P186|P286|P386 },
  385. { O_FXTRACT, R_FXTRACT, FNOARGS, P86|P186|P286|P386 },
  386. { O_FYL2X, R_FYL2X, FNOARGS, P86|P186|P286|P386 },
  387. { O_FYL2XP1, R_FYL2XP1, FNOARGS, P86|P186|P286|P386 },
  388. { O_FNRSTOR, R_FNRSTOR, FMEM94, P86|P186|P286|P386 },
  389. #ifdef V386
  390. { (char)O_MOVSX, 4, PMOVX, P386 },
  391. { (char)O_MOVZX, 4, PMOVX, P386 },
  392. { O_CWDE, 4, PNOARGS, P386 },
  393. { O_CDQ, 4, PNOARGS, P386 },
  394. { O_LFS, 0, PLOAD, P386 },
  395. { O_LGS, 0, PLOAD, P386 },
  396. { O_LSS, 0, PLOAD, P386 },
  397. { O_SHLD, 0, PSHIFT, F_W|P386 },
  398. { O_SHRD, 0, PSHIFT, F_W|P386 },
  399. { O_CMPSD, 4, PNOARGS, P386 },
  400. { O_INSD, 4, PNOARGS, P386 },
  401. { O_LODSD, 4, PNOARGS, P386 },
  402. { O_MOVSD, 4, PNOARGS, P386 },
  403. { O_OUTSD, 4, PNOARGS, P386 },
  404. { O_SCASD, 4, PNOARGS, P386 },
  405. { O_STOSD, 4, PNOARGS, P386 },
  406. { O_BSF, 0xBC, PBITSCAN, P386 },
  407. { O_BSR, 0xBD, PBITSCAN, P386 },
  408. { O_BT, R_BT, PBIT, P386 },
  409. { O_BTC, R_BTC, PBIT, F_W|P386 },
  410. { O_BTR, R_BTR, PBIT, F_W|P386 },
  411. { O_BTS, R_BTS, PBIT, F_W|P386 },
  412. { O_IBTS, 0, PNOARGS, P386 },
  413. { O_XBTS, 0, PNOARGS, P386 },
  414. { O_JECXZ, 4, PRELJMP, P386 },
  415. { O_SETO, R_SETO, PSETCC, F_W|P386 },
  416. { O_SETNO, R_SETNO, PSETCC, F_W|P386 },
  417. { O_SETB, R_SETB, PSETCC, F_W|P386 },
  418. { O_SETNAE, R_SETNAE, PSETCC, F_W|P386 },
  419. { O_SETNB, R_SETNB, PSETCC, F_W|P386 },
  420. { O_SETAE, R_SETAE, PSETCC, F_W|P386 },
  421. { O_SETE, R_SETE, PSETCC, F_W|P386 },
  422. { O_SETZ, R_SETZ, PSETCC, F_W|P386 },
  423. { O_SETNE, R_SETNE, PSETCC, F_W|P386 },
  424. { O_SETNZ, R_SETNZ, PSETCC, F_W|P386 },
  425. { O_SETBE, R_SETBE, PSETCC, F_W|P386 },
  426. { O_SETNA, R_SETNA, PSETCC, F_W|P386 },
  427. { O_SETNBE, R_SETNBE, PSETCC, F_W|P386 },
  428. { O_SETA, R_SETA, PSETCC, F_W|P386 },
  429. { O_SETS, R_SETS, PSETCC, F_W|P386 },
  430. { O_SETNS, R_SETNS, PSETCC, F_W|P386 },
  431. { O_SETP, R_SETP, PSETCC, F_W|P386 },
  432. { O_SETPE, R_SETPE, PSETCC, F_W|P386 },
  433. { O_SETNP, R_SETNP, PSETCC, F_W|P386 },
  434. { O_SETPO, R_SETPO, PSETCC, F_W|P386 },
  435. { O_SETL, R_SETL, PSETCC, F_W|P386 },
  436. { O_SETNGE, R_SETNGE, PSETCC, F_W|P386 },
  437. { O_SETC, R_SETC, PSETCC, F_W|P386 },
  438. { O_SETNC, R_SETNC, PSETCC, F_W|P386 },
  439. { O_SETLE, R_SETLE, PSETCC, F_W|P386 },
  440. { O_SETNG, R_SETNG, PSETCC, F_W|P386 },
  441. { O_SETNL, R_SETNL, PSETCC, F_W|P386 },
  442. { O_SETGE, R_SETGE, PSETCC, F_W|P386 },
  443. { O_SETNLE, R_SETNLE, PSETCC, F_W|P386 },
  444. { O_SETG, R_SETG, PSETCC, F_W|P386 },
  445. { O_PUSHAD, 4, PNOARGS, P386 },
  446. { O_POPAD, 4, PNOARGS, P386 },
  447. { O_POPFD, 4, PNOARGS, P386 },
  448. { O_PUSHFD, 4, PNOARGS, P386 },
  449. { O_IRETD, 4, PNOARGS, P386 },
  450. { O_FUCOM, R_FUCOM, FSTK, P386 },
  451. { O_FUCOMP, R_FUCOMP, FSTK, P386 },
  452. { O_FUCOMPP, R_FUCOMPP, FNOARGS, P386 },
  453. { O_FPREM1, R_FPREM1, FNOARGS, P386 },
  454. { O_FCOS, R_FCOS, FNOARGS, P386 },
  455. { O_FSIN, R_FSIN, FNOARGS, P386 },
  456. { O_FSINCOS, R_FSINCOS, FNOARGS, P386 },
  457. #endif
  458. { O_RETN, 1, PRETURN, P86|P186|P286|P386 },
  459. { O_RETF, 1, PRETURN, P86|P186|P286|P386 }
  460. };