fisk 1.0.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +35 -0
- data/CODE_OF_CONDUCT.md +78 -0
- data/Gemfile +1 -2
- data/README.md +59 -4
- data/Rakefile +13 -5
- data/bin/build-machine.rb +58 -2
- data/bin/instruction.rb.erb +65 -0
- data/bin/instructions.rb.erb +66 -0
- data/fisk.gemspec +21 -0
- data/lib/fisk/basic_block.rb +162 -0
- data/lib/fisk/encoding.rb +127 -0
- data/lib/fisk/errors.rb +35 -0
- data/lib/fisk/helpers.rb +40 -2
- data/lib/fisk/instructions/adc.rb +726 -0
- data/lib/fisk/instructions/adcx.rb +109 -0
- data/lib/fisk/instructions/add.rb +726 -0
- data/lib/fisk/instructions/addpd.rb +57 -0
- data/lib/fisk/instructions/addps.rb +55 -0
- data/lib/fisk/instructions/addsd.rb +57 -0
- data/lib/fisk/instructions/addss.rb +57 -0
- data/lib/fisk/instructions/addsubpd.rb +57 -0
- data/lib/fisk/instructions/addsubps.rb +57 -0
- data/lib/fisk/instructions/adox.rb +109 -0
- data/lib/fisk/instructions/aesdec.rb +59 -0
- data/lib/fisk/instructions/aesdeclast.rb +59 -0
- data/lib/fisk/instructions/aesenc.rb +59 -0
- data/lib/fisk/instructions/aesenclast.rb +59 -0
- data/lib/fisk/instructions/aesimc.rb +59 -0
- data/lib/fisk/instructions/aeskeygenassist.rb +63 -0
- data/lib/fisk/instructions/and.rb +726 -0
- data/lib/fisk/instructions/andn.rb +81 -0
- data/lib/fisk/instructions/andnpd.rb +57 -0
- data/lib/fisk/instructions/andnps.rb +55 -0
- data/lib/fisk/instructions/andpd.rb +57 -0
- data/lib/fisk/instructions/andps.rb +55 -0
- data/lib/fisk/instructions/bextr.rb +157 -0
- data/lib/fisk/instructions/blcfill.rb +77 -0
- data/lib/fisk/instructions/blci.rb +77 -0
- data/lib/fisk/instructions/blcic.rb +77 -0
- data/lib/fisk/instructions/blcmsk.rb +77 -0
- data/lib/fisk/instructions/blcs.rb +77 -0
- data/lib/fisk/instructions/blendpd.rb +63 -0
- data/lib/fisk/instructions/blendps.rb +63 -0
- data/lib/fisk/instructions/blendvpd.rb +61 -0
- data/lib/fisk/instructions/blendvps.rb +61 -0
- data/lib/fisk/instructions/blsfill.rb +77 -0
- data/lib/fisk/instructions/blsi.rb +77 -0
- data/lib/fisk/instructions/blsic.rb +77 -0
- data/lib/fisk/instructions/blsmsk.rb +77 -0
- data/lib/fisk/instructions/blsr.rb +77 -0
- data/lib/fisk/instructions/bsf.rb +149 -0
- data/lib/fisk/instructions/bsr.rb +149 -0
- data/lib/fisk/instructions/bswap.rb +45 -0
- data/lib/fisk/instructions/bt.rb +295 -0
- data/lib/fisk/instructions/btc.rb +295 -0
- data/lib/fisk/instructions/btr.rb +295 -0
- data/lib/fisk/instructions/bts.rb +295 -0
- data/lib/fisk/instructions/bzhi.rb +81 -0
- data/lib/fisk/instructions/call.rb +63 -0
- data/lib/fisk/instructions/cbw.rb +20 -0
- data/lib/fisk/instructions/cdq.rb +19 -0
- data/lib/fisk/instructions/cdqe.rb +25 -0
- data/lib/fisk/instructions/clc.rb +19 -0
- data/lib/fisk/instructions/cld.rb +19 -0
- data/lib/fisk/instructions/clflush.rb +31 -0
- data/lib/fisk/instructions/clflushopt.rb +32 -0
- data/lib/fisk/instructions/clwb.rb +32 -0
- data/lib/fisk/instructions/clzero.rb +21 -0
- data/lib/fisk/instructions/cmc.rb +19 -0
- data/lib/fisk/instructions/cmova.rb +149 -0
- data/lib/fisk/instructions/cmovae.rb +149 -0
- data/lib/fisk/instructions/cmovb.rb +149 -0
- data/lib/fisk/instructions/cmovbe.rb +149 -0
- data/lib/fisk/instructions/cmovc.rb +149 -0
- data/lib/fisk/instructions/cmove.rb +149 -0
- data/lib/fisk/instructions/cmovg.rb +149 -0
- data/lib/fisk/instructions/cmovge.rb +149 -0
- data/lib/fisk/instructions/cmovl.rb +149 -0
- data/lib/fisk/instructions/cmovle.rb +149 -0
- data/lib/fisk/instructions/cmovna.rb +149 -0
- data/lib/fisk/instructions/cmovnae.rb +149 -0
- data/lib/fisk/instructions/cmovnb.rb +149 -0
- data/lib/fisk/instructions/cmovnbe.rb +149 -0
- data/lib/fisk/instructions/cmovnc.rb +149 -0
- data/lib/fisk/instructions/cmovne.rb +149 -0
- data/lib/fisk/instructions/cmovng.rb +149 -0
- data/lib/fisk/instructions/cmovnge.rb +149 -0
- data/lib/fisk/instructions/cmovnl.rb +149 -0
- data/lib/fisk/instructions/cmovnle.rb +149 -0
- data/lib/fisk/instructions/cmovno.rb +149 -0
- data/lib/fisk/instructions/cmovnp.rb +149 -0
- data/lib/fisk/instructions/cmovns.rb +149 -0
- data/lib/fisk/instructions/cmovnz.rb +149 -0
- data/lib/fisk/instructions/cmovo.rb +149 -0
- data/lib/fisk/instructions/cmovp.rb +149 -0
- data/lib/fisk/instructions/cmovpe.rb +149 -0
- data/lib/fisk/instructions/cmovpo.rb +149 -0
- data/lib/fisk/instructions/cmovs.rb +149 -0
- data/lib/fisk/instructions/cmovz.rb +149 -0
- data/lib/fisk/instructions/cmp.rb +726 -0
- data/lib/fisk/instructions/cmppd.rb +61 -0
- data/lib/fisk/instructions/cmpps.rb +59 -0
- data/lib/fisk/instructions/cmpsd.rb +61 -0
- data/lib/fisk/instructions/cmpss.rb +61 -0
- data/lib/fisk/instructions/cmpxchg.rb +195 -0
- data/lib/fisk/instructions/cmpxchg16b.rb +31 -0
- data/lib/fisk/instructions/cmpxchg8b.rb +31 -0
- data/lib/fisk/instructions/comisd.rb +57 -0
- data/lib/fisk/instructions/comiss.rb +55 -0
- data/lib/fisk/instructions/cpuid.rb +20 -0
- data/lib/fisk/instructions/cqo.rb +25 -0
- data/lib/fisk/instructions/crc32.rb +261 -0
- data/lib/fisk/instructions/cvtdq2pd.rb +57 -0
- data/lib/fisk/instructions/cvtdq2ps.rb +55 -0
- data/lib/fisk/instructions/cvtpd2dq.rb +57 -0
- data/lib/fisk/instructions/cvtpd2pi.rb +57 -0
- data/lib/fisk/instructions/cvtpd2ps.rb +57 -0
- data/lib/fisk/instructions/cvtpi2pd.rb +57 -0
- data/lib/fisk/instructions/cvtpi2ps.rb +55 -0
- data/lib/fisk/instructions/cvtps2dq.rb +57 -0
- data/lib/fisk/instructions/cvtps2pd.rb +55 -0
- data/lib/fisk/instructions/cvtps2pi.rb +55 -0
- data/lib/fisk/instructions/cvtsd2si.rb +105 -0
- data/lib/fisk/instructions/cvtsd2ss.rb +57 -0
- data/lib/fisk/instructions/cvtsi2sd.rb +105 -0
- data/lib/fisk/instructions/cvtsi2ss.rb +105 -0
- data/lib/fisk/instructions/cvtss2sd.rb +57 -0
- data/lib/fisk/instructions/cvtss2si.rb +105 -0
- data/lib/fisk/instructions/cvttpd2dq.rb +57 -0
- data/lib/fisk/instructions/cvttpd2pi.rb +57 -0
- data/lib/fisk/instructions/cvttps2dq.rb +57 -0
- data/lib/fisk/instructions/cvttps2pi.rb +55 -0
- data/lib/fisk/instructions/cvttsd2si.rb +105 -0
- data/lib/fisk/instructions/cvttss2si.rb +105 -0
- data/lib/fisk/instructions/cwd.rb +20 -0
- data/lib/fisk/instructions/cwde.rb +19 -0
- data/lib/fisk/instructions/dec.rb +179 -0
- data/lib/fisk/instructions/div.rb +179 -0
- data/lib/fisk/instructions/divpd.rb +57 -0
- data/lib/fisk/instructions/divps.rb +55 -0
- data/lib/fisk/instructions/divsd.rb +57 -0
- data/lib/fisk/instructions/divss.rb +57 -0
- data/lib/fisk/instructions/dppd.rb +63 -0
- data/lib/fisk/instructions/dpps.rb +63 -0
- data/lib/fisk/instructions/emms.rb +20 -0
- data/lib/fisk/instructions/extractps.rb +63 -0
- data/lib/fisk/instructions/extrq.rb +60 -0
- data/lib/fisk/instructions/femms.rb +20 -0
- data/lib/fisk/instructions/haddpd.rb +57 -0
- data/lib/fisk/instructions/haddps.rb +57 -0
- data/lib/fisk/instructions/hsubpd.rb +57 -0
- data/lib/fisk/instructions/hsubps.rb +57 -0
- data/lib/fisk/instructions/idiv.rb +179 -0
- data/lib/fisk/instructions/imul.rb +611 -0
- data/lib/fisk/instructions/inc.rb +179 -0
- data/lib/fisk/instructions/insertps.rb +63 -0
- data/lib/fisk/instructions/insertq.rb +61 -0
- data/lib/fisk/instructions/int.rb +32 -0
- data/lib/fisk/instructions/ja.rb +34 -0
- data/lib/fisk/instructions/jae.rb +34 -0
- data/lib/fisk/instructions/jb.rb +34 -0
- data/lib/fisk/instructions/jbe.rb +34 -0
- data/lib/fisk/instructions/jc.rb +34 -0
- data/lib/fisk/instructions/je.rb +34 -0
- data/lib/fisk/instructions/jecxz.rb +21 -0
- data/lib/fisk/instructions/jg.rb +34 -0
- data/lib/fisk/instructions/jge.rb +34 -0
- data/lib/fisk/instructions/jl.rb +34 -0
- data/lib/fisk/instructions/jle.rb +34 -0
- data/lib/fisk/instructions/jmp.rb +75 -0
- data/lib/fisk/instructions/jna.rb +34 -0
- data/lib/fisk/instructions/jnae.rb +34 -0
- data/lib/fisk/instructions/jnb.rb +34 -0
- data/lib/fisk/instructions/jnbe.rb +34 -0
- data/lib/fisk/instructions/jnc.rb +34 -0
- data/lib/fisk/instructions/jne.rb +34 -0
- data/lib/fisk/instructions/jng.rb +34 -0
- data/lib/fisk/instructions/jnge.rb +34 -0
- data/lib/fisk/instructions/jnl.rb +34 -0
- data/lib/fisk/instructions/jnle.rb +34 -0
- data/lib/fisk/instructions/jno.rb +34 -0
- data/lib/fisk/instructions/jnp.rb +34 -0
- data/lib/fisk/instructions/jns.rb +34 -0
- data/lib/fisk/instructions/jnz.rb +34 -0
- data/lib/fisk/instructions/jo.rb +34 -0
- data/lib/fisk/instructions/jp.rb +34 -0
- data/lib/fisk/instructions/jpe.rb +34 -0
- data/lib/fisk/instructions/jpo.rb +34 -0
- data/lib/fisk/instructions/jrcxz.rb +21 -0
- data/lib/fisk/instructions/js.rb +34 -0
- data/lib/fisk/instructions/jz.rb +34 -0
- data/lib/fisk/instructions/kaddb.rb +27 -0
- data/lib/fisk/instructions/kaddd.rb +27 -0
- data/lib/fisk/instructions/kaddq.rb +27 -0
- data/lib/fisk/instructions/kaddw.rb +27 -0
- data/lib/fisk/instructions/kandb.rb +27 -0
- data/lib/fisk/instructions/kandd.rb +27 -0
- data/lib/fisk/instructions/kandnb.rb +27 -0
- data/lib/fisk/instructions/kandnd.rb +27 -0
- data/lib/fisk/instructions/kandnq.rb +27 -0
- data/lib/fisk/instructions/kandnw.rb +27 -0
- data/lib/fisk/instructions/kandq.rb +27 -0
- data/lib/fisk/instructions/kandw.rb +27 -0
- data/lib/fisk/instructions/kmovb.rb +94 -0
- data/lib/fisk/instructions/kmovd.rb +94 -0
- data/lib/fisk/instructions/kmovq.rb +94 -0
- data/lib/fisk/instructions/kmovw.rb +94 -0
- data/lib/fisk/instructions/knotb.rb +26 -0
- data/lib/fisk/instructions/knotd.rb +26 -0
- data/lib/fisk/instructions/knotq.rb +26 -0
- data/lib/fisk/instructions/knotw.rb +26 -0
- data/lib/fisk/instructions/korb.rb +27 -0
- data/lib/fisk/instructions/kord.rb +27 -0
- data/lib/fisk/instructions/korq.rb +27 -0
- data/lib/fisk/instructions/kortestb.rb +26 -0
- data/lib/fisk/instructions/kortestd.rb +26 -0
- data/lib/fisk/instructions/kortestq.rb +26 -0
- data/lib/fisk/instructions/kortestw.rb +26 -0
- data/lib/fisk/instructions/korw.rb +27 -0
- data/lib/fisk/instructions/kshiftlb.rb +28 -0
- data/lib/fisk/instructions/kshiftld.rb +28 -0
- data/lib/fisk/instructions/kshiftlq.rb +28 -0
- data/lib/fisk/instructions/kshiftlw.rb +28 -0
- data/lib/fisk/instructions/kshiftrb.rb +28 -0
- data/lib/fisk/instructions/kshiftrd.rb +28 -0
- data/lib/fisk/instructions/kshiftrq.rb +28 -0
- data/lib/fisk/instructions/kshiftrw.rb +28 -0
- data/lib/fisk/instructions/ktestb.rb +26 -0
- data/lib/fisk/instructions/ktestd.rb +26 -0
- data/lib/fisk/instructions/ktestq.rb +26 -0
- data/lib/fisk/instructions/ktestw.rb +26 -0
- data/lib/fisk/instructions/kunpckbw.rb +27 -0
- data/lib/fisk/instructions/kunpckdq.rb +27 -0
- data/lib/fisk/instructions/kunpckwd.rb +27 -0
- data/lib/fisk/instructions/kxnorb.rb +27 -0
- data/lib/fisk/instructions/kxnord.rb +27 -0
- data/lib/fisk/instructions/kxnorq.rb +27 -0
- data/lib/fisk/instructions/kxnorw.rb +27 -0
- data/lib/fisk/instructions/kxorb.rb +27 -0
- data/lib/fisk/instructions/kxord.rb +27 -0
- data/lib/fisk/instructions/kxorq.rb +27 -0
- data/lib/fisk/instructions/kxorw.rb +27 -0
- data/lib/fisk/instructions/lddqu.rb +33 -0
- data/lib/fisk/instructions/ldmxcsr.rb +31 -0
- data/lib/fisk/instructions/lea.rb +76 -0
- data/lib/fisk/instructions/lfence.rb +21 -0
- data/lib/fisk/instructions/lzcnt.rb +155 -0
- data/lib/fisk/instructions/maskmovdqu.rb +33 -0
- data/lib/fisk/instructions/maskmovq.rb +32 -0
- data/lib/fisk/instructions/maxpd.rb +57 -0
- data/lib/fisk/instructions/maxps.rb +55 -0
- data/lib/fisk/instructions/maxsd.rb +57 -0
- data/lib/fisk/instructions/maxss.rb +57 -0
- data/lib/fisk/instructions/mfence.rb +21 -0
- data/lib/fisk/instructions/minpd.rb +57 -0
- data/lib/fisk/instructions/minps.rb +55 -0
- data/lib/fisk/instructions/minsd.rb +57 -0
- data/lib/fisk/instructions/minss.rb +57 -0
- data/lib/fisk/instructions/monitor.rb +21 -0
- data/lib/fisk/instructions/monitorx.rb +21 -0
- data/lib/fisk/instructions/mov.rb +650 -0
- data/lib/fisk/instructions/movapd.rb +99 -0
- data/lib/fisk/instructions/movaps.rb +95 -0
- data/lib/fisk/instructions/movbe.rb +155 -0
- data/lib/fisk/instructions/movd.rb +197 -0
- data/lib/fisk/instructions/movddup.rb +57 -0
- data/lib/fisk/instructions/movdq2q.rb +33 -0
- data/lib/fisk/instructions/movdqa.rb +99 -0
- data/lib/fisk/instructions/movdqu.rb +99 -0
- data/lib/fisk/instructions/movhlps.rb +32 -0
- data/lib/fisk/instructions/movhpd.rb +57 -0
- data/lib/fisk/instructions/movhps.rb +55 -0
- data/lib/fisk/instructions/movlhps.rb +32 -0
- data/lib/fisk/instructions/movlpd.rb +57 -0
- data/lib/fisk/instructions/movlps.rb +55 -0
- data/lib/fisk/instructions/movmskpd.rb +33 -0
- data/lib/fisk/instructions/movmskps.rb +32 -0
- data/lib/fisk/instructions/movntdq.rb +33 -0
- data/lib/fisk/instructions/movntdqa.rb +34 -0
- data/lib/fisk/instructions/movnti.rb +55 -0
- data/lib/fisk/instructions/movntpd.rb +33 -0
- data/lib/fisk/instructions/movntps.rb +32 -0
- data/lib/fisk/instructions/movntq.rb +32 -0
- data/lib/fisk/instructions/movntsd.rb +33 -0
- data/lib/fisk/instructions/movntss.rb +33 -0
- data/lib/fisk/instructions/movq.rb +349 -0
- data/lib/fisk/instructions/movq2dq.rb +33 -0
- data/lib/fisk/instructions/movsd.rb +99 -0
- data/lib/fisk/instructions/movshdup.rb +57 -0
- data/lib/fisk/instructions/movsldup.rb +57 -0
- data/lib/fisk/instructions/movss.rb +99 -0
- data/lib/fisk/instructions/movsx.rb +241 -0
- data/lib/fisk/instructions/movsxd.rb +53 -0
- data/lib/fisk/instructions/movupd.rb +99 -0
- data/lib/fisk/instructions/movups.rb +95 -0
- data/lib/fisk/instructions/movzx.rb +241 -0
- data/lib/fisk/instructions/mpsadbw.rb +63 -0
- data/lib/fisk/instructions/mul.rb +179 -0
- data/lib/fisk/instructions/mulpd.rb +57 -0
- data/lib/fisk/instructions/mulps.rb +55 -0
- data/lib/fisk/instructions/mulsd.rb +57 -0
- data/lib/fisk/instructions/mulss.rb +57 -0
- data/lib/fisk/instructions/mulx.rb +81 -0
- data/lib/fisk/instructions/mwait.rb +21 -0
- data/lib/fisk/instructions/mwaitx.rb +21 -0
- data/lib/fisk/instructions/neg.rb +179 -0
- data/lib/fisk/instructions/nop.rb +19 -0
- data/lib/fisk/instructions/not.rb +179 -0
- data/lib/fisk/instructions/or.rb +726 -0
- data/lib/fisk/instructions/orpd.rb +57 -0
- data/lib/fisk/instructions/orps.rb +55 -0
- data/lib/fisk/instructions/pabsb.rb +107 -0
- data/lib/fisk/instructions/pabsd.rb +107 -0
- data/lib/fisk/instructions/pabsw.rb +107 -0
- data/lib/fisk/instructions/packssdw.rb +103 -0
- data/lib/fisk/instructions/packsswb.rb +103 -0
- data/lib/fisk/instructions/packusdw.rb +59 -0
- data/lib/fisk/instructions/packuswb.rb +103 -0
- data/lib/fisk/instructions/paddb.rb +103 -0
- data/lib/fisk/instructions/paddd.rb +103 -0
- data/lib/fisk/instructions/paddq.rb +103 -0
- data/lib/fisk/instructions/paddsb.rb +103 -0
- data/lib/fisk/instructions/paddsw.rb +103 -0
- data/lib/fisk/instructions/paddusb.rb +103 -0
- data/lib/fisk/instructions/paddusw.rb +103 -0
- data/lib/fisk/instructions/paddw.rb +103 -0
- data/lib/fisk/instructions/palignr.rb +115 -0
- data/lib/fisk/instructions/pand.rb +103 -0
- data/lib/fisk/instructions/pandn.rb +103 -0
- data/lib/fisk/instructions/pause.rb +20 -0
- data/lib/fisk/instructions/pavgb.rb +103 -0
- data/lib/fisk/instructions/pavgusb.rb +57 -0
- data/lib/fisk/instructions/pavgw.rb +103 -0
- data/lib/fisk/instructions/pblendvb.rb +61 -0
- data/lib/fisk/instructions/pblendw.rb +63 -0
- data/lib/fisk/instructions/pclmulqdq.rb +63 -0
- data/lib/fisk/instructions/pcmpeqb.rb +103 -0
- data/lib/fisk/instructions/pcmpeqd.rb +103 -0
- data/lib/fisk/instructions/pcmpeqq.rb +59 -0
- data/lib/fisk/instructions/pcmpeqw.rb +103 -0
- data/lib/fisk/instructions/pcmpestri.rb +63 -0
- data/lib/fisk/instructions/pcmpestrm.rb +63 -0
- data/lib/fisk/instructions/pcmpgtb.rb +103 -0
- data/lib/fisk/instructions/pcmpgtd.rb +103 -0
- data/lib/fisk/instructions/pcmpgtq.rb +59 -0
- data/lib/fisk/instructions/pcmpgtw.rb +103 -0
- data/lib/fisk/instructions/pcmpistri.rb +63 -0
- data/lib/fisk/instructions/pcmpistrm.rb +63 -0
- data/lib/fisk/instructions/pdep.rb +81 -0
- data/lib/fisk/instructions/pext.rb +81 -0
- data/lib/fisk/instructions/pextrb.rb +63 -0
- data/lib/fisk/instructions/pextrd.rb +63 -0
- data/lib/fisk/instructions/pextrq.rb +63 -0
- data/lib/fisk/instructions/pextrw.rb +107 -0
- data/lib/fisk/instructions/pf2id.rb +57 -0
- data/lib/fisk/instructions/pf2iw.rb +57 -0
- data/lib/fisk/instructions/pfacc.rb +57 -0
- data/lib/fisk/instructions/pfadd.rb +57 -0
- data/lib/fisk/instructions/pfcmpeq.rb +57 -0
- data/lib/fisk/instructions/pfcmpge.rb +57 -0
- data/lib/fisk/instructions/pfcmpgt.rb +57 -0
- data/lib/fisk/instructions/pfmax.rb +57 -0
- data/lib/fisk/instructions/pfmin.rb +57 -0
- data/lib/fisk/instructions/pfmul.rb +57 -0
- data/lib/fisk/instructions/pfnacc.rb +57 -0
- data/lib/fisk/instructions/pfpnacc.rb +57 -0
- data/lib/fisk/instructions/pfrcp.rb +57 -0
- data/lib/fisk/instructions/pfrcpit1.rb +57 -0
- data/lib/fisk/instructions/pfrcpit2.rb +57 -0
- data/lib/fisk/instructions/pfrsqit1.rb +57 -0
- data/lib/fisk/instructions/pfrsqrt.rb +57 -0
- data/lib/fisk/instructions/pfsub.rb +57 -0
- data/lib/fisk/instructions/pfsubr.rb +57 -0
- data/lib/fisk/instructions/phaddd.rb +107 -0
- data/lib/fisk/instructions/phaddsw.rb +107 -0
- data/lib/fisk/instructions/phaddw.rb +107 -0
- data/lib/fisk/instructions/phminposuw.rb +59 -0
- data/lib/fisk/instructions/phsubd.rb +107 -0
- data/lib/fisk/instructions/phsubsw.rb +107 -0
- data/lib/fisk/instructions/phsubw.rb +107 -0
- data/lib/fisk/instructions/pi2fd.rb +57 -0
- data/lib/fisk/instructions/pi2fw.rb +57 -0
- data/lib/fisk/instructions/pinsrb.rb +63 -0
- data/lib/fisk/instructions/pinsrd.rb +63 -0
- data/lib/fisk/instructions/pinsrq.rb +63 -0
- data/lib/fisk/instructions/pinsrw.rb +111 -0
- data/lib/fisk/instructions/pmaddubsw.rb +107 -0
- data/lib/fisk/instructions/pmaddwd.rb +103 -0
- data/lib/fisk/instructions/pmaxsb.rb +59 -0
- data/lib/fisk/instructions/pmaxsd.rb +59 -0
- data/lib/fisk/instructions/pmaxsw.rb +103 -0
- data/lib/fisk/instructions/pmaxub.rb +103 -0
- data/lib/fisk/instructions/pmaxud.rb +59 -0
- data/lib/fisk/instructions/pmaxuw.rb +59 -0
- data/lib/fisk/instructions/pminsb.rb +59 -0
- data/lib/fisk/instructions/pminsd.rb +59 -0
- data/lib/fisk/instructions/pminsw.rb +103 -0
- data/lib/fisk/instructions/pminub.rb +103 -0
- data/lib/fisk/instructions/pminud.rb +59 -0
- data/lib/fisk/instructions/pminuw.rb +59 -0
- data/lib/fisk/instructions/pmovmskb.rb +56 -0
- data/lib/fisk/instructions/pmovsxbd.rb +59 -0
- data/lib/fisk/instructions/pmovsxbq.rb +59 -0
- data/lib/fisk/instructions/pmovsxbw.rb +59 -0
- data/lib/fisk/instructions/pmovsxdq.rb +59 -0
- data/lib/fisk/instructions/pmovsxwd.rb +59 -0
- data/lib/fisk/instructions/pmovsxwq.rb +59 -0
- data/lib/fisk/instructions/pmovzxbd.rb +59 -0
- data/lib/fisk/instructions/pmovzxbq.rb +59 -0
- data/lib/fisk/instructions/pmovzxbw.rb +59 -0
- data/lib/fisk/instructions/pmovzxdq.rb +59 -0
- data/lib/fisk/instructions/pmovzxwd.rb +59 -0
- data/lib/fisk/instructions/pmovzxwq.rb +59 -0
- data/lib/fisk/instructions/pmuldq.rb +59 -0
- data/lib/fisk/instructions/pmulhrsw.rb +107 -0
- data/lib/fisk/instructions/pmulhrw.rb +57 -0
- data/lib/fisk/instructions/pmulhuw.rb +103 -0
- data/lib/fisk/instructions/pmulhw.rb +103 -0
- data/lib/fisk/instructions/pmulld.rb +59 -0
- data/lib/fisk/instructions/pmullw.rb +103 -0
- data/lib/fisk/instructions/pmuludq.rb +103 -0
- data/lib/fisk/instructions/pop.rb +120 -0
- data/lib/fisk/instructions/popcnt.rb +155 -0
- data/lib/fisk/instructions/por.rb +103 -0
- data/lib/fisk/instructions/prefetch.rb +31 -0
- data/lib/fisk/instructions/prefetchnta.rb +31 -0
- data/lib/fisk/instructions/prefetcht0.rb +31 -0
- data/lib/fisk/instructions/prefetcht1.rb +31 -0
- data/lib/fisk/instructions/prefetcht2.rb +31 -0
- data/lib/fisk/instructions/prefetchw.rb +31 -0
- data/lib/fisk/instructions/prefetchwt1.rb +31 -0
- data/lib/fisk/instructions/psadbw.rb +103 -0
- data/lib/fisk/instructions/pshufb.rb +107 -0
- data/lib/fisk/instructions/pshufd.rb +61 -0
- data/lib/fisk/instructions/pshufhw.rb +61 -0
- data/lib/fisk/instructions/pshuflw.rb +61 -0
- data/lib/fisk/instructions/pshufw.rb +59 -0
- data/lib/fisk/instructions/psignb.rb +107 -0
- data/lib/fisk/instructions/psignd.rb +107 -0
- data/lib/fisk/instructions/psignw.rb +107 -0
- data/lib/fisk/instructions/pslld.rb +152 -0
- data/lib/fisk/instructions/pslldq.rb +34 -0
- data/lib/fisk/instructions/psllq.rb +152 -0
- data/lib/fisk/instructions/psllw.rb +152 -0
- data/lib/fisk/instructions/psrad.rb +152 -0
- data/lib/fisk/instructions/psraw.rb +152 -0
- data/lib/fisk/instructions/psrld.rb +152 -0
- data/lib/fisk/instructions/psrldq.rb +34 -0
- data/lib/fisk/instructions/psrlq.rb +152 -0
- data/lib/fisk/instructions/psrlw.rb +152 -0
- data/lib/fisk/instructions/psubb.rb +103 -0
- data/lib/fisk/instructions/psubd.rb +103 -0
- data/lib/fisk/instructions/psubq.rb +103 -0
- data/lib/fisk/instructions/psubsb.rb +103 -0
- data/lib/fisk/instructions/psubsw.rb +103 -0
- data/lib/fisk/instructions/psubusb.rb +103 -0
- data/lib/fisk/instructions/psubusw.rb +103 -0
- data/lib/fisk/instructions/psubw.rb +103 -0
- data/lib/fisk/instructions/pswapd.rb +57 -0
- data/lib/fisk/instructions/ptest.rb +59 -0
- data/lib/fisk/instructions/punpckhbw.rb +103 -0
- data/lib/fisk/instructions/punpckhdq.rb +103 -0
- data/lib/fisk/instructions/punpckhqdq.rb +57 -0
- data/lib/fisk/instructions/punpckhwd.rb +103 -0
- data/lib/fisk/instructions/punpcklbw.rb +103 -0
- data/lib/fisk/instructions/punpckldq.rb +103 -0
- data/lib/fisk/instructions/punpcklqdq.rb +57 -0
- data/lib/fisk/instructions/punpcklwd.rb +103 -0
- data/lib/fisk/instructions/push.rb +144 -0
- data/lib/fisk/instructions/pxor.rb +103 -0
- data/lib/fisk/instructions/rcl.rb +551 -0
- data/lib/fisk/instructions/rcpps.rb +55 -0
- data/lib/fisk/instructions/rcpss.rb +57 -0
- data/lib/fisk/instructions/rcr.rb +551 -0
- data/lib/fisk/instructions/rdrand.rb +76 -0
- data/lib/fisk/instructions/rdseed.rb +76 -0
- data/lib/fisk/instructions/rdtsc.rb +20 -0
- data/lib/fisk/instructions/rdtscp.rb +21 -0
- data/lib/fisk/instructions/ret.rb +31 -0
- data/lib/fisk/instructions/rol.rb +551 -0
- data/lib/fisk/instructions/ror.rb +551 -0
- data/lib/fisk/instructions/rorx.rb +85 -0
- data/lib/fisk/instructions/roundpd.rb +63 -0
- data/lib/fisk/instructions/roundps.rb +63 -0
- data/lib/fisk/instructions/roundsd.rb +63 -0
- data/lib/fisk/instructions/roundss.rb +63 -0
- data/lib/fisk/instructions/rsqrtps.rb +55 -0
- data/lib/fisk/instructions/rsqrtss.rb +57 -0
- data/lib/fisk/instructions/sal.rb +551 -0
- data/lib/fisk/instructions/sar.rb +551 -0
- data/lib/fisk/instructions/sarx.rb +81 -0
- data/lib/fisk/instructions/sbb.rb +726 -0
- data/lib/fisk/instructions/seta.rb +53 -0
- data/lib/fisk/instructions/setae.rb +53 -0
- data/lib/fisk/instructions/setb.rb +53 -0
- data/lib/fisk/instructions/setbe.rb +53 -0
- data/lib/fisk/instructions/setc.rb +53 -0
- data/lib/fisk/instructions/sete.rb +53 -0
- data/lib/fisk/instructions/setg.rb +53 -0
- data/lib/fisk/instructions/setge.rb +53 -0
- data/lib/fisk/instructions/setl.rb +53 -0
- data/lib/fisk/instructions/setle.rb +53 -0
- data/lib/fisk/instructions/setna.rb +53 -0
- data/lib/fisk/instructions/setnae.rb +53 -0
- data/lib/fisk/instructions/setnb.rb +53 -0
- data/lib/fisk/instructions/setnbe.rb +53 -0
- data/lib/fisk/instructions/setnc.rb +53 -0
- data/lib/fisk/instructions/setne.rb +53 -0
- data/lib/fisk/instructions/setng.rb +53 -0
- data/lib/fisk/instructions/setnge.rb +53 -0
- data/lib/fisk/instructions/setnl.rb +53 -0
- data/lib/fisk/instructions/setnle.rb +53 -0
- data/lib/fisk/instructions/setno.rb +53 -0
- data/lib/fisk/instructions/setnp.rb +53 -0
- data/lib/fisk/instructions/setns.rb +53 -0
- data/lib/fisk/instructions/setnz.rb +53 -0
- data/lib/fisk/instructions/seto.rb +53 -0
- data/lib/fisk/instructions/setp.rb +53 -0
- data/lib/fisk/instructions/setpe.rb +53 -0
- data/lib/fisk/instructions/setpo.rb +53 -0
- data/lib/fisk/instructions/sets.rb +53 -0
- data/lib/fisk/instructions/setz.rb +53 -0
- data/lib/fisk/instructions/sfence.rb +21 -0
- data/lib/fisk/instructions/sha1msg1.rb +57 -0
- data/lib/fisk/instructions/sha1msg2.rb +57 -0
- data/lib/fisk/instructions/sha1nexte.rb +57 -0
- data/lib/fisk/instructions/sha1rnds4.rb +61 -0
- data/lib/fisk/instructions/sha256msg1.rb +57 -0
- data/lib/fisk/instructions/sha256msg2.rb +57 -0
- data/lib/fisk/instructions/sha256rnds2.rb +59 -0
- data/lib/fisk/instructions/shl.rb +551 -0
- data/lib/fisk/instructions/shld.rb +307 -0
- data/lib/fisk/instructions/shlx.rb +81 -0
- data/lib/fisk/instructions/shr.rb +551 -0
- data/lib/fisk/instructions/shrd.rb +307 -0
- data/lib/fisk/instructions/shrx.rb +81 -0
- data/lib/fisk/instructions/shufpd.rb +61 -0
- data/lib/fisk/instructions/shufps.rb +59 -0
- data/lib/fisk/instructions/sqrtpd.rb +57 -0
- data/lib/fisk/instructions/sqrtps.rb +55 -0
- data/lib/fisk/instructions/sqrtsd.rb +57 -0
- data/lib/fisk/instructions/sqrtss.rb +57 -0
- data/lib/fisk/instructions/stc.rb +19 -0
- data/lib/fisk/instructions/std.rb +19 -0
- data/lib/fisk/instructions/stmxcsr.rb +31 -0
- data/lib/fisk/instructions/sub.rb +726 -0
- data/lib/fisk/instructions/subpd.rb +57 -0
- data/lib/fisk/instructions/subps.rb +55 -0
- data/lib/fisk/instructions/subsd.rb +57 -0
- data/lib/fisk/instructions/subss.rb +57 -0
- data/lib/fisk/instructions/syscall.rb +20 -0
- data/lib/fisk/instructions/t1mskc.rb +77 -0
- data/lib/fisk/instructions/test.rb +432 -0
- data/lib/fisk/instructions/tzcnt.rb +155 -0
- data/lib/fisk/instructions/tzmsk.rb +77 -0
- data/lib/fisk/instructions/ucomisd.rb +57 -0
- data/lib/fisk/instructions/ucomiss.rb +55 -0
- data/lib/fisk/instructions/ud2.rb +20 -0
- data/lib/fisk/instructions/unpckhpd.rb +57 -0
- data/lib/fisk/instructions/unpckhps.rb +55 -0
- data/lib/fisk/instructions/unpcklpd.rb +57 -0
- data/lib/fisk/instructions/unpcklps.rb +55 -0
- data/lib/fisk/instructions/vaddpd.rb +190 -0
- data/lib/fisk/instructions/vaddps.rb +190 -0
- data/lib/fisk/instructions/vaddsd.rb +82 -0
- data/lib/fisk/instructions/vaddss.rb +82 -0
- data/lib/fisk/instructions/vaddsubpd.rb +81 -0
- data/lib/fisk/instructions/vaddsubps.rb +81 -0
- data/lib/fisk/instructions/vaesdec.rb +45 -0
- data/lib/fisk/instructions/vaesdeclast.rb +45 -0
- data/lib/fisk/instructions/vaesenc.rb +45 -0
- data/lib/fisk/instructions/vaesenclast.rb +45 -0
- data/lib/fisk/instructions/vaesimc.rb +43 -0
- data/lib/fisk/instructions/vaeskeygenassist.rb +47 -0
- data/lib/fisk/instructions/valignd.rb +129 -0
- data/lib/fisk/instructions/valignq.rb +129 -0
- data/lib/fisk/instructions/vandnpd.rb +189 -0
- data/lib/fisk/instructions/vandnps.rb +189 -0
- data/lib/fisk/instructions/vandpd.rb +189 -0
- data/lib/fisk/instructions/vandps.rb +189 -0
- data/lib/fisk/instructions/vblendmpd.rb +117 -0
- data/lib/fisk/instructions/vblendmps.rb +117 -0
- data/lib/fisk/instructions/vblendpd.rb +89 -0
- data/lib/fisk/instructions/vblendps.rb +89 -0
- data/lib/fisk/instructions/vblendvpd.rb +89 -0
- data/lib/fisk/instructions/vblendvps.rb +89 -0
- data/lib/fisk/instructions/vbroadcastf128.rb +26 -0
- data/lib/fisk/instructions/vbroadcastf32x2.rb +77 -0
- data/lib/fisk/instructions/vbroadcastf32x4.rb +43 -0
- data/lib/fisk/instructions/vbroadcastf32x8.rb +26 -0
- data/lib/fisk/instructions/vbroadcastf64x2.rb +43 -0
- data/lib/fisk/instructions/vbroadcastf64x4.rb +26 -0
- data/lib/fisk/instructions/vbroadcasti128.rb +26 -0
- data/lib/fisk/instructions/vbroadcasti32x2.rb +111 -0
- data/lib/fisk/instructions/vbroadcasti32x4.rb +43 -0
- data/lib/fisk/instructions/vbroadcasti32x8.rb +26 -0
- data/lib/fisk/instructions/vbroadcasti64x2.rb +43 -0
- data/lib/fisk/instructions/vbroadcasti64x4.rb +26 -0
- data/lib/fisk/instructions/vbroadcastsd.rb +111 -0
- data/lib/fisk/instructions/vbroadcastss.rb +145 -0
- data/lib/fisk/instructions/vcmppd.rb +210 -0
- data/lib/fisk/instructions/vcmpps.rb +210 -0
- data/lib/fisk/instructions/vcmpsd.rb +90 -0
- data/lib/fisk/instructions/vcmpss.rb +90 -0
- data/lib/fisk/instructions/vcomisd.rb +78 -0
- data/lib/fisk/instructions/vcomiss.rb +78 -0
- data/lib/fisk/instructions/vcompresspd.rb +111 -0
- data/lib/fisk/instructions/vcompressps.rb +111 -0
- data/lib/fisk/instructions/vcvtdq2pd.rb +179 -0
- data/lib/fisk/instructions/vcvtdq2ps.rb +180 -0
- data/lib/fisk/instructions/vcvtpd2dq.rb +180 -0
- data/lib/fisk/instructions/vcvtpd2ps.rb +180 -0
- data/lib/fisk/instructions/vcvtpd2qq.rb +112 -0
- data/lib/fisk/instructions/vcvtpd2udq.rb +112 -0
- data/lib/fisk/instructions/vcvtpd2uqq.rb +112 -0
- data/lib/fisk/instructions/vcvtph2ps.rb +180 -0
- data/lib/fisk/instructions/vcvtps2dq.rb +180 -0
- data/lib/fisk/instructions/vcvtps2pd.rb +180 -0
- data/lib/fisk/instructions/vcvtps2ph.rb +200 -0
- data/lib/fisk/instructions/vcvtps2qq.rb +112 -0
- data/lib/fisk/instructions/vcvtps2udq.rb +112 -0
- data/lib/fisk/instructions/vcvtps2uqq.rb +112 -0
- data/lib/fisk/instructions/vcvtqq2pd.rb +112 -0
- data/lib/fisk/instructions/vcvtqq2ps.rb +112 -0
- data/lib/fisk/instructions/vcvtsd2si.rb +147 -0
- data/lib/fisk/instructions/vcvtsd2ss.rb +82 -0
- data/lib/fisk/instructions/vcvtsd2usi.rb +79 -0
- data/lib/fisk/instructions/vcvtsi2sd.rb +154 -0
- data/lib/fisk/instructions/vcvtsi2ss.rb +155 -0
- data/lib/fisk/instructions/vcvtss2sd.rb +82 -0
- data/lib/fisk/instructions/vcvtss2si.rb +147 -0
- data/lib/fisk/instructions/vcvtss2usi.rb +79 -0
- data/lib/fisk/instructions/vcvttpd2dq.rb +180 -0
- data/lib/fisk/instructions/vcvttpd2qq.rb +112 -0
- data/lib/fisk/instructions/vcvttpd2udq.rb +112 -0
- data/lib/fisk/instructions/vcvttpd2uqq.rb +112 -0
- data/lib/fisk/instructions/vcvttps2dq.rb +180 -0
- data/lib/fisk/instructions/vcvttps2qq.rb +112 -0
- data/lib/fisk/instructions/vcvttps2udq.rb +112 -0
- data/lib/fisk/instructions/vcvttps2uqq.rb +112 -0
- data/lib/fisk/instructions/vcvttsd2si.rb +147 -0
- data/lib/fisk/instructions/vcvttsd2usi.rb +79 -0
- data/lib/fisk/instructions/vcvttss2si.rb +147 -0
- data/lib/fisk/instructions/vcvttss2usi.rb +79 -0
- data/lib/fisk/instructions/vcvtudq2pd.rb +111 -0
- data/lib/fisk/instructions/vcvtudq2ps.rb +112 -0
- data/lib/fisk/instructions/vcvtuqq2pd.rb +112 -0
- data/lib/fisk/instructions/vcvtuqq2ps.rb +112 -0
- data/lib/fisk/instructions/vcvtusi2sd.rb +82 -0
- data/lib/fisk/instructions/vcvtusi2ss.rb +83 -0
- data/lib/fisk/instructions/vdbpsadbw.rb +129 -0
- data/lib/fisk/instructions/vdivpd.rb +190 -0
- data/lib/fisk/instructions/vdivps.rb +190 -0
- data/lib/fisk/instructions/vdivsd.rb +82 -0
- data/lib/fisk/instructions/vdivss.rb +82 -0
- data/lib/fisk/instructions/vdppd.rb +49 -0
- data/lib/fisk/instructions/vdpps.rb +89 -0
- data/lib/fisk/instructions/vexp2pd.rb +44 -0
- data/lib/fisk/instructions/vexp2ps.rb +44 -0
- data/lib/fisk/instructions/vexpandpd.rb +111 -0
- data/lib/fisk/instructions/vexpandps.rb +111 -0
- data/lib/fisk/instructions/vextractf128.rb +47 -0
- data/lib/fisk/instructions/vextractf32x4.rb +85 -0
- data/lib/fisk/instructions/vextractf32x8.rb +47 -0
- data/lib/fisk/instructions/vextractf64x2.rb +85 -0
- data/lib/fisk/instructions/vextractf64x4.rb +47 -0
- data/lib/fisk/instructions/vextracti128.rb +47 -0
- data/lib/fisk/instructions/vextracti32x4.rb +85 -0
- data/lib/fisk/instructions/vextracti32x8.rb +47 -0
- data/lib/fisk/instructions/vextracti64x2.rb +85 -0
- data/lib/fisk/instructions/vextracti64x4.rb +47 -0
- data/lib/fisk/instructions/vextractps.rb +85 -0
- data/lib/fisk/instructions/vfixupimmpd.rb +130 -0
- data/lib/fisk/instructions/vfixupimmps.rb +130 -0
- data/lib/fisk/instructions/vfixupimmsd.rb +50 -0
- data/lib/fisk/instructions/vfixupimmss.rb +50 -0
- data/lib/fisk/instructions/vfmadd132pd.rb +190 -0
- data/lib/fisk/instructions/vfmadd132ps.rb +190 -0
- data/lib/fisk/instructions/vfmadd132sd.rb +82 -0
- data/lib/fisk/instructions/vfmadd132ss.rb +82 -0
- data/lib/fisk/instructions/vfmadd213pd.rb +190 -0
- data/lib/fisk/instructions/vfmadd213ps.rb +190 -0
- data/lib/fisk/instructions/vfmadd213sd.rb +82 -0
- data/lib/fisk/instructions/vfmadd213ss.rb +82 -0
- data/lib/fisk/instructions/vfmadd231pd.rb +190 -0
- data/lib/fisk/instructions/vfmadd231ps.rb +190 -0
- data/lib/fisk/instructions/vfmadd231sd.rb +82 -0
- data/lib/fisk/instructions/vfmadd231ss.rb +82 -0
- data/lib/fisk/instructions/vfmaddpd.rb +153 -0
- data/lib/fisk/instructions/vfmaddps.rb +153 -0
- data/lib/fisk/instructions/vfmaddsd.rb +81 -0
- data/lib/fisk/instructions/vfmaddss.rb +81 -0
- data/lib/fisk/instructions/vfmaddsub132pd.rb +190 -0
- data/lib/fisk/instructions/vfmaddsub132ps.rb +190 -0
- data/lib/fisk/instructions/vfmaddsub213pd.rb +190 -0
- data/lib/fisk/instructions/vfmaddsub213ps.rb +190 -0
- data/lib/fisk/instructions/vfmaddsub231pd.rb +190 -0
- data/lib/fisk/instructions/vfmaddsub231ps.rb +190 -0
- data/lib/fisk/instructions/vfmaddsubpd.rb +153 -0
- data/lib/fisk/instructions/vfmaddsubps.rb +153 -0
- data/lib/fisk/instructions/vfmsub132pd.rb +190 -0
- data/lib/fisk/instructions/vfmsub132ps.rb +190 -0
- data/lib/fisk/instructions/vfmsub132sd.rb +82 -0
- data/lib/fisk/instructions/vfmsub132ss.rb +82 -0
- data/lib/fisk/instructions/vfmsub213pd.rb +190 -0
- data/lib/fisk/instructions/vfmsub213ps.rb +190 -0
- data/lib/fisk/instructions/vfmsub213sd.rb +82 -0
- data/lib/fisk/instructions/vfmsub213ss.rb +82 -0
- data/lib/fisk/instructions/vfmsub231pd.rb +190 -0
- data/lib/fisk/instructions/vfmsub231ps.rb +190 -0
- data/lib/fisk/instructions/vfmsub231sd.rb +82 -0
- data/lib/fisk/instructions/vfmsub231ss.rb +82 -0
- data/lib/fisk/instructions/vfmsubadd132pd.rb +190 -0
- data/lib/fisk/instructions/vfmsubadd132ps.rb +190 -0
- data/lib/fisk/instructions/vfmsubadd213pd.rb +190 -0
- data/lib/fisk/instructions/vfmsubadd213ps.rb +190 -0
- data/lib/fisk/instructions/vfmsubadd231pd.rb +190 -0
- data/lib/fisk/instructions/vfmsubadd231ps.rb +190 -0
- data/lib/fisk/instructions/vfmsubaddpd.rb +153 -0
- data/lib/fisk/instructions/vfmsubaddps.rb +153 -0
- data/lib/fisk/instructions/vfmsubpd.rb +153 -0
- data/lib/fisk/instructions/vfmsubps.rb +153 -0
- data/lib/fisk/instructions/vfmsubsd.rb +81 -0
- data/lib/fisk/instructions/vfmsubss.rb +81 -0
- data/lib/fisk/instructions/vfnmadd132pd.rb +190 -0
- data/lib/fisk/instructions/vfnmadd132ps.rb +190 -0
- data/lib/fisk/instructions/vfnmadd132sd.rb +82 -0
- data/lib/fisk/instructions/vfnmadd132ss.rb +82 -0
- data/lib/fisk/instructions/vfnmadd213pd.rb +190 -0
- data/lib/fisk/instructions/vfnmadd213ps.rb +190 -0
- data/lib/fisk/instructions/vfnmadd213sd.rb +82 -0
- data/lib/fisk/instructions/vfnmadd213ss.rb +82 -0
- data/lib/fisk/instructions/vfnmadd231pd.rb +190 -0
- data/lib/fisk/instructions/vfnmadd231ps.rb +190 -0
- data/lib/fisk/instructions/vfnmadd231sd.rb +82 -0
- data/lib/fisk/instructions/vfnmadd231ss.rb +82 -0
- data/lib/fisk/instructions/vfnmaddpd.rb +153 -0
- data/lib/fisk/instructions/vfnmaddps.rb +153 -0
- data/lib/fisk/instructions/vfnmaddsd.rb +81 -0
- data/lib/fisk/instructions/vfnmaddss.rb +81 -0
- data/lib/fisk/instructions/vfnmsub132pd.rb +190 -0
- data/lib/fisk/instructions/vfnmsub132ps.rb +190 -0
- data/lib/fisk/instructions/vfnmsub132sd.rb +82 -0
- data/lib/fisk/instructions/vfnmsub132ss.rb +82 -0
- data/lib/fisk/instructions/vfnmsub213pd.rb +190 -0
- data/lib/fisk/instructions/vfnmsub213ps.rb +190 -0
- data/lib/fisk/instructions/vfnmsub213sd.rb +82 -0
- data/lib/fisk/instructions/vfnmsub213ss.rb +82 -0
- data/lib/fisk/instructions/vfnmsub231pd.rb +190 -0
- data/lib/fisk/instructions/vfnmsub231ps.rb +190 -0
- data/lib/fisk/instructions/vfnmsub231sd.rb +82 -0
- data/lib/fisk/instructions/vfnmsub231ss.rb +82 -0
- data/lib/fisk/instructions/vfnmsubpd.rb +153 -0
- data/lib/fisk/instructions/vfnmsubps.rb +153 -0
- data/lib/fisk/instructions/vfnmsubsd.rb +81 -0
- data/lib/fisk/instructions/vfnmsubss.rb +81 -0
- data/lib/fisk/instructions/vfpclasspd.rb +123 -0
- data/lib/fisk/instructions/vfpclassps.rb +123 -0
- data/lib/fisk/instructions/vfpclasssd.rb +47 -0
- data/lib/fisk/instructions/vfpclassss.rb +47 -0
- data/lib/fisk/instructions/vfrczpd.rb +77 -0
- data/lib/fisk/instructions/vfrczps.rb +77 -0
- data/lib/fisk/instructions/vfrczsd.rb +43 -0
- data/lib/fisk/instructions/vfrczss.rb +43 -0
- data/lib/fisk/instructions/vgatherdpd.rb +96 -0
- data/lib/fisk/instructions/vgatherdps.rb +96 -0
- data/lib/fisk/instructions/vgatherpf0dpd.rb +25 -0
- data/lib/fisk/instructions/vgatherpf0dps.rb +25 -0
- data/lib/fisk/instructions/vgatherpf0qpd.rb +25 -0
- data/lib/fisk/instructions/vgatherpf0qps.rb +25 -0
- data/lib/fisk/instructions/vgatherpf1dpd.rb +25 -0
- data/lib/fisk/instructions/vgatherpf1dps.rb +25 -0
- data/lib/fisk/instructions/vgatherpf1qpd.rb +25 -0
- data/lib/fisk/instructions/vgatherpf1qps.rb +25 -0
- data/lib/fisk/instructions/vgatherqpd.rb +96 -0
- data/lib/fisk/instructions/vgatherqps.rb +96 -0
- data/lib/fisk/instructions/vgetexppd.rb +112 -0
- data/lib/fisk/instructions/vgetexpps.rb +112 -0
- data/lib/fisk/instructions/vgetexpsd.rb +46 -0
- data/lib/fisk/instructions/vgetexpss.rb +46 -0
- data/lib/fisk/instructions/vgetmantpd.rb +124 -0
- data/lib/fisk/instructions/vgetmantps.rb +124 -0
- data/lib/fisk/instructions/vgetmantsd.rb +50 -0
- data/lib/fisk/instructions/vgetmantss.rb +50 -0
- data/lib/fisk/instructions/vhaddpd.rb +81 -0
- data/lib/fisk/instructions/vhaddps.rb +81 -0
- data/lib/fisk/instructions/vhsubpd.rb +81 -0
- data/lib/fisk/instructions/vhsubps.rb +81 -0
- data/lib/fisk/instructions/vinsertf128.rb +49 -0
- data/lib/fisk/instructions/vinsertf32x4.rb +89 -0
- data/lib/fisk/instructions/vinsertf32x8.rb +49 -0
- data/lib/fisk/instructions/vinsertf64x2.rb +89 -0
- data/lib/fisk/instructions/vinsertf64x4.rb +49 -0
- data/lib/fisk/instructions/vinserti128.rb +49 -0
- data/lib/fisk/instructions/vinserti32x4.rb +89 -0
- data/lib/fisk/instructions/vinserti32x8.rb +49 -0
- data/lib/fisk/instructions/vinserti64x2.rb +89 -0
- data/lib/fisk/instructions/vinserti64x4.rb +49 -0
- data/lib/fisk/instructions/vinsertps.rb +89 -0
- data/lib/fisk/instructions/vlddqu.rb +43 -0
- data/lib/fisk/instructions/vldmxcsr.rb +25 -0
- data/lib/fisk/instructions/vmaskmovdqu.rb +26 -0
- data/lib/fisk/instructions/vmaskmovpd.rb +81 -0
- data/lib/fisk/instructions/vmaskmovps.rb +81 -0
- data/lib/fisk/instructions/vmaxpd.rb +190 -0
- data/lib/fisk/instructions/vmaxps.rb +190 -0
- data/lib/fisk/instructions/vmaxsd.rb +82 -0
- data/lib/fisk/instructions/vmaxss.rb +82 -0
- data/lib/fisk/instructions/vminpd.rb +190 -0
- data/lib/fisk/instructions/vminps.rb +190 -0
- data/lib/fisk/instructions/vminsd.rb +82 -0
- data/lib/fisk/instructions/vminss.rb +82 -0
- data/lib/fisk/instructions/vmovapd.rb +319 -0
- data/lib/fisk/instructions/vmovaps.rb +319 -0
- data/lib/fisk/instructions/vmovd.rb +145 -0
- data/lib/fisk/instructions/vmovddup.rb +179 -0
- data/lib/fisk/instructions/vmovdqa.rb +133 -0
- data/lib/fisk/instructions/vmovdqa32.rb +195 -0
- data/lib/fisk/instructions/vmovdqa64.rb +195 -0
- data/lib/fisk/instructions/vmovdqu.rb +133 -0
- data/lib/fisk/instructions/vmovdqu16.rb +195 -0
- data/lib/fisk/instructions/vmovdqu32.rb +195 -0
- data/lib/fisk/instructions/vmovdqu64.rb +195 -0
- data/lib/fisk/instructions/vmovdqu8.rb +195 -0
- data/lib/fisk/instructions/vmovhlps.rb +45 -0
- data/lib/fisk/instructions/vmovhpd.rb +79 -0
- data/lib/fisk/instructions/vmovhps.rb +79 -0
- data/lib/fisk/instructions/vmovlhps.rb +45 -0
- data/lib/fisk/instructions/vmovlpd.rb +79 -0
- data/lib/fisk/instructions/vmovlps.rb +79 -0
- data/lib/fisk/instructions/vmovmskpd.rb +43 -0
- data/lib/fisk/instructions/vmovmskps.rb +43 -0
- data/lib/fisk/instructions/vmovntdq.rb +94 -0
- data/lib/fisk/instructions/vmovntdqa.rb +94 -0
- data/lib/fisk/instructions/vmovntpd.rb +94 -0
- data/lib/fisk/instructions/vmovntps.rb +94 -0
- data/lib/fisk/instructions/vmovq.rb +245 -0
- data/lib/fisk/instructions/vmovsd.rb +135 -0
- data/lib/fisk/instructions/vmovshdup.rb +179 -0
- data/lib/fisk/instructions/vmovsldup.rb +179 -0
- data/lib/fisk/instructions/vmovss.rb +135 -0
- data/lib/fisk/instructions/vmovupd.rb +319 -0
- data/lib/fisk/instructions/vmovups.rb +319 -0
- data/lib/fisk/instructions/vmpsadbw.rb +89 -0
- data/lib/fisk/instructions/vmulpd.rb +190 -0
- data/lib/fisk/instructions/vmulps.rb +190 -0
- data/lib/fisk/instructions/vmulsd.rb +82 -0
- data/lib/fisk/instructions/vmulss.rb +82 -0
- data/lib/fisk/instructions/vorpd.rb +189 -0
- data/lib/fisk/instructions/vorps.rb +189 -0
- data/lib/fisk/instructions/vpabsb.rb +179 -0
- data/lib/fisk/instructions/vpabsd.rb +179 -0
- data/lib/fisk/instructions/vpabsq.rb +111 -0
- data/lib/fisk/instructions/vpabsw.rb +179 -0
- data/lib/fisk/instructions/vpackssdw.rb +189 -0
- data/lib/fisk/instructions/vpacksswb.rb +189 -0
- data/lib/fisk/instructions/vpackusdw.rb +189 -0
- data/lib/fisk/instructions/vpackuswb.rb +189 -0
- data/lib/fisk/instructions/vpaddb.rb +189 -0
- data/lib/fisk/instructions/vpaddd.rb +189 -0
- data/lib/fisk/instructions/vpaddq.rb +189 -0
- data/lib/fisk/instructions/vpaddsb.rb +189 -0
- data/lib/fisk/instructions/vpaddsw.rb +189 -0
- data/lib/fisk/instructions/vpaddusb.rb +189 -0
- data/lib/fisk/instructions/vpaddusw.rb +189 -0
- data/lib/fisk/instructions/vpaddw.rb +189 -0
- data/lib/fisk/instructions/vpalignr.rb +209 -0
- data/lib/fisk/instructions/vpand.rb +81 -0
- data/lib/fisk/instructions/vpandd.rb +117 -0
- data/lib/fisk/instructions/vpandn.rb +81 -0
- data/lib/fisk/instructions/vpandnd.rb +117 -0
- data/lib/fisk/instructions/vpandnq.rb +117 -0
- data/lib/fisk/instructions/vpandq.rb +117 -0
- data/lib/fisk/instructions/vpavgb.rb +189 -0
- data/lib/fisk/instructions/vpavgw.rb +189 -0
- data/lib/fisk/instructions/vpblendd.rb +89 -0
- data/lib/fisk/instructions/vpblendmb.rb +117 -0
- data/lib/fisk/instructions/vpblendmd.rb +117 -0
- data/lib/fisk/instructions/vpblendmq.rb +117 -0
- data/lib/fisk/instructions/vpblendmw.rb +117 -0
- data/lib/fisk/instructions/vpblendvb.rb +89 -0
- data/lib/fisk/instructions/vpblendw.rb +89 -0
- data/lib/fisk/instructions/vpbroadcastb.rb +230 -0
- data/lib/fisk/instructions/vpbroadcastd.rb +230 -0
- data/lib/fisk/instructions/vpbroadcastmb2q.rb +60 -0
- data/lib/fisk/instructions/vpbroadcastmw2d.rb +60 -0
- data/lib/fisk/instructions/vpbroadcastq.rb +230 -0
- data/lib/fisk/instructions/vpbroadcastw.rb +230 -0
- data/lib/fisk/instructions/vpclmulqdq.rb +49 -0
- data/lib/fisk/instructions/vpcmov.rb +153 -0
- data/lib/fisk/instructions/vpcmpb.rb +129 -0
- data/lib/fisk/instructions/vpcmpd.rb +129 -0
- data/lib/fisk/instructions/vpcmpeqb.rb +189 -0
- data/lib/fisk/instructions/vpcmpeqd.rb +189 -0
- data/lib/fisk/instructions/vpcmpeqq.rb +189 -0
- data/lib/fisk/instructions/vpcmpeqw.rb +189 -0
- data/lib/fisk/instructions/vpcmpestri.rb +47 -0
- data/lib/fisk/instructions/vpcmpestrm.rb +47 -0
- data/lib/fisk/instructions/vpcmpgtb.rb +189 -0
- data/lib/fisk/instructions/vpcmpgtd.rb +189 -0
- data/lib/fisk/instructions/vpcmpgtq.rb +189 -0
- data/lib/fisk/instructions/vpcmpgtw.rb +189 -0
- data/lib/fisk/instructions/vpcmpistri.rb +47 -0
- data/lib/fisk/instructions/vpcmpistrm.rb +47 -0
- data/lib/fisk/instructions/vpcmpq.rb +129 -0
- data/lib/fisk/instructions/vpcmpub.rb +129 -0
- data/lib/fisk/instructions/vpcmpud.rb +129 -0
- data/lib/fisk/instructions/vpcmpuq.rb +129 -0
- data/lib/fisk/instructions/vpcmpuw.rb +129 -0
- data/lib/fisk/instructions/vpcmpw.rb +129 -0
- data/lib/fisk/instructions/vpcomb.rb +49 -0
- data/lib/fisk/instructions/vpcomd.rb +49 -0
- data/lib/fisk/instructions/vpcompressd.rb +111 -0
- data/lib/fisk/instructions/vpcompressq.rb +111 -0
- data/lib/fisk/instructions/vpcomq.rb +49 -0
- data/lib/fisk/instructions/vpcomub.rb +49 -0
- data/lib/fisk/instructions/vpcomud.rb +49 -0
- data/lib/fisk/instructions/vpcomuq.rb +49 -0
- data/lib/fisk/instructions/vpcomuw.rb +49 -0
- data/lib/fisk/instructions/vpcomw.rb +49 -0
- data/lib/fisk/instructions/vpconflictd.rb +111 -0
- data/lib/fisk/instructions/vpconflictq.rb +111 -0
- data/lib/fisk/instructions/vperm2f128.rb +49 -0
- data/lib/fisk/instructions/vperm2i128.rb +49 -0
- data/lib/fisk/instructions/vpermb.rb +117 -0
- data/lib/fisk/instructions/vpermd.rb +117 -0
- data/lib/fisk/instructions/vpermi2b.rb +117 -0
- data/lib/fisk/instructions/vpermi2d.rb +117 -0
- data/lib/fisk/instructions/vpermi2pd.rb +117 -0
- data/lib/fisk/instructions/vpermi2ps.rb +117 -0
- data/lib/fisk/instructions/vpermi2q.rb +117 -0
- data/lib/fisk/instructions/vpermi2w.rb +117 -0
- data/lib/fisk/instructions/vpermil2pd.rb +159 -0
- data/lib/fisk/instructions/vpermil2ps.rb +159 -0
- data/lib/fisk/instructions/vpermilpd.rb +379 -0
- data/lib/fisk/instructions/vpermilps.rb +379 -0
- data/lib/fisk/instructions/vpermpd.rb +195 -0
- data/lib/fisk/instructions/vpermps.rb +117 -0
- data/lib/fisk/instructions/vpermq.rb +195 -0
- data/lib/fisk/instructions/vpermt2b.rb +117 -0
- data/lib/fisk/instructions/vpermt2d.rb +117 -0
- data/lib/fisk/instructions/vpermt2pd.rb +117 -0
- data/lib/fisk/instructions/vpermt2ps.rb +117 -0
- data/lib/fisk/instructions/vpermt2q.rb +117 -0
- data/lib/fisk/instructions/vpermt2w.rb +117 -0
- data/lib/fisk/instructions/vpermw.rb +117 -0
- data/lib/fisk/instructions/vpexpandd.rb +111 -0
- data/lib/fisk/instructions/vpexpandq.rb +111 -0
- data/lib/fisk/instructions/vpextrb.rb +85 -0
- data/lib/fisk/instructions/vpextrd.rb +85 -0
- data/lib/fisk/instructions/vpextrq.rb +85 -0
- data/lib/fisk/instructions/vpextrw.rb +109 -0
- data/lib/fisk/instructions/vpgatherdd.rb +96 -0
- data/lib/fisk/instructions/vpgatherdq.rb +96 -0
- data/lib/fisk/instructions/vpgatherqd.rb +96 -0
- data/lib/fisk/instructions/vpgatherqq.rb +96 -0
- data/lib/fisk/instructions/vphaddbd.rb +43 -0
- data/lib/fisk/instructions/vphaddbq.rb +43 -0
- data/lib/fisk/instructions/vphaddbw.rb +43 -0
- data/lib/fisk/instructions/vphaddd.rb +81 -0
- data/lib/fisk/instructions/vphadddq.rb +43 -0
- data/lib/fisk/instructions/vphaddsw.rb +81 -0
- data/lib/fisk/instructions/vphaddubd.rb +43 -0
- data/lib/fisk/instructions/vphaddubq.rb +43 -0
- data/lib/fisk/instructions/vphaddubw.rb +43 -0
- data/lib/fisk/instructions/vphaddudq.rb +43 -0
- data/lib/fisk/instructions/vphadduwd.rb +43 -0
- data/lib/fisk/instructions/vphadduwq.rb +43 -0
- data/lib/fisk/instructions/vphaddw.rb +81 -0
- data/lib/fisk/instructions/vphaddwd.rb +43 -0
- data/lib/fisk/instructions/vphaddwq.rb +43 -0
- data/lib/fisk/instructions/vphminposuw.rb +43 -0
- data/lib/fisk/instructions/vphsubbw.rb +43 -0
- data/lib/fisk/instructions/vphsubd.rb +81 -0
- data/lib/fisk/instructions/vphsubdq.rb +43 -0
- data/lib/fisk/instructions/vphsubsw.rb +81 -0
- data/lib/fisk/instructions/vphsubw.rb +81 -0
- data/lib/fisk/instructions/vphsubwd.rb +43 -0
- data/lib/fisk/instructions/vpinsrb.rb +89 -0
- data/lib/fisk/instructions/vpinsrd.rb +89 -0
- data/lib/fisk/instructions/vpinsrq.rb +89 -0
- data/lib/fisk/instructions/vpinsrw.rb +89 -0
- data/lib/fisk/instructions/vplzcntd.rb +111 -0
- data/lib/fisk/instructions/vplzcntq.rb +111 -0
- data/lib/fisk/instructions/vpmacsdd.rb +49 -0
- data/lib/fisk/instructions/vpmacsdqh.rb +49 -0
- data/lib/fisk/instructions/vpmacsdql.rb +49 -0
- data/lib/fisk/instructions/vpmacssdd.rb +49 -0
- data/lib/fisk/instructions/vpmacssdqh.rb +49 -0
- data/lib/fisk/instructions/vpmacssdql.rb +49 -0
- data/lib/fisk/instructions/vpmacsswd.rb +49 -0
- data/lib/fisk/instructions/vpmacssww.rb +49 -0
- data/lib/fisk/instructions/vpmacswd.rb +49 -0
- data/lib/fisk/instructions/vpmacsww.rb +49 -0
- data/lib/fisk/instructions/vpmadcsswd.rb +49 -0
- data/lib/fisk/instructions/vpmadcswd.rb +49 -0
- data/lib/fisk/instructions/vpmadd52huq.rb +117 -0
- data/lib/fisk/instructions/vpmadd52luq.rb +117 -0
- data/lib/fisk/instructions/vpmaddubsw.rb +189 -0
- data/lib/fisk/instructions/vpmaddwd.rb +189 -0
- data/lib/fisk/instructions/vpmaskmovd.rb +81 -0
- data/lib/fisk/instructions/vpmaskmovq.rb +81 -0
- data/lib/fisk/instructions/vpmaxsb.rb +189 -0
- data/lib/fisk/instructions/vpmaxsd.rb +189 -0
- data/lib/fisk/instructions/vpmaxsq.rb +117 -0
- data/lib/fisk/instructions/vpmaxsw.rb +189 -0
- data/lib/fisk/instructions/vpmaxub.rb +189 -0
- data/lib/fisk/instructions/vpmaxud.rb +189 -0
- data/lib/fisk/instructions/vpmaxuq.rb +117 -0
- data/lib/fisk/instructions/vpmaxuw.rb +189 -0
- data/lib/fisk/instructions/vpminsb.rb +189 -0
- data/lib/fisk/instructions/vpminsd.rb +189 -0
- data/lib/fisk/instructions/vpminsq.rb +117 -0
- data/lib/fisk/instructions/vpminsw.rb +189 -0
- data/lib/fisk/instructions/vpminub.rb +189 -0
- data/lib/fisk/instructions/vpminud.rb +189 -0
- data/lib/fisk/instructions/vpminuq.rb +117 -0
- data/lib/fisk/instructions/vpminuw.rb +189 -0
- data/lib/fisk/instructions/vpmovb2m.rb +60 -0
- data/lib/fisk/instructions/vpmovd2m.rb +60 -0
- data/lib/fisk/instructions/vpmovdb.rb +111 -0
- data/lib/fisk/instructions/vpmovdw.rb +111 -0
- data/lib/fisk/instructions/vpmovm2b.rb +60 -0
- data/lib/fisk/instructions/vpmovm2d.rb +60 -0
- data/lib/fisk/instructions/vpmovm2q.rb +60 -0
- data/lib/fisk/instructions/vpmovm2w.rb +60 -0
- data/lib/fisk/instructions/vpmovmskb.rb +43 -0
- data/lib/fisk/instructions/vpmovq2m.rb +60 -0
- data/lib/fisk/instructions/vpmovqb.rb +111 -0
- data/lib/fisk/instructions/vpmovqd.rb +111 -0
- data/lib/fisk/instructions/vpmovqw.rb +111 -0
- data/lib/fisk/instructions/vpmovsdb.rb +111 -0
- data/lib/fisk/instructions/vpmovsdw.rb +111 -0
- data/lib/fisk/instructions/vpmovsqb.rb +111 -0
- data/lib/fisk/instructions/vpmovsqd.rb +111 -0
- data/lib/fisk/instructions/vpmovsqw.rb +111 -0
- data/lib/fisk/instructions/vpmovswb.rb +111 -0
- data/lib/fisk/instructions/vpmovsxbd.rb +179 -0
- data/lib/fisk/instructions/vpmovsxbq.rb +179 -0
- data/lib/fisk/instructions/vpmovsxbw.rb +179 -0
- data/lib/fisk/instructions/vpmovsxdq.rb +179 -0
- data/lib/fisk/instructions/vpmovsxwd.rb +179 -0
- data/lib/fisk/instructions/vpmovsxwq.rb +179 -0
- data/lib/fisk/instructions/vpmovusdb.rb +111 -0
- data/lib/fisk/instructions/vpmovusdw.rb +111 -0
- data/lib/fisk/instructions/vpmovusqb.rb +111 -0
- data/lib/fisk/instructions/vpmovusqd.rb +111 -0
- data/lib/fisk/instructions/vpmovusqw.rb +111 -0
- data/lib/fisk/instructions/vpmovuswb.rb +111 -0
- data/lib/fisk/instructions/vpmovw2m.rb +60 -0
- data/lib/fisk/instructions/vpmovwb.rb +111 -0
- data/lib/fisk/instructions/vpmovzxbd.rb +179 -0
- data/lib/fisk/instructions/vpmovzxbq.rb +179 -0
- data/lib/fisk/instructions/vpmovzxbw.rb +179 -0
- data/lib/fisk/instructions/vpmovzxdq.rb +179 -0
- data/lib/fisk/instructions/vpmovzxwd.rb +179 -0
- data/lib/fisk/instructions/vpmovzxwq.rb +179 -0
- data/lib/fisk/instructions/vpmuldq.rb +189 -0
- data/lib/fisk/instructions/vpmulhrsw.rb +189 -0
- data/lib/fisk/instructions/vpmulhuw.rb +189 -0
- data/lib/fisk/instructions/vpmulhw.rb +189 -0
- data/lib/fisk/instructions/vpmulld.rb +189 -0
- data/lib/fisk/instructions/vpmullq.rb +117 -0
- data/lib/fisk/instructions/vpmullw.rb +189 -0
- data/lib/fisk/instructions/vpmultishiftqb.rb +117 -0
- data/lib/fisk/instructions/vpmuludq.rb +189 -0
- data/lib/fisk/instructions/vpopcntd.rb +43 -0
- data/lib/fisk/instructions/vpopcntq.rb +43 -0
- data/lib/fisk/instructions/vpor.rb +81 -0
- data/lib/fisk/instructions/vpord.rb +117 -0
- data/lib/fisk/instructions/vporq.rb +117 -0
- data/lib/fisk/instructions/vpperm.rb +81 -0
- data/lib/fisk/instructions/vprold.rb +123 -0
- data/lib/fisk/instructions/vprolq.rb +123 -0
- data/lib/fisk/instructions/vprolvd.rb +117 -0
- data/lib/fisk/instructions/vprolvq.rb +117 -0
- data/lib/fisk/instructions/vprord.rb +123 -0
- data/lib/fisk/instructions/vprorq.rb +123 -0
- data/lib/fisk/instructions/vprorvd.rb +117 -0
- data/lib/fisk/instructions/vprorvq.rb +117 -0
- data/lib/fisk/instructions/vprotb.rb +112 -0
- data/lib/fisk/instructions/vprotd.rb +112 -0
- data/lib/fisk/instructions/vprotq.rb +112 -0
- data/lib/fisk/instructions/vprotw.rb +112 -0
- data/lib/fisk/instructions/vpsadbw.rb +189 -0
- data/lib/fisk/instructions/vpscatterdd.rb +60 -0
- data/lib/fisk/instructions/vpscatterdq.rb +60 -0
- data/lib/fisk/instructions/vpscatterqd.rb +60 -0
- data/lib/fisk/instructions/vpscatterqq.rb +60 -0
- data/lib/fisk/instructions/vpshab.rb +74 -0
- data/lib/fisk/instructions/vpshad.rb +74 -0
- data/lib/fisk/instructions/vpshaq.rb +74 -0
- data/lib/fisk/instructions/vpshaw.rb +74 -0
- data/lib/fisk/instructions/vpshlb.rb +74 -0
- data/lib/fisk/instructions/vpshld.rb +74 -0
- data/lib/fisk/instructions/vpshlq.rb +74 -0
- data/lib/fisk/instructions/vpshlw.rb +74 -0
- data/lib/fisk/instructions/vpshufb.rb +189 -0
- data/lib/fisk/instructions/vpshufd.rb +199 -0
- data/lib/fisk/instructions/vpshufhw.rb +199 -0
- data/lib/fisk/instructions/vpshuflw.rb +199 -0
- data/lib/fisk/instructions/vpsignb.rb +81 -0
- data/lib/fisk/instructions/vpsignd.rb +81 -0
- data/lib/fisk/instructions/vpsignw.rb +81 -0
- data/lib/fisk/instructions/vpslld.rb +341 -0
- data/lib/fisk/instructions/vpslldq.rb +161 -0
- data/lib/fisk/instructions/vpsllq.rb +341 -0
- data/lib/fisk/instructions/vpsllvd.rb +189 -0
- data/lib/fisk/instructions/vpsllvq.rb +189 -0
- data/lib/fisk/instructions/vpsllvw.rb +117 -0
- data/lib/fisk/instructions/vpsllw.rb +341 -0
- data/lib/fisk/instructions/vpsrad.rb +341 -0
- data/lib/fisk/instructions/vpsraq.rb +231 -0
- data/lib/fisk/instructions/vpsravd.rb +189 -0
- data/lib/fisk/instructions/vpsravq.rb +117 -0
- data/lib/fisk/instructions/vpsravw.rb +117 -0
- data/lib/fisk/instructions/vpsraw.rb +341 -0
- data/lib/fisk/instructions/vpsrld.rb +341 -0
- data/lib/fisk/instructions/vpsrldq.rb +161 -0
- data/lib/fisk/instructions/vpsrlq.rb +341 -0
- data/lib/fisk/instructions/vpsrlvd.rb +189 -0
- data/lib/fisk/instructions/vpsrlvq.rb +189 -0
- data/lib/fisk/instructions/vpsrlvw.rb +117 -0
- data/lib/fisk/instructions/vpsrlw.rb +341 -0
- data/lib/fisk/instructions/vpsubb.rb +189 -0
- data/lib/fisk/instructions/vpsubd.rb +189 -0
- data/lib/fisk/instructions/vpsubq.rb +189 -0
- data/lib/fisk/instructions/vpsubsb.rb +189 -0
- data/lib/fisk/instructions/vpsubsw.rb +189 -0
- data/lib/fisk/instructions/vpsubusb.rb +189 -0
- data/lib/fisk/instructions/vpsubusw.rb +189 -0
- data/lib/fisk/instructions/vpsubw.rb +189 -0
- data/lib/fisk/instructions/vpternlogd.rb +129 -0
- data/lib/fisk/instructions/vpternlogq.rb +129 -0
- data/lib/fisk/instructions/vptest.rb +77 -0
- data/lib/fisk/instructions/vptestmb.rb +117 -0
- data/lib/fisk/instructions/vptestmd.rb +117 -0
- data/lib/fisk/instructions/vptestmq.rb +117 -0
- data/lib/fisk/instructions/vptestmw.rb +117 -0
- data/lib/fisk/instructions/vptestnmb.rb +117 -0
- data/lib/fisk/instructions/vptestnmd.rb +117 -0
- data/lib/fisk/instructions/vptestnmq.rb +117 -0
- data/lib/fisk/instructions/vptestnmw.rb +117 -0
- data/lib/fisk/instructions/vpunpckhbw.rb +189 -0
- data/lib/fisk/instructions/vpunpckhdq.rb +189 -0
- data/lib/fisk/instructions/vpunpckhqdq.rb +189 -0
- data/lib/fisk/instructions/vpunpckhwd.rb +189 -0
- data/lib/fisk/instructions/vpunpcklbw.rb +189 -0
- data/lib/fisk/instructions/vpunpckldq.rb +189 -0
- data/lib/fisk/instructions/vpunpcklqdq.rb +189 -0
- data/lib/fisk/instructions/vpunpcklwd.rb +189 -0
- data/lib/fisk/instructions/vpxor.rb +81 -0
- data/lib/fisk/instructions/vpxord.rb +117 -0
- data/lib/fisk/instructions/vpxorq.rb +117 -0
- data/lib/fisk/instructions/vrangepd.rb +130 -0
- data/lib/fisk/instructions/vrangeps.rb +130 -0
- data/lib/fisk/instructions/vrangesd.rb +50 -0
- data/lib/fisk/instructions/vrangess.rb +50 -0
- data/lib/fisk/instructions/vrcp14pd.rb +111 -0
- data/lib/fisk/instructions/vrcp14ps.rb +111 -0
- data/lib/fisk/instructions/vrcp14sd.rb +45 -0
- data/lib/fisk/instructions/vrcp14ss.rb +45 -0
- data/lib/fisk/instructions/vrcp28pd.rb +44 -0
- data/lib/fisk/instructions/vrcp28ps.rb +44 -0
- data/lib/fisk/instructions/vrcp28sd.rb +46 -0
- data/lib/fisk/instructions/vrcp28ss.rb +46 -0
- data/lib/fisk/instructions/vrcpps.rb +77 -0
- data/lib/fisk/instructions/vrcpss.rb +45 -0
- data/lib/fisk/instructions/vreducepd.rb +123 -0
- data/lib/fisk/instructions/vreduceps.rb +123 -0
- data/lib/fisk/instructions/vreducesd.rb +49 -0
- data/lib/fisk/instructions/vreducess.rb +49 -0
- data/lib/fisk/instructions/vrndscalepd.rb +124 -0
- data/lib/fisk/instructions/vrndscaleps.rb +124 -0
- data/lib/fisk/instructions/vrndscalesd.rb +50 -0
- data/lib/fisk/instructions/vrndscaless.rb +50 -0
- data/lib/fisk/instructions/vroundpd.rb +85 -0
- data/lib/fisk/instructions/vroundps.rb +85 -0
- data/lib/fisk/instructions/vroundsd.rb +49 -0
- data/lib/fisk/instructions/vroundss.rb +49 -0
- data/lib/fisk/instructions/vrsqrt14pd.rb +111 -0
- data/lib/fisk/instructions/vrsqrt14ps.rb +111 -0
- data/lib/fisk/instructions/vrsqrt14sd.rb +45 -0
- data/lib/fisk/instructions/vrsqrt14ss.rb +45 -0
- data/lib/fisk/instructions/vrsqrt28pd.rb +44 -0
- data/lib/fisk/instructions/vrsqrt28ps.rb +44 -0
- data/lib/fisk/instructions/vrsqrt28sd.rb +46 -0
- data/lib/fisk/instructions/vrsqrt28ss.rb +46 -0
- data/lib/fisk/instructions/vrsqrtps.rb +77 -0
- data/lib/fisk/instructions/vrsqrtss.rb +45 -0
- data/lib/fisk/instructions/vscalefpd.rb +118 -0
- data/lib/fisk/instructions/vscalefps.rb +118 -0
- data/lib/fisk/instructions/vscalefsd.rb +46 -0
- data/lib/fisk/instructions/vscalefss.rb +46 -0
- data/lib/fisk/instructions/vscatterdpd.rb +60 -0
- data/lib/fisk/instructions/vscatterdps.rb +60 -0
- data/lib/fisk/instructions/vscatterpf0dpd.rb +25 -0
- data/lib/fisk/instructions/vscatterpf0dps.rb +25 -0
- data/lib/fisk/instructions/vscatterpf0qpd.rb +25 -0
- data/lib/fisk/instructions/vscatterpf0qps.rb +25 -0
- data/lib/fisk/instructions/vscatterpf1dpd.rb +25 -0
- data/lib/fisk/instructions/vscatterpf1dps.rb +25 -0
- data/lib/fisk/instructions/vscatterpf1qpd.rb +25 -0
- data/lib/fisk/instructions/vscatterpf1qps.rb +25 -0
- data/lib/fisk/instructions/vscatterqpd.rb +60 -0
- data/lib/fisk/instructions/vscatterqps.rb +60 -0
- data/lib/fisk/instructions/vshuff32x4.rb +89 -0
- data/lib/fisk/instructions/vshuff64x2.rb +89 -0
- data/lib/fisk/instructions/vshufi32x4.rb +89 -0
- data/lib/fisk/instructions/vshufi64x2.rb +89 -0
- data/lib/fisk/instructions/vshufpd.rb +209 -0
- data/lib/fisk/instructions/vshufps.rb +209 -0
- data/lib/fisk/instructions/vsqrtpd.rb +180 -0
- data/lib/fisk/instructions/vsqrtps.rb +180 -0
- data/lib/fisk/instructions/vsqrtsd.rb +82 -0
- data/lib/fisk/instructions/vsqrtss.rb +82 -0
- data/lib/fisk/instructions/vstmxcsr.rb +25 -0
- data/lib/fisk/instructions/vsubpd.rb +190 -0
- data/lib/fisk/instructions/vsubps.rb +190 -0
- data/lib/fisk/instructions/vsubsd.rb +82 -0
- data/lib/fisk/instructions/vsubss.rb +82 -0
- data/lib/fisk/instructions/vtestpd.rb +77 -0
- data/lib/fisk/instructions/vtestps.rb +77 -0
- data/lib/fisk/instructions/vucomisd.rb +78 -0
- data/lib/fisk/instructions/vucomiss.rb +78 -0
- data/lib/fisk/instructions/vunpckhpd.rb +189 -0
- data/lib/fisk/instructions/vunpckhps.rb +189 -0
- data/lib/fisk/instructions/vunpcklpd.rb +189 -0
- data/lib/fisk/instructions/vunpcklps.rb +189 -0
- data/lib/fisk/instructions/vxorpd.rb +189 -0
- data/lib/fisk/instructions/vxorps.rb +189 -0
- data/lib/fisk/instructions/vzeroall.rb +20 -0
- data/lib/fisk/instructions/vzeroupper.rb +20 -0
- data/lib/fisk/instructions/xadd.rb +195 -0
- data/lib/fisk/instructions/xchg.rb +451 -0
- data/lib/fisk/instructions/xgetbv.rb +21 -0
- data/lib/fisk/instructions/xlatb.rb +35 -0
- data/lib/fisk/instructions/xor.rb +726 -0
- data/lib/fisk/instructions/xorpd.rb +57 -0
- data/lib/fisk/instructions/xorps.rb +55 -0
- data/lib/fisk/instructions.rb +5067 -0
- data/lib/fisk/version.rb +3 -0
- data/lib/fisk.rb +728 -96
- data/test/helper.rb +11 -0
- data/test/test_cfg.rb +245 -0
- data/test/test_fisk.rb +526 -3
- data/test/test_fisk_written_size.rb +21 -0
- data/test/test_register_allocation.rb +220 -0
- data/test/test_run_fisk.rb +222 -7
- metadata +1302 -7
- data/bin/machine.rb.erb +0 -100
- data/lib/fisk/machine/encoding.rb +0 -78
- data/lib/fisk/machine/generated.rb +0 -124746
- data/lib/fisk/machine.rb +0 -35
data/lib/fisk.rb
CHANGED
@@ -1,18 +1,176 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
4
|
-
require "
|
3
|
+
require "stringio"
|
4
|
+
require "set"
|
5
|
+
|
6
|
+
require "fisk/instructions"
|
7
|
+
require "fisk/basic_block"
|
8
|
+
require "fisk/errors"
|
9
|
+
require "fisk/version"
|
5
10
|
|
6
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
|
+
def immediate?; false; end
|
20
|
+
def absolute_location?; false; end
|
21
|
+
end
|
22
|
+
|
23
|
+
class Operand
|
24
|
+
include OperandPredicates
|
25
|
+
|
26
|
+
def works? op
|
27
|
+
self.type == op.type
|
28
|
+
end
|
29
|
+
|
30
|
+
def rex_value
|
31
|
+
value >> 3
|
32
|
+
end
|
33
|
+
|
34
|
+
def op_value
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class ValueOperand < Operand
|
40
|
+
attr_reader :value
|
41
|
+
alias :type :value
|
42
|
+
|
43
|
+
def initialize value
|
44
|
+
@value = value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
7
48
|
module Registers
|
8
|
-
class Register <
|
9
|
-
|
49
|
+
class Register < Operand
|
50
|
+
attr_reader :name, :type, :value
|
51
|
+
|
52
|
+
def initialize name, type, value
|
53
|
+
@name = name
|
54
|
+
@type = type
|
55
|
+
@value = value
|
56
|
+
end
|
57
|
+
|
58
|
+
def works? op
|
59
|
+
type = op.type
|
10
60
|
type == self.name || type == self.type
|
11
61
|
end
|
12
62
|
|
13
|
-
def
|
63
|
+
def op_value
|
64
|
+
value
|
65
|
+
end
|
66
|
+
|
67
|
+
def extended_register?
|
68
|
+
@value > 7 || EXTENDED_R8.include?(self)
|
69
|
+
end
|
70
|
+
|
71
|
+
def register?; true; end
|
72
|
+
|
73
|
+
def to_register
|
74
|
+
self
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
class Rip < Operand
|
79
|
+
attr_accessor :displacement
|
80
|
+
|
81
|
+
def initialize displacement
|
82
|
+
@displacement = displacement
|
83
|
+
end
|
84
|
+
|
85
|
+
def works? op
|
86
|
+
type = op.type
|
87
|
+
type == "m64" || type == "m"
|
88
|
+
end
|
89
|
+
|
90
|
+
def unresolved?
|
91
|
+
@displacement.is_a?(Fisk::UnknownLabel)
|
92
|
+
end
|
93
|
+
|
94
|
+
def memory?; true; end
|
95
|
+
def rip?; true; end
|
96
|
+
|
97
|
+
def rex_value
|
98
|
+
0x0
|
99
|
+
end
|
100
|
+
|
101
|
+
def op_value
|
102
|
+
0x0
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
class Temp < Operand
|
107
|
+
attr_reader :name, :type
|
108
|
+
attr_accessor :register, :start_point, :end_point
|
109
|
+
|
110
|
+
def initialize name, type
|
111
|
+
@name = name
|
112
|
+
@type = type
|
113
|
+
@start_point = nil
|
114
|
+
@end_point = nil
|
115
|
+
end
|
116
|
+
|
117
|
+
def temp_register?; true; end
|
118
|
+
def register?; true; end
|
119
|
+
|
120
|
+
def op_value
|
121
|
+
reg.op_value
|
122
|
+
end
|
123
|
+
|
124
|
+
def extended_register?
|
125
|
+
reg.extended_register?
|
126
|
+
end
|
127
|
+
|
128
|
+
def rex_value
|
129
|
+
reg.rex_value
|
130
|
+
end
|
131
|
+
|
132
|
+
def value
|
133
|
+
reg.value
|
134
|
+
end
|
135
|
+
|
136
|
+
def to_register
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
def reg
|
141
|
+
unless @register
|
142
|
+
raise Errors::UnassignedRegister, "Temporary register #{name} hasn't been assigned a real register"
|
143
|
+
end
|
144
|
+
|
145
|
+
@register
|
146
|
+
end
|
14
147
|
end
|
15
148
|
|
149
|
+
AL = Register.new "al", "r8", 0
|
150
|
+
CL = Register.new "cl", "r8", 1
|
151
|
+
DL = Register.new "dl", "r8", 2
|
152
|
+
BL = Register.new "bl", "r8", 3
|
153
|
+
|
154
|
+
SPL = Register.new "spl", "r8", 4
|
155
|
+
BPL = Register.new "bpl", "r8", 5
|
156
|
+
SIL = Register.new "sil", "r8", 6
|
157
|
+
DIL = Register.new "dil", "r8", 7
|
158
|
+
EXTENDED_R8 = [SPL, BPL, SIL, DIL]
|
159
|
+
|
160
|
+
AH = Register.new "ah", "r8", 4
|
161
|
+
CH = Register.new "ch", "r8", 5
|
162
|
+
DH = Register.new "dh", "r8", 6
|
163
|
+
BH = Register.new "bh", "r8", 7
|
164
|
+
|
165
|
+
AX = Register.new "ax", "r16", 0
|
166
|
+
CX = Register.new "cx", "r16", 1
|
167
|
+
DX = Register.new "dx", "r16", 2
|
168
|
+
BX = Register.new "bx", "r16", 3
|
169
|
+
SP = Register.new "sp", "r16", 4
|
170
|
+
BP = Register.new "bp", "r16", 5
|
171
|
+
SI = Register.new "si", "r16", 6
|
172
|
+
DI = Register.new "di", "r16", 7
|
173
|
+
|
16
174
|
EAX = Register.new "eax", "r32", 0
|
17
175
|
ECX = Register.new "ecx", "r32", 1
|
18
176
|
EDX = Register.new "edx", "r32", 2
|
@@ -33,177 +191,521 @@ class Fisk
|
|
33
191
|
8.times do |i|
|
34
192
|
i += 8
|
35
193
|
const_set "R#{i}", Register.new("r#{i}", "r64", i)
|
194
|
+
const_set "R#{i}D", Register.new("r#{i}d", "r32", i)
|
195
|
+
const_set "R#{i}W", Register.new("r#{i}w", "r16", i)
|
196
|
+
const_set "R#{i}B", Register.new("r#{i}b", "r8", i)
|
36
197
|
end
|
37
|
-
end
|
38
198
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
199
|
+
# List of *caller* saved registers for the C calling convention
|
200
|
+
CALLER_SAVED = [ RDI, RSI, RDX, RCX, R8, R9, R10, R11 ]
|
201
|
+
|
202
|
+
# List of *callee* saved registers for the C calling convention
|
203
|
+
CALLEE_SAVED = [ RBX, RSP, RBP, R12, R13, R14, R15 ]
|
43
204
|
end
|
44
205
|
|
45
|
-
class
|
46
|
-
|
47
|
-
|
206
|
+
class Memory < Operand
|
207
|
+
attr_reader :register, :displacement
|
208
|
+
|
209
|
+
def initialize register, displacement
|
210
|
+
@register = register
|
211
|
+
@displacement = displacement
|
212
|
+
end
|
213
|
+
|
214
|
+
def extended_register?
|
215
|
+
@register.extended_register?
|
216
|
+
end
|
217
|
+
|
218
|
+
def value
|
219
|
+
@register.value
|
220
|
+
end
|
221
|
+
|
222
|
+
def + displacement
|
223
|
+
self.class.new(register, self.displacement + displacement)
|
224
|
+
end
|
225
|
+
|
226
|
+
def memory?; true; end
|
227
|
+
|
228
|
+
def rex_value
|
229
|
+
@register.rex_value
|
48
230
|
end
|
49
231
|
end
|
50
232
|
|
51
|
-
|
52
|
-
|
233
|
+
[8, 16, 32, 64].each do |size|
|
234
|
+
class_eval <<~eostr, __FILE__, __LINE__ + 1
|
235
|
+
class M#{size} < Memory
|
236
|
+
def type
|
237
|
+
"m#{size}"
|
238
|
+
end
|
239
|
+
|
240
|
+
def size; #{size}; end
|
241
|
+
end
|
242
|
+
|
243
|
+
def m#{size} val, displacement = 0; M#{size}.new(val, displacement); end
|
244
|
+
eostr
|
53
245
|
end
|
54
246
|
|
55
|
-
class
|
247
|
+
class M < Memory
|
56
248
|
def type
|
57
|
-
"
|
249
|
+
"m"
|
58
250
|
end
|
59
251
|
end
|
60
252
|
|
61
|
-
|
62
|
-
|
63
|
-
"imm32"
|
64
|
-
end
|
253
|
+
def rip displacement = 0
|
254
|
+
Registers::Rip.new(displacement)
|
65
255
|
end
|
66
256
|
|
67
|
-
|
68
|
-
|
69
|
-
|
257
|
+
def m x, displacement = 0
|
258
|
+
M.new x, displacement
|
259
|
+
end
|
260
|
+
|
261
|
+
class ImmediateOperand < ValueOperand
|
262
|
+
def immediate?; true; end
|
263
|
+
|
264
|
+
def works? insn_op
|
265
|
+
insn_op.immediate? && size <= insn_op.size
|
70
266
|
end
|
71
267
|
end
|
72
268
|
|
73
|
-
|
269
|
+
# Define all immediate value methods of different sizes
|
270
|
+
[8, 16, 32, 64].each do |size|
|
271
|
+
class_eval <<~eostr, __FILE__, __LINE__ + 1
|
272
|
+
class Imm#{size} < ImmediateOperand
|
273
|
+
def type
|
274
|
+
"imm#{size}"
|
275
|
+
end
|
276
|
+
|
277
|
+
def size; #{size}; end
|
278
|
+
end
|
279
|
+
|
280
|
+
def imm#{size} val; Imm#{size}.new(val.to_i); end
|
281
|
+
eostr
|
282
|
+
end
|
283
|
+
|
284
|
+
class Relative < ValueOperand; end
|
285
|
+
|
286
|
+
class Rel8 < Relative
|
74
287
|
def type
|
75
288
|
"rel8"
|
76
289
|
end
|
77
290
|
end
|
78
291
|
|
79
|
-
class Rel32 <
|
292
|
+
class Rel32 < Relative
|
80
293
|
def type
|
81
294
|
"rel32"
|
82
295
|
end
|
83
296
|
end
|
84
297
|
|
85
|
-
class MOffs64 <
|
298
|
+
class MOffs64 < ValueOperand
|
86
299
|
def type
|
87
300
|
"moffs64"
|
88
301
|
end
|
89
302
|
end
|
90
303
|
|
91
|
-
class Lit <
|
304
|
+
class Lit < ValueOperand
|
92
305
|
def type
|
93
306
|
value.to_s
|
94
307
|
end
|
95
308
|
end
|
96
309
|
|
97
|
-
|
310
|
+
class UnknownLabel < Operand
|
311
|
+
attr_reader :name
|
98
312
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
@position = 0
|
103
|
-
end
|
313
|
+
def initialize name
|
314
|
+
@name = name
|
315
|
+
end
|
104
316
|
|
105
|
-
|
106
|
-
|
317
|
+
def works? op
|
318
|
+
type = op.type
|
107
319
|
type == "rel32"
|
108
320
|
end
|
109
321
|
|
110
|
-
def
|
111
|
-
|
112
|
-
def value
|
113
|
-
label = assembler.label_for(name)
|
114
|
-
label.position - (insn.position + insn.bytesize)
|
115
|
-
end
|
322
|
+
def unresolved?; true; end
|
116
323
|
end
|
117
324
|
|
118
|
-
|
325
|
+
module InstructionPredicates
|
326
|
+
def retry?; false; end
|
327
|
+
def label?; false; end
|
328
|
+
def jump?; false; end
|
329
|
+
def has_temp_registers?; false; end
|
330
|
+
def comment?; false; end
|
331
|
+
def lazy?; false; end
|
119
332
|
end
|
120
333
|
|
121
|
-
|
122
|
-
|
123
|
-
end
|
334
|
+
class Label < Struct.new(:name)
|
335
|
+
include InstructionPredicates
|
124
336
|
|
125
|
-
|
126
|
-
UnknownLabel.new(name, self)
|
337
|
+
def label?; true; end
|
127
338
|
end
|
128
339
|
|
129
|
-
|
130
|
-
|
131
|
-
end
|
340
|
+
class Comment < Struct.new(:message)
|
341
|
+
include InstructionPredicates
|
132
342
|
|
133
|
-
|
134
|
-
val = Registers.const_get const
|
135
|
-
define_method(const.downcase) { val }
|
343
|
+
def comment?; true; end
|
136
344
|
end
|
137
345
|
|
138
346
|
class Instruction
|
139
|
-
|
347
|
+
include InstructionPredicates
|
140
348
|
|
141
|
-
def initialize insn,
|
349
|
+
def initialize insn, form, operands
|
142
350
|
@insn = insn
|
351
|
+
@form = form
|
143
352
|
@operands = operands
|
144
|
-
|
353
|
+
end
|
354
|
+
|
355
|
+
def has_temp_registers?
|
356
|
+
@operands.any?(&:temp_register?)
|
357
|
+
end
|
358
|
+
|
359
|
+
def temp_registers
|
360
|
+
@operands.find_all(&:temp_register?)
|
145
361
|
end
|
146
362
|
|
147
363
|
def encodings
|
148
|
-
@
|
364
|
+
@form.encodings
|
149
365
|
end
|
150
366
|
|
151
|
-
def encode buffer
|
152
|
-
encoding = @
|
367
|
+
def encode buffer, labels
|
368
|
+
encoding = @form.encodings.first
|
153
369
|
encoding.encode buffer, @operands
|
154
370
|
end
|
371
|
+
end
|
372
|
+
|
373
|
+
class UnresolvedRIPInstruction
|
374
|
+
include InstructionPredicates
|
375
|
+
|
376
|
+
def initialize insn, form, operands
|
377
|
+
@insn = insn
|
378
|
+
@form = form
|
379
|
+
@operands = operands
|
380
|
+
@retry = false
|
381
|
+
@saved_pos = 0
|
382
|
+
end
|
383
|
+
|
384
|
+
def retry?; true; end
|
385
|
+
|
386
|
+
def encode buffer, labels
|
387
|
+
# Use dummy values for any unresolvable operands
|
388
|
+
operands = @operands.map do |op|
|
389
|
+
if op.rip? && op.unresolved?
|
390
|
+
# Try resolving the operands
|
391
|
+
if labels.key?(op.displacement.name)
|
392
|
+
Registers::Rip.new labels[op.displacement.name] - @saved_pos
|
393
|
+
else
|
394
|
+
Registers::Rip.new 0x0CAFE
|
395
|
+
end
|
396
|
+
else
|
397
|
+
op
|
398
|
+
end
|
399
|
+
end
|
155
400
|
|
156
|
-
|
157
|
-
@
|
401
|
+
@form.encodings.first.encode buffer, operands
|
402
|
+
@saved_pos = buffer.pos
|
158
403
|
end
|
159
404
|
end
|
160
405
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
406
|
+
class AbsoluteJumpInstruction
|
407
|
+
include InstructionPredicates
|
408
|
+
|
409
|
+
def initialize insn, form, operand
|
410
|
+
@insn = insn
|
411
|
+
@form = form
|
412
|
+
@operand = operand
|
413
|
+
@must_retry = false
|
414
|
+
end
|
415
|
+
|
416
|
+
def jump?
|
417
|
+
true
|
418
|
+
end
|
419
|
+
|
420
|
+
def target
|
421
|
+
@operand.name
|
422
|
+
end
|
423
|
+
|
424
|
+
def encode buffer, labels
|
425
|
+
form = find_form "rel32"
|
426
|
+
encoding = form.encodings.first
|
427
|
+
operand_klass = Rel32
|
428
|
+
|
429
|
+
pos = buffer.pos
|
430
|
+
rel_jump = 0xCAFE
|
431
|
+
2.times do
|
432
|
+
buffer.seek pos, IO::SEEK_SET
|
433
|
+
encoding.encode buffer, [operand_klass.new(rel_jump)]
|
434
|
+
rel_jump = @operand.value - buffer.address
|
435
|
+
end
|
436
|
+
end
|
437
|
+
|
438
|
+
private
|
439
|
+
|
440
|
+
def find_form form_type
|
441
|
+
@insn.forms.find { |form| form.operands.first.type == form_type }
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
class UnresolvedJumpInstruction
|
446
|
+
include InstructionPredicates
|
447
|
+
|
448
|
+
def initialize insn, form, operand
|
449
|
+
@insn = insn
|
450
|
+
@form = form
|
451
|
+
@operand = operand
|
452
|
+
@must_retry = false
|
453
|
+
end
|
454
|
+
|
455
|
+
def jump?
|
456
|
+
true
|
457
|
+
end
|
458
|
+
|
459
|
+
def target
|
460
|
+
@operand.name
|
461
|
+
end
|
462
|
+
|
463
|
+
def retry?
|
464
|
+
true
|
465
|
+
end
|
466
|
+
|
467
|
+
def encode buffer, labels
|
468
|
+
# Estimate by using a rel32 offset
|
469
|
+
form = find_form "rel32"
|
470
|
+
encoding = form.encodings.first
|
471
|
+
operand_klass = Rel32
|
472
|
+
|
473
|
+
if labels.key? target
|
474
|
+
unless @must_retry
|
475
|
+
estimated_offset = labels[target] - (buffer.pos + 6) # 6 seems like a good length
|
476
|
+
|
477
|
+
if estimated_offset >= -128 && estimated_offset <= 127
|
478
|
+
# fits in a rel8
|
479
|
+
operand_klass = Rel8
|
480
|
+
form = find_form "rel8"
|
481
|
+
encoding = form.encodings.first
|
482
|
+
end
|
483
|
+
end
|
484
|
+
|
485
|
+
# We don't know what the size of the jump will be, so just write
|
486
|
+
# it out with some dummy data and keep track of the buffer position.
|
487
|
+
# Calculate the real jump offset, then rewind and patch the jump with
|
488
|
+
# the right location. 😩
|
489
|
+
pos = buffer.pos
|
490
|
+
encoding.encode buffer, [operand_klass.new(0xFE)]
|
491
|
+
jump_len = -(buffer.pos - labels[target])
|
492
|
+
buffer.seek pos, IO::SEEK_SET
|
493
|
+
encoding.encode buffer, [operand_klass.new(jump_len)]
|
168
494
|
else
|
169
|
-
|
495
|
+
if @must_retry
|
496
|
+
# We retried once, but the label wasn't defined
|
497
|
+
raise Errors::MissingLabel, "Label `#{target}` was used, but not defined"
|
498
|
+
end
|
499
|
+
@must_retry = true
|
500
|
+
encoding.encode buffer, [operand_klass.new(0x0CAFE)]
|
170
501
|
end
|
171
502
|
end
|
172
503
|
|
173
|
-
|
504
|
+
private
|
174
505
|
|
175
|
-
|
506
|
+
def find_form form_type
|
507
|
+
@insn.forms.find { |form| form.operands.first.type == form_type }
|
508
|
+
end
|
509
|
+
end
|
176
510
|
|
177
|
-
|
511
|
+
def initialize
|
512
|
+
@instructions = []
|
513
|
+
@labels = {}
|
514
|
+
# A set of temp registers recorded as we see them (not at allocation time)
|
515
|
+
@temp_registers = Set.new
|
516
|
+
yield self if block_given?
|
517
|
+
end
|
178
518
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
519
|
+
# Mark a temporary register as "done being used" at this point in the
|
520
|
+
# instructions. Using the register after passing the register to this
|
521
|
+
# method results in undefined behavior.
|
522
|
+
def release_register reg
|
523
|
+
if reg.end_point
|
524
|
+
raise Errors::AlreadyReleasedError, "register #{reg.name} already released at #{reg.end_point}"
|
525
|
+
end
|
526
|
+
|
527
|
+
reg.end_point = (@instructions.length - 1)
|
528
|
+
end
|
529
|
+
|
530
|
+
# Releases all registers that haven't already been released
|
531
|
+
def release_all_registers
|
532
|
+
@temp_registers.each do |reg|
|
533
|
+
next if reg.end_point
|
534
|
+
release_register reg
|
535
|
+
end
|
536
|
+
end
|
537
|
+
|
538
|
+
# Return a list of basic blocks for the instructions
|
539
|
+
def basic_blocks
|
540
|
+
cfg.blocks
|
541
|
+
end
|
542
|
+
|
543
|
+
# Return a cfg for these instructions. The CFG includes connected basic
|
544
|
+
# blocks as well as any temporary registers
|
545
|
+
def cfg
|
546
|
+
CFG.build @instructions
|
547
|
+
end
|
548
|
+
|
549
|
+
# Create a label to be used with jump instructions. For example:
|
550
|
+
#
|
551
|
+
# fisk.jmp(fisk.label(:foo))
|
552
|
+
# fisk.int(lit(3))
|
553
|
+
# fisk.put_label(:foo)
|
554
|
+
#
|
555
|
+
def label name
|
556
|
+
UnknownLabel.new(name)
|
557
|
+
end
|
183
558
|
|
559
|
+
Lazy = Struct.new(:block) do # :nodoc:
|
560
|
+
include InstructionPredicates
|
561
|
+
|
562
|
+
def lazy?; true; end
|
563
|
+
|
564
|
+
def encode buffer, labels
|
565
|
+
block.call buffer.pos
|
566
|
+
end
|
567
|
+
end
|
568
|
+
|
569
|
+
# Record a block that will be called during instruction encoding. The block
|
570
|
+
# will be yielded the current position of the buffer.
|
571
|
+
#
|
572
|
+
# For example:
|
573
|
+
#
|
574
|
+
# patch_position = nil
|
575
|
+
#
|
576
|
+
# fisk.nop
|
577
|
+
# fisk.lazy { |pos| patch_location = pos }
|
578
|
+
# fisk.jmp(fisk.label(:foo))
|
579
|
+
# fisk.lazy { |_|
|
580
|
+
# fisk.mov(fisk.r8, fisk.imm64(patch_location))
|
581
|
+
# }
|
582
|
+
# fisk.write_to(buf)
|
583
|
+
#
|
584
|
+
# The first lazy block will be yielded the position of the buffer immediately
|
585
|
+
# after encoding the `nop` instruction and before encoding the `jmp`
|
586
|
+
# instruction. The second lazy block will be yielded to after the `jmp`
|
587
|
+
# instruction has been encoded. This gives you a chance to write the buffer
|
588
|
+
# position from certain points in to your assembly
|
589
|
+
def lazy &block
|
590
|
+
@instructions << Lazy.new(block)
|
184
591
|
self
|
185
592
|
end
|
186
593
|
|
187
|
-
|
188
|
-
|
189
|
-
|
594
|
+
# Insert a label named +name+ at the current position in the instructions.
|
595
|
+
def put_label name
|
596
|
+
if @labels.key? name
|
597
|
+
raise Errors::LabelAlreadyDefined, "Label `#{name}` is already defined"
|
190
598
|
end
|
599
|
+
@labels[name] = nil
|
600
|
+
@instructions << Label.new(name)
|
601
|
+
self
|
191
602
|
end
|
603
|
+
alias :make_label :put_label
|
192
604
|
|
193
|
-
|
194
|
-
|
605
|
+
# Insert a comment at the current position in the instructions.
|
606
|
+
def comment message
|
607
|
+
@instructions << Comment.new(message)
|
608
|
+
self
|
195
609
|
end
|
196
610
|
|
197
|
-
|
198
|
-
|
611
|
+
# Allocate and return a new register. These registers will be replaced with
|
612
|
+
# real registers when `assign_registers` is called.
|
613
|
+
def register name = "temp"
|
614
|
+
Registers::Temp.new name, "r64"
|
199
615
|
end
|
200
616
|
|
201
|
-
|
202
|
-
|
617
|
+
# Allocate a register and yield it to the block. The register will be
|
618
|
+
# automatically released after the block is finished.
|
619
|
+
def with_register name = "temp"
|
620
|
+
reg = register(name)
|
621
|
+
yield reg
|
622
|
+
release_register reg
|
203
623
|
end
|
204
624
|
|
205
|
-
|
206
|
-
|
625
|
+
# Assign registers to any temporary registers. Only registers in +list+
|
626
|
+
# will be used when selecting register assignments
|
627
|
+
def assign_registers list, local: false
|
628
|
+
temp_registers = @temp_registers
|
629
|
+
|
630
|
+
# This mutates the temp registers, setting their end_point based on
|
631
|
+
# the CFG
|
632
|
+
self.cfg unless local
|
633
|
+
|
634
|
+
temp_registers.each do |reg|
|
635
|
+
unless reg.end_point
|
636
|
+
raise Errors::UnreleasedRegisterError, "Register #{reg.name} hasn't been released"
|
637
|
+
end
|
638
|
+
end
|
639
|
+
|
640
|
+
temp_registers = temp_registers.sort_by(&:start_point)
|
641
|
+
|
642
|
+
active = []
|
643
|
+
free_registers = list.reverse
|
644
|
+
register_count = list.length
|
645
|
+
|
646
|
+
temp_registers.each do |temp_reg|
|
647
|
+
# expire old intervals
|
648
|
+
active, dead = active.sort_by(&:end_point).partition do |j|
|
649
|
+
j.end_point >= temp_reg.start_point
|
650
|
+
end
|
651
|
+
|
652
|
+
# Add unused registers back to the free register list
|
653
|
+
dead.each { |tr| free_registers << tr.register }
|
654
|
+
|
655
|
+
if active.length == register_count
|
656
|
+
raise NotImplementedError, "Register spilled"
|
657
|
+
end
|
658
|
+
|
659
|
+
temp_reg.register = free_registers.pop
|
660
|
+
active << temp_reg
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
Registers.constants.grep(/^[A-Z0-9]*$/).each do |const|
|
665
|
+
val = Registers.const_get const
|
666
|
+
define_method(const.downcase) { val }
|
667
|
+
end
|
668
|
+
|
669
|
+
include Fisk::Instructions::DSLMethods
|
670
|
+
|
671
|
+
def moffs64 val
|
672
|
+
MOffs64.new val
|
673
|
+
end
|
674
|
+
|
675
|
+
# Create a signed immediate value of the right width
|
676
|
+
def imm val
|
677
|
+
val = val.to_i
|
678
|
+
|
679
|
+
if val >= -0x7F - 1 && val <= 0x7F
|
680
|
+
imm8 val
|
681
|
+
elsif val >= -0x7FFF - 1 && val <= 0x7FFF
|
682
|
+
imm16 val
|
683
|
+
elsif val >= -0x7FFFFFFF - 1 && val <= 0x7FFFFFFF
|
684
|
+
imm32 val
|
685
|
+
elsif val >= -0x7FFFFFFFFFFFFFFF - 1 && val <= 0x7FFFFFFFFFFFFFFF
|
686
|
+
imm64 val
|
687
|
+
else
|
688
|
+
raise ArgumentError, "#{val} is larger than a 64 bit int"
|
689
|
+
end
|
690
|
+
end
|
691
|
+
|
692
|
+
# Create an unsigned immediate value of the right width
|
693
|
+
def uimm val
|
694
|
+
val = val.to_i
|
695
|
+
|
696
|
+
if val < 0
|
697
|
+
raise ArgumentError, "#{val} is negative"
|
698
|
+
elsif val <= 0xFF
|
699
|
+
imm8 val
|
700
|
+
elsif val <= 0xFFFF
|
701
|
+
imm16 val
|
702
|
+
elsif val <= 0xFFFFFFFF
|
703
|
+
imm32 val
|
704
|
+
elsif val <= 0xFFFFFFFFFFFFFFFF
|
705
|
+
imm64 val
|
706
|
+
else
|
707
|
+
raise ArgumentError, "#{val} is too large for a 64 bit int"
|
708
|
+
end
|
207
709
|
end
|
208
710
|
|
209
711
|
def rel8 val
|
@@ -214,27 +716,157 @@ class Fisk
|
|
214
716
|
Rel32.new val
|
215
717
|
end
|
216
718
|
|
719
|
+
class AbsoluteLocation < Rel32
|
720
|
+
def absolute_location?; true; end
|
721
|
+
end
|
722
|
+
|
723
|
+
# Creates an "absolute" location. Use this for JUMP instructions where you
|
724
|
+
# know the absolute location but want a relative location calculated later.
|
725
|
+
#
|
726
|
+
# For example:
|
727
|
+
#
|
728
|
+
# fisk.jmp fisk.absolute(0xCAFE)
|
729
|
+
#
|
730
|
+
# The emitted JMP instruction will use a calculated relative address (this is
|
731
|
+
# because x64 doesn't have a jump to absolute position).
|
732
|
+
def absolute val
|
733
|
+
AbsoluteLocation.new val
|
734
|
+
end
|
735
|
+
|
217
736
|
def lit val
|
218
|
-
# to_s because we're getting the value from JSON as a string
|
219
737
|
Lit.new val
|
220
738
|
end
|
221
739
|
|
222
|
-
|
223
|
-
|
740
|
+
# Instance eval's a given block and writes encoded instructions to +buf+.
|
741
|
+
# For example:
|
742
|
+
#
|
743
|
+
# fisk = Fisk.new
|
744
|
+
# fisk.asm do
|
745
|
+
# mov r9, imm64(32)
|
746
|
+
# end
|
747
|
+
#
|
748
|
+
def asm buf = StringIO.new(''.b), metadata: {}, &block
|
224
749
|
instance_eval(&block)
|
225
|
-
|
750
|
+
write_to buf, metadata: metadata
|
226
751
|
buf
|
227
752
|
end
|
228
753
|
|
229
|
-
|
754
|
+
# Encodes all instructions and returns a binary string with the encoded
|
755
|
+
# instructions.
|
756
|
+
def to_binary(metadata: {})
|
230
757
|
io = StringIO.new ''.b
|
231
|
-
|
758
|
+
write_to io, metadata: metadata
|
232
759
|
io.string
|
233
760
|
end
|
234
761
|
|
762
|
+
RetryRequest = Struct.new(:insn, :io_seek_pos)
|
763
|
+
|
764
|
+
# Encode all instructions and write them to +buffer+. +buffer+ should be an
|
765
|
+
# IO object.
|
766
|
+
def write_to buffer, metadata: {}
|
767
|
+
labels = {}
|
768
|
+
comments = {}
|
769
|
+
unresolved = []
|
770
|
+
instructions = @instructions.dup
|
771
|
+
backup = @instructions.dup
|
772
|
+
@instructions.clear
|
773
|
+
|
774
|
+
while insn = instructions.shift
|
775
|
+
if insn.label?
|
776
|
+
labels[insn.name] = buffer.pos
|
777
|
+
elsif insn.comment?
|
778
|
+
comments.update({buffer.pos => insn.message}) { |_, *lines| lines.join($/) }
|
779
|
+
elsif insn.lazy?
|
780
|
+
insn.encode buffer, labels
|
781
|
+
instructions.unshift(*@instructions)
|
782
|
+
@instructions.clear
|
783
|
+
else
|
784
|
+
if insn.retry?
|
785
|
+
retry_req = RetryRequest.new(insn, buffer.pos)
|
786
|
+
unresolved << retry_req
|
787
|
+
end
|
788
|
+
|
789
|
+
write_instruction insn, buffer, labels
|
790
|
+
end
|
791
|
+
end
|
792
|
+
|
793
|
+
metadata[:comments] = comments
|
794
|
+
@instructions = backup
|
795
|
+
|
796
|
+
return if unresolved.empty?
|
797
|
+
|
798
|
+
pos = buffer.pos
|
799
|
+
unresolved.each do |req|
|
800
|
+
insn = req.insn
|
801
|
+
buffer.seek req.io_seek_pos, IO::SEEK_SET
|
802
|
+
insn.encode buffer, labels
|
803
|
+
end
|
804
|
+
buffer.seek pos, IO::SEEK_SET
|
805
|
+
|
806
|
+
buffer
|
807
|
+
end
|
808
|
+
|
809
|
+
def gen_with_insn insns, params
|
810
|
+
forms = insns.forms.find_all do |insn|
|
811
|
+
if insn.operands.length == params.length
|
812
|
+
params.zip(insn.operands).all? { |want_op, have_op|
|
813
|
+
want_op.works?(have_op)
|
814
|
+
}
|
815
|
+
else
|
816
|
+
false
|
817
|
+
end
|
818
|
+
end
|
819
|
+
|
820
|
+
if forms.length == 0
|
821
|
+
valid_forms = insns.forms.map { |form|
|
822
|
+
" #{insns.name} #{form.operands.map(&:type).join(", ")}"
|
823
|
+
}.join "\n"
|
824
|
+
msg = <<~eostr
|
825
|
+
Couldn't find instruction #{insns.name} #{params.map(&:type).join(", ")}
|
826
|
+
Valid forms:
|
827
|
+
#{valid_forms}
|
828
|
+
eostr
|
829
|
+
raise NotImplementedError, msg
|
830
|
+
end
|
831
|
+
|
832
|
+
form = forms.first
|
833
|
+
|
834
|
+
insn = nil
|
835
|
+
|
836
|
+
params.each do |param|
|
837
|
+
if param.unresolved?
|
838
|
+
if insns.name =~ /^J/ # I hope all jump instructions start with J!
|
839
|
+
insn = UnresolvedJumpInstruction.new(insns, form, params.first)
|
840
|
+
else
|
841
|
+
# If it's not a jump instruction, assume unresolved RIP relative 😬
|
842
|
+
insn = UnresolvedRIPInstruction.new(insns, form, params)
|
843
|
+
end
|
844
|
+
end
|
845
|
+
|
846
|
+
if param.absolute_location? && insns.name =~ /^(?:J|CALL)/
|
847
|
+
insn = AbsoluteJumpInstruction.new(insns, form, params.first)
|
848
|
+
end
|
849
|
+
|
850
|
+
if param.temp_register?
|
851
|
+
if param.end_point
|
852
|
+
raise Errors::UseAfterInvalidationError, "Register #{param.name} used after release"
|
853
|
+
end
|
854
|
+
@temp_registers << param
|
855
|
+
|
856
|
+
param.start_point ||= @instructions.length
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
insn ||= Instruction.new(insns, form, params)
|
861
|
+
|
862
|
+
@instructions << insn
|
863
|
+
|
864
|
+
self
|
865
|
+
end
|
866
|
+
|
235
867
|
private
|
236
868
|
|
237
|
-
def
|
238
|
-
|
869
|
+
def write_instruction insn, buffer, labels
|
870
|
+
insn.encode buffer, labels
|
239
871
|
end
|
240
872
|
end
|