fisk 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1245) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +35 -0
  3. data/CODE_OF_CONDUCT.md +78 -0
  4. data/Gemfile +1 -2
  5. data/Rakefile +4 -2
  6. data/bin/build-machine.rb +14 -0
  7. data/bin/instruction.rb.erb +29 -56
  8. data/fisk.gemspec +5 -0
  9. data/lib/fisk.rb +269 -71
  10. data/lib/fisk/encoding.rb +67 -5
  11. data/lib/fisk/errors.rb +5 -0
  12. data/lib/fisk/instructions/adc.rb +505 -539
  13. data/lib/fisk/instructions/adcx.rb +74 -78
  14. data/lib/fisk/instructions/add.rb +505 -539
  15. data/lib/fisk/instructions/addpd.rb +36 -38
  16. data/lib/fisk/instructions/addps.rb +34 -36
  17. data/lib/fisk/instructions/addsd.rb +36 -38
  18. data/lib/fisk/instructions/addss.rb +36 -38
  19. data/lib/fisk/instructions/addsubpd.rb +36 -38
  20. data/lib/fisk/instructions/addsubps.rb +36 -38
  21. data/lib/fisk/instructions/adox.rb +74 -78
  22. data/lib/fisk/instructions/aesdec.rb +38 -40
  23. data/lib/fisk/instructions/aesdeclast.rb +38 -40
  24. data/lib/fisk/instructions/aesenc.rb +38 -40
  25. data/lib/fisk/instructions/aesenclast.rb +38 -40
  26. data/lib/fisk/instructions/aesimc.rb +38 -40
  27. data/lib/fisk/instructions/aeskeygenassist.rb +42 -44
  28. data/lib/fisk/instructions/and.rb +505 -539
  29. data/lib/fisk/instructions/andn.rb +62 -66
  30. data/lib/fisk/instructions/andnpd.rb +36 -38
  31. data/lib/fisk/instructions/andnps.rb +34 -36
  32. data/lib/fisk/instructions/andpd.rb +36 -38
  33. data/lib/fisk/instructions/andps.rb +34 -36
  34. data/lib/fisk/instructions/bextr.rb +126 -134
  35. data/lib/fisk/instructions/blcfill.rb +58 -62
  36. data/lib/fisk/instructions/blci.rb +58 -62
  37. data/lib/fisk/instructions/blcic.rb +58 -62
  38. data/lib/fisk/instructions/blcmsk.rb +58 -62
  39. data/lib/fisk/instructions/blcs.rb +58 -62
  40. data/lib/fisk/instructions/blendpd.rb +42 -44
  41. data/lib/fisk/instructions/blendps.rb +42 -44
  42. data/lib/fisk/instructions/blendvpd.rb +40 -42
  43. data/lib/fisk/instructions/blendvps.rb +40 -42
  44. data/lib/fisk/instructions/blsfill.rb +58 -62
  45. data/lib/fisk/instructions/blsi.rb +58 -62
  46. data/lib/fisk/instructions/blsic.rb +58 -62
  47. data/lib/fisk/instructions/blsmsk.rb +58 -62
  48. data/lib/fisk/instructions/blsr.rb +58 -62
  49. data/lib/fisk/instructions/bsf.rb +100 -106
  50. data/lib/fisk/instructions/bsr.rb +100 -106
  51. data/lib/fisk/instructions/bswap.rb +28 -30
  52. data/lib/fisk/instructions/bt.rb +204 -216
  53. data/lib/fisk/instructions/btc.rb +204 -216
  54. data/lib/fisk/instructions/btr.rb +204 -216
  55. data/lib/fisk/instructions/bts.rb +204 -216
  56. data/lib/fisk/instructions/bzhi.rb +62 -66
  57. data/lib/fisk/instructions/call.rb +41 -44
  58. data/lib/fisk/instructions/cbw.rb +12 -13
  59. data/lib/fisk/instructions/cdq.rb +11 -12
  60. data/lib/fisk/instructions/cdqe.rb +13 -14
  61. data/lib/fisk/instructions/clc.rb +11 -12
  62. data/lib/fisk/instructions/cld.rb +11 -12
  63. data/lib/fisk/instructions/clflush.rb +17 -18
  64. data/lib/fisk/instructions/clflushopt.rb +18 -19
  65. data/lib/fisk/instructions/clwb.rb +18 -19
  66. data/lib/fisk/instructions/clzero.rb +13 -14
  67. data/lib/fisk/instructions/cmc.rb +11 -12
  68. data/lib/fisk/instructions/cmova.rb +100 -106
  69. data/lib/fisk/instructions/cmovae.rb +100 -106
  70. data/lib/fisk/instructions/cmovb.rb +100 -106
  71. data/lib/fisk/instructions/cmovbe.rb +100 -106
  72. data/lib/fisk/instructions/cmovc.rb +100 -106
  73. data/lib/fisk/instructions/cmove.rb +100 -106
  74. data/lib/fisk/instructions/cmovg.rb +100 -106
  75. data/lib/fisk/instructions/cmovge.rb +100 -106
  76. data/lib/fisk/instructions/cmovl.rb +100 -106
  77. data/lib/fisk/instructions/cmovle.rb +100 -106
  78. data/lib/fisk/instructions/cmovna.rb +100 -106
  79. data/lib/fisk/instructions/cmovnae.rb +100 -106
  80. data/lib/fisk/instructions/cmovnb.rb +100 -106
  81. data/lib/fisk/instructions/cmovnbe.rb +100 -106
  82. data/lib/fisk/instructions/cmovnc.rb +100 -106
  83. data/lib/fisk/instructions/cmovne.rb +100 -106
  84. data/lib/fisk/instructions/cmovng.rb +100 -106
  85. data/lib/fisk/instructions/cmovnge.rb +100 -106
  86. data/lib/fisk/instructions/cmovnl.rb +100 -106
  87. data/lib/fisk/instructions/cmovnle.rb +100 -106
  88. data/lib/fisk/instructions/cmovno.rb +100 -106
  89. data/lib/fisk/instructions/cmovnp.rb +100 -106
  90. data/lib/fisk/instructions/cmovns.rb +100 -106
  91. data/lib/fisk/instructions/cmovnz.rb +100 -106
  92. data/lib/fisk/instructions/cmovo.rb +100 -106
  93. data/lib/fisk/instructions/cmovp.rb +100 -106
  94. data/lib/fisk/instructions/cmovpe.rb +100 -106
  95. data/lib/fisk/instructions/cmovpo.rb +100 -106
  96. data/lib/fisk/instructions/cmovs.rb +100 -106
  97. data/lib/fisk/instructions/cmovz.rb +100 -106
  98. data/lib/fisk/instructions/cmp.rb +505 -539
  99. data/lib/fisk/instructions/cmppd.rb +40 -42
  100. data/lib/fisk/instructions/cmpps.rb +38 -40
  101. data/lib/fisk/instructions/cmpsd.rb +40 -42
  102. data/lib/fisk/instructions/cmpss.rb +40 -42
  103. data/lib/fisk/instructions/cmpxchg.rb +132 -140
  104. data/lib/fisk/instructions/cmpxchg16b.rb +17 -18
  105. data/lib/fisk/instructions/cmpxchg8b.rb +17 -18
  106. data/lib/fisk/instructions/comisd.rb +36 -38
  107. data/lib/fisk/instructions/comiss.rb +34 -36
  108. data/lib/fisk/instructions/cpuid.rb +12 -13
  109. data/lib/fisk/instructions/cqo.rb +13 -14
  110. data/lib/fisk/instructions/crc32.rb +184 -194
  111. data/lib/fisk/instructions/cvtdq2pd.rb +36 -38
  112. data/lib/fisk/instructions/cvtdq2ps.rb +34 -36
  113. data/lib/fisk/instructions/cvtpd2dq.rb +36 -38
  114. data/lib/fisk/instructions/cvtpd2pi.rb +36 -38
  115. data/lib/fisk/instructions/cvtpd2ps.rb +36 -38
  116. data/lib/fisk/instructions/cvtpi2pd.rb +36 -38
  117. data/lib/fisk/instructions/cvtpi2ps.rb +34 -36
  118. data/lib/fisk/instructions/cvtps2dq.rb +36 -38
  119. data/lib/fisk/instructions/cvtps2pd.rb +34 -36
  120. data/lib/fisk/instructions/cvtps2pi.rb +34 -36
  121. data/lib/fisk/instructions/cvtsd2si.rb +70 -74
  122. data/lib/fisk/instructions/cvtsd2ss.rb +36 -38
  123. data/lib/fisk/instructions/cvtsi2sd.rb +70 -74
  124. data/lib/fisk/instructions/cvtsi2ss.rb +70 -74
  125. data/lib/fisk/instructions/cvtss2sd.rb +36 -38
  126. data/lib/fisk/instructions/cvtss2si.rb +70 -74
  127. data/lib/fisk/instructions/cvttpd2dq.rb +36 -38
  128. data/lib/fisk/instructions/cvttpd2pi.rb +36 -38
  129. data/lib/fisk/instructions/cvttps2dq.rb +36 -38
  130. data/lib/fisk/instructions/cvttps2pi.rb +34 -36
  131. data/lib/fisk/instructions/cvttsd2si.rb +70 -74
  132. data/lib/fisk/instructions/cvttss2si.rb +70 -74
  133. data/lib/fisk/instructions/cwd.rb +12 -13
  134. data/lib/fisk/instructions/cwde.rb +11 -12
  135. data/lib/fisk/instructions/dec.rb +116 -124
  136. data/lib/fisk/instructions/div.rb +116 -124
  137. data/lib/fisk/instructions/divpd.rb +36 -38
  138. data/lib/fisk/instructions/divps.rb +34 -36
  139. data/lib/fisk/instructions/divsd.rb +36 -38
  140. data/lib/fisk/instructions/divss.rb +36 -38
  141. data/lib/fisk/instructions/dppd.rb +42 -44
  142. data/lib/fisk/instructions/dpps.rb +42 -44
  143. data/lib/fisk/instructions/emms.rb +12 -13
  144. data/lib/fisk/instructions/extractps.rb +42 -44
  145. data/lib/fisk/instructions/extrq.rb +39 -41
  146. data/lib/fisk/instructions/femms.rb +12 -13
  147. data/lib/fisk/instructions/haddpd.rb +36 -38
  148. data/lib/fisk/instructions/haddps.rb +36 -38
  149. data/lib/fisk/instructions/hsubpd.rb +36 -38
  150. data/lib/fisk/instructions/hsubps.rb +36 -38
  151. data/lib/fisk/instructions/idiv.rb +116 -124
  152. data/lib/fisk/instructions/imul.rb +422 -448
  153. data/lib/fisk/instructions/inc.rb +116 -124
  154. data/lib/fisk/instructions/insertps.rb +42 -44
  155. data/lib/fisk/instructions/insertq.rb +40 -42
  156. data/lib/fisk/instructions/int.rb +23 -25
  157. data/lib/fisk/instructions/ja.rb +25 -27
  158. data/lib/fisk/instructions/jae.rb +25 -27
  159. data/lib/fisk/instructions/jb.rb +25 -27
  160. data/lib/fisk/instructions/jbe.rb +25 -27
  161. data/lib/fisk/instructions/jc.rb +25 -27
  162. data/lib/fisk/instructions/je.rb +25 -27
  163. data/lib/fisk/instructions/jecxz.rb +13 -14
  164. data/lib/fisk/instructions/jg.rb +25 -27
  165. data/lib/fisk/instructions/jge.rb +25 -27
  166. data/lib/fisk/instructions/jl.rb +25 -27
  167. data/lib/fisk/instructions/jle.rb +25 -27
  168. data/lib/fisk/instructions/jmp.rb +52 -56
  169. data/lib/fisk/instructions/jna.rb +25 -27
  170. data/lib/fisk/instructions/jnae.rb +25 -27
  171. data/lib/fisk/instructions/jnb.rb +25 -27
  172. data/lib/fisk/instructions/jnbe.rb +25 -27
  173. data/lib/fisk/instructions/jnc.rb +25 -27
  174. data/lib/fisk/instructions/jne.rb +25 -27
  175. data/lib/fisk/instructions/jng.rb +25 -27
  176. data/lib/fisk/instructions/jnge.rb +25 -27
  177. data/lib/fisk/instructions/jnl.rb +25 -27
  178. data/lib/fisk/instructions/jnle.rb +25 -27
  179. data/lib/fisk/instructions/jno.rb +25 -27
  180. data/lib/fisk/instructions/jnp.rb +25 -27
  181. data/lib/fisk/instructions/jns.rb +25 -27
  182. data/lib/fisk/instructions/jnz.rb +25 -27
  183. data/lib/fisk/instructions/jo.rb +25 -27
  184. data/lib/fisk/instructions/jp.rb +25 -27
  185. data/lib/fisk/instructions/jpe.rb +25 -27
  186. data/lib/fisk/instructions/jpo.rb +25 -27
  187. data/lib/fisk/instructions/jrcxz.rb +13 -14
  188. data/lib/fisk/instructions/js.rb +25 -27
  189. data/lib/fisk/instructions/jz.rb +25 -27
  190. data/lib/fisk/instructions/kaddb.rb +17 -18
  191. data/lib/fisk/instructions/kaddd.rb +17 -18
  192. data/lib/fisk/instructions/kaddq.rb +17 -18
  193. data/lib/fisk/instructions/kaddw.rb +17 -18
  194. data/lib/fisk/instructions/kandb.rb +17 -18
  195. data/lib/fisk/instructions/kandd.rb +17 -18
  196. data/lib/fisk/instructions/kandnb.rb +17 -18
  197. data/lib/fisk/instructions/kandnd.rb +17 -18
  198. data/lib/fisk/instructions/kandnq.rb +17 -18
  199. data/lib/fisk/instructions/kandnw.rb +17 -18
  200. data/lib/fisk/instructions/kandq.rb +17 -18
  201. data/lib/fisk/instructions/kandw.rb +17 -18
  202. data/lib/fisk/instructions/kmovb.rb +72 -77
  203. data/lib/fisk/instructions/kmovd.rb +72 -77
  204. data/lib/fisk/instructions/kmovq.rb +72 -77
  205. data/lib/fisk/instructions/kmovw.rb +72 -77
  206. data/lib/fisk/instructions/knotb.rb +16 -17
  207. data/lib/fisk/instructions/knotd.rb +16 -17
  208. data/lib/fisk/instructions/knotq.rb +16 -17
  209. data/lib/fisk/instructions/knotw.rb +16 -17
  210. data/lib/fisk/instructions/korb.rb +17 -18
  211. data/lib/fisk/instructions/kord.rb +17 -18
  212. data/lib/fisk/instructions/korq.rb +17 -18
  213. data/lib/fisk/instructions/kortestb.rb +16 -17
  214. data/lib/fisk/instructions/kortestd.rb +16 -17
  215. data/lib/fisk/instructions/kortestq.rb +16 -17
  216. data/lib/fisk/instructions/kortestw.rb +16 -17
  217. data/lib/fisk/instructions/korw.rb +17 -18
  218. data/lib/fisk/instructions/kshiftlb.rb +18 -19
  219. data/lib/fisk/instructions/kshiftld.rb +18 -19
  220. data/lib/fisk/instructions/kshiftlq.rb +18 -19
  221. data/lib/fisk/instructions/kshiftlw.rb +18 -19
  222. data/lib/fisk/instructions/kshiftrb.rb +18 -19
  223. data/lib/fisk/instructions/kshiftrd.rb +18 -19
  224. data/lib/fisk/instructions/kshiftrq.rb +18 -19
  225. data/lib/fisk/instructions/kshiftrw.rb +18 -19
  226. data/lib/fisk/instructions/ktestb.rb +16 -17
  227. data/lib/fisk/instructions/ktestd.rb +16 -17
  228. data/lib/fisk/instructions/ktestq.rb +16 -17
  229. data/lib/fisk/instructions/ktestw.rb +16 -17
  230. data/lib/fisk/instructions/kunpckbw.rb +17 -18
  231. data/lib/fisk/instructions/kunpckdq.rb +17 -18
  232. data/lib/fisk/instructions/kunpckwd.rb +17 -18
  233. data/lib/fisk/instructions/kxnorb.rb +17 -18
  234. data/lib/fisk/instructions/kxnord.rb +17 -18
  235. data/lib/fisk/instructions/kxnorq.rb +17 -18
  236. data/lib/fisk/instructions/kxnorw.rb +17 -18
  237. data/lib/fisk/instructions/kxorb.rb +17 -18
  238. data/lib/fisk/instructions/kxord.rb +17 -18
  239. data/lib/fisk/instructions/kxorq.rb +17 -18
  240. data/lib/fisk/instructions/kxorw.rb +17 -18
  241. data/lib/fisk/instructions/lddqu.rb +19 -20
  242. data/lib/fisk/instructions/ldmxcsr.rb +17 -18
  243. data/lib/fisk/instructions/lea.rb +48 -51
  244. data/lib/fisk/instructions/lfence.rb +13 -14
  245. data/lib/fisk/instructions/lzcnt.rb +106 -112
  246. data/lib/fisk/instructions/maskmovdqu.rb +19 -20
  247. data/lib/fisk/instructions/maskmovq.rb +18 -19
  248. data/lib/fisk/instructions/maxpd.rb +36 -38
  249. data/lib/fisk/instructions/maxps.rb +34 -36
  250. data/lib/fisk/instructions/maxsd.rb +36 -38
  251. data/lib/fisk/instructions/maxss.rb +36 -38
  252. data/lib/fisk/instructions/mfence.rb +13 -14
  253. data/lib/fisk/instructions/minpd.rb +36 -38
  254. data/lib/fisk/instructions/minps.rb +34 -36
  255. data/lib/fisk/instructions/minsd.rb +36 -38
  256. data/lib/fisk/instructions/minss.rb +36 -38
  257. data/lib/fisk/instructions/monitor.rb +13 -14
  258. data/lib/fisk/instructions/monitorx.rb +13 -14
  259. data/lib/fisk/instructions/mov.rb +450 -482
  260. data/lib/fisk/instructions/movapd.rb +65 -69
  261. data/lib/fisk/instructions/movaps.rb +61 -65
  262. data/lib/fisk/instructions/movbe.rb +106 -112
  263. data/lib/fisk/instructions/movd.rb +134 -142
  264. data/lib/fisk/instructions/movddup.rb +36 -38
  265. data/lib/fisk/instructions/movdq2q.rb +19 -20
  266. data/lib/fisk/instructions/movdqa.rb +65 -69
  267. data/lib/fisk/instructions/movdqu.rb +65 -69
  268. data/lib/fisk/instructions/movhlps.rb +18 -19
  269. data/lib/fisk/instructions/movhpd.rb +36 -38
  270. data/lib/fisk/instructions/movhps.rb +34 -36
  271. data/lib/fisk/instructions/movlhps.rb +18 -19
  272. data/lib/fisk/instructions/movlpd.rb +36 -38
  273. data/lib/fisk/instructions/movlps.rb +34 -36
  274. data/lib/fisk/instructions/movmskpd.rb +19 -20
  275. data/lib/fisk/instructions/movmskps.rb +18 -19
  276. data/lib/fisk/instructions/movntdq.rb +19 -20
  277. data/lib/fisk/instructions/movntdqa.rb +20 -21
  278. data/lib/fisk/instructions/movnti.rb +34 -36
  279. data/lib/fisk/instructions/movntpd.rb +19 -20
  280. data/lib/fisk/instructions/movntps.rb +18 -19
  281. data/lib/fisk/instructions/movntq.rb +18 -19
  282. data/lib/fisk/instructions/movntsd.rb +19 -20
  283. data/lib/fisk/instructions/movntss.rb +19 -20
  284. data/lib/fisk/instructions/movq.rb +236 -252
  285. data/lib/fisk/instructions/movq2dq.rb +19 -20
  286. data/lib/fisk/instructions/movsd.rb +65 -69
  287. data/lib/fisk/instructions/movshdup.rb +36 -38
  288. data/lib/fisk/instructions/movsldup.rb +36 -38
  289. data/lib/fisk/instructions/movss.rb +65 -69
  290. data/lib/fisk/instructions/movsx.rb +164 -174
  291. data/lib/fisk/instructions/movsxd.rb +32 -34
  292. data/lib/fisk/instructions/movupd.rb +65 -69
  293. data/lib/fisk/instructions/movups.rb +61 -65
  294. data/lib/fisk/instructions/movzx.rb +164 -174
  295. data/lib/fisk/instructions/mpsadbw.rb +42 -44
  296. data/lib/fisk/instructions/mul.rb +116 -124
  297. data/lib/fisk/instructions/mulpd.rb +36 -38
  298. data/lib/fisk/instructions/mulps.rb +34 -36
  299. data/lib/fisk/instructions/mulsd.rb +36 -38
  300. data/lib/fisk/instructions/mulss.rb +36 -38
  301. data/lib/fisk/instructions/mulx.rb +62 -66
  302. data/lib/fisk/instructions/mwait.rb +13 -14
  303. data/lib/fisk/instructions/mwaitx.rb +13 -14
  304. data/lib/fisk/instructions/neg.rb +116 -124
  305. data/lib/fisk/instructions/nop.rb +11 -12
  306. data/lib/fisk/instructions/not.rb +116 -124
  307. data/lib/fisk/instructions/or.rb +505 -539
  308. data/lib/fisk/instructions/orpd.rb +36 -38
  309. data/lib/fisk/instructions/orps.rb +34 -36
  310. data/lib/fisk/instructions/pabsb.rb +72 -76
  311. data/lib/fisk/instructions/pabsd.rb +72 -76
  312. data/lib/fisk/instructions/pabsw.rb +72 -76
  313. data/lib/fisk/instructions/packssdw.rb +68 -72
  314. data/lib/fisk/instructions/packsswb.rb +68 -72
  315. data/lib/fisk/instructions/packusdw.rb +38 -40
  316. data/lib/fisk/instructions/packuswb.rb +68 -72
  317. data/lib/fisk/instructions/paddb.rb +68 -72
  318. data/lib/fisk/instructions/paddd.rb +68 -72
  319. data/lib/fisk/instructions/paddq.rb +68 -72
  320. data/lib/fisk/instructions/paddsb.rb +68 -72
  321. data/lib/fisk/instructions/paddsw.rb +68 -72
  322. data/lib/fisk/instructions/paddusb.rb +68 -72
  323. data/lib/fisk/instructions/paddusw.rb +68 -72
  324. data/lib/fisk/instructions/paddw.rb +68 -72
  325. data/lib/fisk/instructions/palignr.rb +80 -84
  326. data/lib/fisk/instructions/pand.rb +68 -72
  327. data/lib/fisk/instructions/pandn.rb +68 -72
  328. data/lib/fisk/instructions/pause.rb +12 -13
  329. data/lib/fisk/instructions/pavgb.rb +68 -72
  330. data/lib/fisk/instructions/pavgusb.rb +36 -38
  331. data/lib/fisk/instructions/pavgw.rb +68 -72
  332. data/lib/fisk/instructions/pblendvb.rb +40 -42
  333. data/lib/fisk/instructions/pblendw.rb +42 -44
  334. data/lib/fisk/instructions/pclmulqdq.rb +42 -44
  335. data/lib/fisk/instructions/pcmpeqb.rb +68 -72
  336. data/lib/fisk/instructions/pcmpeqd.rb +68 -72
  337. data/lib/fisk/instructions/pcmpeqq.rb +38 -40
  338. data/lib/fisk/instructions/pcmpeqw.rb +68 -72
  339. data/lib/fisk/instructions/pcmpestri.rb +42 -44
  340. data/lib/fisk/instructions/pcmpestrm.rb +42 -44
  341. data/lib/fisk/instructions/pcmpgtb.rb +68 -72
  342. data/lib/fisk/instructions/pcmpgtd.rb +68 -72
  343. data/lib/fisk/instructions/pcmpgtq.rb +38 -40
  344. data/lib/fisk/instructions/pcmpgtw.rb +68 -72
  345. data/lib/fisk/instructions/pcmpistri.rb +42 -44
  346. data/lib/fisk/instructions/pcmpistrm.rb +42 -44
  347. data/lib/fisk/instructions/pdep.rb +62 -66
  348. data/lib/fisk/instructions/pext.rb +62 -66
  349. data/lib/fisk/instructions/pextrb.rb +42 -44
  350. data/lib/fisk/instructions/pextrd.rb +42 -44
  351. data/lib/fisk/instructions/pextrq.rb +42 -44
  352. data/lib/fisk/instructions/pextrw.rb +73 -77
  353. data/lib/fisk/instructions/pf2id.rb +36 -38
  354. data/lib/fisk/instructions/pf2iw.rb +36 -38
  355. data/lib/fisk/instructions/pfacc.rb +36 -38
  356. data/lib/fisk/instructions/pfadd.rb +36 -38
  357. data/lib/fisk/instructions/pfcmpeq.rb +36 -38
  358. data/lib/fisk/instructions/pfcmpge.rb +36 -38
  359. data/lib/fisk/instructions/pfcmpgt.rb +36 -38
  360. data/lib/fisk/instructions/pfmax.rb +36 -38
  361. data/lib/fisk/instructions/pfmin.rb +36 -38
  362. data/lib/fisk/instructions/pfmul.rb +36 -38
  363. data/lib/fisk/instructions/pfnacc.rb +36 -38
  364. data/lib/fisk/instructions/pfpnacc.rb +36 -38
  365. data/lib/fisk/instructions/pfrcp.rb +36 -38
  366. data/lib/fisk/instructions/pfrcpit1.rb +36 -38
  367. data/lib/fisk/instructions/pfrcpit2.rb +36 -38
  368. data/lib/fisk/instructions/pfrsqit1.rb +36 -38
  369. data/lib/fisk/instructions/pfrsqrt.rb +36 -38
  370. data/lib/fisk/instructions/pfsub.rb +36 -38
  371. data/lib/fisk/instructions/pfsubr.rb +36 -38
  372. data/lib/fisk/instructions/phaddd.rb +72 -76
  373. data/lib/fisk/instructions/phaddsw.rb +72 -76
  374. data/lib/fisk/instructions/phaddw.rb +72 -76
  375. data/lib/fisk/instructions/phminposuw.rb +38 -40
  376. data/lib/fisk/instructions/phsubd.rb +72 -76
  377. data/lib/fisk/instructions/phsubsw.rb +72 -76
  378. data/lib/fisk/instructions/phsubw.rb +72 -76
  379. data/lib/fisk/instructions/pi2fd.rb +36 -38
  380. data/lib/fisk/instructions/pi2fw.rb +36 -38
  381. data/lib/fisk/instructions/pinsrb.rb +42 -44
  382. data/lib/fisk/instructions/pinsrd.rb +42 -44
  383. data/lib/fisk/instructions/pinsrq.rb +42 -44
  384. data/lib/fisk/instructions/pinsrw.rb +76 -80
  385. data/lib/fisk/instructions/pmaddubsw.rb +72 -76
  386. data/lib/fisk/instructions/pmaddwd.rb +68 -72
  387. data/lib/fisk/instructions/pmaxsb.rb +38 -40
  388. data/lib/fisk/instructions/pmaxsd.rb +38 -40
  389. data/lib/fisk/instructions/pmaxsw.rb +68 -72
  390. data/lib/fisk/instructions/pmaxub.rb +68 -72
  391. data/lib/fisk/instructions/pmaxud.rb +38 -40
  392. data/lib/fisk/instructions/pmaxuw.rb +38 -40
  393. data/lib/fisk/instructions/pminsb.rb +38 -40
  394. data/lib/fisk/instructions/pminsd.rb +38 -40
  395. data/lib/fisk/instructions/pminsw.rb +68 -72
  396. data/lib/fisk/instructions/pminub.rb +68 -72
  397. data/lib/fisk/instructions/pminud.rb +38 -40
  398. data/lib/fisk/instructions/pminuw.rb +38 -40
  399. data/lib/fisk/instructions/pmovmskb.rb +35 -37
  400. data/lib/fisk/instructions/pmovsxbd.rb +38 -40
  401. data/lib/fisk/instructions/pmovsxbq.rb +38 -40
  402. data/lib/fisk/instructions/pmovsxbw.rb +38 -40
  403. data/lib/fisk/instructions/pmovsxdq.rb +38 -40
  404. data/lib/fisk/instructions/pmovsxwd.rb +38 -40
  405. data/lib/fisk/instructions/pmovsxwq.rb +38 -40
  406. data/lib/fisk/instructions/pmovzxbd.rb +38 -40
  407. data/lib/fisk/instructions/pmovzxbq.rb +38 -40
  408. data/lib/fisk/instructions/pmovzxbw.rb +38 -40
  409. data/lib/fisk/instructions/pmovzxdq.rb +38 -40
  410. data/lib/fisk/instructions/pmovzxwd.rb +38 -40
  411. data/lib/fisk/instructions/pmovzxwq.rb +38 -40
  412. data/lib/fisk/instructions/pmuldq.rb +38 -40
  413. data/lib/fisk/instructions/pmulhrsw.rb +72 -76
  414. data/lib/fisk/instructions/pmulhrw.rb +36 -38
  415. data/lib/fisk/instructions/pmulhuw.rb +68 -72
  416. data/lib/fisk/instructions/pmulhw.rb +68 -72
  417. data/lib/fisk/instructions/pmulld.rb +38 -40
  418. data/lib/fisk/instructions/pmullw.rb +68 -72
  419. data/lib/fisk/instructions/pmuludq.rb +68 -72
  420. data/lib/fisk/instructions/pop.rb +77 -83
  421. data/lib/fisk/instructions/popcnt.rb +106 -112
  422. data/lib/fisk/instructions/por.rb +68 -72
  423. data/lib/fisk/instructions/prefetch.rb +17 -18
  424. data/lib/fisk/instructions/prefetchnta.rb +17 -18
  425. data/lib/fisk/instructions/prefetcht0.rb +17 -18
  426. data/lib/fisk/instructions/prefetcht1.rb +17 -18
  427. data/lib/fisk/instructions/prefetcht2.rb +17 -18
  428. data/lib/fisk/instructions/prefetchw.rb +17 -18
  429. data/lib/fisk/instructions/prefetchwt1.rb +17 -18
  430. data/lib/fisk/instructions/psadbw.rb +68 -72
  431. data/lib/fisk/instructions/pshufb.rb +72 -76
  432. data/lib/fisk/instructions/pshufd.rb +40 -42
  433. data/lib/fisk/instructions/pshufhw.rb +40 -42
  434. data/lib/fisk/instructions/pshuflw.rb +40 -42
  435. data/lib/fisk/instructions/pshufw.rb +38 -40
  436. data/lib/fisk/instructions/psignb.rb +72 -76
  437. data/lib/fisk/instructions/psignd.rb +72 -76
  438. data/lib/fisk/instructions/psignw.rb +72 -76
  439. data/lib/fisk/instructions/pslld.rb +103 -109
  440. data/lib/fisk/instructions/pslldq.rb +20 -21
  441. data/lib/fisk/instructions/psllq.rb +103 -109
  442. data/lib/fisk/instructions/psllw.rb +103 -109
  443. data/lib/fisk/instructions/psrad.rb +103 -109
  444. data/lib/fisk/instructions/psraw.rb +103 -109
  445. data/lib/fisk/instructions/psrld.rb +103 -109
  446. data/lib/fisk/instructions/psrldq.rb +20 -21
  447. data/lib/fisk/instructions/psrlq.rb +103 -109
  448. data/lib/fisk/instructions/psrlw.rb +103 -109
  449. data/lib/fisk/instructions/psubb.rb +68 -72
  450. data/lib/fisk/instructions/psubd.rb +68 -72
  451. data/lib/fisk/instructions/psubq.rb +68 -72
  452. data/lib/fisk/instructions/psubsb.rb +68 -72
  453. data/lib/fisk/instructions/psubsw.rb +68 -72
  454. data/lib/fisk/instructions/psubusb.rb +68 -72
  455. data/lib/fisk/instructions/psubusw.rb +68 -72
  456. data/lib/fisk/instructions/psubw.rb +68 -72
  457. data/lib/fisk/instructions/pswapd.rb +36 -38
  458. data/lib/fisk/instructions/ptest.rb +38 -40
  459. data/lib/fisk/instructions/punpckhbw.rb +68 -72
  460. data/lib/fisk/instructions/punpckhdq.rb +68 -72
  461. data/lib/fisk/instructions/punpckhqdq.rb +36 -38
  462. data/lib/fisk/instructions/punpckhwd.rb +68 -72
  463. data/lib/fisk/instructions/punpcklbw.rb +68 -72
  464. data/lib/fisk/instructions/punpckldq.rb +68 -72
  465. data/lib/fisk/instructions/punpcklqdq.rb +36 -38
  466. data/lib/fisk/instructions/punpcklwd.rb +68 -72
  467. data/lib/fisk/instructions/push.rb +99 -107
  468. data/lib/fisk/instructions/pxor.rb +68 -72
  469. data/lib/fisk/instructions/rcl.rb +376 -400
  470. data/lib/fisk/instructions/rcpps.rb +34 -36
  471. data/lib/fisk/instructions/rcpss.rb +36 -38
  472. data/lib/fisk/instructions/rcr.rb +376 -400
  473. data/lib/fisk/instructions/rdrand.rb +48 -51
  474. data/lib/fisk/instructions/rdseed.rb +48 -51
  475. data/lib/fisk/instructions/rdtsc.rb +12 -13
  476. data/lib/fisk/instructions/rdtscp.rb +13 -14
  477. data/lib/fisk/instructions/ret.rb +22 -24
  478. data/lib/fisk/instructions/rol.rb +376 -400
  479. data/lib/fisk/instructions/ror.rb +376 -400
  480. data/lib/fisk/instructions/rorx.rb +66 -70
  481. data/lib/fisk/instructions/roundpd.rb +42 -44
  482. data/lib/fisk/instructions/roundps.rb +42 -44
  483. data/lib/fisk/instructions/roundsd.rb +42 -44
  484. data/lib/fisk/instructions/roundss.rb +42 -44
  485. data/lib/fisk/instructions/rsqrtps.rb +34 -36
  486. data/lib/fisk/instructions/rsqrtss.rb +36 -38
  487. data/lib/fisk/instructions/sal.rb +376 -400
  488. data/lib/fisk/instructions/sar.rb +376 -400
  489. data/lib/fisk/instructions/sarx.rb +62 -66
  490. data/lib/fisk/instructions/sbb.rb +505 -539
  491. data/lib/fisk/instructions/seta.rb +34 -36
  492. data/lib/fisk/instructions/setae.rb +34 -36
  493. data/lib/fisk/instructions/setb.rb +34 -36
  494. data/lib/fisk/instructions/setbe.rb +34 -36
  495. data/lib/fisk/instructions/setc.rb +34 -36
  496. data/lib/fisk/instructions/sete.rb +34 -36
  497. data/lib/fisk/instructions/setg.rb +34 -36
  498. data/lib/fisk/instructions/setge.rb +34 -36
  499. data/lib/fisk/instructions/setl.rb +34 -36
  500. data/lib/fisk/instructions/setle.rb +34 -36
  501. data/lib/fisk/instructions/setna.rb +34 -36
  502. data/lib/fisk/instructions/setnae.rb +34 -36
  503. data/lib/fisk/instructions/setnb.rb +34 -36
  504. data/lib/fisk/instructions/setnbe.rb +34 -36
  505. data/lib/fisk/instructions/setnc.rb +34 -36
  506. data/lib/fisk/instructions/setne.rb +34 -36
  507. data/lib/fisk/instructions/setng.rb +34 -36
  508. data/lib/fisk/instructions/setnge.rb +34 -36
  509. data/lib/fisk/instructions/setnl.rb +34 -36
  510. data/lib/fisk/instructions/setnle.rb +34 -36
  511. data/lib/fisk/instructions/setno.rb +34 -36
  512. data/lib/fisk/instructions/setnp.rb +34 -36
  513. data/lib/fisk/instructions/setns.rb +34 -36
  514. data/lib/fisk/instructions/setnz.rb +34 -36
  515. data/lib/fisk/instructions/seto.rb +34 -36
  516. data/lib/fisk/instructions/setp.rb +34 -36
  517. data/lib/fisk/instructions/setpe.rb +34 -36
  518. data/lib/fisk/instructions/setpo.rb +34 -36
  519. data/lib/fisk/instructions/sets.rb +34 -36
  520. data/lib/fisk/instructions/setz.rb +34 -36
  521. data/lib/fisk/instructions/sfence.rb +13 -14
  522. data/lib/fisk/instructions/sha1msg1.rb +36 -38
  523. data/lib/fisk/instructions/sha1msg2.rb +36 -38
  524. data/lib/fisk/instructions/sha1nexte.rb +36 -38
  525. data/lib/fisk/instructions/sha1rnds4.rb +40 -42
  526. data/lib/fisk/instructions/sha256msg1.rb +36 -38
  527. data/lib/fisk/instructions/sha256msg2.rb +36 -38
  528. data/lib/fisk/instructions/sha256rnds2.rb +38 -40
  529. data/lib/fisk/instructions/shl.rb +376 -400
  530. data/lib/fisk/instructions/shld.rb +216 -228
  531. data/lib/fisk/instructions/shlx.rb +62 -66
  532. data/lib/fisk/instructions/shr.rb +376 -400
  533. data/lib/fisk/instructions/shrd.rb +216 -228
  534. data/lib/fisk/instructions/shrx.rb +62 -66
  535. data/lib/fisk/instructions/shufpd.rb +40 -42
  536. data/lib/fisk/instructions/shufps.rb +38 -40
  537. data/lib/fisk/instructions/sqrtpd.rb +36 -38
  538. data/lib/fisk/instructions/sqrtps.rb +34 -36
  539. data/lib/fisk/instructions/sqrtsd.rb +36 -38
  540. data/lib/fisk/instructions/sqrtss.rb +36 -38
  541. data/lib/fisk/instructions/stc.rb +11 -12
  542. data/lib/fisk/instructions/std.rb +11 -12
  543. data/lib/fisk/instructions/stmxcsr.rb +17 -18
  544. data/lib/fisk/instructions/sub.rb +505 -539
  545. data/lib/fisk/instructions/subpd.rb +36 -38
  546. data/lib/fisk/instructions/subps.rb +34 -36
  547. data/lib/fisk/instructions/subsd.rb +36 -38
  548. data/lib/fisk/instructions/subss.rb +36 -38
  549. data/lib/fisk/instructions/syscall.rb +12 -13
  550. data/lib/fisk/instructions/t1mskc.rb +58 -62
  551. data/lib/fisk/instructions/test.rb +305 -325
  552. data/lib/fisk/instructions/tzcnt.rb +106 -112
  553. data/lib/fisk/instructions/tzmsk.rb +58 -62
  554. data/lib/fisk/instructions/ucomisd.rb +36 -38
  555. data/lib/fisk/instructions/ucomiss.rb +34 -36
  556. data/lib/fisk/instructions/ud2.rb +12 -13
  557. data/lib/fisk/instructions/unpckhpd.rb +36 -38
  558. data/lib/fisk/instructions/unpckhps.rb +34 -36
  559. data/lib/fisk/instructions/unpcklpd.rb +36 -38
  560. data/lib/fisk/instructions/unpcklps.rb +34 -36
  561. data/lib/fisk/instructions/vaddpd.rb +153 -163
  562. data/lib/fisk/instructions/vaddps.rb +153 -163
  563. data/lib/fisk/instructions/vaddsd.rb +63 -67
  564. data/lib/fisk/instructions/vaddss.rb +63 -67
  565. data/lib/fisk/instructions/vaddsubpd.rb +62 -66
  566. data/lib/fisk/instructions/vaddsubps.rb +62 -66
  567. data/lib/fisk/instructions/vaesdec.rb +32 -34
  568. data/lib/fisk/instructions/vaesdeclast.rb +32 -34
  569. data/lib/fisk/instructions/vaesenc.rb +32 -34
  570. data/lib/fisk/instructions/vaesenclast.rb +32 -34
  571. data/lib/fisk/instructions/vaesimc.rb +30 -32
  572. data/lib/fisk/instructions/vaeskeygenassist.rb +34 -36
  573. data/lib/fisk/instructions/valignd.rb +104 -110
  574. data/lib/fisk/instructions/valignq.rb +104 -110
  575. data/lib/fisk/instructions/vandnpd.rb +152 -162
  576. data/lib/fisk/instructions/vandnps.rb +152 -162
  577. data/lib/fisk/instructions/vandpd.rb +152 -162
  578. data/lib/fisk/instructions/vandps.rb +152 -162
  579. data/lib/fisk/instructions/vblendmpd.rb +92 -98
  580. data/lib/fisk/instructions/vblendmps.rb +92 -98
  581. data/lib/fisk/instructions/vblendpd.rb +70 -74
  582. data/lib/fisk/instructions/vblendps.rb +70 -74
  583. data/lib/fisk/instructions/vblendvpd.rb +70 -74
  584. data/lib/fisk/instructions/vblendvps.rb +70 -74
  585. data/lib/fisk/instructions/vbroadcastf128.rb +16 -17
  586. data/lib/fisk/instructions/vbroadcastf32x2.rb +58 -62
  587. data/lib/fisk/instructions/vbroadcastf32x4.rb +30 -32
  588. data/lib/fisk/instructions/vbroadcastf32x8.rb +16 -17
  589. data/lib/fisk/instructions/vbroadcastf64x2.rb +30 -32
  590. data/lib/fisk/instructions/vbroadcastf64x4.rb +16 -17
  591. data/lib/fisk/instructions/vbroadcasti128.rb +16 -17
  592. data/lib/fisk/instructions/vbroadcasti32x2.rb +86 -92
  593. data/lib/fisk/instructions/vbroadcasti32x4.rb +30 -32
  594. data/lib/fisk/instructions/vbroadcasti32x8.rb +16 -17
  595. data/lib/fisk/instructions/vbroadcasti64x2.rb +30 -32
  596. data/lib/fisk/instructions/vbroadcasti64x4.rb +16 -17
  597. data/lib/fisk/instructions/vbroadcastsd.rb +86 -92
  598. data/lib/fisk/instructions/vbroadcastss.rb +114 -122
  599. data/lib/fisk/instructions/vcmppd.rb +173 -183
  600. data/lib/fisk/instructions/vcmpps.rb +173 -183
  601. data/lib/fisk/instructions/vcmpsd.rb +71 -75
  602. data/lib/fisk/instructions/vcmpss.rb +71 -75
  603. data/lib/fisk/instructions/vcomisd.rb +59 -63
  604. data/lib/fisk/instructions/vcomiss.rb +59 -63
  605. data/lib/fisk/instructions/vcompresspd.rb +86 -92
  606. data/lib/fisk/instructions/vcompressps.rb +86 -92
  607. data/lib/fisk/instructions/vcvtdq2pd.rb +142 -152
  608. data/lib/fisk/instructions/vcvtdq2ps.rb +143 -153
  609. data/lib/fisk/instructions/vcvtpd2dq.rb +143 -153
  610. data/lib/fisk/instructions/vcvtpd2ps.rb +143 -153
  611. data/lib/fisk/instructions/vcvtpd2qq.rb +87 -93
  612. data/lib/fisk/instructions/vcvtpd2udq.rb +87 -93
  613. data/lib/fisk/instructions/vcvtpd2uqq.rb +87 -93
  614. data/lib/fisk/instructions/vcvtph2ps.rb +143 -153
  615. data/lib/fisk/instructions/vcvtps2dq.rb +143 -153
  616. data/lib/fisk/instructions/vcvtps2pd.rb +143 -153
  617. data/lib/fisk/instructions/vcvtps2ph.rb +163 -173
  618. data/lib/fisk/instructions/vcvtps2qq.rb +87 -93
  619. data/lib/fisk/instructions/vcvtps2udq.rb +87 -93
  620. data/lib/fisk/instructions/vcvtps2uqq.rb +87 -93
  621. data/lib/fisk/instructions/vcvtqq2pd.rb +87 -93
  622. data/lib/fisk/instructions/vcvtqq2ps.rb +87 -93
  623. data/lib/fisk/instructions/vcvtsd2si.rb +116 -124
  624. data/lib/fisk/instructions/vcvtsd2ss.rb +63 -67
  625. data/lib/fisk/instructions/vcvtsd2usi.rb +60 -64
  626. data/lib/fisk/instructions/vcvtsi2sd.rb +123 -131
  627. data/lib/fisk/instructions/vcvtsi2ss.rb +124 -132
  628. data/lib/fisk/instructions/vcvtss2sd.rb +63 -67
  629. data/lib/fisk/instructions/vcvtss2si.rb +116 -124
  630. data/lib/fisk/instructions/vcvtss2usi.rb +60 -64
  631. data/lib/fisk/instructions/vcvttpd2dq.rb +143 -153
  632. data/lib/fisk/instructions/vcvttpd2qq.rb +87 -93
  633. data/lib/fisk/instructions/vcvttpd2udq.rb +87 -93
  634. data/lib/fisk/instructions/vcvttpd2uqq.rb +87 -93
  635. data/lib/fisk/instructions/vcvttps2dq.rb +143 -153
  636. data/lib/fisk/instructions/vcvttps2qq.rb +87 -93
  637. data/lib/fisk/instructions/vcvttps2udq.rb +87 -93
  638. data/lib/fisk/instructions/vcvttps2uqq.rb +87 -93
  639. data/lib/fisk/instructions/vcvttsd2si.rb +116 -124
  640. data/lib/fisk/instructions/vcvttsd2usi.rb +60 -64
  641. data/lib/fisk/instructions/vcvttss2si.rb +116 -124
  642. data/lib/fisk/instructions/vcvttss2usi.rb +60 -64
  643. data/lib/fisk/instructions/vcvtudq2pd.rb +86 -92
  644. data/lib/fisk/instructions/vcvtudq2ps.rb +87 -93
  645. data/lib/fisk/instructions/vcvtuqq2pd.rb +87 -93
  646. data/lib/fisk/instructions/vcvtuqq2ps.rb +87 -93
  647. data/lib/fisk/instructions/vcvtusi2sd.rb +63 -67
  648. data/lib/fisk/instructions/vcvtusi2ss.rb +64 -68
  649. data/lib/fisk/instructions/vdbpsadbw.rb +104 -110
  650. data/lib/fisk/instructions/vdivpd.rb +153 -163
  651. data/lib/fisk/instructions/vdivps.rb +153 -163
  652. data/lib/fisk/instructions/vdivsd.rb +63 -67
  653. data/lib/fisk/instructions/vdivss.rb +63 -67
  654. data/lib/fisk/instructions/vdppd.rb +36 -38
  655. data/lib/fisk/instructions/vdpps.rb +70 -74
  656. data/lib/fisk/instructions/vexp2pd.rb +31 -33
  657. data/lib/fisk/instructions/vexp2ps.rb +31 -33
  658. data/lib/fisk/instructions/vexpandpd.rb +86 -92
  659. data/lib/fisk/instructions/vexpandps.rb +86 -92
  660. data/lib/fisk/instructions/vextractf128.rb +34 -36
  661. data/lib/fisk/instructions/vextractf32x4.rb +66 -70
  662. data/lib/fisk/instructions/vextractf32x8.rb +34 -36
  663. data/lib/fisk/instructions/vextractf64x2.rb +66 -70
  664. data/lib/fisk/instructions/vextractf64x4.rb +34 -36
  665. data/lib/fisk/instructions/vextracti128.rb +34 -36
  666. data/lib/fisk/instructions/vextracti32x4.rb +66 -70
  667. data/lib/fisk/instructions/vextracti32x8.rb +34 -36
  668. data/lib/fisk/instructions/vextracti64x2.rb +66 -70
  669. data/lib/fisk/instructions/vextracti64x4.rb +34 -36
  670. data/lib/fisk/instructions/vextractps.rb +66 -70
  671. data/lib/fisk/instructions/vfixupimmpd.rb +105 -111
  672. data/lib/fisk/instructions/vfixupimmps.rb +105 -111
  673. data/lib/fisk/instructions/vfixupimmsd.rb +37 -39
  674. data/lib/fisk/instructions/vfixupimmss.rb +37 -39
  675. data/lib/fisk/instructions/vfmadd132pd.rb +153 -163
  676. data/lib/fisk/instructions/vfmadd132ps.rb +153 -163
  677. data/lib/fisk/instructions/vfmadd132sd.rb +63 -67
  678. data/lib/fisk/instructions/vfmadd132ss.rb +63 -67
  679. data/lib/fisk/instructions/vfmadd213pd.rb +153 -163
  680. data/lib/fisk/instructions/vfmadd213ps.rb +153 -163
  681. data/lib/fisk/instructions/vfmadd213sd.rb +63 -67
  682. data/lib/fisk/instructions/vfmadd213ss.rb +63 -67
  683. data/lib/fisk/instructions/vfmadd231pd.rb +153 -163
  684. data/lib/fisk/instructions/vfmadd231ps.rb +153 -163
  685. data/lib/fisk/instructions/vfmadd231sd.rb +63 -67
  686. data/lib/fisk/instructions/vfmadd231ss.rb +63 -67
  687. data/lib/fisk/instructions/vfmaddpd.rb +124 -132
  688. data/lib/fisk/instructions/vfmaddps.rb +124 -132
  689. data/lib/fisk/instructions/vfmaddsd.rb +63 -67
  690. data/lib/fisk/instructions/vfmaddss.rb +63 -67
  691. data/lib/fisk/instructions/vfmaddsub132pd.rb +153 -163
  692. data/lib/fisk/instructions/vfmaddsub132ps.rb +153 -163
  693. data/lib/fisk/instructions/vfmaddsub213pd.rb +153 -163
  694. data/lib/fisk/instructions/vfmaddsub213ps.rb +153 -163
  695. data/lib/fisk/instructions/vfmaddsub231pd.rb +153 -163
  696. data/lib/fisk/instructions/vfmaddsub231ps.rb +153 -163
  697. data/lib/fisk/instructions/vfmaddsubpd.rb +124 -132
  698. data/lib/fisk/instructions/vfmaddsubps.rb +124 -132
  699. data/lib/fisk/instructions/vfmsub132pd.rb +153 -163
  700. data/lib/fisk/instructions/vfmsub132ps.rb +153 -163
  701. data/lib/fisk/instructions/vfmsub132sd.rb +63 -67
  702. data/lib/fisk/instructions/vfmsub132ss.rb +63 -67
  703. data/lib/fisk/instructions/vfmsub213pd.rb +153 -163
  704. data/lib/fisk/instructions/vfmsub213ps.rb +153 -163
  705. data/lib/fisk/instructions/vfmsub213sd.rb +63 -67
  706. data/lib/fisk/instructions/vfmsub213ss.rb +63 -67
  707. data/lib/fisk/instructions/vfmsub231pd.rb +153 -163
  708. data/lib/fisk/instructions/vfmsub231ps.rb +153 -163
  709. data/lib/fisk/instructions/vfmsub231sd.rb +63 -67
  710. data/lib/fisk/instructions/vfmsub231ss.rb +63 -67
  711. data/lib/fisk/instructions/vfmsubadd132pd.rb +153 -163
  712. data/lib/fisk/instructions/vfmsubadd132ps.rb +153 -163
  713. data/lib/fisk/instructions/vfmsubadd213pd.rb +153 -163
  714. data/lib/fisk/instructions/vfmsubadd213ps.rb +153 -163
  715. data/lib/fisk/instructions/vfmsubadd231pd.rb +153 -163
  716. data/lib/fisk/instructions/vfmsubadd231ps.rb +153 -163
  717. data/lib/fisk/instructions/vfmsubaddpd.rb +124 -132
  718. data/lib/fisk/instructions/vfmsubaddps.rb +124 -132
  719. data/lib/fisk/instructions/vfmsubpd.rb +124 -132
  720. data/lib/fisk/instructions/vfmsubps.rb +124 -132
  721. data/lib/fisk/instructions/vfmsubsd.rb +63 -67
  722. data/lib/fisk/instructions/vfmsubss.rb +63 -67
  723. data/lib/fisk/instructions/vfnmadd132pd.rb +153 -163
  724. data/lib/fisk/instructions/vfnmadd132ps.rb +153 -163
  725. data/lib/fisk/instructions/vfnmadd132sd.rb +63 -67
  726. data/lib/fisk/instructions/vfnmadd132ss.rb +63 -67
  727. data/lib/fisk/instructions/vfnmadd213pd.rb +153 -163
  728. data/lib/fisk/instructions/vfnmadd213ps.rb +153 -163
  729. data/lib/fisk/instructions/vfnmadd213sd.rb +63 -67
  730. data/lib/fisk/instructions/vfnmadd213ss.rb +63 -67
  731. data/lib/fisk/instructions/vfnmadd231pd.rb +153 -163
  732. data/lib/fisk/instructions/vfnmadd231ps.rb +153 -163
  733. data/lib/fisk/instructions/vfnmadd231sd.rb +63 -67
  734. data/lib/fisk/instructions/vfnmadd231ss.rb +63 -67
  735. data/lib/fisk/instructions/vfnmaddpd.rb +124 -132
  736. data/lib/fisk/instructions/vfnmaddps.rb +124 -132
  737. data/lib/fisk/instructions/vfnmaddsd.rb +63 -67
  738. data/lib/fisk/instructions/vfnmaddss.rb +63 -67
  739. data/lib/fisk/instructions/vfnmsub132pd.rb +153 -163
  740. data/lib/fisk/instructions/vfnmsub132ps.rb +153 -163
  741. data/lib/fisk/instructions/vfnmsub132sd.rb +63 -67
  742. data/lib/fisk/instructions/vfnmsub132ss.rb +63 -67
  743. data/lib/fisk/instructions/vfnmsub213pd.rb +153 -163
  744. data/lib/fisk/instructions/vfnmsub213ps.rb +153 -163
  745. data/lib/fisk/instructions/vfnmsub213sd.rb +63 -67
  746. data/lib/fisk/instructions/vfnmsub213ss.rb +63 -67
  747. data/lib/fisk/instructions/vfnmsub231pd.rb +153 -163
  748. data/lib/fisk/instructions/vfnmsub231ps.rb +153 -163
  749. data/lib/fisk/instructions/vfnmsub231sd.rb +63 -67
  750. data/lib/fisk/instructions/vfnmsub231ss.rb +63 -67
  751. data/lib/fisk/instructions/vfnmsubpd.rb +124 -132
  752. data/lib/fisk/instructions/vfnmsubps.rb +124 -132
  753. data/lib/fisk/instructions/vfnmsubsd.rb +63 -67
  754. data/lib/fisk/instructions/vfnmsubss.rb +63 -67
  755. data/lib/fisk/instructions/vfpclasspd.rb +98 -104
  756. data/lib/fisk/instructions/vfpclassps.rb +98 -104
  757. data/lib/fisk/instructions/vfpclasssd.rb +34 -36
  758. data/lib/fisk/instructions/vfpclassss.rb +34 -36
  759. data/lib/fisk/instructions/vfrczpd.rb +58 -62
  760. data/lib/fisk/instructions/vfrczps.rb +58 -62
  761. data/lib/fisk/instructions/vfrczsd.rb +30 -32
  762. data/lib/fisk/instructions/vfrczss.rb +30 -32
  763. data/lib/fisk/instructions/vgatherdpd.rb +74 -79
  764. data/lib/fisk/instructions/vgatherdps.rb +74 -79
  765. data/lib/fisk/instructions/vgatherpf0dpd.rb +15 -16
  766. data/lib/fisk/instructions/vgatherpf0dps.rb +15 -16
  767. data/lib/fisk/instructions/vgatherpf0qpd.rb +15 -16
  768. data/lib/fisk/instructions/vgatherpf0qps.rb +15 -16
  769. data/lib/fisk/instructions/vgatherpf1dpd.rb +15 -16
  770. data/lib/fisk/instructions/vgatherpf1dps.rb +15 -16
  771. data/lib/fisk/instructions/vgatherpf1qpd.rb +15 -16
  772. data/lib/fisk/instructions/vgatherpf1qps.rb +15 -16
  773. data/lib/fisk/instructions/vgatherqpd.rb +74 -79
  774. data/lib/fisk/instructions/vgatherqps.rb +74 -79
  775. data/lib/fisk/instructions/vgetexppd.rb +87 -93
  776. data/lib/fisk/instructions/vgetexpps.rb +87 -93
  777. data/lib/fisk/instructions/vgetexpsd.rb +33 -35
  778. data/lib/fisk/instructions/vgetexpss.rb +33 -35
  779. data/lib/fisk/instructions/vgetmantpd.rb +99 -105
  780. data/lib/fisk/instructions/vgetmantps.rb +99 -105
  781. data/lib/fisk/instructions/vgetmantsd.rb +37 -39
  782. data/lib/fisk/instructions/vgetmantss.rb +37 -39
  783. data/lib/fisk/instructions/vhaddpd.rb +62 -66
  784. data/lib/fisk/instructions/vhaddps.rb +62 -66
  785. data/lib/fisk/instructions/vhsubpd.rb +62 -66
  786. data/lib/fisk/instructions/vhsubps.rb +62 -66
  787. data/lib/fisk/instructions/vinsertf128.rb +36 -38
  788. data/lib/fisk/instructions/vinsertf32x4.rb +70 -74
  789. data/lib/fisk/instructions/vinsertf32x8.rb +36 -38
  790. data/lib/fisk/instructions/vinsertf64x2.rb +70 -74
  791. data/lib/fisk/instructions/vinsertf64x4.rb +36 -38
  792. data/lib/fisk/instructions/vinserti128.rb +36 -38
  793. data/lib/fisk/instructions/vinserti32x4.rb +70 -74
  794. data/lib/fisk/instructions/vinserti32x8.rb +36 -38
  795. data/lib/fisk/instructions/vinserti64x2.rb +70 -74
  796. data/lib/fisk/instructions/vinserti64x4.rb +36 -38
  797. data/lib/fisk/instructions/vinsertps.rb +70 -74
  798. data/lib/fisk/instructions/vlddqu.rb +30 -32
  799. data/lib/fisk/instructions/vldmxcsr.rb +15 -16
  800. data/lib/fisk/instructions/vmaskmovdqu.rb +16 -17
  801. data/lib/fisk/instructions/vmaskmovpd.rb +62 -66
  802. data/lib/fisk/instructions/vmaskmovps.rb +62 -66
  803. data/lib/fisk/instructions/vmaxpd.rb +153 -163
  804. data/lib/fisk/instructions/vmaxps.rb +153 -163
  805. data/lib/fisk/instructions/vmaxsd.rb +63 -67
  806. data/lib/fisk/instructions/vmaxss.rb +63 -67
  807. data/lib/fisk/instructions/vminpd.rb +153 -163
  808. data/lib/fisk/instructions/vminps.rb +153 -163
  809. data/lib/fisk/instructions/vminsd.rb +63 -67
  810. data/lib/fisk/instructions/vminss.rb +63 -67
  811. data/lib/fisk/instructions/vmovapd.rb +257 -277
  812. data/lib/fisk/instructions/vmovaps.rb +257 -277
  813. data/lib/fisk/instructions/vmovd.rb +114 -122
  814. data/lib/fisk/instructions/vmovddup.rb +142 -152
  815. data/lib/fisk/instructions/vmovdqa.rb +104 -112
  816. data/lib/fisk/instructions/vmovdqa32.rb +155 -167
  817. data/lib/fisk/instructions/vmovdqa64.rb +155 -167
  818. data/lib/fisk/instructions/vmovdqu.rb +104 -112
  819. data/lib/fisk/instructions/vmovdqu16.rb +155 -167
  820. data/lib/fisk/instructions/vmovdqu32.rb +155 -167
  821. data/lib/fisk/instructions/vmovdqu64.rb +155 -167
  822. data/lib/fisk/instructions/vmovdqu8.rb +155 -167
  823. data/lib/fisk/instructions/vmovhlps.rb +32 -34
  824. data/lib/fisk/instructions/vmovhpd.rb +60 -64
  825. data/lib/fisk/instructions/vmovhps.rb +60 -64
  826. data/lib/fisk/instructions/vmovlhps.rb +32 -34
  827. data/lib/fisk/instructions/vmovlpd.rb +60 -64
  828. data/lib/fisk/instructions/vmovlps.rb +60 -64
  829. data/lib/fisk/instructions/vmovmskpd.rb +30 -32
  830. data/lib/fisk/instructions/vmovmskps.rb +30 -32
  831. data/lib/fisk/instructions/vmovntdq.rb +72 -77
  832. data/lib/fisk/instructions/vmovntdqa.rb +72 -77
  833. data/lib/fisk/instructions/vmovntpd.rb +72 -77
  834. data/lib/fisk/instructions/vmovntps.rb +72 -77
  835. data/lib/fisk/instructions/vmovq.rb +196 -212
  836. data/lib/fisk/instructions/vmovsd.rb +106 -114
  837. data/lib/fisk/instructions/vmovshdup.rb +142 -152
  838. data/lib/fisk/instructions/vmovsldup.rb +142 -152
  839. data/lib/fisk/instructions/vmovss.rb +106 -114
  840. data/lib/fisk/instructions/vmovupd.rb +257 -277
  841. data/lib/fisk/instructions/vmovups.rb +257 -277
  842. data/lib/fisk/instructions/vmpsadbw.rb +70 -74
  843. data/lib/fisk/instructions/vmulpd.rb +153 -163
  844. data/lib/fisk/instructions/vmulps.rb +153 -163
  845. data/lib/fisk/instructions/vmulsd.rb +63 -67
  846. data/lib/fisk/instructions/vmulss.rb +63 -67
  847. data/lib/fisk/instructions/vorpd.rb +152 -162
  848. data/lib/fisk/instructions/vorps.rb +152 -162
  849. data/lib/fisk/instructions/vpabsb.rb +142 -152
  850. data/lib/fisk/instructions/vpabsd.rb +142 -152
  851. data/lib/fisk/instructions/vpabsq.rb +86 -92
  852. data/lib/fisk/instructions/vpabsw.rb +142 -152
  853. data/lib/fisk/instructions/vpackssdw.rb +152 -162
  854. data/lib/fisk/instructions/vpacksswb.rb +152 -162
  855. data/lib/fisk/instructions/vpackusdw.rb +152 -162
  856. data/lib/fisk/instructions/vpackuswb.rb +152 -162
  857. data/lib/fisk/instructions/vpaddb.rb +152 -162
  858. data/lib/fisk/instructions/vpaddd.rb +152 -162
  859. data/lib/fisk/instructions/vpaddq.rb +152 -162
  860. data/lib/fisk/instructions/vpaddsb.rb +152 -162
  861. data/lib/fisk/instructions/vpaddsw.rb +152 -162
  862. data/lib/fisk/instructions/vpaddusb.rb +152 -162
  863. data/lib/fisk/instructions/vpaddusw.rb +152 -162
  864. data/lib/fisk/instructions/vpaddw.rb +152 -162
  865. data/lib/fisk/instructions/vpalignr.rb +172 -182
  866. data/lib/fisk/instructions/vpand.rb +62 -66
  867. data/lib/fisk/instructions/vpandd.rb +92 -98
  868. data/lib/fisk/instructions/vpandn.rb +62 -66
  869. data/lib/fisk/instructions/vpandnd.rb +92 -98
  870. data/lib/fisk/instructions/vpandnq.rb +92 -98
  871. data/lib/fisk/instructions/vpandq.rb +92 -98
  872. data/lib/fisk/instructions/vpavgb.rb +152 -162
  873. data/lib/fisk/instructions/vpavgw.rb +152 -162
  874. data/lib/fisk/instructions/vpblendd.rb +70 -74
  875. data/lib/fisk/instructions/vpblendmb.rb +92 -98
  876. data/lib/fisk/instructions/vpblendmd.rb +92 -98
  877. data/lib/fisk/instructions/vpblendmq.rb +92 -98
  878. data/lib/fisk/instructions/vpblendmw.rb +92 -98
  879. data/lib/fisk/instructions/vpblendvb.rb +70 -74
  880. data/lib/fisk/instructions/vpblendw.rb +70 -74
  881. data/lib/fisk/instructions/vpbroadcastb.rb +184 -197
  882. data/lib/fisk/instructions/vpbroadcastd.rb +184 -197
  883. data/lib/fisk/instructions/vpbroadcastmb2q.rb +44 -47
  884. data/lib/fisk/instructions/vpbroadcastmw2d.rb +44 -47
  885. data/lib/fisk/instructions/vpbroadcastq.rb +184 -197
  886. data/lib/fisk/instructions/vpbroadcastw.rb +184 -197
  887. data/lib/fisk/instructions/vpclmulqdq.rb +36 -38
  888. data/lib/fisk/instructions/vpcmov.rb +124 -132
  889. data/lib/fisk/instructions/vpcmpb.rb +104 -110
  890. data/lib/fisk/instructions/vpcmpd.rb +104 -110
  891. data/lib/fisk/instructions/vpcmpeqb.rb +152 -162
  892. data/lib/fisk/instructions/vpcmpeqd.rb +152 -162
  893. data/lib/fisk/instructions/vpcmpeqq.rb +152 -162
  894. data/lib/fisk/instructions/vpcmpeqw.rb +152 -162
  895. data/lib/fisk/instructions/vpcmpestri.rb +34 -36
  896. data/lib/fisk/instructions/vpcmpestrm.rb +34 -36
  897. data/lib/fisk/instructions/vpcmpgtb.rb +152 -162
  898. data/lib/fisk/instructions/vpcmpgtd.rb +152 -162
  899. data/lib/fisk/instructions/vpcmpgtq.rb +152 -162
  900. data/lib/fisk/instructions/vpcmpgtw.rb +152 -162
  901. data/lib/fisk/instructions/vpcmpistri.rb +34 -36
  902. data/lib/fisk/instructions/vpcmpistrm.rb +34 -36
  903. data/lib/fisk/instructions/vpcmpq.rb +104 -110
  904. data/lib/fisk/instructions/vpcmpub.rb +104 -110
  905. data/lib/fisk/instructions/vpcmpud.rb +104 -110
  906. data/lib/fisk/instructions/vpcmpuq.rb +104 -110
  907. data/lib/fisk/instructions/vpcmpuw.rb +104 -110
  908. data/lib/fisk/instructions/vpcmpw.rb +104 -110
  909. data/lib/fisk/instructions/vpcomb.rb +36 -38
  910. data/lib/fisk/instructions/vpcomd.rb +36 -38
  911. data/lib/fisk/instructions/vpcompressd.rb +86 -92
  912. data/lib/fisk/instructions/vpcompressq.rb +86 -92
  913. data/lib/fisk/instructions/vpcomq.rb +36 -38
  914. data/lib/fisk/instructions/vpcomub.rb +36 -38
  915. data/lib/fisk/instructions/vpcomud.rb +36 -38
  916. data/lib/fisk/instructions/vpcomuq.rb +36 -38
  917. data/lib/fisk/instructions/vpcomuw.rb +36 -38
  918. data/lib/fisk/instructions/vpcomw.rb +36 -38
  919. data/lib/fisk/instructions/vpconflictd.rb +86 -92
  920. data/lib/fisk/instructions/vpconflictq.rb +86 -92
  921. data/lib/fisk/instructions/vperm2f128.rb +36 -38
  922. data/lib/fisk/instructions/vperm2i128.rb +36 -38
  923. data/lib/fisk/instructions/vpermb.rb +92 -98
  924. data/lib/fisk/instructions/vpermd.rb +92 -98
  925. data/lib/fisk/instructions/vpermi2b.rb +92 -98
  926. data/lib/fisk/instructions/vpermi2d.rb +92 -98
  927. data/lib/fisk/instructions/vpermi2pd.rb +92 -98
  928. data/lib/fisk/instructions/vpermi2ps.rb +92 -98
  929. data/lib/fisk/instructions/vpermi2q.rb +92 -98
  930. data/lib/fisk/instructions/vpermi2w.rb +92 -98
  931. data/lib/fisk/instructions/vpermil2pd.rb +130 -138
  932. data/lib/fisk/instructions/vpermil2ps.rb +130 -138
  933. data/lib/fisk/instructions/vpermilpd.rb +312 -332
  934. data/lib/fisk/instructions/vpermilps.rb +312 -332
  935. data/lib/fisk/instructions/vpermpd.rb +158 -168
  936. data/lib/fisk/instructions/vpermps.rb +92 -98
  937. data/lib/fisk/instructions/vpermq.rb +158 -168
  938. data/lib/fisk/instructions/vpermt2b.rb +92 -98
  939. data/lib/fisk/instructions/vpermt2d.rb +92 -98
  940. data/lib/fisk/instructions/vpermt2pd.rb +92 -98
  941. data/lib/fisk/instructions/vpermt2ps.rb +92 -98
  942. data/lib/fisk/instructions/vpermt2q.rb +92 -98
  943. data/lib/fisk/instructions/vpermt2w.rb +92 -98
  944. data/lib/fisk/instructions/vpermw.rb +92 -98
  945. data/lib/fisk/instructions/vpexpandd.rb +86 -92
  946. data/lib/fisk/instructions/vpexpandq.rb +86 -92
  947. data/lib/fisk/instructions/vpextrb.rb +66 -70
  948. data/lib/fisk/instructions/vpextrd.rb +66 -70
  949. data/lib/fisk/instructions/vpextrq.rb +66 -70
  950. data/lib/fisk/instructions/vpextrw.rb +86 -92
  951. data/lib/fisk/instructions/vpgatherdd.rb +74 -79
  952. data/lib/fisk/instructions/vpgatherdq.rb +74 -79
  953. data/lib/fisk/instructions/vpgatherqd.rb +74 -79
  954. data/lib/fisk/instructions/vpgatherqq.rb +74 -79
  955. data/lib/fisk/instructions/vphaddbd.rb +30 -32
  956. data/lib/fisk/instructions/vphaddbq.rb +30 -32
  957. data/lib/fisk/instructions/vphaddbw.rb +30 -32
  958. data/lib/fisk/instructions/vphaddd.rb +62 -66
  959. data/lib/fisk/instructions/vphadddq.rb +30 -32
  960. data/lib/fisk/instructions/vphaddsw.rb +62 -66
  961. data/lib/fisk/instructions/vphaddubd.rb +30 -32
  962. data/lib/fisk/instructions/vphaddubq.rb +30 -32
  963. data/lib/fisk/instructions/vphaddubw.rb +30 -32
  964. data/lib/fisk/instructions/vphaddudq.rb +30 -32
  965. data/lib/fisk/instructions/vphadduwd.rb +30 -32
  966. data/lib/fisk/instructions/vphadduwq.rb +30 -32
  967. data/lib/fisk/instructions/vphaddw.rb +62 -66
  968. data/lib/fisk/instructions/vphaddwd.rb +30 -32
  969. data/lib/fisk/instructions/vphaddwq.rb +30 -32
  970. data/lib/fisk/instructions/vphminposuw.rb +30 -32
  971. data/lib/fisk/instructions/vphsubbw.rb +30 -32
  972. data/lib/fisk/instructions/vphsubd.rb +62 -66
  973. data/lib/fisk/instructions/vphsubdq.rb +30 -32
  974. data/lib/fisk/instructions/vphsubsw.rb +62 -66
  975. data/lib/fisk/instructions/vphsubw.rb +62 -66
  976. data/lib/fisk/instructions/vphsubwd.rb +30 -32
  977. data/lib/fisk/instructions/vpinsrb.rb +70 -74
  978. data/lib/fisk/instructions/vpinsrd.rb +70 -74
  979. data/lib/fisk/instructions/vpinsrq.rb +70 -74
  980. data/lib/fisk/instructions/vpinsrw.rb +70 -74
  981. data/lib/fisk/instructions/vplzcntd.rb +86 -92
  982. data/lib/fisk/instructions/vplzcntq.rb +86 -92
  983. data/lib/fisk/instructions/vpmacsdd.rb +36 -38
  984. data/lib/fisk/instructions/vpmacsdqh.rb +36 -38
  985. data/lib/fisk/instructions/vpmacsdql.rb +36 -38
  986. data/lib/fisk/instructions/vpmacssdd.rb +36 -38
  987. data/lib/fisk/instructions/vpmacssdqh.rb +36 -38
  988. data/lib/fisk/instructions/vpmacssdql.rb +36 -38
  989. data/lib/fisk/instructions/vpmacsswd.rb +36 -38
  990. data/lib/fisk/instructions/vpmacssww.rb +36 -38
  991. data/lib/fisk/instructions/vpmacswd.rb +36 -38
  992. data/lib/fisk/instructions/vpmacsww.rb +36 -38
  993. data/lib/fisk/instructions/vpmadcsswd.rb +36 -38
  994. data/lib/fisk/instructions/vpmadcswd.rb +36 -38
  995. data/lib/fisk/instructions/vpmadd52huq.rb +92 -98
  996. data/lib/fisk/instructions/vpmadd52luq.rb +92 -98
  997. data/lib/fisk/instructions/vpmaddubsw.rb +152 -162
  998. data/lib/fisk/instructions/vpmaddwd.rb +152 -162
  999. data/lib/fisk/instructions/vpmaskmovd.rb +62 -66
  1000. data/lib/fisk/instructions/vpmaskmovq.rb +62 -66
  1001. data/lib/fisk/instructions/vpmaxsb.rb +152 -162
  1002. data/lib/fisk/instructions/vpmaxsd.rb +152 -162
  1003. data/lib/fisk/instructions/vpmaxsq.rb +92 -98
  1004. data/lib/fisk/instructions/vpmaxsw.rb +152 -162
  1005. data/lib/fisk/instructions/vpmaxub.rb +152 -162
  1006. data/lib/fisk/instructions/vpmaxud.rb +152 -162
  1007. data/lib/fisk/instructions/vpmaxuq.rb +92 -98
  1008. data/lib/fisk/instructions/vpmaxuw.rb +152 -162
  1009. data/lib/fisk/instructions/vpminsb.rb +152 -162
  1010. data/lib/fisk/instructions/vpminsd.rb +152 -162
  1011. data/lib/fisk/instructions/vpminsq.rb +92 -98
  1012. data/lib/fisk/instructions/vpminsw.rb +152 -162
  1013. data/lib/fisk/instructions/vpminub.rb +152 -162
  1014. data/lib/fisk/instructions/vpminud.rb +152 -162
  1015. data/lib/fisk/instructions/vpminuq.rb +92 -98
  1016. data/lib/fisk/instructions/vpminuw.rb +152 -162
  1017. data/lib/fisk/instructions/vpmovb2m.rb +44 -47
  1018. data/lib/fisk/instructions/vpmovd2m.rb +44 -47
  1019. data/lib/fisk/instructions/vpmovdb.rb +86 -92
  1020. data/lib/fisk/instructions/vpmovdw.rb +86 -92
  1021. data/lib/fisk/instructions/vpmovm2b.rb +44 -47
  1022. data/lib/fisk/instructions/vpmovm2d.rb +44 -47
  1023. data/lib/fisk/instructions/vpmovm2q.rb +44 -47
  1024. data/lib/fisk/instructions/vpmovm2w.rb +44 -47
  1025. data/lib/fisk/instructions/vpmovmskb.rb +30 -32
  1026. data/lib/fisk/instructions/vpmovq2m.rb +44 -47
  1027. data/lib/fisk/instructions/vpmovqb.rb +86 -92
  1028. data/lib/fisk/instructions/vpmovqd.rb +86 -92
  1029. data/lib/fisk/instructions/vpmovqw.rb +86 -92
  1030. data/lib/fisk/instructions/vpmovsdb.rb +86 -92
  1031. data/lib/fisk/instructions/vpmovsdw.rb +86 -92
  1032. data/lib/fisk/instructions/vpmovsqb.rb +86 -92
  1033. data/lib/fisk/instructions/vpmovsqd.rb +86 -92
  1034. data/lib/fisk/instructions/vpmovsqw.rb +86 -92
  1035. data/lib/fisk/instructions/vpmovswb.rb +86 -92
  1036. data/lib/fisk/instructions/vpmovsxbd.rb +142 -152
  1037. data/lib/fisk/instructions/vpmovsxbq.rb +142 -152
  1038. data/lib/fisk/instructions/vpmovsxbw.rb +142 -152
  1039. data/lib/fisk/instructions/vpmovsxdq.rb +142 -152
  1040. data/lib/fisk/instructions/vpmovsxwd.rb +142 -152
  1041. data/lib/fisk/instructions/vpmovsxwq.rb +142 -152
  1042. data/lib/fisk/instructions/vpmovusdb.rb +86 -92
  1043. data/lib/fisk/instructions/vpmovusdw.rb +86 -92
  1044. data/lib/fisk/instructions/vpmovusqb.rb +86 -92
  1045. data/lib/fisk/instructions/vpmovusqd.rb +86 -92
  1046. data/lib/fisk/instructions/vpmovusqw.rb +86 -92
  1047. data/lib/fisk/instructions/vpmovuswb.rb +86 -92
  1048. data/lib/fisk/instructions/vpmovw2m.rb +44 -47
  1049. data/lib/fisk/instructions/vpmovwb.rb +86 -92
  1050. data/lib/fisk/instructions/vpmovzxbd.rb +142 -152
  1051. data/lib/fisk/instructions/vpmovzxbq.rb +142 -152
  1052. data/lib/fisk/instructions/vpmovzxbw.rb +142 -152
  1053. data/lib/fisk/instructions/vpmovzxdq.rb +142 -152
  1054. data/lib/fisk/instructions/vpmovzxwd.rb +142 -152
  1055. data/lib/fisk/instructions/vpmovzxwq.rb +142 -152
  1056. data/lib/fisk/instructions/vpmuldq.rb +152 -162
  1057. data/lib/fisk/instructions/vpmulhrsw.rb +152 -162
  1058. data/lib/fisk/instructions/vpmulhuw.rb +152 -162
  1059. data/lib/fisk/instructions/vpmulhw.rb +152 -162
  1060. data/lib/fisk/instructions/vpmulld.rb +152 -162
  1061. data/lib/fisk/instructions/vpmullq.rb +92 -98
  1062. data/lib/fisk/instructions/vpmullw.rb +152 -162
  1063. data/lib/fisk/instructions/vpmultishiftqb.rb +92 -98
  1064. data/lib/fisk/instructions/vpmuludq.rb +152 -162
  1065. data/lib/fisk/instructions/vpopcntd.rb +30 -32
  1066. data/lib/fisk/instructions/vpopcntq.rb +30 -32
  1067. data/lib/fisk/instructions/vpor.rb +62 -66
  1068. data/lib/fisk/instructions/vpord.rb +92 -98
  1069. data/lib/fisk/instructions/vporq.rb +92 -98
  1070. data/lib/fisk/instructions/vpperm.rb +63 -67
  1071. data/lib/fisk/instructions/vprold.rb +98 -104
  1072. data/lib/fisk/instructions/vprolq.rb +98 -104
  1073. data/lib/fisk/instructions/vprolvd.rb +92 -98
  1074. data/lib/fisk/instructions/vprolvq.rb +92 -98
  1075. data/lib/fisk/instructions/vprord.rb +98 -104
  1076. data/lib/fisk/instructions/vprorq.rb +98 -104
  1077. data/lib/fisk/instructions/vprorvd.rb +92 -98
  1078. data/lib/fisk/instructions/vprorvq.rb +92 -98
  1079. data/lib/fisk/instructions/vprotb.rb +88 -94
  1080. data/lib/fisk/instructions/vprotd.rb +88 -94
  1081. data/lib/fisk/instructions/vprotq.rb +88 -94
  1082. data/lib/fisk/instructions/vprotw.rb +88 -94
  1083. data/lib/fisk/instructions/vpsadbw.rb +152 -162
  1084. data/lib/fisk/instructions/vpscatterdd.rb +44 -47
  1085. data/lib/fisk/instructions/vpscatterdq.rb +44 -47
  1086. data/lib/fisk/instructions/vpscatterqd.rb +44 -47
  1087. data/lib/fisk/instructions/vpscatterqq.rb +44 -47
  1088. data/lib/fisk/instructions/vpshab.rb +56 -60
  1089. data/lib/fisk/instructions/vpshad.rb +56 -60
  1090. data/lib/fisk/instructions/vpshaq.rb +56 -60
  1091. data/lib/fisk/instructions/vpshaw.rb +56 -60
  1092. data/lib/fisk/instructions/vpshlb.rb +56 -60
  1093. data/lib/fisk/instructions/vpshld.rb +56 -60
  1094. data/lib/fisk/instructions/vpshlq.rb +56 -60
  1095. data/lib/fisk/instructions/vpshlw.rb +56 -60
  1096. data/lib/fisk/instructions/vpshufb.rb +152 -162
  1097. data/lib/fisk/instructions/vpshufd.rb +162 -172
  1098. data/lib/fisk/instructions/vpshufhw.rb +162 -172
  1099. data/lib/fisk/instructions/vpshuflw.rb +162 -172
  1100. data/lib/fisk/instructions/vpsignb.rb +62 -66
  1101. data/lib/fisk/instructions/vpsignd.rb +62 -66
  1102. data/lib/fisk/instructions/vpsignw.rb +62 -66
  1103. data/lib/fisk/instructions/vpslld.rb +280 -298
  1104. data/lib/fisk/instructions/vpslldq.rb +130 -138
  1105. data/lib/fisk/instructions/vpsllq.rb +280 -298
  1106. data/lib/fisk/instructions/vpsllvd.rb +152 -162
  1107. data/lib/fisk/instructions/vpsllvq.rb +152 -162
  1108. data/lib/fisk/instructions/vpsllvw.rb +92 -98
  1109. data/lib/fisk/instructions/vpsllw.rb +280 -298
  1110. data/lib/fisk/instructions/vpsrad.rb +280 -298
  1111. data/lib/fisk/instructions/vpsraq.rb +188 -200
  1112. data/lib/fisk/instructions/vpsravd.rb +152 -162
  1113. data/lib/fisk/instructions/vpsravq.rb +92 -98
  1114. data/lib/fisk/instructions/vpsravw.rb +92 -98
  1115. data/lib/fisk/instructions/vpsraw.rb +280 -298
  1116. data/lib/fisk/instructions/vpsrld.rb +280 -298
  1117. data/lib/fisk/instructions/vpsrldq.rb +130 -138
  1118. data/lib/fisk/instructions/vpsrlq.rb +280 -298
  1119. data/lib/fisk/instructions/vpsrlvd.rb +152 -162
  1120. data/lib/fisk/instructions/vpsrlvq.rb +152 -162
  1121. data/lib/fisk/instructions/vpsrlvw.rb +92 -98
  1122. data/lib/fisk/instructions/vpsrlw.rb +280 -298
  1123. data/lib/fisk/instructions/vpsubb.rb +152 -162
  1124. data/lib/fisk/instructions/vpsubd.rb +152 -162
  1125. data/lib/fisk/instructions/vpsubq.rb +152 -162
  1126. data/lib/fisk/instructions/vpsubsb.rb +152 -162
  1127. data/lib/fisk/instructions/vpsubsw.rb +152 -162
  1128. data/lib/fisk/instructions/vpsubusb.rb +152 -162
  1129. data/lib/fisk/instructions/vpsubusw.rb +152 -162
  1130. data/lib/fisk/instructions/vpsubw.rb +152 -162
  1131. data/lib/fisk/instructions/vpternlogd.rb +104 -110
  1132. data/lib/fisk/instructions/vpternlogq.rb +104 -110
  1133. data/lib/fisk/instructions/vptest.rb +58 -62
  1134. data/lib/fisk/instructions/vptestmb.rb +92 -98
  1135. data/lib/fisk/instructions/vptestmd.rb +92 -98
  1136. data/lib/fisk/instructions/vptestmq.rb +92 -98
  1137. data/lib/fisk/instructions/vptestmw.rb +92 -98
  1138. data/lib/fisk/instructions/vptestnmb.rb +92 -98
  1139. data/lib/fisk/instructions/vptestnmd.rb +92 -98
  1140. data/lib/fisk/instructions/vptestnmq.rb +92 -98
  1141. data/lib/fisk/instructions/vptestnmw.rb +92 -98
  1142. data/lib/fisk/instructions/vpunpckhbw.rb +152 -162
  1143. data/lib/fisk/instructions/vpunpckhdq.rb +152 -162
  1144. data/lib/fisk/instructions/vpunpckhqdq.rb +152 -162
  1145. data/lib/fisk/instructions/vpunpckhwd.rb +152 -162
  1146. data/lib/fisk/instructions/vpunpcklbw.rb +152 -162
  1147. data/lib/fisk/instructions/vpunpckldq.rb +152 -162
  1148. data/lib/fisk/instructions/vpunpcklqdq.rb +152 -162
  1149. data/lib/fisk/instructions/vpunpcklwd.rb +152 -162
  1150. data/lib/fisk/instructions/vpxor.rb +62 -66
  1151. data/lib/fisk/instructions/vpxord.rb +92 -98
  1152. data/lib/fisk/instructions/vpxorq.rb +92 -98
  1153. data/lib/fisk/instructions/vrangepd.rb +105 -111
  1154. data/lib/fisk/instructions/vrangeps.rb +105 -111
  1155. data/lib/fisk/instructions/vrangesd.rb +37 -39
  1156. data/lib/fisk/instructions/vrangess.rb +37 -39
  1157. data/lib/fisk/instructions/vrcp14pd.rb +86 -92
  1158. data/lib/fisk/instructions/vrcp14ps.rb +86 -92
  1159. data/lib/fisk/instructions/vrcp14sd.rb +32 -34
  1160. data/lib/fisk/instructions/vrcp14ss.rb +32 -34
  1161. data/lib/fisk/instructions/vrcp28pd.rb +31 -33
  1162. data/lib/fisk/instructions/vrcp28ps.rb +31 -33
  1163. data/lib/fisk/instructions/vrcp28sd.rb +33 -35
  1164. data/lib/fisk/instructions/vrcp28ss.rb +33 -35
  1165. data/lib/fisk/instructions/vrcpps.rb +58 -62
  1166. data/lib/fisk/instructions/vrcpss.rb +32 -34
  1167. data/lib/fisk/instructions/vreducepd.rb +98 -104
  1168. data/lib/fisk/instructions/vreduceps.rb +98 -104
  1169. data/lib/fisk/instructions/vreducesd.rb +36 -38
  1170. data/lib/fisk/instructions/vreducess.rb +36 -38
  1171. data/lib/fisk/instructions/vrndscalepd.rb +99 -105
  1172. data/lib/fisk/instructions/vrndscaleps.rb +99 -105
  1173. data/lib/fisk/instructions/vrndscalesd.rb +37 -39
  1174. data/lib/fisk/instructions/vrndscaless.rb +37 -39
  1175. data/lib/fisk/instructions/vroundpd.rb +66 -70
  1176. data/lib/fisk/instructions/vroundps.rb +66 -70
  1177. data/lib/fisk/instructions/vroundsd.rb +36 -38
  1178. data/lib/fisk/instructions/vroundss.rb +36 -38
  1179. data/lib/fisk/instructions/vrsqrt14pd.rb +86 -92
  1180. data/lib/fisk/instructions/vrsqrt14ps.rb +86 -92
  1181. data/lib/fisk/instructions/vrsqrt14sd.rb +32 -34
  1182. data/lib/fisk/instructions/vrsqrt14ss.rb +32 -34
  1183. data/lib/fisk/instructions/vrsqrt28pd.rb +31 -33
  1184. data/lib/fisk/instructions/vrsqrt28ps.rb +31 -33
  1185. data/lib/fisk/instructions/vrsqrt28sd.rb +33 -35
  1186. data/lib/fisk/instructions/vrsqrt28ss.rb +33 -35
  1187. data/lib/fisk/instructions/vrsqrtps.rb +58 -62
  1188. data/lib/fisk/instructions/vrsqrtss.rb +32 -34
  1189. data/lib/fisk/instructions/vscalefpd.rb +93 -99
  1190. data/lib/fisk/instructions/vscalefps.rb +93 -99
  1191. data/lib/fisk/instructions/vscalefsd.rb +33 -35
  1192. data/lib/fisk/instructions/vscalefss.rb +33 -35
  1193. data/lib/fisk/instructions/vscatterdpd.rb +44 -47
  1194. data/lib/fisk/instructions/vscatterdps.rb +44 -47
  1195. data/lib/fisk/instructions/vscatterpf0dpd.rb +15 -16
  1196. data/lib/fisk/instructions/vscatterpf0dps.rb +15 -16
  1197. data/lib/fisk/instructions/vscatterpf0qpd.rb +15 -16
  1198. data/lib/fisk/instructions/vscatterpf0qps.rb +15 -16
  1199. data/lib/fisk/instructions/vscatterpf1dpd.rb +15 -16
  1200. data/lib/fisk/instructions/vscatterpf1dps.rb +15 -16
  1201. data/lib/fisk/instructions/vscatterpf1qpd.rb +15 -16
  1202. data/lib/fisk/instructions/vscatterpf1qps.rb +15 -16
  1203. data/lib/fisk/instructions/vscatterqpd.rb +44 -47
  1204. data/lib/fisk/instructions/vscatterqps.rb +44 -47
  1205. data/lib/fisk/instructions/vshuff32x4.rb +70 -74
  1206. data/lib/fisk/instructions/vshuff64x2.rb +70 -74
  1207. data/lib/fisk/instructions/vshufi32x4.rb +70 -74
  1208. data/lib/fisk/instructions/vshufi64x2.rb +70 -74
  1209. data/lib/fisk/instructions/vshufpd.rb +172 -182
  1210. data/lib/fisk/instructions/vshufps.rb +172 -182
  1211. data/lib/fisk/instructions/vsqrtpd.rb +143 -153
  1212. data/lib/fisk/instructions/vsqrtps.rb +143 -153
  1213. data/lib/fisk/instructions/vsqrtsd.rb +63 -67
  1214. data/lib/fisk/instructions/vsqrtss.rb +63 -67
  1215. data/lib/fisk/instructions/vstmxcsr.rb +15 -16
  1216. data/lib/fisk/instructions/vsubpd.rb +153 -163
  1217. data/lib/fisk/instructions/vsubps.rb +153 -163
  1218. data/lib/fisk/instructions/vsubsd.rb +63 -67
  1219. data/lib/fisk/instructions/vsubss.rb +63 -67
  1220. data/lib/fisk/instructions/vtestpd.rb +58 -62
  1221. data/lib/fisk/instructions/vtestps.rb +58 -62
  1222. data/lib/fisk/instructions/vucomisd.rb +59 -63
  1223. data/lib/fisk/instructions/vucomiss.rb +59 -63
  1224. data/lib/fisk/instructions/vunpckhpd.rb +152 -162
  1225. data/lib/fisk/instructions/vunpckhps.rb +152 -162
  1226. data/lib/fisk/instructions/vunpcklpd.rb +152 -162
  1227. data/lib/fisk/instructions/vunpcklps.rb +152 -162
  1228. data/lib/fisk/instructions/vxorpd.rb +152 -162
  1229. data/lib/fisk/instructions/vxorps.rb +152 -162
  1230. data/lib/fisk/instructions/vzeroall.rb +12 -13
  1231. data/lib/fisk/instructions/vzeroupper.rb +12 -13
  1232. data/lib/fisk/instructions/xadd.rb +132 -140
  1233. data/lib/fisk/instructions/xchg.rb +306 -328
  1234. data/lib/fisk/instructions/xgetbv.rb +13 -14
  1235. data/lib/fisk/instructions/xlatb.rb +22 -24
  1236. data/lib/fisk/instructions/xor.rb +505 -539
  1237. data/lib/fisk/instructions/xorpd.rb +36 -38
  1238. data/lib/fisk/instructions/xorps.rb +34 -36
  1239. data/lib/fisk/version.rb +1 -1
  1240. data/test/test_cfg.rb +1 -2
  1241. data/test/test_fisk.rb +228 -0
  1242. data/test/test_fisk_written_size.rb +21 -0
  1243. data/test/test_register_allocation.rb +19 -0
  1244. data/test/test_run_fisk.rb +16 -0
  1245. metadata +63 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42d5818c354d7ee2347266ca997e314615a23f832687a30dc05578a2e92b6310
4
- data.tar.gz: '06428fa873eed75d9ee07bdedd1fa848a51dfaa826dd38ce661c6b267509e3a8'
3
+ metadata.gz: bd9dadadf62c43af7898876779ad80e10ab4883cd69ea599b02631efb068e817
4
+ data.tar.gz: abf1ec8a5b3e61e5fc45abe9b59e74349e91924f9a073179f0db186a686229a6
5
5
  SHA512:
6
- metadata.gz: 5ccbb718f81f5856f19dfca980a3f7d39e7a96cdc8dcd43922fb7e90e89d16d87d20cb07ccc54cf09809a9c3020504ab3ea8742bad65b77edc83cf94015c5794
7
- data.tar.gz: 8e9182cb31c8d29dd260e35d607a525536a5964cacc814898a2ac696ec3f8f2b9671f982a698c8b725e380eb7bff54c07f1a84c6bbc25540ab7bfcd0388ca8e6
6
+ metadata.gz: 1586760e58ade58534d5e22ca7ee56c0b5faa25d12ec3028c51c82543a65b86025f7d5bc35fe6dc14c8cc1cb9948cb736a669210b1c92e5fc96bb692e21e6837
7
+ data.tar.gz: 903f6d801e036ca5084e5111bafa06ebf601d5a27b8adc48e25b9200b67ef4de4be6f2998ed4589c934d54fddbdafe7fa7536ff649647fc1e04319270b85e3b0
@@ -0,0 +1,35 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ${{ matrix.os }}-latest
8
+
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ os: [ubuntu, macos]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Install libcapstone Linux
17
+ if: matrix.os == 'ubuntu'
18
+ run: |
19
+ sudo apt-get update -y
20
+ sudo apt-get install -y libcapstone-dev
21
+
22
+ - name: Install libcapstone macOS
23
+ if: matrix.os == 'macos'
24
+ run: |
25
+ brew update
26
+ brew install capstone
27
+
28
+ - name: Set up Ruby
29
+ uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
30
+ with:
31
+ ruby-version: 3.0
32
+ - name: Install dependencies
33
+ run: bundle install
34
+ - name: Run tests
35
+ run: bundle exec rake
@@ -0,0 +1,78 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ In the interest of fostering an open and welcoming environment, we as
7
+ contributors and maintainers pledge to make participation in our project and
8
+ our community a harassment-free experience for everyone, regardless of age, body
9
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
10
+ level of experience, education, socio-economic status, nationality, personal
11
+ appearance, race, religion, or sexual identity and orientation.
12
+
13
+ ## Our Standards
14
+
15
+ Examples of behavior that contributes to creating a positive environment
16
+ include:
17
+
18
+ * Using welcoming and inclusive language
19
+ * Being respectful of differing viewpoints and experiences
20
+ * Gracefully accepting constructive criticism
21
+ * Focusing on what is best for the community
22
+ * Showing empathy towards other community members
23
+
24
+ Examples of unacceptable behavior by participants include:
25
+
26
+ * The use of sexualized language or imagery and unwelcome sexual attention or
27
+ advances
28
+ * Trolling, insulting/derogatory comments, and personal or political attacks
29
+ * Public or private harassment
30
+ * Publishing others' private information, such as a physical or electronic
31
+ address, without explicit permission
32
+ * Other conduct which could reasonably be considered inappropriate in a
33
+ professional setting
34
+
35
+ ## Our Responsibilities
36
+
37
+ Project maintainers are responsible for clarifying the standards of acceptable
38
+ behavior and are expected to take appropriate and fair corrective action in
39
+ response to any instances of unacceptable behavior.
40
+
41
+ Project maintainers have the right and responsibility to remove, edit, or
42
+ reject comments, commits, code, wiki edits, issues, and other contributions
43
+ that are not aligned to this Code of Conduct, or to ban temporarily or
44
+ permanently any contributor for other behaviors that they deem inappropriate,
45
+ threatening, offensive, or harmful.
46
+
47
+ ## Scope
48
+
49
+ This Code of Conduct applies within all project spaces, and it also applies when
50
+ an individual is representing the project or its community in public spaces.
51
+ Examples of representing a project or community include using an official
52
+ project e-mail address, posting via an official social media account, or acting
53
+ as an appointed representative at an online or offline event. Representation of
54
+ a project may be further defined and clarified by project maintainers.
55
+
56
+ ## Enforcement
57
+
58
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
59
+ reported by contacting the project team at aaron.patterson at gmail.com. All
60
+ complaints will be reviewed and investigated and will result in a response that
61
+ is deemed necessary and appropriate to the circumstances. The project team is
62
+ obligated to maintain confidentiality with regard to the reporter of an incident.
63
+ Further details of specific enforcement policies may be posted separately.
64
+
65
+ Project maintainers who do not follow or enforce the Code of Conduct in good
66
+ faith may face temporary or permanent repercussions as determined by other
67
+ members of the project's leadership.
68
+
69
+ ## Attribution
70
+
71
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
72
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
73
+
74
+ [homepage]: https://www.contributor-covenant.org
75
+
76
+ For answers to common questions about this code of conduct, see
77
+ https://www.contributor-covenant.org/faq
78
+
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "minitest"
4
- gem "crabstone"
3
+ gemspec
data/Rakefile CHANGED
@@ -10,8 +10,9 @@ INSNS_DIR = "lib/fisk/instructions"
10
10
 
11
11
  file XML_FILE do
12
12
  Dir.mkdir 'tmp' unless File.directory?("tmp")
13
- cd "tmp"
14
- sh "git clone https://github.com/Maratyszcza/Opcodes.git"
13
+ cd "tmp" do
14
+ sh "git clone https://github.com/Maratyszcza/Opcodes.git"
15
+ end
15
16
  end
16
17
 
17
18
  file INSNS_DIR do
@@ -33,3 +34,4 @@ Rake::TestTask.new do |t|
33
34
  end
34
35
 
35
36
  task :test => LIB_FILE
37
+ task :default => :test
data/bin/build-machine.rb CHANGED
@@ -2,6 +2,20 @@ require "nokogiri"
2
2
  require "stringio"
3
3
  require "erb"
4
4
 
5
+ def modrm_method operands
6
+ op_types = operands.map { |x| x["type"] }
7
+ case op_types
8
+ in [/^m\d*$/, /^r\d+$/]
9
+ "add_modrm_mem_reg"
10
+ in [/^r\d+$/, /^m\d*$/]
11
+ "add_modrm_reg_mem"
12
+ in [/^r\d+$/, /^r\d+$/]
13
+ "add_modrm_reg_reg"
14
+ else
15
+ "add_modrm"
16
+ end
17
+ end
18
+
5
19
  def parse_rex v
6
20
  if v
7
21
  case v
@@ -4,88 +4,61 @@ class Fisk
4
4
  module Instructions
5
5
  <%- name = instruction["name"] -%>
6
6
  # Instruction <%= name %>
7
- forms = []
7
+ <%= name %> = Instruction.new(<%= name.dump %>, [
8
8
  <%-
9
9
  instruction.children.each do |form|
10
10
  next unless form.name == "InstructionForm"
11
11
  -%>
12
- operands = []
13
- encodings = []
14
12
  <%-
15
13
  operands = form.children.reject(&:text?).find_all { |c| c.name == "Operand" }
14
+ encodings = form.children.reject(&:text?).find_all { |c| c.name == "Encoding" }
16
15
  -%>
17
16
  # <%= form["gas-name"] %>: <%= operands.map { |op| op["type"] }.join(", ") %>
18
- <%-
19
- form.children.each do |child|
20
- next if child.text?
21
- case child.name
22
- -%>
23
- <%- when "Operand" -%>
24
- operands << OPERAND_TYPES[<%= unique_operands.index(%w{ type input output }.map { |n| child[n] }) %>]
25
- <%-
26
- when "Encoding"
27
- size = 0
28
- -%>
29
- encodings << Class.new(Fisk::Encoding) {
30
- def encode buffer, operands
17
+ Form.new([
18
+ <%- operands.each do |child| -%>
19
+ OPERAND_TYPES[<%= unique_operands.index(%w{ type input output }.map { |n| child[n] }) %>],
20
+ <%- end -%>
21
+ ].freeze, [
22
+ <%- encodings.each do |child| -%>
23
+ Class.new(Fisk::Encoding) {
24
+ def encode buffer, operands
31
25
  <%-
32
26
  child.children.each do |encoding|
33
27
  next if encoding.text?
34
28
  case encoding.name
35
29
  when "Opcode"
36
- size += 1
37
30
  -%>
38
- add_opcode buffer, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= parse_operand_value encoding["addend"] %>
39
- <%-
40
- when "Immediate"
41
- size += encoding["size"].to_i
42
- -%>
43
- add_immediate buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>
44
- <%-
45
- when "CodeOffset"
46
- size += encoding["size"].to_i
47
- -%>
48
- add_code_offset buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>
49
- <%-
50
- when "REX"
51
- size += 1 unless encoding["mandatory"] == "false"
52
- -%>
53
- add_rex(buffer, operands,
31
+ add_opcode(buffer, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= parse_operand_value encoding["addend"] %>) +
32
+ <%- when "Immediate" -%>
33
+ add_immediate(buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>) +
34
+ <%- when "CodeOffset" -%>
35
+ add_code_offset(buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>) +
36
+ <%- when "REX" -%>
37
+ add_rex(buffer, operands,
54
38
  <%= !(encoding["mandatory"] == "false") %>,
55
39
  <%= parse_rex encoding["W"] %>,
56
40
  <%= parse_rex encoding["R"] %>,
57
41
  <%= parse_rex encoding["X"] %>,
58
- <%= parse_rex encoding["B"] %>)
59
- <%-
60
- when "ModRM"
61
- size += 1
62
- -%>
63
- add_modrm(buffer, operands,
42
+ <%= parse_rex encoding["B"] %>) +
43
+ <%- when "ModRM" -%>
44
+ <%= modrm_method(operands) %>(buffer,
64
45
  <%= encoding["mode"].to_i(2) %>,
65
46
  <%= parse_operand_value encoding["reg"] %>,
66
- <%= parse_operand_value encoding["rm"] %>)
47
+ <%= parse_operand_value encoding["rm"] %>, operands) +
67
48
  <%- when "Prefix" -%>
68
- add_prefix buffer, operands, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= encoding["mandatory"] %>
49
+ add_prefix(buffer, operands, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= encoding["mandatory"] %>) +
69
50
  <%- when "DataOffset" -%>
70
- add_data_offset buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>
51
+ add_data_offset(buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>) +
71
52
  <%- else -%>
72
- add_<%= encoding.name %> buffer, operands
53
+ add_<%= encoding.name %>(buffer, operands)
73
54
  <%- end -%>
74
55
  <%- end -%>
75
- end
76
-
77
- def bytesize; <%= size %>; end
78
- }.new
79
- <%- when "ISA" -%>
80
- <%- when "ImplicitOperand" -%>
81
- <%-
82
- else
83
- raise NotImplementedError, child.name
84
- -%>
56
+ 0
57
+ end
58
+ }.new.freeze,
85
59
  <%- end -%>
86
- <%- end -%>
87
- forms << Form.new(operands, encodings)
60
+ ].freeze).freeze,
88
61
  <%- end -%>
89
- <%= name %> = Instruction.new(<%= name.dump %>, forms)
62
+ ].freeze).freeze
90
63
  end
91
64
  end
data/fisk.gemspec CHANGED
@@ -13,4 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.test_files = s.files.grep(%r{^test/})
14
14
  s.homepage = "https://github.com/tenderlove/fisk"
15
15
  s.license = "Apache-2.0"
16
+
17
+ s.add_development_dependency 'minitest', '~> 5.14'
18
+ s.add_development_dependency 'crabstone', '~> 4.0'
19
+ s.add_development_dependency 'rake', '~> 13.0'
20
+ s.add_development_dependency 'nokogiri', '~> 1.11'
16
21
  end
data/lib/fisk.rb CHANGED
@@ -9,13 +9,19 @@ require "fisk/errors"
9
9
  require "fisk/version"
10
10
 
11
11
  class Fisk
12
+ module OperandPredicates
13
+ def unresolved?; false; end
14
+ def register?; false; end
15
+ def temp_register?; false; end
16
+ def extended_register?; false; end
17
+ def memory?; false; end
18
+ def rip?; false; end
19
+ end
20
+
12
21
  class Operand
22
+ include OperandPredicates
23
+
13
24
  def works? type; self.type == type; end
14
- def unknown_label?; false; end
15
- def register?; false; end
16
- def temp_register?; false; end
17
- def extended_register?; false; end
18
- def m64?; false; end
19
25
 
20
26
  def rex_value
21
27
  value >> 3
@@ -53,7 +59,36 @@ class Fisk
53
59
  value & 0x7
54
60
  end
55
61
 
56
- def extended_register?; @value > 7; end
62
+ def extended_register?
63
+ @value > 7 || EXTENDED_R8.include?(self)
64
+ end
65
+ end
66
+
67
+ class Rip < Operand
68
+ attr_accessor :displacement
69
+
70
+ def initialize displacement
71
+ @displacement = displacement
72
+ end
73
+
74
+ def works? type
75
+ type == "m64" || type == "m"
76
+ end
77
+
78
+ def unresolved?
79
+ @displacement.is_a?(Fisk::UnknownLabel)
80
+ end
81
+
82
+ def memory?; true; end
83
+ def rip?; true; end
84
+
85
+ def rex_value
86
+ 0x0
87
+ end
88
+
89
+ def op_value
90
+ 0x0
91
+ end
57
92
  end
58
93
 
59
94
  class Temp < Operand
@@ -69,19 +104,56 @@ class Fisk
69
104
 
70
105
  def temp_register?; true; end
71
106
 
107
+ def op_value
108
+ reg.op_value
109
+ end
110
+
72
111
  def extended_register?
73
- @register.extended_register?
112
+ reg.extended_register?
74
113
  end
75
114
 
76
115
  def rex_value
77
- @register.rex_value
116
+ reg.rex_value
78
117
  end
79
118
 
80
119
  def value
81
- @register.value
120
+ reg.value
121
+ end
122
+
123
+ def reg
124
+ unless @register
125
+ raise Errors::UnassignedRegister, "Temporary register #{name} hasn't been assigned a real register"
126
+ end
127
+
128
+ @register
82
129
  end
83
130
  end
84
131
 
132
+ AL = Register.new "al", "r8", 0
133
+ CL = Register.new "cl", "r8", 1
134
+ DL = Register.new "dl", "r8", 2
135
+ BL = Register.new "bl", "r8", 3
136
+
137
+ SPL = Register.new "spl", "r8", 4
138
+ BPL = Register.new "bpl", "r8", 5
139
+ SIL = Register.new "sil", "r8", 6
140
+ DIL = Register.new "dil", "r8", 7
141
+ EXTENDED_R8 = [SPL, BPL, SIL, DIL]
142
+
143
+ AH = Register.new "ah", "r8", 4
144
+ CH = Register.new "ch", "r8", 5
145
+ DH = Register.new "dh", "r8", 6
146
+ BH = Register.new "bh", "r8", 7
147
+
148
+ AX = Register.new "ax", "r16", 0
149
+ CX = Register.new "cx", "r16", 1
150
+ DX = Register.new "dx", "r16", 2
151
+ BX = Register.new "bx", "r16", 3
152
+ SP = Register.new "sp", "r16", 4
153
+ BP = Register.new "bp", "r16", 5
154
+ SI = Register.new "si", "r16", 6
155
+ DI = Register.new "di", "r16", 7
156
+
85
157
  EAX = Register.new "eax", "r32", 0
86
158
  ECX = Register.new "ecx", "r32", 1
87
159
  EDX = Register.new "edx", "r32", 2
@@ -102,6 +174,9 @@ class Fisk
102
174
  8.times do |i|
103
175
  i += 8
104
176
  const_set "R#{i}", Register.new("r#{i}", "r64", i)
177
+ const_set "R#{i}D", Register.new("r#{i}d", "r32", i)
178
+ const_set "R#{i}W", Register.new("r#{i}w", "r16", i)
179
+ const_set "R#{i}B", Register.new("r#{i}b", "r8", i)
105
180
  end
106
181
 
107
182
  # List of *caller* saved registers for the C calling convention
@@ -111,8 +186,7 @@ class Fisk
111
186
  CALLEE_SAVED = [ RBX, RSP, RBP, R12, R13, R14, R15 ]
112
187
  end
113
188
 
114
-
115
- class M64 < Operand
189
+ class Memory < Operand
116
190
  attr_reader :displacement
117
191
 
118
192
  def initialize register, displacement
@@ -124,17 +198,33 @@ class Fisk
124
198
  @register.value
125
199
  end
126
200
 
201
+ def memory?; true; end
202
+ end
203
+
204
+ class M64 < Memory
127
205
  def type
128
206
  "m64"
129
207
  end
208
+ end
209
+
210
+ class M < Memory
211
+ def type
212
+ "m"
213
+ end
214
+ end
130
215
 
131
- def m64?; true; end
216
+ def rip displacement = 0
217
+ Registers::Rip.new(displacement)
132
218
  end
133
219
 
134
220
  def m64 x, displacement = 0
135
221
  M64.new x, displacement
136
222
  end
137
223
 
224
+ def m x, displacement = 0
225
+ M.new x, displacement
226
+ end
227
+
138
228
  # Define all immediate value methods of different sizes
139
229
  [8, 16, 32, 64].each do |size|
140
230
  class_eval <<~eostr, __FILE__, __LINE__ + 1
@@ -172,37 +262,50 @@ class Fisk
172
262
  end
173
263
  end
174
264
 
175
- class UnknownLabel < Struct.new(:name)
265
+ class UnknownLabel < Operand
266
+ attr_reader :name
267
+
268
+ def initialize name
269
+ @name = name
270
+ end
271
+
176
272
  def works? type
177
273
  type == "rel32"
178
274
  end
179
275
 
180
- def unknown_label?; true; end
181
- def temp_register?; false; end
276
+ def unresolved?; true; end
277
+ end
182
278
 
183
- def value
184
- label = assembler.label_for(name)
185
- label.position - (insn.position + insn.bytesize)
186
- end
279
+ module InstructionPredicates
280
+ def retry?; false; end
281
+ def label?; false; end
282
+ def jump?; false; end
283
+ def has_temp_registers?; false; end
284
+ def comment?; false; end
285
+ def lazy?; false; end
187
286
  end
188
287
 
189
288
  class Label < Struct.new(:name)
289
+ include InstructionPredicates
290
+
190
291
  def label?; true; end
191
- def jump?; false; end
192
- def has_temp_registers?; false; end
292
+ end
293
+
294
+ class Comment < Struct.new(:message)
295
+ include InstructionPredicates
296
+
297
+ def comment?; true; end
193
298
  end
194
299
 
195
300
  class Instruction
301
+ include InstructionPredicates
302
+
196
303
  def initialize insn, form, operands
197
304
  @insn = insn
198
305
  @form = form
199
306
  @operands = operands
200
307
  end
201
308
 
202
- def jump?
203
- false
204
- end
205
-
206
309
  def has_temp_registers?
207
310
  @operands.any?(&:temp_register?)
208
311
  end
@@ -218,22 +321,48 @@ class Fisk
218
321
  def encode buffer, labels
219
322
  encoding = @form.encodings.first
220
323
  encoding.encode buffer, @operands
221
- true
222
324
  end
325
+ end
223
326
 
224
- def bytesize
225
- @form.encodings.first.bytesize
327
+ class UnresolvedRIPInstruction
328
+ include InstructionPredicates
329
+
330
+ def initialize insn, form, operands
331
+ @insn = insn
332
+ @form = form
333
+ @operands = operands
334
+ @retry = false
226
335
  end
227
336
 
228
- def label?; false; end
337
+ def retry?; true; end
338
+
339
+ def encode buffer, labels
340
+ # Use dummy values for any unresolvable operands
341
+ operands = @operands.map do |op|
342
+ if op.rip? && op.unresolved?
343
+ # Try resolving the operands
344
+ if labels.key?(op.displacement.name)
345
+ Registers::Rip.new labels[op.displacement.name]
346
+ else
347
+ Registers::Rip.new 0x0CAFE
348
+ end
349
+ else
350
+ op
351
+ end
352
+ end
353
+
354
+ @form.encodings.first.encode buffer, operands
355
+ end
229
356
  end
230
357
 
231
- class UnresolvedInstruction
358
+ class UnresolvedJumpInstruction
359
+ include InstructionPredicates
360
+
232
361
  def initialize insn, form, operand
233
- @insn = insn
234
- @form = form
235
- @operand = operand
236
- @saved_pos = nil
362
+ @insn = insn
363
+ @form = form
364
+ @operand = operand
365
+ @must_retry = false
237
366
  end
238
367
 
239
368
  def jump?
@@ -244,44 +373,43 @@ class Fisk
244
373
  @operand.name
245
374
  end
246
375
 
247
- def has_temp_registers?; false; end
376
+ def retry?
377
+ true
378
+ end
248
379
 
249
380
  def encode buffer, labels
250
381
  # Estimate by using a rel32 offset
251
- form = find_form "rel32"
252
- encoding = form.encodings.first
253
- operand_klass = Rel32
254
-
255
- if labels.key? @operand.name
256
- if @saved_pos
257
- # Only use rel32 if we saved the position
258
- buffer.seek @saved_pos, IO::SEEK_SET
259
- else
260
- estimated_offset = labels[@operand.name] - (buffer.pos + encoding.bytesize)
382
+ form = find_form "rel32"
383
+ encoding = form.encodings.first
384
+ operand_klass = Rel32
385
+
386
+ if labels.key? target
387
+ unless @must_retry
388
+ estimated_offset = labels[target] - (buffer.pos + 6) # 6 seems like a good length
261
389
 
262
390
  if estimated_offset >= -128 && estimated_offset <= 127
263
391
  # fits in a rel8
264
- operand_klass = Rel8
265
- form = find_form "rel8"
266
- encoding = form.encodings.first
392
+ operand_klass = Rel8
393
+ form = find_form "rel8"
394
+ encoding = form.encodings.first
267
395
  end
268
396
  end
269
397
 
270
- jump_len = -(buffer.pos + encoding.bytesize - labels[@operand.name])
398
+ # We don't know what the size of the jump will be, so just write
399
+ # it out with some dummy data and keep track of the buffer position.
400
+ # Calculate the real jump offset, then rewind and patch the jump with
401
+ # the right location. 😩
402
+ pos = buffer.pos
403
+ encoding.encode buffer, [operand_klass.new(0xFE)]
404
+ jump_len = -(buffer.pos - labels[target])
405
+ buffer.seek pos, IO::SEEK_SET
271
406
  encoding.encode buffer, [operand_klass.new(jump_len)]
272
- true
273
407
  else
274
- # We've hit a label that doesn't exist yet
275
- # Save the buffer position so we can seek back to it later
276
- @saved_pos = buffer.pos
277
- # Write 5 bytes to reserve our spot
278
- encoding.bytesize.times { buffer.putc 0 }
279
- false
408
+ @must_retry = true
409
+ encoding.encode buffer, [operand_klass.new(0x0CAFE)]
280
410
  end
281
411
  end
282
412
 
283
- def label?; false; end
284
-
285
413
  private
286
414
 
287
415
  def find_form form_type
@@ -337,6 +465,41 @@ class Fisk
337
465
  UnknownLabel.new(name)
338
466
  end
339
467
 
468
+ Lazy = Struct.new(:block) do # :nodoc:
469
+ include InstructionPredicates
470
+
471
+ def lazy?; true; end
472
+
473
+ def encode buffer, labels
474
+ block.call buffer.pos
475
+ end
476
+ end
477
+
478
+ # Record a block that will be called during instruction encoding. The block
479
+ # will be yielded the current position of the buffer.
480
+ #
481
+ # For example:
482
+ #
483
+ # patch_position = nil
484
+ #
485
+ # fisk.nop
486
+ # fisk.lazy { |pos| patch_location = pos }
487
+ # fisk.jmp(fisk.label(:foo))
488
+ # fisk.lazy { |_|
489
+ # fisk.mov(fisk.r8, fisk.imm64(patch_location))
490
+ # }
491
+ # fisk.write_to(buf)
492
+ #
493
+ # The first lazy block will be yielded the position of the buffer immediately
494
+ # after encoding the `nop` instruction and before encoding the `jmp`
495
+ # instruction. The second lazy block will be yielded to after the `jmp`
496
+ # instruction has been encoded. This gives you a chance to write the buffer
497
+ # position from certain points in to your assembly
498
+ def lazy &block
499
+ @instructions << Lazy.new(block)
500
+ self
501
+ end
502
+
340
503
  # Insert a label named +name+ at the current position in the instructions.
341
504
  def put_label name
342
505
  @instructions << Label.new(name)
@@ -344,6 +507,12 @@ class Fisk
344
507
  end
345
508
  alias :make_label :put_label
346
509
 
510
+ # Insert a comment at the current position in the instructions.
511
+ def comment message
512
+ @instructions << Comment.new(message)
513
+ self
514
+ end
515
+
347
516
  # Allocate and return a new register. These registers will be replaced with
348
517
  # real registers when `assign_registers` is called.
349
518
  def register name = "temp"
@@ -452,39 +621,60 @@ class Fisk
452
621
  # mov r9, imm64(32)
453
622
  # end
454
623
  #
455
- def asm buf = StringIO.new(''.b), &block
624
+ def asm buf = StringIO.new(''.b), metadata: {}, &block
456
625
  instance_eval(&block)
457
- write_to buf
626
+ write_to buf, metadata: metadata
458
627
  buf
459
628
  end
460
629
 
461
630
  # Encodes all instructions and returns a binary string with the encoded
462
631
  # instructions.
463
- def to_binary
632
+ def to_binary(metadata: {})
464
633
  io = StringIO.new ''.b
465
- write_to io
634
+ write_to io, metadata: metadata
466
635
  io.string
467
636
  end
468
637
 
638
+ RetryRequest = Struct.new(:insn, :io_seek_pos)
639
+
469
640
  # Encode all instructions and write them to +buffer+. +buffer+ should be an
470
641
  # IO object.
471
- def write_to buffer
642
+ def write_to buffer, metadata: {}
472
643
  labels = {}
644
+ comments = {}
473
645
  unresolved = []
474
- @instructions.each do |insn|
646
+ instructions = @instructions.dup
647
+ backup = @instructions.dup
648
+ @instructions.clear
649
+
650
+ while insn = instructions.shift
475
651
  if insn.label?
476
652
  labels[insn.name] = buffer.pos
653
+ elsif insn.comment?
654
+ comments.update({buffer.pos => insn.message}) { |_, *lines| lines.join($/) }
655
+ elsif insn.lazy?
656
+ insn.encode buffer, labels
657
+ instructions.unshift(*@instructions)
658
+ @instructions.clear
477
659
  else
478
- unless insn.encode buffer, labels
479
- unresolved << insn
660
+ if insn.retry?
661
+ retry_req = RetryRequest.new(insn, buffer.pos)
662
+ unresolved << retry_req
480
663
  end
664
+
665
+ write_instruction insn, buffer, labels
481
666
  end
482
667
  end
483
668
 
669
+ metadata[:comments] = comments
670
+ @instructions = backup
671
+
484
672
  return if unresolved.empty?
485
673
 
486
674
  pos = buffer.pos
487
- unresolved.each do |insn|
675
+ unresolved.each do |req|
676
+ insn = req.insn
677
+ buffer.seek req.io_seek_pos, IO::SEEK_SET
488
678
  insn.encode buffer, labels
489
679
  end
490
680
  buffer.seek pos, IO::SEEK_SET
@@ -520,11 +710,13 @@ class Fisk
520
710
  insn = nil
521
711
 
522
712
  params.each do |param|
523
- if param.unknown_label?
524
- if params.length > 1
525
- raise ArgumentError, "labels only work with single param jump instructions"
713
+ if param.unresolved?
714
+ if insns.name =~ /^J/ # I hope all jump instructions start with J!
715
+ insn = UnresolvedJumpInstruction.new(insns, form, params.first)
716
+ else
717
+ # If it's not a jump instruction, assume unresolved RIP relative 😬
718
+ insn = UnresolvedRIPInstruction.new(insns, form, params)
526
719
  end
527
- insn = UnresolvedInstruction.new(insns, form, params.first)
528
720
  end
529
721
 
530
722
  if param.temp_register?
@@ -543,4 +735,10 @@ class Fisk
543
735
 
544
736
  self
545
737
  end
738
+
739
+ private
740
+
741
+ def write_instruction insn, buffer, labels
742
+ insn.encode buffer, labels
743
+ end
546
744
  end