x86_table.js 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. "use strict";
  2. const { hex } = require("./util");
  3. // http://ref.x86asm.net/coder32.html
  4. const zf = 1 << 6;
  5. const of = 1 << 11;
  6. const cf = 1 << 0;
  7. const af = 1 << 4;
  8. const pf = 1 << 2;
  9. const sf = 1 << 7;
  10. // Test intel-specific behaviour
  11. // Setting this to true can make some tests fail
  12. const TESTS_ASSUME_INTEL = false;
  13. // === Types of instructions
  14. //
  15. // create entry | check for compiled code | instruction
  16. // -------------+-------------------------+-----------------------------------------------------------
  17. // 1 | optional | pop ds (may change cpu state)
  18. // | | trigger_ud, div (exception that doesn't generate conditional return from BB)
  19. // | | port io, popf, sti (may call interrupt or continue at next instruction)
  20. // | | hlt
  21. // -------------+-------------------------+-----------------------------------------------------------
  22. // 1 | 1 | call [eax], jmp [eax], int, iret, ret, jmpf, callf, sysenter, sysexit
  23. // | | Special case: normal instruction with fallthough to next page
  24. // | | Special case: after execution of compiled code
  25. // | | -> may create redundant entry points depending on last instruction?
  26. // -------------+-------------------------+-----------------------------------------------------------
  27. // 1 | 0 | rep movs, rep lods, rep stos, rep cmps, rep scas
  28. // | | -> Executed as follows:
  29. // | | - Upto including the first call in compiled mode
  30. // | | - Back to main loop and repeated in interpreted mode (as entry point is after instruction, not on)
  31. // | | - When finished entry pointer *after* instruction is hit and execution continues in compiled mode
  32. // -------------+-------------------------+-----------------------------------------------------------
  33. // 0 | optional | jmp foo, jnz foo
  34. // | | (foo is in the same page as the instruction)
  35. // -------------+-------------------------+-----------------------------------------------------------
  36. // 1 | 1 | call foo
  37. // | | (foo is in the same page as the instruction)
  38. // | | -> The entry point is not created for jumps within
  39. // | | this page, but speculatively for calls from
  40. // | | other pages to the function in this page
  41. // -------------+-------------------------+-----------------------------------------------------------
  42. // 1 | 1 | call foo, jmp foo, jnz foo
  43. // | | (foo is in a different page than the instruction)
  44. // e: a modrm byte follows the operand
  45. // os: the instruction behaves differently depending on the operand size
  46. // fixed_g: the reg field of the modrm byte selects an instruction
  47. // skip: skip automatically generated tests (nasmtests)
  48. // mask_flags: flags bits to mask in generated tests
  49. // prefix: is a prefix instruction
  50. // imm8, imm8s, imm16, imm1632, immaddr, extra_imm8, extra_imm16: one or two immediate bytes follows the instruction
  51. // custom: will callback jit to generate custom code
  52. // block_boundary: may change eip in a way not handled by the jit
  53. // no_next_instruction: jit will stop analysing after instruction (e.g., unconditional jump, ret)
  54. const encodings = [
  55. { opcode: 0x06, os: 1, custom: 1 },
  56. { opcode: 0x07, os: 1, skip: 1, block_boundary: 1 }, // pop es: block_boundary since it uses non-raising cpu exceptions
  57. { opcode: 0x0E, os: 1, custom: 1 },
  58. { opcode: 0x0F, os: 1, prefix: 1 },
  59. { opcode: 0x16, os: 1, custom: 1 },
  60. { opcode: 0x17, block_boundary: 1, os: 1, skip: 1 }, // pop ss
  61. { opcode: 0x1E, os: 1, custom: 1 },
  62. { opcode: 0x1F, block_boundary: 1, os: 1, skip: 1 }, // pop ds
  63. { opcode: 0x26, prefix: 1 },
  64. { opcode: 0x27, mask_flags: of },
  65. { opcode: 0x2E, prefix: 1 },
  66. { opcode: 0x2F, mask_flags: of },
  67. { opcode: 0x36, prefix: 1 },
  68. { opcode: 0x37, mask_flags: of | sf | pf | zf },
  69. { opcode: 0x3E, prefix: 1 },
  70. { opcode: 0x3F, mask_flags: of | sf | pf | zf },
  71. { opcode: 0x60, os: 1, block_boundary: 1 }, // pusha
  72. { opcode: 0x61, os: 1, block_boundary: 1 }, // popa
  73. { opcode: 0x62, e: 1, skip: 1 },
  74. { opcode: 0x63, e: 1, block_boundary: 1 }, // arpl
  75. { opcode: 0x64, prefix: 1 },
  76. { opcode: 0x65, prefix: 1 },
  77. { opcode: 0x66, prefix: 1 },
  78. { opcode: 0x67, prefix: 1 },
  79. { opcode: 0x68, custom: 1, os: 1, imm1632: 1 },
  80. { opcode: 0x69, os: 1, e: 1, custom: 1, imm1632: 1, mask_flags: TESTS_ASSUME_INTEL ? af : sf | zf | af | pf },
  81. { opcode: 0x6A, custom: 1, os: 1, imm8s: 1 },
  82. { opcode: 0x6B, os: 1, e: 1, custom: 1, imm8s: 1, mask_flags: TESTS_ASSUME_INTEL ? af : sf | zf | af | pf },
  83. { opcode: 0x6C, block_boundary: 1, custom: 1, is_string: 1, skip: 1 }, // ins
  84. { opcode: 0xF26C, block_boundary: 1, custom: 1, is_string: 1, skip: 1 },
  85. { opcode: 0xF36C, block_boundary: 1, custom: 1, is_string: 1, skip: 1 },
  86. { opcode: 0x6D, block_boundary: 1, custom: 1, is_string: 1, os: 1, skip: 1 },
  87. { opcode: 0xF26D, block_boundary: 1, custom: 1, is_string: 1, os: 1, skip: 1 },
  88. { opcode: 0xF36D, block_boundary: 1, custom: 1, is_string: 1, os: 1, skip: 1 },
  89. { opcode: 0x6E, block_boundary: 1, custom: 1, is_string: 1, skip: 1 }, // outs
  90. { opcode: 0xF26E, block_boundary: 1, custom: 1, is_string: 1, skip: 1 },
  91. { opcode: 0xF36E, block_boundary: 1, custom: 1, is_string: 1, skip: 1 },
  92. { opcode: 0x6F, block_boundary: 1, custom: 1, is_string: 1, os: 1, skip: 1 },
  93. { opcode: 0xF26F, block_boundary: 1, custom: 1, is_string: 1, os: 1, skip: 1 },
  94. { opcode: 0xF36F, block_boundary: 1, custom: 1, is_string: 1, os: 1, skip: 1 },
  95. { opcode: 0x84, custom: 1, e: 1 },
  96. { opcode: 0x85, custom: 1, e: 1, os: 1 },
  97. { opcode: 0x86, custom: 1, e: 1 },
  98. { opcode: 0x87, custom: 1, os: 1, e: 1 },
  99. { opcode: 0x88, custom: 1, e: 1 },
  100. { opcode: 0x89, custom: 1, os: 1, e: 1 },
  101. { opcode: 0x8A, custom: 1, e: 1 },
  102. { opcode: 0x8B, custom: 1, os: 1, e: 1 },
  103. { opcode: 0x8C, os: 1, e: 1, custom: 1, skip: 1 }, // mov reg, sreg
  104. { opcode: 0x8D, reg_ud: 1, os: 1, e: 1, custom_modrm_resolve: 1, custom: 1 }, // lea
  105. { opcode: 0x8E, block_boundary: 1, e: 1, skip: 1 }, // mov sreg
  106. { opcode: 0x8F, os: 1, e: 1, fixed_g: 0, custom_modrm_resolve: 1, custom: 1, block_boundary: 1 }, // pop r/m
  107. { opcode: 0x90, custom: 1 },
  108. { opcode: 0x91, custom: 1, os: 1 },
  109. { opcode: 0x92, custom: 1, os: 1 },
  110. { opcode: 0x93, custom: 1, os: 1 },
  111. { opcode: 0x94, custom: 1, os: 1 },
  112. { opcode: 0x95, custom: 1, os: 1 },
  113. { opcode: 0x96, custom: 1, os: 1 },
  114. { opcode: 0x97, custom: 1, os: 1 },
  115. { opcode: 0x98, os: 1, custom: 1 },
  116. { opcode: 0x99, os: 1, custom: 1 },
  117. { opcode: 0x9A, os: 1, imm1632: 1, extra_imm16: 1, skip: 1, block_boundary: 1 }, // callf
  118. { opcode: 0x9B, block_boundary: 1, skip: 1 }, // fwait: block_boundary since it uses non-raising cpu exceptions
  119. { opcode: 0x9C, os: 1, custom: 1, skip: 1 }, // pushf
  120. { opcode: 0x9D, os: 1, custom: 1, skip: 1 }, // popf
  121. { opcode: 0x9E, custom: 1 },
  122. { opcode: 0x9F, custom: 1 },
  123. { opcode: 0xA0, custom: 1, immaddr: 1 },
  124. { opcode: 0xA1, custom: 1, os: 1, immaddr: 1 },
  125. { opcode: 0xA2, custom: 1, immaddr: 1 },
  126. { opcode: 0xA3, custom: 1, os: 1, immaddr: 1 },
  127. // string instructions aren't jumps, but they modify eip due to how they're implemented
  128. { opcode: 0xA4, block_boundary: 0, custom: 1, is_string: 1 },
  129. { opcode: 0xF2A4, block_boundary: 1, custom: 1, is_string: 1 },
  130. { opcode: 0xF3A4, block_boundary: 1, custom: 1, is_string: 1 },
  131. { opcode: 0xA5, block_boundary: 0, custom: 1, is_string: 1, os: 1 },
  132. { opcode: 0xF2A5, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  133. { opcode: 0xF3A5, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  134. { opcode: 0xA6, block_boundary: 1, custom: 1, is_string: 1 },
  135. { opcode: 0xF2A6, block_boundary: 1, custom: 1, is_string: 1 },
  136. { opcode: 0xF3A6, block_boundary: 1, custom: 1, is_string: 1 },
  137. { opcode: 0xA7, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  138. { opcode: 0xF2A7, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  139. { opcode: 0xF3A7, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  140. { opcode: 0xA8, custom: 1, imm8: 1 },
  141. { opcode: 0xA9, custom: 1, os: 1, imm1632: 1 },
  142. { opcode: 0xAA, block_boundary: 0, custom: 1, is_string: 1 },
  143. { opcode: 0xF2AA, block_boundary: 1, custom: 1, is_string: 1 },
  144. { opcode: 0xF3AA, block_boundary: 1, custom: 1, is_string: 1 },
  145. { opcode: 0xAB, block_boundary: 0, custom: 1, is_string: 1, os: 1 },
  146. { opcode: 0xF2AB, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  147. { opcode: 0xF3AB, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  148. { opcode: 0xAC, block_boundary: 0, custom: 1, is_string: 1 },
  149. { opcode: 0xF2AC, block_boundary: 1, custom: 1, is_string: 1 },
  150. { opcode: 0xF3AC, block_boundary: 1, custom: 1, is_string: 1 },
  151. { opcode: 0xAD, block_boundary: 0, custom: 1, is_string: 1, os: 1 },
  152. { opcode: 0xF2AD, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  153. { opcode: 0xF3AD, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  154. { opcode: 0xAE, block_boundary: 0, custom: 1, is_string: 1 },
  155. { opcode: 0xF2AE, block_boundary: 1, custom: 1, is_string: 1 },
  156. { opcode: 0xF3AE, block_boundary: 1, custom: 1, is_string: 1 },
  157. { opcode: 0xAF, block_boundary: 0, custom: 1, is_string: 1, os: 1 },
  158. { opcode: 0xF2AF, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  159. { opcode: 0xF3AF, block_boundary: 1, custom: 1, is_string: 1, os: 1 },
  160. { opcode: 0xC2, custom: 1, block_boundary: 1, no_next_instruction: 1, os: 1, absolute_jump: 1, imm16: 1, skip: 1 }, // ret
  161. { opcode: 0xC3, custom: 1, block_boundary: 1, no_next_instruction: 1, os: 1, absolute_jump: 1, skip: 1 },
  162. { opcode: 0xC4, block_boundary: 1, os: 1, e: 1, skip: 1 }, // les
  163. { opcode: 0xC5, block_boundary: 1, os: 1, e: 1, skip: 1 }, // lds
  164. { opcode: 0xC6, custom: 1, e: 1, fixed_g: 0, imm8: 1 },
  165. { opcode: 0xC7, custom: 1, os: 1, e: 1, fixed_g: 0, imm1632: 1 },
  166. // XXX: Temporary block boundary
  167. { opcode: 0xC8, os: 1, imm16: 1, extra_imm8: 1, block_boundary: 1 }, // enter
  168. { opcode: 0xC9, custom: 1, os: 1, skip: 1 }, // leave
  169. { opcode: 0xCA, block_boundary: 1, no_next_instruction: 1, os: 1, imm16: 1, skip: 1 }, // retf
  170. { opcode: 0xCB, block_boundary: 1, no_next_instruction: 1, os: 1, skip: 1 },
  171. { opcode: 0xCC, block_boundary: 1, skip: 1 }, // int
  172. { opcode: 0xCD, block_boundary: 1, skip: 1, imm8: 1 },
  173. { opcode: 0xCE, block_boundary: 1, skip: 1 },
  174. { opcode: 0xCF, block_boundary: 1, no_next_instruction: 1, os: 1, skip: 1 }, // iret
  175. { opcode: 0xD4, imm8: 1, block_boundary: 1 }, // aam, may trigger #de
  176. { opcode: 0xD5, imm8: 1, mask_flags: of | cf | af },
  177. { opcode: 0xD6 },
  178. { opcode: 0xD7, skip: 1, custom: 1 },
  179. { opcode: 0xD8, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1 },
  180. { opcode: 0xD8, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1 },
  181. { opcode: 0xD8, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1 },
  182. { opcode: 0xD8, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1 },
  183. { opcode: 0xD8, e: 1, fixed_g: 4, custom: 1, is_fpu: 1, task_switch_test: 1 },
  184. { opcode: 0xD8, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1 },
  185. { opcode: 0xD8, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1 },
  186. { opcode: 0xD8, e: 1, fixed_g: 7, custom: 1, is_fpu: 1, task_switch_test: 1 },
  187. { opcode: 0xD9, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  188. { opcode: 0xD9, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  189. { opcode: 0xD9, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  190. { opcode: 0xD9, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  191. { opcode: 0xD9, e: 1, fixed_g: 4, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1, skip_mem: 1 }, // fldenv (mem)
  192. { opcode: 0xD9, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  193. { opcode: 0xD9, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1, skip: 1 }, // fstenv (mem), fprem (reg)
  194. { opcode: 0xD9, e: 1, fixed_g: 7, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1, skip_reg: 1 }, // fprem, fyl2xp1 (precision issues)
  195. { opcode: 0xDA, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1 },
  196. { opcode: 0xDA, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1 },
  197. { opcode: 0xDA, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1 },
  198. { opcode: 0xDA, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1 },
  199. { opcode: 0xDA, e: 1, fixed_g: 4, custom: 1, is_fpu: 1, task_switch_test: 1 },
  200. { opcode: 0xDA, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1 },
  201. { opcode: 0xDA, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1 },
  202. { opcode: 0xDA, e: 1, fixed_g: 7, custom: 1, is_fpu: 1, task_switch_test: 1 },
  203. { opcode: 0xDB, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1 },
  204. { opcode: 0xDB, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1 }, // fisttp (sse3)
  205. { opcode: 0xDB, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1 },
  206. { opcode: 0xDB, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1 },
  207. { opcode: 0xDB, e: 1, fixed_g: 4, custom: 0, is_fpu: 1, task_switch_test: 1 },
  208. { opcode: 0xDB, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1 },
  209. { opcode: 0xDB, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1 },
  210. { opcode: 0xDB, e: 1, fixed_g: 7, custom: 0, is_fpu: 1, task_switch_test: 1 },
  211. { opcode: 0xDC, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1 },
  212. { opcode: 0xDC, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1 },
  213. { opcode: 0xDC, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1 },
  214. { opcode: 0xDC, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1 },
  215. { opcode: 0xDC, e: 1, fixed_g: 4, custom: 1, is_fpu: 1, task_switch_test: 1 },
  216. { opcode: 0xDC, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1 },
  217. { opcode: 0xDC, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1 },
  218. { opcode: 0xDC, e: 1, fixed_g: 7, custom: 1, is_fpu: 1, task_switch_test: 1 },
  219. { opcode: 0xDD, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  220. { opcode: 0xDD, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 }, // fisttp (sse3)
  221. { opcode: 0xDD, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  222. { opcode: 0xDD, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  223. { opcode: 0xDD, e: 1, fixed_g: 4, custom: 0, is_fpu: 1, task_switch_test: 1, os: 1, skip_mem: 1 }, // frstor
  224. { opcode: 0xDD, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1, os: 1 },
  225. { opcode: 0xDD, e: 1, fixed_g: 6, custom: 0, is_fpu: 1, task_switch_test: 1, os: 1, skip_mem: 1 }, // fsave
  226. { opcode: 0xDD, e: 1, fixed_g: 7, custom: 0, is_fpu: 1, task_switch_test: 1, os: 1, skip_mem: 1 }, // fstsw (denormal flag)
  227. { opcode: 0xDE, e: 1, fixed_g: 0, custom: 1, is_fpu: 1, task_switch_test: 1 },
  228. { opcode: 0xDE, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1 },
  229. { opcode: 0xDE, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1 },
  230. { opcode: 0xDE, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1 },
  231. { opcode: 0xDE, e: 1, fixed_g: 4, custom: 1, is_fpu: 1, task_switch_test: 1 },
  232. { opcode: 0xDE, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1 },
  233. { opcode: 0xDE, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1 },
  234. { opcode: 0xDE, e: 1, fixed_g: 7, custom: 1, is_fpu: 1, task_switch_test: 1 },
  235. { opcode: 0xDF, e: 1, fixed_g: 0, custom: 0, is_fpu: 1, task_switch_test: 1 },
  236. { opcode: 0xDF, e: 1, fixed_g: 1, custom: 1, is_fpu: 1, task_switch_test: 1 }, // fisttp (sse3)
  237. { opcode: 0xDF, e: 1, fixed_g: 2, custom: 1, is_fpu: 1, task_switch_test: 1 },
  238. { opcode: 0xDF, e: 1, fixed_g: 3, custom: 1, is_fpu: 1, task_switch_test: 1 },
  239. { opcode: 0xDF, e: 1, fixed_g: 4, custom: 1, is_fpu: 1, task_switch_test: 1, skip: 1 }, // unimplemented: Binary Coded Decimals / fsts (denormal flag)
  240. { opcode: 0xDF, e: 1, fixed_g: 5, custom: 1, is_fpu: 1, task_switch_test: 1 },
  241. { opcode: 0xDF, e: 1, fixed_g: 6, custom: 1, is_fpu: 1, task_switch_test: 1 },
  242. { opcode: 0xDF, e: 1, fixed_g: 7, custom: 1, is_fpu: 1, task_switch_test: 1 },
  243. // loop, jcxz, etc.
  244. { opcode: 0xE0, os: 1, imm8s: 1, no_block_boundary_in_interpreted: 1, skip: 1, block_boundary: 1, jump_offset_imm: 1, custom: 1, conditional_jump: 1 },
  245. { opcode: 0xE1, os: 1, imm8s: 1, no_block_boundary_in_interpreted: 1, skip: 1, block_boundary: 1, jump_offset_imm: 1, custom: 1, conditional_jump: 1 },
  246. { opcode: 0xE2, os: 1, imm8s: 1, no_block_boundary_in_interpreted: 1, skip: 1, block_boundary: 1, jump_offset_imm: 1, custom: 1, conditional_jump: 1 },
  247. { opcode: 0xE3, os: 1, imm8s: 1, no_block_boundary_in_interpreted: 1, skip: 1, block_boundary: 1, jump_offset_imm: 1, custom: 1, conditional_jump: 1 },
  248. // port functions aren't jumps, but they may modify eip due to how they are implemented
  249. { opcode: 0xE4, block_boundary: 1, imm8: 1, skip: 1 }, // in
  250. { opcode: 0xE5, block_boundary: 1, os: 1, imm8: 1, skip: 1 },
  251. { opcode: 0xE6, block_boundary: 1, imm8: 1, skip: 1 }, // out
  252. { opcode: 0xE7, block_boundary: 1, os: 1, imm8: 1, skip: 1 },
  253. { opcode: 0xE8, block_boundary: 1, jump_offset_imm: 1, os: 1, imm1632: 1, custom: 1, skip: 1 }, // call
  254. { opcode: 0xE9, block_boundary: 1, no_block_boundary_in_interpreted: 1, jump_offset_imm: 1, no_next_instruction: 1, os: 1, imm1632: 1, custom: 1, skip: 1 },
  255. { opcode: 0xEA, block_boundary: 1, no_next_instruction: 1, os: 1, imm1632: 1, extra_imm16: 1, skip: 1 }, // jmpf
  256. { opcode: 0xEB, block_boundary: 1, no_block_boundary_in_interpreted: 1, jump_offset_imm: 1, no_next_instruction: 1, os: 1, imm8s: 1, custom: 1, skip: 1 },
  257. { opcode: 0xEC, block_boundary: 1, skip: 1 }, // in
  258. { opcode: 0xED, block_boundary: 1, os: 1, skip: 1 },
  259. { opcode: 0xEE, block_boundary: 1, skip: 1 }, // out
  260. { opcode: 0xEF, block_boundary: 1, os: 1, skip: 1 },
  261. { opcode: 0xF0, prefix: 1 },
  262. { opcode: 0xF1, skip: 1 },
  263. { opcode: 0xF2, prefix: 1 },
  264. { opcode: 0xF3, prefix: 1 },
  265. { opcode: 0xF4, block_boundary: 1, no_next_instruction: 1, skip: 1 }, // hlt
  266. { opcode: 0xF5 },
  267. { opcode: 0xF6, e: 1, fixed_g: 0, imm8: 1, custom: 1 },
  268. { opcode: 0xF6, e: 1, fixed_g: 1, imm8: 1, custom: 1 },
  269. { opcode: 0xF6, e: 1, fixed_g: 2, custom: 1 },
  270. { opcode: 0xF6, e: 1, fixed_g: 3, custom: 1 },
  271. { opcode: 0xF6, e: 1, fixed_g: 4, mask_flags: TESTS_ASSUME_INTEL ? af | zf : sf | zf | af | pf },
  272. { opcode: 0xF6, e: 1, fixed_g: 5, mask_flags: TESTS_ASSUME_INTEL ? af | zf : sf | zf | af | pf },
  273. // div/idiv: Not a block boundary, but doesn't use control flow exceptions
  274. { opcode: 0xF6, e: 1, fixed_g: 6, mask_flags: TESTS_ASSUME_INTEL ? 0 : sf | zf | af | pf, block_boundary: 1 },
  275. { opcode: 0xF6, e: 1, fixed_g: 7, mask_flags: TESTS_ASSUME_INTEL ? 0 : sf | zf | af | pf, block_boundary: 1 },
  276. { opcode: 0xF7, os: 1, e: 1, fixed_g: 0, imm1632: 1, custom: 1 },
  277. { opcode: 0xF7, os: 1, e: 1, fixed_g: 1, imm1632: 1, custom: 1 },
  278. { opcode: 0xF7, os: 1, e: 1, fixed_g: 2, custom: 1 },
  279. { opcode: 0xF7, os: 1, e: 1, fixed_g: 3, custom: 1 },
  280. { opcode: 0xF7, os: 1, e: 1, fixed_g: 4, mask_flags: TESTS_ASSUME_INTEL ? af | zf : sf | zf | af | pf, custom: 1 },
  281. { opcode: 0xF7, os: 1, e: 1, fixed_g: 5, mask_flags: TESTS_ASSUME_INTEL ? af | zf : sf | zf | af | pf, custom: 1 },
  282. { opcode: 0xF7, os: 1, e: 1, fixed_g: 6, mask_flags: TESTS_ASSUME_INTEL ? 0 : sf | zf | af | pf, custom: 1 },
  283. { opcode: 0xF7, os: 1, e: 1, fixed_g: 7, mask_flags: TESTS_ASSUME_INTEL ? 0 : sf | zf | af | pf, custom: 1 },
  284. { opcode: 0xF8, custom: 1 },
  285. { opcode: 0xF9, custom: 1 },
  286. { opcode: 0xFA, custom: 1, skip: 1 },
  287. // STI: Note: Has special handling in jit in order to call handle_irqs safely
  288. { opcode: 0xFB, custom: 1, custom_sti: 1, skip: 1 },
  289. { opcode: 0xFC, custom: 1 },
  290. { opcode: 0xFD, custom: 1 },
  291. { opcode: 0xFE, e: 1, fixed_g: 0, custom: 1 },
  292. { opcode: 0xFE, e: 1, fixed_g: 1, custom: 1 },
  293. { opcode: 0xFF, os: 1, e: 1, fixed_g: 0, custom: 1 },
  294. { opcode: 0xFF, os: 1, e: 1, fixed_g: 1, custom: 1 },
  295. { opcode: 0xFF, os: 1, e: 1, fixed_g: 2, custom: 1, block_boundary: 1, absolute_jump: 1, skip: 1 },
  296. { opcode: 0xFF, os: 1, e: 1, fixed_g: 3, block_boundary: 1, skip: 1 },
  297. { opcode: 0xFF, os: 1, e: 1, fixed_g: 4, custom: 1, block_boundary: 1, absolute_jump: 1, no_next_instruction: 1, skip: 1 },
  298. { opcode: 0xFF, os: 1, e: 1, fixed_g: 5, block_boundary: 1, no_next_instruction: 1, skip: 1 },
  299. { opcode: 0xFF, custom: 1, os: 1, e: 1, fixed_g: 6 },
  300. { opcode: 0x0F00, fixed_g: 0, e: 1, skip: 1, block_boundary: 1, os: 1 }, // sldt, ...
  301. { opcode: 0x0F00, fixed_g: 1, e: 1, skip: 1, block_boundary: 1, os: 1 },
  302. { opcode: 0x0F00, fixed_g: 2, e: 1, skip: 1, block_boundary: 1, os: 1 },
  303. { opcode: 0x0F00, fixed_g: 3, e: 1, skip: 1, block_boundary: 1, os: 1 },
  304. { opcode: 0x0F00, fixed_g: 4, e: 1, skip: 1, block_boundary: 1, os: 1 },
  305. { opcode: 0x0F00, fixed_g: 5, e: 1, skip: 1, block_boundary: 1, os: 1 },
  306. { opcode: 0x0F01, fixed_g: 0, e: 1, skip: 1, block_boundary: 1, os: 1 }, // sgdt, ...
  307. { opcode: 0x0F01, fixed_g: 1, e: 1, skip: 1, block_boundary: 1, os: 1 },
  308. { opcode: 0x0F01, fixed_g: 2, e: 1, skip: 1, block_boundary: 1, os: 1 },
  309. { opcode: 0x0F01, fixed_g: 3, e: 1, skip: 1, block_boundary: 1, os: 1 },
  310. { opcode: 0x0F01, fixed_g: 4, e: 1, skip: 1, block_boundary: 1, os: 1 },
  311. { opcode: 0x0F01, fixed_g: 6, e: 1, skip: 1, block_boundary: 1, os: 1 },
  312. { opcode: 0x0F01, fixed_g: 7, e: 1, skip: 1, block_boundary: 1, os: 1 },
  313. { opcode: 0x0F02, os: 1, e: 1, skip: 1, block_boundary: 1 }, // lar
  314. { opcode: 0x0F03, os: 1, e: 1, skip: 1, block_boundary: 1 }, // lsl
  315. { opcode: 0x0F04, skip: 1, block_boundary: 1 },
  316. { opcode: 0x0F05, skip: 1, block_boundary: 1 },
  317. { opcode: 0x0F06, skip: 1, block_boundary: 1 }, // clts
  318. { opcode: 0x0F07, skip: 1, block_boundary: 1 },
  319. { opcode: 0x0F08, skip: 1, block_boundary: 1 },
  320. { opcode: 0x0F09, skip: 1, block_boundary: 1 }, // wbinvd
  321. { opcode: 0x0F0A, skip: 1, block_boundary: 1 },
  322. // ud2
  323. // Technically has a next instruction, but Linux uses this for assertions
  324. // and embeds the assertion message after this instruction, which is likely
  325. // the most common use case of ud2
  326. { opcode: 0x0F0B, skip: 1, block_boundary: 1, custom: 1, no_next_instruction: 1 },
  327. { opcode: 0x0F0C, skip: 1, block_boundary: 1 },
  328. { opcode: 0x0F0D, skip: 1, block_boundary: 1 },
  329. { opcode: 0x0F0E, skip: 1, block_boundary: 1 },
  330. { opcode: 0x0F0F, skip: 1, block_boundary: 1 },
  331. { opcode: 0x0F18, e: 1, custom: 1 },
  332. { opcode: 0x0F19, custom: 1, e: 1 },
  333. { opcode: 0x0F1A, skip: 1, block_boundary: 1 },
  334. { opcode: 0x0F1B, skip: 1, block_boundary: 1 },
  335. { opcode: 0x0F1C, custom: 1, e: 1 },
  336. { opcode: 0x0F1D, custom: 1, e: 1 },
  337. { opcode: 0x0F1E, custom: 1, e: 1 },
  338. { opcode: 0x0F1F, custom: 1, e: 1 },
  339. { opcode: 0x0F20, ignore_mod: 1, e: 1, skip: 1, block_boundary: 1 }, // mov reg, creg
  340. { opcode: 0x0F21, ignore_mod: 1, e: 1, skip: 1, block_boundary: 1 }, // mov reg, dreg
  341. { opcode: 0x0F22, ignore_mod: 1, e: 1, skip: 1, block_boundary: 1 }, // mov creg, reg
  342. { opcode: 0x0F23, ignore_mod: 1, e: 1, skip: 1, block_boundary: 1 }, // mov dreg, reg
  343. { opcode: 0x0F24, skip: 1, block_boundary: 1 },
  344. { opcode: 0x0F25, skip: 1, block_boundary: 1 },
  345. { opcode: 0x0F26, skip: 1, block_boundary: 1 },
  346. { opcode: 0x0F27, skip: 1, block_boundary: 1 },
  347. { opcode: 0x0F30, skip: 1, block_boundary: 1 }, // wrmsr
  348. { opcode: 0x0F31, skip: 1, custom: 1 }, // rdtsc
  349. { opcode: 0x0F32, skip: 1, block_boundary: 1 }, // rdmsr
  350. { opcode: 0x0F33, skip: 1, block_boundary: 1 }, // rdpmc
  351. { opcode: 0x0F34, skip: 1, block_boundary: 1, no_next_instruction: 1 }, // sysenter
  352. { opcode: 0x0F35, skip: 1, block_boundary: 1, no_next_instruction: 1 }, // sysexit
  353. { opcode: 0x0F36, skip: 1, block_boundary: 1 }, // ud
  354. { opcode: 0x0F37, skip: 1, block_boundary: 1 }, // getsec
  355. // ssse3+
  356. { opcode: 0x0F38, skip: 1, block_boundary: 1 },
  357. { opcode: 0x0F39, skip: 1, block_boundary: 1 },
  358. { opcode: 0x0F3A, skip: 1, block_boundary: 1 },
  359. { opcode: 0x0F3B, skip: 1, block_boundary: 1 },
  360. { opcode: 0x0F3C, skip: 1, block_boundary: 1 },
  361. { opcode: 0x0F3D, skip: 1, block_boundary: 1 },
  362. { opcode: 0x0F3E, skip: 1, block_boundary: 1 },
  363. { opcode: 0x0F3F, skip: 1, block_boundary: 1 },
  364. { opcode: 0x0FA0, os: 1, custom: 1 },
  365. { opcode: 0x0FA1, os: 1, block_boundary: 1, skip: 1 }, // pop fs: block_boundary since it uses non-raising cpu exceptions
  366. { opcode: 0x0FA2, skip: 1 },
  367. { opcode: 0x0FA8, os: 1, custom: 1 },
  368. { opcode: 0x0FA9, os: 1, block_boundary: 1, skip: 1 }, // pop gs
  369. { opcode: 0x0FA3, os: 1, e: 1, custom: 1, skip_mem: 1 }, // bt (can also index memory, but not supported by test right now)
  370. { opcode: 0x0FAB, os: 1, e: 1, custom: 1, skip_mem: 1 },
  371. { opcode: 0x0FB3, os: 1, e: 1, custom: 1, skip_mem: 1 },
  372. { opcode: 0x0FBB, os: 1, e: 1, custom: 1, skip_mem: 1 },
  373. { opcode: 0x0FBA, os: 1, e: 1, fixed_g: 4, imm8: 1, custom: 1 }, // bt
  374. { opcode: 0x0FBA, os: 1, e: 1, fixed_g: 5, imm8: 1, custom: 1 },
  375. { opcode: 0x0FBA, os: 1, e: 1, fixed_g: 6, imm8: 1, custom: 1 },
  376. { opcode: 0x0FBA, os: 1, e: 1, fixed_g: 7, imm8: 1, custom: 1 },
  377. { opcode: 0x0FBC, os: 1, e: 1, mask_flags: of | sf | af | pf | cf, custom: 1 }, // bsf
  378. { opcode: 0x0FBD, os: 1, e: 1, mask_flags: of | sf | af | pf | cf, custom: 1 },
  379. // note: overflow flag only undefined if shift is > 1
  380. { opcode: 0x0FA4, os: 1, e: 1, custom: 1, imm8: 1, mask_flags: af | of }, // shld
  381. { opcode: 0x0FA5, os: 1, e: 1, custom: 1, mask_flags: af | of },
  382. { opcode: 0x0FAC, os: 1, e: 1, custom: 1, imm8: 1, mask_flags: af | of },
  383. { opcode: 0x0FAD, os: 1, e: 1, custom: 1, mask_flags: af | of },
  384. { opcode: 0x0FA6, skip: 1, block_boundary: 1 }, // ud
  385. { opcode: 0x0FA7, skip: 1, block_boundary: 1 }, // ud
  386. { opcode: 0x0FAA, skip: 1 },
  387. { opcode: 0x0FAE, e: 1, fixed_g: 0, reg_ud: 1, task_switch_test: 1, skip: 1, block_boundary: 1 }, // fxsave
  388. { opcode: 0x0FAE, e: 1, fixed_g: 1, reg_ud: 1, task_switch_test: 1, skip: 1, block_boundary: 1 }, // fxrstor
  389. { opcode: 0x0FAE, e: 1, fixed_g: 2, reg_ud: 1, sse: 1, skip: 1, block_boundary: 1 }, // ldmxcsr
  390. { opcode: 0x0FAE, e: 1, fixed_g: 3, reg_ud: 1, sse: 1, skip: 1, block_boundary: 1 }, // stmxcsr
  391. { opcode: 0x0FAE, e: 1, fixed_g: 4, reg_ud: 1, skip: 1, block_boundary: 1 }, // xsave (mem, not implemented)
  392. { opcode: 0x0FAE, e: 1, fixed_g: 5, skip: 1, custom: 1 }, // lfence (reg, only 0), xrstor (mem, not implemented)
  393. { opcode: 0x0FAE, e: 1, fixed_g: 6, skip: 1, block_boundary: 1 }, // mfence (reg, only 0), xsaveopt (mem, not implemented)
  394. { opcode: 0x0FAE, e: 1, fixed_g: 7, skip: 1, block_boundary: 1 }, // sfence (reg, only 0), clflush (mem)
  395. { opcode: 0x0FAF, os: 1, e: 1, mask_flags: TESTS_ASSUME_INTEL ? af | zf : sf | zf | af | pf, custom: 1 }, // imul
  396. { opcode: 0x0FB0, e: 1 }, // cmxchg
  397. { opcode: 0x0FB1, os: 1, e: 1, custom: 1 },
  398. { opcode: 0x0FC7, e: 1, fixed_g: 1, os: 1, reg_ud: 1, custom: 1 }, // cmpxchg8b (memory)
  399. { opcode: 0x0FC7, e: 1, fixed_g: 6, os: 1, mem_ud: 1, skip: 1 }, // rdrand
  400. { opcode: 0x0FB2, block_boundary: 1, os: 1, e: 1, skip: 1 }, // lss
  401. { opcode: 0x0FB4, block_boundary: 1, os: 1, e: 1, skip: 1 }, // lfs
  402. { opcode: 0x0FB5, block_boundary: 1, os: 1, e: 1, skip: 1 }, // lgs
  403. { opcode: 0x0FB6, os: 1, e: 1, custom: 1 }, // movzx
  404. { opcode: 0x0FB7, os: 1, e: 1, custom: 1 },
  405. { opcode: 0xF30FB8, os: 1, e: 1, custom: 1 }, // popcnt
  406. { opcode: 0x0FB8, os: 1, e: 1, block_boundary: 1 }, // ud
  407. { opcode: 0x0FB9, block_boundary: 1 }, // ud2
  408. { opcode: 0x0FBE, os: 1, e: 1, custom: 1 }, // movsx
  409. { opcode: 0x0FBF, os: 1, e: 1, custom: 1 },
  410. { opcode: 0x0FC0, e: 1 }, // xadd
  411. { opcode: 0x0FC1, os: 1, e: 1, custom: 1 },
  412. { opcode: 0x0FC8, custom: 1 }, // bswap
  413. { opcode: 0x0FC9, custom: 1 },
  414. { opcode: 0x0FCA, custom: 1 },
  415. { opcode: 0x0FCB, custom: 1 },
  416. { opcode: 0x0FCC, custom: 1 },
  417. { opcode: 0x0FCD, custom: 1 },
  418. { opcode: 0x0FCE, custom: 1 },
  419. { opcode: 0x0FCF, custom: 1 },
  420. // mmx, sse
  421. { sse: 1, opcode: 0x0F10, e: 1, custom: 1 },
  422. { sse: 1, opcode: 0xF30F10, e: 1, custom: 1 },
  423. { sse: 1, opcode: 0x660F10, e: 1, custom: 1 },
  424. { sse: 1, opcode: 0xF20F10, e: 1, custom: 1 },
  425. { sse: 1, opcode: 0x0F11, e: 1, custom: 1 },
  426. { sse: 1, opcode: 0xF30F11, e: 1, custom: 1 },
  427. { sse: 1, opcode: 0x660F11, e: 1, custom: 1 },
  428. { sse: 1, opcode: 0xF20F11, e: 1, custom: 1 },
  429. { sse: 1, opcode: 0x0F12, e: 1, custom: 1 },
  430. { sse: 1, opcode: 0x660F12, reg_ud: 1, e: 1, custom: 1 },
  431. { sse: 1, opcode: 0xF20F12, e: 1, custom: 1 }, // sse3
  432. { sse: 1, opcode: 0xF30F12, e: 1, custom: 1 }, // sse3
  433. { sse: 1, opcode: 0x0F13, reg_ud: 1, e: 1, custom: 1 },
  434. { sse: 1, opcode: 0x660F13, reg_ud: 1, e: 1, custom: 1 },
  435. { sse: 1, opcode: 0x0F14, e: 1, custom: 1 },
  436. { sse: 1, opcode: 0x660F14, e: 1, custom: 1 },
  437. { sse: 1, opcode: 0x0F15, e: 1, custom: 1 },
  438. { sse: 1, opcode: 0x660F15, e: 1, custom: 1 },
  439. { sse: 1, opcode: 0x0F16, e: 1, custom: 1 },
  440. { sse: 1, opcode: 0x660F16, reg_ud: 1, e: 1, custom: 1 },
  441. { sse: 1, opcode: 0xF30F16, e: 1, custom: 1 }, // sse3
  442. { sse: 1, opcode: 0x0F17, reg_ud: 1, e: 1, custom: 1 },
  443. { sse: 1, opcode: 0x660F17, reg_ud: 1, e: 1, custom: 1 },
  444. { sse: 1, opcode: 0x0F28, e: 1, custom: 1 },
  445. { sse: 1, opcode: 0x660F28, e: 1, custom: 1 },
  446. { sse: 1, opcode: 0x0F29, e: 1, custom: 1 },
  447. { sse: 1, opcode: 0x660F29, e: 1, custom: 1 },
  448. { sse: 1, opcode: 0x0F2A, e: 1, custom: 1 },
  449. { sse: 1, opcode: 0x660F2A, e: 1, custom: 1 },
  450. { sse: 1, opcode: 0xF20F2A, e: 1, custom: 1 },
  451. { sse: 1, opcode: 0xF30F2A, e: 1, custom: 1 },
  452. { sse: 1, opcode: 0x0F2B, reg_ud: 1, e: 1, custom: 1 },
  453. { sse: 1, opcode: 0x660F2B, reg_ud: 1, e: 1, custom: 1 },
  454. { sse: 1, opcode: 0x0F2C, e: 1 },
  455. { sse: 1, opcode: 0x660F2C, e: 1 },
  456. { sse: 1, opcode: 0xF20F2C, e: 1, custom: 1 },
  457. { sse: 1, opcode: 0xF30F2C, e: 1, custom: 1 },
  458. { sse: 1, opcode: 0x0F2D, e: 1 },
  459. { sse: 1, opcode: 0x660F2D, e: 1 },
  460. { sse: 1, opcode: 0xF20F2D, e: 1, custom: 1 },
  461. { sse: 1, opcode: 0xF30F2D, e: 1, custom: 1 },
  462. { sse: 1, opcode: 0x0F2E, e: 1, custom: 1 },
  463. { sse: 1, opcode: 0x660F2E, e: 1, custom: 1 },
  464. { sse: 1, opcode: 0x0F2F, e: 1, custom: 1 },
  465. { sse: 1, opcode: 0x660F2F, e: 1, custom: 1 },
  466. { sse: 1, opcode: 0x0F50, mem_ud: 1, e: 1 },
  467. { sse: 1, opcode: 0x660F50, mem_ud: 1, e: 1 },
  468. { sse: 1, opcode: 0x0F51, e: 1, custom: 1 },
  469. { sse: 1, opcode: 0x660F51, e: 1, custom: 1 },
  470. { sse: 1, opcode: 0xF20F51, e: 1, custom: 1 },
  471. { sse: 1, opcode: 0xF30F51, e: 1, custom: 1 },
  472. // approximation of 1/sqrt(x). Skipped because our approximation doesn't match intel's
  473. { sse: 1, opcode: 0x0F52, e: 1, skip: 1, custom: 1 },
  474. { sse: 1, opcode: 0xF30F52, e: 1, skip: 1, custom: 1 },
  475. // reciprocal: approximation of 1/x. Skipped because our approximation doesn't match intel's
  476. { sse: 1, opcode: 0x0F53, e: 1, skip: 1, custom: 1 },
  477. { sse: 1, opcode: 0xF30F53, e: 1, skip: 1, custom: 1 },
  478. { sse: 1, opcode: 0x0F54, e: 1, custom: 1 },
  479. { sse: 1, opcode: 0x660F54, e: 1, custom: 1 },
  480. { sse: 1, opcode: 0x0F55, e: 1, custom: 1 },
  481. { sse: 1, opcode: 0x660F55, e: 1, custom: 1 },
  482. { sse: 1, opcode: 0x0F56, e: 1, custom: 1 },
  483. { sse: 1, opcode: 0x660F56, e: 1, custom: 1 },
  484. { sse: 1, opcode: 0x0F57, e: 1, custom: 1 },
  485. { sse: 1, opcode: 0x660F57, e: 1, custom: 1 },
  486. { sse: 1, opcode: 0x0F58, e: 1, custom: 1 },
  487. { sse: 1, opcode: 0x660F58, e: 1, custom: 1 },
  488. { sse: 1, opcode: 0xF20F58, e: 1, custom: 1 },
  489. { sse: 1, opcode: 0xF30F58, e: 1, custom: 1 },
  490. { sse: 1, opcode: 0x0F59, e: 1, custom: 1 },
  491. { sse: 1, opcode: 0x660F59, e: 1, custom: 1 },
  492. { sse: 1, opcode: 0xF20F59, e: 1, custom: 1 },
  493. { sse: 1, opcode: 0xF30F59, e: 1, custom: 1 },
  494. { sse: 1, opcode: 0x0F5A, e: 1, custom: 1 },
  495. { sse: 1, opcode: 0x660F5A, e: 1, custom: 1 },
  496. { sse: 1, opcode: 0xF20F5A, e: 1, custom: 1 },
  497. { sse: 1, opcode: 0xF30F5A, e: 1, custom: 1 },
  498. { sse: 1, opcode: 0x0F5B, e: 1, custom: 1 },
  499. { sse: 1, opcode: 0x660F5B, e: 1, custom: 1 },
  500. // no F2 variant
  501. { sse: 1, opcode: 0xF30F5B, e: 1, custom: 1 },
  502. { sse: 1, opcode: 0x0F5C, e: 1, custom: 1 },
  503. { sse: 1, opcode: 0x660F5C, e: 1, custom: 1 },
  504. { sse: 1, opcode: 0xF20F5C, e: 1, custom: 1 },
  505. { sse: 1, opcode: 0xF30F5C, e: 1, custom: 1 },
  506. { sse: 1, opcode: 0x0F5D, e: 1, custom: 1 },
  507. { sse: 1, opcode: 0x660F5D, e: 1, custom: 1 },
  508. { sse: 1, opcode: 0xF20F5D, e: 1, custom: 1 },
  509. { sse: 1, opcode: 0xF30F5D, e: 1, custom: 1 },
  510. { sse: 1, opcode: 0x0F5E, e: 1, custom: 1 },
  511. { sse: 1, opcode: 0x660F5E, e: 1, custom: 1 },
  512. { sse: 1, opcode: 0xF20F5E, e: 1, custom: 1 },
  513. { sse: 1, opcode: 0xF30F5E, e: 1, custom: 1 },
  514. { sse: 1, opcode: 0x0F5F, e: 1, custom: 1 },
  515. { sse: 1, opcode: 0x660F5F, e: 1, custom: 1 },
  516. { sse: 1, opcode: 0xF20F5F, e: 1, custom: 1 },
  517. { sse: 1, opcode: 0xF30F5F, e: 1, custom: 1 },
  518. { sse: 1, opcode: 0x660F60, e: 1, custom: 1 },
  519. { sse: 1, opcode: 0x0F60, e: 1, custom: 1 },
  520. { sse: 1, opcode: 0x660F61, e: 1, custom: 1 },
  521. { sse: 1, opcode: 0x0F61, e: 1, custom: 1 },
  522. { sse: 1, opcode: 0x660F62, e: 1, custom: 1 },
  523. { sse: 1, opcode: 0x0F62, e: 1, custom: 1 },
  524. { sse: 1, opcode: 0x660F63, e: 1, custom: 1 },
  525. { sse: 1, opcode: 0x0F63, e: 1, custom: 1 },
  526. { sse: 1, opcode: 0x660F64, e: 1, custom: 1 },
  527. { sse: 1, opcode: 0x0F64, e: 1, custom: 1 },
  528. { sse: 1, opcode: 0x660F65, e: 1, custom: 1 },
  529. { sse: 1, opcode: 0x0F65, e: 1, custom: 1 },
  530. { sse: 1, opcode: 0x660F66, e: 1, custom: 1 },
  531. { sse: 1, opcode: 0x0F66, e: 1, custom: 1 },
  532. { sse: 1, opcode: 0x660F67, e: 1, custom: 1 },
  533. { sse: 1, opcode: 0x0F67, e: 1, custom: 1 },
  534. { sse: 1, opcode: 0x660F68, e: 1, custom: 1 },
  535. { sse: 1, opcode: 0x0F68, e: 1, custom: 1 },
  536. { sse: 1, opcode: 0x660F69, e: 1, custom: 1 },
  537. { sse: 1, opcode: 0x0F69, e: 1, custom: 1 },
  538. { sse: 1, opcode: 0x660F6A, e: 1, custom: 1 },
  539. { sse: 1, opcode: 0x0F6A, e: 1, custom: 1 },
  540. { sse: 1, opcode: 0x660F6B, e: 1, custom: 1 },
  541. { sse: 1, opcode: 0x0F6B, e: 1, custom: 1 },
  542. { sse: 1, opcode: 0x660F6C, e: 1, custom: 1 },
  543. { sse: 1, opcode: 0x0F6C, e: 1, block_boundary: 1 }, // ud
  544. { sse: 1, opcode: 0x660F6D, e: 1, custom: 1 },
  545. { sse: 1, opcode: 0x0F6D, e: 1, block_boundary: 1 }, // ud
  546. { sse: 1, opcode: 0x660F6E, e: 1, custom: 1 },
  547. { sse: 1, opcode: 0x0F6E, e: 1, custom: 1 },
  548. { sse: 1, opcode: 0xF30F6F, e: 1, custom: 1 },
  549. { sse: 1, opcode: 0x660F6F, e: 1, custom: 1 },
  550. { sse: 1, opcode: 0x0F6F, e: 1, custom: 1 },
  551. { sse: 1, opcode: 0x0F70, e: 1, imm8: 1, custom: 1 },
  552. { sse: 1, opcode: 0x660F70, e: 1, imm8: 1, custom: 1 },
  553. { sse: 1, opcode: 0xF20F70, e: 1, imm8: 1, custom: 1 },
  554. { sse: 1, opcode: 0xF30F70, e: 1, imm8: 1, custom: 1 },
  555. { sse: 1, opcode: 0x0F71, e: 1, fixed_g: 2, imm8: 1, mem_ud: 1, custom: 1 },
  556. { sse: 1, opcode: 0x660F71, e: 1, fixed_g: 2, imm8: 1, mem_ud: 1, custom: 1 },
  557. { sse: 1, opcode: 0x0F71, e: 1, fixed_g: 4, imm8: 1, mem_ud: 1, custom: 1 },
  558. { sse: 1, opcode: 0x660F71, e: 1, fixed_g: 4, imm8: 1, mem_ud: 1, custom: 1 },
  559. { sse: 1, opcode: 0x0F71, e: 1, fixed_g: 6, imm8: 1, mem_ud: 1, custom: 1 },
  560. { sse: 1, opcode: 0x660F71, e: 1, fixed_g: 6, imm8: 1, mem_ud: 1, custom: 1 },
  561. { sse: 1, opcode: 0x0F72, e: 1, fixed_g: 2, imm8: 1, mem_ud: 1, custom: 1 },
  562. { sse: 1, opcode: 0x660F72, e: 1, fixed_g: 2, imm8: 1, mem_ud: 1, custom: 1 },
  563. { sse: 1, opcode: 0x0F72, e: 1, fixed_g: 4, imm8: 1, mem_ud: 1, custom: 1 },
  564. { sse: 1, opcode: 0x660F72, e: 1, fixed_g: 4, imm8: 1, mem_ud: 1, custom: 1 },
  565. { sse: 1, opcode: 0x0F72, e: 1, fixed_g: 6, imm8: 1, mem_ud: 1, custom: 1 },
  566. { sse: 1, opcode: 0x660F72, e: 1, fixed_g: 6, imm8: 1, mem_ud: 1, custom: 1 },
  567. { sse: 1, opcode: 0x0F73, e: 1, fixed_g: 2, imm8: 1, mem_ud: 1, custom: 1 },
  568. { sse: 1, opcode: 0x660F73, e: 1, fixed_g: 2, imm8: 1, mem_ud: 1, custom: 1 },
  569. { sse: 1, opcode: 0x660F73, e: 1, fixed_g: 3, imm8: 1, mem_ud: 1, custom: 1 },
  570. { sse: 1, opcode: 0x0F73, e: 1, fixed_g: 6, imm8: 1, mem_ud: 1, custom: 1 },
  571. { sse: 1, opcode: 0x660F73, e: 1, fixed_g: 6, imm8: 1, mem_ud: 1, custom: 1 },
  572. { sse: 1, opcode: 0x660F73, e: 1, fixed_g: 7, imm8: 1, mem_ud: 1, custom: 1 },
  573. { sse: 1, opcode: 0x0F74, e: 1, custom: 1 },
  574. { sse: 1, opcode: 0x660F74, e: 1, custom: 1 },
  575. { sse: 1, opcode: 0x0F75, e: 1, custom: 1 },
  576. { sse: 1, opcode: 0x660F75, e: 1, custom: 1 },
  577. { sse: 1, opcode: 0x0F76, e: 1, custom: 1 },
  578. { sse: 1, opcode: 0x660F76, e: 1, custom: 1 },
  579. { sse: 1, opcode: 0x0F77, skip: 1 }, // emms (skip as it breaks gdb printing of float registers)
  580. // vmx instructions
  581. { opcode: 0x0F78, skip: 1, block_boundary: 1 },
  582. { opcode: 0x0F79, skip: 1, block_boundary: 1 },
  583. { opcode: 0x0F7A, skip: 1, block_boundary: 1 }, // ud
  584. { opcode: 0x0F7B, skip: 1, block_boundary: 1 }, // ud
  585. { sse: 1, opcode: 0x660F7C, e: 1, custom: 1 }, // sse3
  586. { sse: 1, opcode: 0xF20F7C, e: 1, custom: 1 }, // sse3
  587. { sse: 1, opcode: 0x660F7D, e: 1, custom: 1 }, // sse3
  588. { sse: 1, opcode: 0xF20F7D, e: 1, custom: 1 }, // sse3
  589. { opcode: 0x0F7C, skip: 1, block_boundary: 1 }, // ud
  590. { opcode: 0x0F7D, skip: 1, block_boundary: 1 }, // ud
  591. { sse: 1, opcode: 0x0F7E, e: 1, custom: 1 },
  592. { sse: 1, opcode: 0x660F7E, e: 1, custom: 1 },
  593. { sse: 1, opcode: 0xF30F7E, e: 1, custom: 1 },
  594. { sse: 1, opcode: 0x0F7F, e: 1, custom: 1 },
  595. { sse: 1, opcode: 0x660F7F, e: 1, custom: 1 },
  596. { sse: 1, opcode: 0xF30F7F, e: 1, custom: 1 },
  597. { sse: 1, opcode: 0x0FC2, e: 1, imm8: 1, custom: 1 },
  598. { sse: 1, opcode: 0x660FC2, e: 1, imm8: 1, custom: 1 },
  599. { sse: 1, opcode: 0xF20FC2, e: 1, imm8: 1, custom: 1 },
  600. { sse: 1, opcode: 0xF30FC2, e: 1, imm8: 1, custom: 1 },
  601. { opcode: 0x0FC3, e: 1, custom: 1, reg_ud: 1 }, // movnti: Uses normal registers, hence not marked as sse
  602. { sse: 1, opcode: 0x0FC4, e: 1, imm8: 1, custom: 1 },
  603. { sse: 1, opcode: 0x660FC4, e: 1, imm8: 1, custom: 1 },
  604. { sse: 1, opcode: 0x0FC5, e: 1, mem_ud: 1, imm8: 1, custom: 1 },
  605. { sse: 1, opcode: 0x660FC5, e: 1, mem_ud: 1, imm8: 1, custom: 1 },
  606. { sse: 1, opcode: 0x0FC6, e: 1, imm8: 1, custom: 1 },
  607. { sse: 1, opcode: 0x660FC6, e: 1, imm8: 1, custom: 1 },
  608. { sse: 1, opcode: 0x0FD0, skip: 1, block_boundary: 1 }, // sse3
  609. { sse: 1, opcode: 0x0FD1, e: 1, custom: 1 },
  610. { sse: 1, opcode: 0x660FD1, e: 1, custom: 1 },
  611. { sse: 1, opcode: 0x0FD2, e: 1, custom: 1 },
  612. { sse: 1, opcode: 0x660FD2, e: 1, custom: 1 },
  613. { sse: 1, opcode: 0x0FD3, e: 1, custom: 1 },
  614. { sse: 1, opcode: 0x660FD3, e: 1, custom: 1 },
  615. { sse: 1, opcode: 0x0FD4, e: 1, custom: 1 },
  616. { sse: 1, opcode: 0x660FD4, e: 1, custom: 1 },
  617. { sse: 1, opcode: 0x0FD5, e: 1, custom: 1 },
  618. { sse: 1, opcode: 0x660FD5, e: 1, custom: 1 },
  619. { sse: 1, opcode: 0x660FD6, e: 1, custom: 1 },
  620. { sse: 1, opcode: 0xF20FD6, mem_ud: 1, e: 1 },
  621. { sse: 1, opcode: 0xF30FD6, mem_ud: 1, e: 1 },
  622. { sse: 1, opcode: 0x0FD6, e: 1, block_boundary: 1 }, // ud
  623. { sse: 1, opcode: 0x0FD7, e: 1, mem_ud: 1, custom: 1 },
  624. { sse: 1, opcode: 0x660FD7, e: 1, mem_ud: 1, custom: 1 },
  625. { sse: 1, opcode: 0x0FD8, e: 1, custom: 1 },
  626. { sse: 1, opcode: 0x660FD8, e: 1, custom: 1 },
  627. { sse: 1, opcode: 0x0FD9, e: 1, custom: 1 },
  628. { sse: 1, opcode: 0x660FD9, e: 1, custom: 1 },
  629. { sse: 1, opcode: 0x0FDA, e: 1, custom: 1 },
  630. { sse: 1, opcode: 0x660FDA, e: 1, custom: 1 },
  631. { sse: 1, opcode: 0x0FDB, e: 1, custom: 1 },
  632. { sse: 1, opcode: 0x660FDB, e: 1, custom: 1 },
  633. { sse: 1, opcode: 0x0FDC, e: 1, custom: 1 },
  634. { sse: 1, opcode: 0x660FDC, e: 1, custom: 1 },
  635. { sse: 1, opcode: 0x0FDD, e: 1, custom: 1 },
  636. { sse: 1, opcode: 0x660FDD, e: 1, custom: 1 },
  637. { sse: 1, opcode: 0x0FDE, e: 1, custom: 1 },
  638. { sse: 1, opcode: 0x660FDE, e: 1, custom: 1 },
  639. { sse: 1, opcode: 0x0FDF, e: 1, custom: 1 },
  640. { sse: 1, opcode: 0x660FDF, e: 1, custom: 1 },
  641. { sse: 1, opcode: 0x0FE0, e: 1, custom: 1 },
  642. { sse: 1, opcode: 0x660FE0, e: 1, custom: 1 },
  643. { sse: 1, opcode: 0x0FE1, e: 1, custom: 1 },
  644. { sse: 1, opcode: 0x660FE1, e: 1, custom: 1 },
  645. { sse: 1, opcode: 0x0FE2, e: 1, custom: 1 },
  646. { sse: 1, opcode: 0x660FE2, e: 1, custom: 1 },
  647. { sse: 1, opcode: 0x0FE3, e: 1, custom: 1 },
  648. { sse: 1, opcode: 0x660FE3, e: 1, custom: 1 },
  649. { sse: 1, opcode: 0x0FE4, e: 1, custom: 1 },
  650. { sse: 1, opcode: 0x660FE4, e: 1, custom: 1 },
  651. { sse: 1, opcode: 0x0FE5, e: 1, custom: 1 },
  652. { sse: 1, opcode: 0x660FE5, e: 1, custom: 1 },
  653. { sse: 1, opcode: 0x660FE6, e: 1, custom: 1 },
  654. { sse: 1, opcode: 0xF20FE6, e: 1, custom: 1 },
  655. { sse: 1, opcode: 0xF30FE6, e: 1, custom: 1 },
  656. { sse: 1, opcode: 0x0FE6, e: 1, block_boundary: 1 }, // ud
  657. { sse: 1, opcode: 0x0FE7, e: 1, reg_ud: 1 },
  658. { sse: 1, opcode: 0x660FE7, e: 1, reg_ud: 1, custom: 1 },
  659. { sse: 1, opcode: 0x0FE8, e: 1, custom: 1 },
  660. { sse: 1, opcode: 0x660FE8, e: 1, custom: 1 },
  661. { sse: 1, opcode: 0x0FE9, e: 1, custom: 1 },
  662. { sse: 1, opcode: 0x660FE9, e: 1, custom: 1 },
  663. { sse: 1, opcode: 0x0FEA, e: 1, custom: 1 },
  664. { sse: 1, opcode: 0x660FEA, e: 1, custom: 1 },
  665. { sse: 1, opcode: 0x0FEB, e: 1, custom: 1 },
  666. { sse: 1, opcode: 0x660FEB, e: 1, custom: 1 },
  667. { sse: 1, opcode: 0x0FEC, e: 1, custom: 1 },
  668. { sse: 1, opcode: 0x660FEC, e: 1, custom: 1 },
  669. { sse: 1, opcode: 0x0FED, e: 1, custom: 1 },
  670. { sse: 1, opcode: 0x660FED, e: 1, custom: 1 },
  671. { sse: 1, opcode: 0x0FEE, e: 1, custom: 1 },
  672. { sse: 1, opcode: 0x660FEE, e: 1, custom: 1 },
  673. { sse: 1, opcode: 0x0FEF, e: 1, custom: 1 },
  674. { sse: 1, opcode: 0x660FEF, e: 1, custom: 1 },
  675. { sse: 1, opcode: 0x0FF0, skip: 1, block_boundary: 1 }, // sse3
  676. { sse: 1, opcode: 0x0FF1, e: 1, custom: 1 },
  677. { sse: 1, opcode: 0x660FF1, e: 1, custom: 1 },
  678. { sse: 1, opcode: 0x0FF2, e: 1, custom: 1 },
  679. { sse: 1, opcode: 0x660FF2, e: 1, custom: 1 },
  680. { sse: 1, opcode: 0x0FF3, e: 1, custom: 1 },
  681. { sse: 1, opcode: 0x660FF3, e: 1, custom: 1 },
  682. { sse: 1, opcode: 0x0FF4, e: 1, custom: 1 },
  683. { sse: 1, opcode: 0x660FF4, e: 1, custom: 1 },
  684. { sse: 1, opcode: 0x0FF5, e: 1, custom: 1 },
  685. { sse: 1, opcode: 0x660FF5, e: 1, custom: 1 },
  686. { sse: 1, opcode: 0x0FF6, e: 1, custom: 1 },
  687. { sse: 1, opcode: 0x660FF6, e: 1, custom: 1 },
  688. // maskmovq (0FF7), maskmovdqu (660FF7) tested manually
  689. // Generated tests don't setup EDI as required (yet)
  690. { sse: 1, opcode: 0x0FF7, mem_ud: 1, e: 1, custom: 1, skip: 1 },
  691. { sse: 1, opcode: 0x660FF7, mem_ud: 1, e: 1, custom: 1, skip: 1 },
  692. { sse: 1, opcode: 0x0FF8, e: 1, custom: 1 },
  693. { sse: 1, opcode: 0x660FF8, e: 1, custom: 1 },
  694. { sse: 1, opcode: 0x0FF9, e: 1, custom: 1 },
  695. { sse: 1, opcode: 0x660FF9, e: 1, custom: 1 },
  696. { sse: 1, opcode: 0x0FFA, e: 1, custom: 1 },
  697. { sse: 1, opcode: 0x660FFA, e: 1, custom: 1 },
  698. { sse: 1, opcode: 0x0FFB, e: 1, custom: 1 },
  699. { sse: 1, opcode: 0x660FFB, e: 1, custom: 1 },
  700. { sse: 1, opcode: 0x0FFC, e: 1, custom: 1 },
  701. { sse: 1, opcode: 0x660FFC, e: 1, custom: 1 },
  702. { sse: 1, opcode: 0x0FFD, e: 1, custom: 1 },
  703. { sse: 1, opcode: 0x660FFD, e: 1, custom: 1 },
  704. { sse: 1, opcode: 0x0FFE, e: 1, custom: 1 },
  705. { sse: 1, opcode: 0x660FFE, e: 1, custom: 1 },
  706. { opcode: 0x0FFF, block_boundary: 1 }, // ud
  707. ];
  708. for(let i = 0; i < 8; i++)
  709. {
  710. encodings.push.apply(encodings, [
  711. { opcode: 0x00 | i << 3, custom: 1, e: 1 },
  712. { opcode: 0x01 | i << 3, custom: 1, os: 1, e: 1 },
  713. { opcode: 0x02 | i << 3, custom: 1, e: 1 },
  714. { opcode: 0x03 | i << 3, custom: 1, os: 1, e: 1 },
  715. { opcode: 0x04 | i << 3, custom: 1, imm8: 1 },
  716. { opcode: 0x05 | i << 3, custom: 1, os: 1, imm1632: 1 },
  717. { opcode: 0x40 | i, os: 1, custom: 1 },
  718. { opcode: 0x48 | i, os: 1, custom: 1 },
  719. { opcode: 0x50 | i, custom: 1, os: 1 },
  720. { opcode: 0x58 | i, custom: 1, os: 1 },
  721. { opcode: 0x70 | i, block_boundary: 1, no_block_boundary_in_interpreted: 1, jump_offset_imm: 1, conditional_jump: 1, os: 1, imm8s: 1, custom: 1, skip: 1 },
  722. { opcode: 0x78 | i, block_boundary: 1, no_block_boundary_in_interpreted: 1, jump_offset_imm: 1, conditional_jump: 1, os: 1, imm8s: 1, custom: 1, skip: 1 },
  723. { opcode: 0x80, e: 1, fixed_g: i, imm8: 1, custom: 1 },
  724. { opcode: 0x81, os: 1, e: 1, fixed_g: i, imm1632: 1, custom: 1 },
  725. { opcode: 0x82, e: 1, fixed_g: i, imm8: 1, custom: 1 },
  726. { opcode: 0x83, os: 1, e: 1, fixed_g: i, imm8s: 1, custom: 1 },
  727. { opcode: 0xB0 | i, custom: 1, imm8: 1 },
  728. { opcode: 0xB8 | i, custom: 1, os: 1, imm1632: 1 },
  729. // note: overflow flag only undefined if shift is > 1
  730. // note: the adjust flag is undefined for shifts > 0 and unaffected by rotates
  731. { opcode: 0xC0, e: 1, fixed_g: i, imm8: 1, mask_flags: of | af, custom: 1 },
  732. { opcode: 0xC1, os: 1, e: 1, fixed_g: i, imm8: 1, mask_flags: of | af, custom: 1 },
  733. { opcode: 0xD0, e: 1, fixed_g: i, mask_flags: af, custom: 1 },
  734. { opcode: 0xD1, os: 1, e: 1, fixed_g: i, mask_flags: af, custom: 1 },
  735. { opcode: 0xD2, e: 1, fixed_g: i, mask_flags: of | af, custom: 1 },
  736. { opcode: 0xD3, os: 1, e: 1, fixed_g: i, mask_flags: of | af, custom: 1 },
  737. { opcode: 0x0F40 | i, e: 1, os: 1, custom: 1 },
  738. { opcode: 0x0F48 | i, e: 1, os: 1, custom: 1 },
  739. { opcode: 0x0F80 | i, block_boundary: 1, no_block_boundary_in_interpreted: 1, jump_offset_imm: 1, conditional_jump: 1, imm1632: 1, os: 1, custom: 1, skip: 1 },
  740. { opcode: 0x0F88 | i, block_boundary: 1, no_block_boundary_in_interpreted: 1, jump_offset_imm: 1, conditional_jump: 1, imm1632: 1, os: 1, custom: 1, skip: 1 },
  741. { opcode: 0x0F90 | i, e: 1, custom: 1 },
  742. { opcode: 0x0F98 | i, e: 1, custom: 1 },
  743. ]);
  744. }
  745. encodings.sort((e1, e2) => {
  746. let o1 = (e1.opcode & 0xFF00) === 0x0F00 ? e1.opcode & 0xFFFF : e1.opcode & 0xFF;
  747. let o2 = (e2.opcode & 0xFF00) === 0x0F00 ? e2.opcode & 0xFFFF : e2.opcode & 0xFF;
  748. return o1 - o2 || e1.fixed_g - e2.fixed_g;
  749. });
  750. module.exports = Object.freeze(encodings.map(entry => Object.freeze(entry)));