fisk 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +56 -1
- data/bin/build-machine.rb +2 -2
- data/fisk.gemspec +5 -1
- data/lib/fisk.rb +289 -71
- data/lib/fisk/basic_block.rb +162 -0
- data/lib/fisk/errors.rb +19 -0
- data/lib/fisk/instructions/adc.rb +125 -125
- data/lib/fisk/instructions/adcx.rb +18 -18
- data/lib/fisk/instructions/add.rb +125 -125
- data/lib/fisk/instructions/addpd.rb +9 -9
- data/lib/fisk/instructions/addps.rb +9 -9
- data/lib/fisk/instructions/addsd.rb +9 -9
- data/lib/fisk/instructions/addss.rb +9 -9
- data/lib/fisk/instructions/addsubpd.rb +9 -9
- data/lib/fisk/instructions/addsubps.rb +9 -9
- data/lib/fisk/instructions/adox.rb +18 -18
- data/lib/fisk/instructions/aesdec.rb +9 -9
- data/lib/fisk/instructions/aesdeclast.rb +9 -9
- data/lib/fisk/instructions/aesenc.rb +9 -9
- data/lib/fisk/instructions/aesenclast.rb +9 -9
- data/lib/fisk/instructions/aesimc.rb +9 -9
- data/lib/fisk/instructions/aeskeygenassist.rb +11 -11
- data/lib/fisk/instructions/and.rb +125 -125
- data/lib/fisk/instructions/andn.rb +8 -8
- data/lib/fisk/instructions/andnpd.rb +9 -9
- data/lib/fisk/instructions/andnps.rb +9 -9
- data/lib/fisk/instructions/andpd.rb +9 -9
- data/lib/fisk/instructions/andps.rb +9 -9
- data/lib/fisk/instructions/bextr.rb +20 -20
- data/lib/fisk/instructions/blcfill.rb +4 -4
- data/lib/fisk/instructions/blci.rb +4 -4
- data/lib/fisk/instructions/blcic.rb +4 -4
- data/lib/fisk/instructions/blcmsk.rb +4 -4
- data/lib/fisk/instructions/blcs.rb +4 -4
- data/lib/fisk/instructions/blendpd.rb +11 -11
- data/lib/fisk/instructions/blendps.rb +11 -11
- data/lib/fisk/instructions/blendvpd.rb +9 -9
- data/lib/fisk/instructions/blendvps.rb +9 -9
- data/lib/fisk/instructions/blsfill.rb +4 -4
- data/lib/fisk/instructions/blsi.rb +4 -4
- data/lib/fisk/instructions/blsic.rb +4 -4
- data/lib/fisk/instructions/blsmsk.rb +4 -4
- data/lib/fisk/instructions/blsr.rb +4 -4
- data/lib/fisk/instructions/bsf.rb +27 -27
- data/lib/fisk/instructions/bsr.rb +27 -27
- data/lib/fisk/instructions/bswap.rb +4 -4
- data/lib/fisk/instructions/bt.rb +48 -48
- data/lib/fisk/instructions/btc.rb +48 -48
- data/lib/fisk/instructions/btr.rb +48 -48
- data/lib/fisk/instructions/bts.rb +48 -48
- data/lib/fisk/instructions/bzhi.rb +8 -8
- data/lib/fisk/instructions/call.rb +6 -6
- data/lib/fisk/instructions/clflush.rb +3 -3
- data/lib/fisk/instructions/clflushopt.rb +3 -3
- data/lib/fisk/instructions/clwb.rb +3 -3
- data/lib/fisk/instructions/cmova.rb +27 -27
- data/lib/fisk/instructions/cmovae.rb +27 -27
- data/lib/fisk/instructions/cmovb.rb +27 -27
- data/lib/fisk/instructions/cmovbe.rb +27 -27
- data/lib/fisk/instructions/cmovc.rb +27 -27
- data/lib/fisk/instructions/cmove.rb +27 -27
- data/lib/fisk/instructions/cmovg.rb +27 -27
- data/lib/fisk/instructions/cmovge.rb +27 -27
- data/lib/fisk/instructions/cmovl.rb +27 -27
- data/lib/fisk/instructions/cmovle.rb +27 -27
- data/lib/fisk/instructions/cmovna.rb +27 -27
- data/lib/fisk/instructions/cmovnae.rb +27 -27
- data/lib/fisk/instructions/cmovnb.rb +27 -27
- data/lib/fisk/instructions/cmovnbe.rb +27 -27
- data/lib/fisk/instructions/cmovnc.rb +27 -27
- data/lib/fisk/instructions/cmovne.rb +27 -27
- data/lib/fisk/instructions/cmovng.rb +27 -27
- data/lib/fisk/instructions/cmovnge.rb +27 -27
- data/lib/fisk/instructions/cmovnl.rb +27 -27
- data/lib/fisk/instructions/cmovnle.rb +27 -27
- data/lib/fisk/instructions/cmovno.rb +27 -27
- data/lib/fisk/instructions/cmovnp.rb +27 -27
- data/lib/fisk/instructions/cmovns.rb +27 -27
- data/lib/fisk/instructions/cmovnz.rb +27 -27
- data/lib/fisk/instructions/cmovo.rb +27 -27
- data/lib/fisk/instructions/cmovp.rb +27 -27
- data/lib/fisk/instructions/cmovpe.rb +27 -27
- data/lib/fisk/instructions/cmovpo.rb +27 -27
- data/lib/fisk/instructions/cmovs.rb +27 -27
- data/lib/fisk/instructions/cmovz.rb +27 -27
- data/lib/fisk/instructions/cmp.rb +125 -125
- data/lib/fisk/instructions/cmppd.rb +11 -11
- data/lib/fisk/instructions/cmpps.rb +11 -11
- data/lib/fisk/instructions/cmpsd.rb +11 -11
- data/lib/fisk/instructions/cmpss.rb +11 -11
- data/lib/fisk/instructions/cmpxchg.rb +36 -36
- data/lib/fisk/instructions/cmpxchg16b.rb +3 -3
- data/lib/fisk/instructions/cmpxchg8b.rb +3 -3
- data/lib/fisk/instructions/comisd.rb +9 -9
- data/lib/fisk/instructions/comiss.rb +9 -9
- data/lib/fisk/instructions/crc32.rb +45 -45
- data/lib/fisk/instructions/cvtdq2pd.rb +9 -9
- data/lib/fisk/instructions/cvtdq2ps.rb +9 -9
- data/lib/fisk/instructions/cvtpd2dq.rb +9 -9
- data/lib/fisk/instructions/cvtpd2pi.rb +9 -9
- data/lib/fisk/instructions/cvtpd2ps.rb +9 -9
- data/lib/fisk/instructions/cvtpi2pd.rb +9 -9
- data/lib/fisk/instructions/cvtpi2ps.rb +9 -9
- data/lib/fisk/instructions/cvtps2dq.rb +9 -9
- data/lib/fisk/instructions/cvtps2pd.rb +9 -9
- data/lib/fisk/instructions/cvtps2pi.rb +9 -9
- data/lib/fisk/instructions/cvtsd2si.rb +18 -18
- data/lib/fisk/instructions/cvtsd2ss.rb +9 -9
- data/lib/fisk/instructions/cvtsi2sd.rb +18 -18
- data/lib/fisk/instructions/cvtsi2ss.rb +18 -18
- data/lib/fisk/instructions/cvtss2sd.rb +9 -9
- data/lib/fisk/instructions/cvtss2si.rb +18 -18
- data/lib/fisk/instructions/cvttpd2dq.rb +9 -9
- data/lib/fisk/instructions/cvttpd2pi.rb +9 -9
- data/lib/fisk/instructions/cvttps2dq.rb +9 -9
- data/lib/fisk/instructions/cvttps2pi.rb +9 -9
- data/lib/fisk/instructions/cvttsd2si.rb +18 -18
- data/lib/fisk/instructions/cvttss2si.rb +18 -18
- data/lib/fisk/instructions/dec.rb +20 -20
- data/lib/fisk/instructions/div.rb +20 -20
- data/lib/fisk/instructions/divpd.rb +9 -9
- data/lib/fisk/instructions/divps.rb +9 -9
- data/lib/fisk/instructions/divsd.rb +9 -9
- data/lib/fisk/instructions/divss.rb +9 -9
- data/lib/fisk/instructions/dppd.rb +11 -11
- data/lib/fisk/instructions/dpps.rb +11 -11
- data/lib/fisk/instructions/extractps.rb +11 -11
- data/lib/fisk/instructions/extrq.rb +8 -8
- data/lib/fisk/instructions/haddpd.rb +9 -9
- data/lib/fisk/instructions/haddps.rb +9 -9
- data/lib/fisk/instructions/hsubpd.rb +9 -9
- data/lib/fisk/instructions/hsubps.rb +9 -9
- data/lib/fisk/instructions/idiv.rb +20 -20
- data/lib/fisk/instructions/imul.rb +113 -113
- data/lib/fisk/instructions/inc.rb +20 -20
- data/lib/fisk/instructions/insertps.rb +11 -11
- data/lib/fisk/instructions/insertq.rb +10 -10
- data/lib/fisk/instructions/int.rb +1 -1
- data/lib/fisk/instructions/ja.rb +2 -2
- data/lib/fisk/instructions/jae.rb +2 -2
- data/lib/fisk/instructions/jb.rb +2 -2
- data/lib/fisk/instructions/jbe.rb +2 -2
- data/lib/fisk/instructions/jc.rb +2 -2
- data/lib/fisk/instructions/je.rb +2 -2
- data/lib/fisk/instructions/jecxz.rb +1 -1
- data/lib/fisk/instructions/jg.rb +2 -2
- data/lib/fisk/instructions/jge.rb +2 -2
- data/lib/fisk/instructions/jl.rb +2 -2
- data/lib/fisk/instructions/jle.rb +2 -2
- data/lib/fisk/instructions/jmp.rb +7 -7
- data/lib/fisk/instructions/jna.rb +2 -2
- data/lib/fisk/instructions/jnae.rb +2 -2
- data/lib/fisk/instructions/jnb.rb +2 -2
- data/lib/fisk/instructions/jnbe.rb +2 -2
- data/lib/fisk/instructions/jnc.rb +2 -2
- data/lib/fisk/instructions/jne.rb +2 -2
- data/lib/fisk/instructions/jng.rb +2 -2
- data/lib/fisk/instructions/jnge.rb +2 -2
- data/lib/fisk/instructions/jnl.rb +2 -2
- data/lib/fisk/instructions/jnle.rb +2 -2
- data/lib/fisk/instructions/jno.rb +2 -2
- data/lib/fisk/instructions/jnp.rb +2 -2
- data/lib/fisk/instructions/jns.rb +2 -2
- data/lib/fisk/instructions/jnz.rb +2 -2
- data/lib/fisk/instructions/jo.rb +2 -2
- data/lib/fisk/instructions/jp.rb +2 -2
- data/lib/fisk/instructions/jpe.rb +2 -2
- data/lib/fisk/instructions/jpo.rb +2 -2
- data/lib/fisk/instructions/jrcxz.rb +1 -1
- data/lib/fisk/instructions/js.rb +2 -2
- data/lib/fisk/instructions/jz.rb +2 -2
- data/lib/fisk/instructions/kaddb.rb +2 -2
- data/lib/fisk/instructions/kaddd.rb +2 -2
- data/lib/fisk/instructions/kaddq.rb +2 -2
- data/lib/fisk/instructions/kaddw.rb +2 -2
- data/lib/fisk/instructions/kandb.rb +2 -2
- data/lib/fisk/instructions/kandd.rb +2 -2
- data/lib/fisk/instructions/kandnb.rb +2 -2
- data/lib/fisk/instructions/kandnd.rb +2 -2
- data/lib/fisk/instructions/kandnq.rb +2 -2
- data/lib/fisk/instructions/kandnw.rb +2 -2
- data/lib/fisk/instructions/kandq.rb +2 -2
- data/lib/fisk/instructions/kandw.rb +2 -2
- data/lib/fisk/instructions/kmovb.rb +10 -10
- data/lib/fisk/instructions/kmovd.rb +10 -10
- data/lib/fisk/instructions/kmovq.rb +10 -10
- data/lib/fisk/instructions/kmovw.rb +10 -10
- data/lib/fisk/instructions/knotb.rb +2 -2
- data/lib/fisk/instructions/knotd.rb +2 -2
- data/lib/fisk/instructions/knotq.rb +2 -2
- data/lib/fisk/instructions/knotw.rb +2 -2
- data/lib/fisk/instructions/korb.rb +2 -2
- data/lib/fisk/instructions/kord.rb +2 -2
- data/lib/fisk/instructions/korq.rb +2 -2
- data/lib/fisk/instructions/kortestb.rb +2 -2
- data/lib/fisk/instructions/kortestd.rb +2 -2
- data/lib/fisk/instructions/kortestq.rb +2 -2
- data/lib/fisk/instructions/kortestw.rb +2 -2
- data/lib/fisk/instructions/korw.rb +2 -2
- data/lib/fisk/instructions/kshiftlb.rb +3 -3
- data/lib/fisk/instructions/kshiftld.rb +3 -3
- data/lib/fisk/instructions/kshiftlq.rb +3 -3
- data/lib/fisk/instructions/kshiftlw.rb +3 -3
- data/lib/fisk/instructions/kshiftrb.rb +3 -3
- data/lib/fisk/instructions/kshiftrd.rb +3 -3
- data/lib/fisk/instructions/kshiftrq.rb +3 -3
- data/lib/fisk/instructions/kshiftrw.rb +3 -3
- data/lib/fisk/instructions/ktestb.rb +2 -2
- data/lib/fisk/instructions/ktestd.rb +2 -2
- data/lib/fisk/instructions/ktestq.rb +2 -2
- data/lib/fisk/instructions/ktestw.rb +2 -2
- data/lib/fisk/instructions/kunpckbw.rb +2 -2
- data/lib/fisk/instructions/kunpckdq.rb +2 -2
- data/lib/fisk/instructions/kunpckwd.rb +2 -2
- data/lib/fisk/instructions/kxnorb.rb +2 -2
- data/lib/fisk/instructions/kxnord.rb +2 -2
- data/lib/fisk/instructions/kxnorq.rb +2 -2
- data/lib/fisk/instructions/kxnorw.rb +2 -2
- data/lib/fisk/instructions/kxorb.rb +2 -2
- data/lib/fisk/instructions/kxord.rb +2 -2
- data/lib/fisk/instructions/kxorq.rb +2 -2
- data/lib/fisk/instructions/kxorw.rb +2 -2
- data/lib/fisk/instructions/lddqu.rb +5 -5
- data/lib/fisk/instructions/ldmxcsr.rb +3 -3
- data/lib/fisk/instructions/lea.rb +15 -15
- data/lib/fisk/instructions/lzcnt.rb +27 -27
- data/lib/fisk/instructions/maskmovdqu.rb +4 -4
- data/lib/fisk/instructions/maskmovq.rb +4 -4
- data/lib/fisk/instructions/maxpd.rb +9 -9
- data/lib/fisk/instructions/maxps.rb +9 -9
- data/lib/fisk/instructions/maxsd.rb +9 -9
- data/lib/fisk/instructions/maxss.rb +9 -9
- data/lib/fisk/instructions/minpd.rb +9 -9
- data/lib/fisk/instructions/minps.rb +9 -9
- data/lib/fisk/instructions/minsd.rb +9 -9
- data/lib/fisk/instructions/minss.rb +9 -9
- data/lib/fisk/instructions/mov.rb +116 -116
- data/lib/fisk/instructions/movapd.rb +18 -18
- data/lib/fisk/instructions/movaps.rb +18 -18
- data/lib/fisk/instructions/movbe.rb +30 -30
- data/lib/fisk/instructions/movd.rb +36 -36
- data/lib/fisk/instructions/movddup.rb +9 -9
- data/lib/fisk/instructions/movdq2q.rb +4 -4
- data/lib/fisk/instructions/movdqa.rb +18 -18
- data/lib/fisk/instructions/movdqu.rb +18 -18
- data/lib/fisk/instructions/movhlps.rb +4 -4
- data/lib/fisk/instructions/movhpd.rb +10 -10
- data/lib/fisk/instructions/movhps.rb +10 -10
- data/lib/fisk/instructions/movlhps.rb +4 -4
- data/lib/fisk/instructions/movlpd.rb +10 -10
- data/lib/fisk/instructions/movlps.rb +10 -10
- data/lib/fisk/instructions/movmskpd.rb +4 -4
- data/lib/fisk/instructions/movmskps.rb +4 -4
- data/lib/fisk/instructions/movntdq.rb +5 -5
- data/lib/fisk/instructions/movntdqa.rb +5 -5
- data/lib/fisk/instructions/movnti.rb +10 -10
- data/lib/fisk/instructions/movntpd.rb +5 -5
- data/lib/fisk/instructions/movntps.rb +5 -5
- data/lib/fisk/instructions/movntq.rb +5 -5
- data/lib/fisk/instructions/movntsd.rb +5 -5
- data/lib/fisk/instructions/movntss.rb +5 -5
- data/lib/fisk/instructions/movq.rb +72 -72
- data/lib/fisk/instructions/movq2dq.rb +4 -4
- data/lib/fisk/instructions/movsd.rb +18 -18
- data/lib/fisk/instructions/movshdup.rb +9 -9
- data/lib/fisk/instructions/movsldup.rb +9 -9
- data/lib/fisk/instructions/movss.rb +18 -18
- data/lib/fisk/instructions/movsx.rb +45 -45
- data/lib/fisk/instructions/movsxd.rb +9 -9
- data/lib/fisk/instructions/movupd.rb +18 -18
- data/lib/fisk/instructions/movups.rb +18 -18
- data/lib/fisk/instructions/movzx.rb +45 -45
- data/lib/fisk/instructions/mpsadbw.rb +11 -11
- data/lib/fisk/instructions/mul.rb +20 -20
- data/lib/fisk/instructions/mulpd.rb +9 -9
- data/lib/fisk/instructions/mulps.rb +9 -9
- data/lib/fisk/instructions/mulsd.rb +9 -9
- data/lib/fisk/instructions/mulss.rb +9 -9
- data/lib/fisk/instructions/mulx.rb +8 -8
- data/lib/fisk/instructions/neg.rb +20 -20
- data/lib/fisk/instructions/not.rb +20 -20
- data/lib/fisk/instructions/or.rb +125 -125
- data/lib/fisk/instructions/orpd.rb +9 -9
- data/lib/fisk/instructions/orps.rb +9 -9
- data/lib/fisk/instructions/pabsb.rb +18 -18
- data/lib/fisk/instructions/pabsd.rb +18 -18
- data/lib/fisk/instructions/pabsw.rb +18 -18
- data/lib/fisk/instructions/packssdw.rb +18 -18
- data/lib/fisk/instructions/packsswb.rb +18 -18
- data/lib/fisk/instructions/packusdw.rb +9 -9
- data/lib/fisk/instructions/packuswb.rb +18 -18
- data/lib/fisk/instructions/paddb.rb +18 -18
- data/lib/fisk/instructions/paddd.rb +18 -18
- data/lib/fisk/instructions/paddq.rb +18 -18
- data/lib/fisk/instructions/paddsb.rb +18 -18
- data/lib/fisk/instructions/paddsw.rb +18 -18
- data/lib/fisk/instructions/paddusb.rb +18 -18
- data/lib/fisk/instructions/paddusw.rb +18 -18
- data/lib/fisk/instructions/paddw.rb +18 -18
- data/lib/fisk/instructions/palignr.rb +22 -22
- data/lib/fisk/instructions/pand.rb +18 -18
- data/lib/fisk/instructions/pandn.rb +18 -18
- data/lib/fisk/instructions/pavgb.rb +18 -18
- data/lib/fisk/instructions/pavgusb.rb +9 -9
- data/lib/fisk/instructions/pavgw.rb +18 -18
- data/lib/fisk/instructions/pblendvb.rb +9 -9
- data/lib/fisk/instructions/pblendw.rb +11 -11
- data/lib/fisk/instructions/pclmulqdq.rb +11 -11
- data/lib/fisk/instructions/pcmpeqb.rb +18 -18
- data/lib/fisk/instructions/pcmpeqd.rb +18 -18
- data/lib/fisk/instructions/pcmpeqq.rb +9 -9
- data/lib/fisk/instructions/pcmpeqw.rb +18 -18
- data/lib/fisk/instructions/pcmpestri.rb +11 -11
- data/lib/fisk/instructions/pcmpestrm.rb +11 -11
- data/lib/fisk/instructions/pcmpgtb.rb +18 -18
- data/lib/fisk/instructions/pcmpgtd.rb +18 -18
- data/lib/fisk/instructions/pcmpgtq.rb +9 -9
- data/lib/fisk/instructions/pcmpgtw.rb +18 -18
- data/lib/fisk/instructions/pcmpistri.rb +11 -11
- data/lib/fisk/instructions/pcmpistrm.rb +11 -11
- data/lib/fisk/instructions/pdep.rb +8 -8
- data/lib/fisk/instructions/pext.rb +8 -8
- data/lib/fisk/instructions/pextrb.rb +11 -11
- data/lib/fisk/instructions/pextrd.rb +11 -11
- data/lib/fisk/instructions/pextrq.rb +11 -11
- data/lib/fisk/instructions/pextrw.rb +21 -21
- data/lib/fisk/instructions/pf2id.rb +9 -9
- data/lib/fisk/instructions/pf2iw.rb +9 -9
- data/lib/fisk/instructions/pfacc.rb +9 -9
- data/lib/fisk/instructions/pfadd.rb +9 -9
- data/lib/fisk/instructions/pfcmpeq.rb +9 -9
- data/lib/fisk/instructions/pfcmpge.rb +9 -9
- data/lib/fisk/instructions/pfcmpgt.rb +9 -9
- data/lib/fisk/instructions/pfmax.rb +9 -9
- data/lib/fisk/instructions/pfmin.rb +9 -9
- data/lib/fisk/instructions/pfmul.rb +9 -9
- data/lib/fisk/instructions/pfnacc.rb +9 -9
- data/lib/fisk/instructions/pfpnacc.rb +9 -9
- data/lib/fisk/instructions/pfrcp.rb +9 -9
- data/lib/fisk/instructions/pfrcpit1.rb +9 -9
- data/lib/fisk/instructions/pfrcpit2.rb +9 -9
- data/lib/fisk/instructions/pfrsqit1.rb +9 -9
- data/lib/fisk/instructions/pfrsqrt.rb +9 -9
- data/lib/fisk/instructions/pfsub.rb +9 -9
- data/lib/fisk/instructions/pfsubr.rb +9 -9
- data/lib/fisk/instructions/phaddd.rb +18 -18
- data/lib/fisk/instructions/phaddsw.rb +18 -18
- data/lib/fisk/instructions/phaddw.rb +18 -18
- data/lib/fisk/instructions/phminposuw.rb +9 -9
- data/lib/fisk/instructions/phsubd.rb +18 -18
- data/lib/fisk/instructions/phsubsw.rb +18 -18
- data/lib/fisk/instructions/phsubw.rb +18 -18
- data/lib/fisk/instructions/pi2fd.rb +9 -9
- data/lib/fisk/instructions/pi2fw.rb +9 -9
- data/lib/fisk/instructions/pinsrb.rb +11 -11
- data/lib/fisk/instructions/pinsrd.rb +11 -11
- data/lib/fisk/instructions/pinsrq.rb +11 -11
- data/lib/fisk/instructions/pinsrw.rb +22 -22
- data/lib/fisk/instructions/pmaddubsw.rb +18 -18
- data/lib/fisk/instructions/pmaddwd.rb +18 -18
- data/lib/fisk/instructions/pmaxsb.rb +9 -9
- data/lib/fisk/instructions/pmaxsd.rb +9 -9
- data/lib/fisk/instructions/pmaxsw.rb +18 -18
- data/lib/fisk/instructions/pmaxub.rb +18 -18
- data/lib/fisk/instructions/pmaxud.rb +9 -9
- data/lib/fisk/instructions/pmaxuw.rb +9 -9
- data/lib/fisk/instructions/pminsb.rb +9 -9
- data/lib/fisk/instructions/pminsd.rb +9 -9
- data/lib/fisk/instructions/pminsw.rb +18 -18
- data/lib/fisk/instructions/pminub.rb +18 -18
- data/lib/fisk/instructions/pminud.rb +9 -9
- data/lib/fisk/instructions/pminuw.rb +9 -9
- data/lib/fisk/instructions/pmovmskb.rb +8 -8
- data/lib/fisk/instructions/pmovsxbd.rb +9 -9
- data/lib/fisk/instructions/pmovsxbq.rb +9 -9
- data/lib/fisk/instructions/pmovsxbw.rb +9 -9
- data/lib/fisk/instructions/pmovsxdq.rb +9 -9
- data/lib/fisk/instructions/pmovsxwd.rb +9 -9
- data/lib/fisk/instructions/pmovsxwq.rb +9 -9
- data/lib/fisk/instructions/pmovzxbd.rb +9 -9
- data/lib/fisk/instructions/pmovzxbq.rb +9 -9
- data/lib/fisk/instructions/pmovzxbw.rb +9 -9
- data/lib/fisk/instructions/pmovzxdq.rb +9 -9
- data/lib/fisk/instructions/pmovzxwd.rb +9 -9
- data/lib/fisk/instructions/pmovzxwq.rb +9 -9
- data/lib/fisk/instructions/pmuldq.rb +9 -9
- data/lib/fisk/instructions/pmulhrsw.rb +18 -18
- data/lib/fisk/instructions/pmulhrw.rb +9 -9
- data/lib/fisk/instructions/pmulhuw.rb +18 -18
- data/lib/fisk/instructions/pmulhw.rb +18 -18
- data/lib/fisk/instructions/pmulld.rb +9 -9
- data/lib/fisk/instructions/pmullw.rb +18 -18
- data/lib/fisk/instructions/pmuludq.rb +18 -18
- data/lib/fisk/instructions/pop.rb +14 -14
- data/lib/fisk/instructions/popcnt.rb +27 -27
- data/lib/fisk/instructions/por.rb +18 -18
- data/lib/fisk/instructions/prefetch.rb +3 -3
- data/lib/fisk/instructions/prefetchnta.rb +3 -3
- data/lib/fisk/instructions/prefetcht0.rb +3 -3
- data/lib/fisk/instructions/prefetcht1.rb +3 -3
- data/lib/fisk/instructions/prefetcht2.rb +3 -3
- data/lib/fisk/instructions/prefetchw.rb +3 -3
- data/lib/fisk/instructions/prefetchwt1.rb +3 -3
- data/lib/fisk/instructions/psadbw.rb +18 -18
- data/lib/fisk/instructions/pshufb.rb +18 -18
- data/lib/fisk/instructions/pshufd.rb +11 -11
- data/lib/fisk/instructions/pshufhw.rb +11 -11
- data/lib/fisk/instructions/pshuflw.rb +11 -11
- data/lib/fisk/instructions/pshufw.rb +11 -11
- data/lib/fisk/instructions/psignb.rb +18 -18
- data/lib/fisk/instructions/psignd.rb +18 -18
- data/lib/fisk/instructions/psignw.rb +18 -18
- data/lib/fisk/instructions/pslld.rb +24 -24
- data/lib/fisk/instructions/pslldq.rb +3 -3
- data/lib/fisk/instructions/psllq.rb +24 -24
- data/lib/fisk/instructions/psllw.rb +24 -24
- data/lib/fisk/instructions/psrad.rb +24 -24
- data/lib/fisk/instructions/psraw.rb +24 -24
- data/lib/fisk/instructions/psrld.rb +24 -24
- data/lib/fisk/instructions/psrldq.rb +3 -3
- data/lib/fisk/instructions/psrlq.rb +24 -24
- data/lib/fisk/instructions/psrlw.rb +24 -24
- data/lib/fisk/instructions/psubb.rb +18 -18
- data/lib/fisk/instructions/psubd.rb +18 -18
- data/lib/fisk/instructions/psubq.rb +18 -18
- data/lib/fisk/instructions/psubsb.rb +18 -18
- data/lib/fisk/instructions/psubsw.rb +18 -18
- data/lib/fisk/instructions/psubusb.rb +18 -18
- data/lib/fisk/instructions/psubusw.rb +18 -18
- data/lib/fisk/instructions/psubw.rb +18 -18
- data/lib/fisk/instructions/pswapd.rb +9 -9
- data/lib/fisk/instructions/ptest.rb +9 -9
- data/lib/fisk/instructions/punpckhbw.rb +18 -18
- data/lib/fisk/instructions/punpckhdq.rb +18 -18
- data/lib/fisk/instructions/punpckhqdq.rb +9 -9
- data/lib/fisk/instructions/punpckhwd.rb +18 -18
- data/lib/fisk/instructions/punpcklbw.rb +18 -18
- data/lib/fisk/instructions/punpckldq.rb +18 -18
- data/lib/fisk/instructions/punpcklqdq.rb +9 -9
- data/lib/fisk/instructions/punpcklwd.rb +18 -18
- data/lib/fisk/instructions/push.rb +16 -16
- data/lib/fisk/instructions/pxor.rb +18 -18
- data/lib/fisk/instructions/rcl.rb +68 -68
- data/lib/fisk/instructions/rcpps.rb +9 -9
- data/lib/fisk/instructions/rcpss.rb +9 -9
- data/lib/fisk/instructions/rcr.rb +68 -68
- data/lib/fisk/instructions/rdrand.rb +6 -6
- data/lib/fisk/instructions/rdseed.rb +6 -6
- data/lib/fisk/instructions/ret.rb +1 -1
- data/lib/fisk/instructions/rol.rb +68 -68
- data/lib/fisk/instructions/ror.rb +68 -68
- data/lib/fisk/instructions/rorx.rb +12 -12
- data/lib/fisk/instructions/roundpd.rb +11 -11
- data/lib/fisk/instructions/roundps.rb +11 -11
- data/lib/fisk/instructions/roundsd.rb +11 -11
- data/lib/fisk/instructions/roundss.rb +11 -11
- data/lib/fisk/instructions/rsqrtps.rb +9 -9
- data/lib/fisk/instructions/rsqrtss.rb +9 -9
- data/lib/fisk/instructions/sal.rb +68 -68
- data/lib/fisk/instructions/sar.rb +68 -68
- data/lib/fisk/instructions/sarx.rb +8 -8
- data/lib/fisk/instructions/sbb.rb +125 -125
- data/lib/fisk/instructions/seta.rb +5 -5
- data/lib/fisk/instructions/setae.rb +5 -5
- data/lib/fisk/instructions/setb.rb +5 -5
- data/lib/fisk/instructions/setbe.rb +5 -5
- data/lib/fisk/instructions/setc.rb +5 -5
- data/lib/fisk/instructions/sete.rb +5 -5
- data/lib/fisk/instructions/setg.rb +5 -5
- data/lib/fisk/instructions/setge.rb +5 -5
- data/lib/fisk/instructions/setl.rb +5 -5
- data/lib/fisk/instructions/setle.rb +5 -5
- data/lib/fisk/instructions/setna.rb +5 -5
- data/lib/fisk/instructions/setnae.rb +5 -5
- data/lib/fisk/instructions/setnb.rb +5 -5
- data/lib/fisk/instructions/setnbe.rb +5 -5
- data/lib/fisk/instructions/setnc.rb +5 -5
- data/lib/fisk/instructions/setne.rb +5 -5
- data/lib/fisk/instructions/setng.rb +5 -5
- data/lib/fisk/instructions/setnge.rb +5 -5
- data/lib/fisk/instructions/setnl.rb +5 -5
- data/lib/fisk/instructions/setnle.rb +5 -5
- data/lib/fisk/instructions/setno.rb +5 -5
- data/lib/fisk/instructions/setnp.rb +5 -5
- data/lib/fisk/instructions/setns.rb +5 -5
- data/lib/fisk/instructions/setnz.rb +5 -5
- data/lib/fisk/instructions/seto.rb +5 -5
- data/lib/fisk/instructions/setp.rb +5 -5
- data/lib/fisk/instructions/setpe.rb +5 -5
- data/lib/fisk/instructions/setpo.rb +5 -5
- data/lib/fisk/instructions/sets.rb +5 -5
- data/lib/fisk/instructions/setz.rb +5 -5
- data/lib/fisk/instructions/sha1msg1.rb +9 -9
- data/lib/fisk/instructions/sha1msg2.rb +9 -9
- data/lib/fisk/instructions/sha1nexte.rb +9 -9
- data/lib/fisk/instructions/sha1rnds4.rb +11 -11
- data/lib/fisk/instructions/sha256msg1.rb +9 -9
- data/lib/fisk/instructions/sha256msg2.rb +9 -9
- data/lib/fisk/instructions/sha256rnds2.rb +9 -9
- data/lib/fisk/instructions/shl.rb +68 -68
- data/lib/fisk/instructions/shld.rb +60 -60
- data/lib/fisk/instructions/shlx.rb +8 -8
- data/lib/fisk/instructions/shr.rb +68 -68
- data/lib/fisk/instructions/shrd.rb +60 -60
- data/lib/fisk/instructions/shrx.rb +8 -8
- data/lib/fisk/instructions/shufpd.rb +11 -11
- data/lib/fisk/instructions/shufps.rb +11 -11
- data/lib/fisk/instructions/sqrtpd.rb +9 -9
- data/lib/fisk/instructions/sqrtps.rb +9 -9
- data/lib/fisk/instructions/sqrtsd.rb +9 -9
- data/lib/fisk/instructions/sqrtss.rb +9 -9
- data/lib/fisk/instructions/stmxcsr.rb +3 -3
- data/lib/fisk/instructions/sub.rb +125 -125
- data/lib/fisk/instructions/subpd.rb +9 -9
- data/lib/fisk/instructions/subps.rb +9 -9
- data/lib/fisk/instructions/subsd.rb +9 -9
- data/lib/fisk/instructions/subss.rb +9 -9
- data/lib/fisk/instructions/t1mskc.rb +4 -4
- data/lib/fisk/instructions/test.rb +68 -68
- data/lib/fisk/instructions/tzcnt.rb +27 -27
- data/lib/fisk/instructions/tzmsk.rb +4 -4
- data/lib/fisk/instructions/ucomisd.rb +9 -9
- data/lib/fisk/instructions/ucomiss.rb +9 -9
- data/lib/fisk/instructions/unpckhpd.rb +9 -9
- data/lib/fisk/instructions/unpckhps.rb +9 -9
- data/lib/fisk/instructions/unpcklpd.rb +9 -9
- data/lib/fisk/instructions/unpcklps.rb +9 -9
- data/lib/fisk/instructions/vaddpd.rb +20 -20
- data/lib/fisk/instructions/vaddps.rb +20 -20
- data/lib/fisk/instructions/vaddsd.rb +8 -8
- data/lib/fisk/instructions/vaddss.rb +8 -8
- data/lib/fisk/instructions/vaddsubpd.rb +8 -8
- data/lib/fisk/instructions/vaddsubps.rb +8 -8
- data/lib/fisk/instructions/vaesdec.rb +4 -4
- data/lib/fisk/instructions/vaesdeclast.rb +4 -4
- data/lib/fisk/instructions/vaesenc.rb +4 -4
- data/lib/fisk/instructions/vaesenclast.rb +4 -4
- data/lib/fisk/instructions/vaesimc.rb +4 -4
- data/lib/fisk/instructions/vaeskeygenassist.rb +6 -6
- data/lib/fisk/instructions/valignd.rb +18 -18
- data/lib/fisk/instructions/valignq.rb +18 -18
- data/lib/fisk/instructions/vandnpd.rb +20 -20
- data/lib/fisk/instructions/vandnps.rb +20 -20
- data/lib/fisk/instructions/vandpd.rb +20 -20
- data/lib/fisk/instructions/vandps.rb +20 -20
- data/lib/fisk/instructions/vblendmpd.rb +12 -12
- data/lib/fisk/instructions/vblendmps.rb +12 -12
- data/lib/fisk/instructions/vblendpd.rb +12 -12
- data/lib/fisk/instructions/vblendps.rb +12 -12
- data/lib/fisk/instructions/vblendvpd.rb +8 -8
- data/lib/fisk/instructions/vblendvps.rb +8 -8
- data/lib/fisk/instructions/vbroadcastf128.rb +2 -2
- data/lib/fisk/instructions/vbroadcastf32x2.rb +8 -8
- data/lib/fisk/instructions/vbroadcastf32x4.rb +4 -4
- data/lib/fisk/instructions/vbroadcastf32x8.rb +2 -2
- data/lib/fisk/instructions/vbroadcastf64x2.rb +4 -4
- data/lib/fisk/instructions/vbroadcastf64x4.rb +2 -2
- data/lib/fisk/instructions/vbroadcasti128.rb +2 -2
- data/lib/fisk/instructions/vbroadcasti32x2.rb +12 -12
- data/lib/fisk/instructions/vbroadcasti32x4.rb +4 -4
- data/lib/fisk/instructions/vbroadcasti32x8.rb +2 -2
- data/lib/fisk/instructions/vbroadcasti64x2.rb +4 -4
- data/lib/fisk/instructions/vbroadcasti64x4.rb +2 -2
- data/lib/fisk/instructions/vbroadcastsd.rb +12 -12
- data/lib/fisk/instructions/vbroadcastss.rb +16 -16
- data/lib/fisk/instructions/vcmppd.rb +30 -30
- data/lib/fisk/instructions/vcmpps.rb +30 -30
- data/lib/fisk/instructions/vcmpsd.rb +12 -12
- data/lib/fisk/instructions/vcmpss.rb +12 -12
- data/lib/fisk/instructions/vcomisd.rb +8 -8
- data/lib/fisk/instructions/vcomiss.rb +8 -8
- data/lib/fisk/instructions/vcompresspd.rb +12 -12
- data/lib/fisk/instructions/vcompressps.rb +12 -12
- data/lib/fisk/instructions/vcvtdq2pd.rb +20 -20
- data/lib/fisk/instructions/vcvtdq2ps.rb +20 -20
- data/lib/fisk/instructions/vcvtpd2dq.rb +20 -20
- data/lib/fisk/instructions/vcvtpd2ps.rb +20 -20
- data/lib/fisk/instructions/vcvtpd2qq.rb +12 -12
- data/lib/fisk/instructions/vcvtpd2udq.rb +12 -12
- data/lib/fisk/instructions/vcvtpd2uqq.rb +12 -12
- data/lib/fisk/instructions/vcvtph2ps.rb +20 -20
- data/lib/fisk/instructions/vcvtps2dq.rb +20 -20
- data/lib/fisk/instructions/vcvtps2pd.rb +20 -20
- data/lib/fisk/instructions/vcvtps2ph.rb +30 -30
- data/lib/fisk/instructions/vcvtps2qq.rb +12 -12
- data/lib/fisk/instructions/vcvtps2udq.rb +12 -12
- data/lib/fisk/instructions/vcvtps2uqq.rb +12 -12
- data/lib/fisk/instructions/vcvtqq2pd.rb +12 -12
- data/lib/fisk/instructions/vcvtqq2ps.rb +12 -12
- data/lib/fisk/instructions/vcvtsd2si.rb +16 -16
- data/lib/fisk/instructions/vcvtsd2ss.rb +8 -8
- data/lib/fisk/instructions/vcvtsd2usi.rb +8 -8
- data/lib/fisk/instructions/vcvtsi2sd.rb +16 -16
- data/lib/fisk/instructions/vcvtsi2ss.rb +16 -16
- data/lib/fisk/instructions/vcvtss2sd.rb +8 -8
- data/lib/fisk/instructions/vcvtss2si.rb +16 -16
- data/lib/fisk/instructions/vcvtss2usi.rb +8 -8
- data/lib/fisk/instructions/vcvttpd2dq.rb +20 -20
- data/lib/fisk/instructions/vcvttpd2qq.rb +12 -12
- data/lib/fisk/instructions/vcvttpd2udq.rb +12 -12
- data/lib/fisk/instructions/vcvttpd2uqq.rb +12 -12
- data/lib/fisk/instructions/vcvttps2dq.rb +20 -20
- data/lib/fisk/instructions/vcvttps2qq.rb +12 -12
- data/lib/fisk/instructions/vcvttps2udq.rb +12 -12
- data/lib/fisk/instructions/vcvttps2uqq.rb +12 -12
- data/lib/fisk/instructions/vcvttsd2si.rb +16 -16
- data/lib/fisk/instructions/vcvttsd2usi.rb +8 -8
- data/lib/fisk/instructions/vcvttss2si.rb +16 -16
- data/lib/fisk/instructions/vcvttss2usi.rb +8 -8
- data/lib/fisk/instructions/vcvtudq2pd.rb +12 -12
- data/lib/fisk/instructions/vcvtudq2ps.rb +12 -12
- data/lib/fisk/instructions/vcvtuqq2pd.rb +12 -12
- data/lib/fisk/instructions/vcvtuqq2ps.rb +12 -12
- data/lib/fisk/instructions/vcvtusi2sd.rb +8 -8
- data/lib/fisk/instructions/vcvtusi2ss.rb +8 -8
- data/lib/fisk/instructions/vdbpsadbw.rb +18 -18
- data/lib/fisk/instructions/vdivpd.rb +20 -20
- data/lib/fisk/instructions/vdivps.rb +20 -20
- data/lib/fisk/instructions/vdivsd.rb +8 -8
- data/lib/fisk/instructions/vdivss.rb +8 -8
- data/lib/fisk/instructions/vdppd.rb +6 -6
- data/lib/fisk/instructions/vdpps.rb +12 -12
- data/lib/fisk/instructions/vexp2pd.rb +4 -4
- data/lib/fisk/instructions/vexp2ps.rb +4 -4
- data/lib/fisk/instructions/vexpandpd.rb +12 -12
- data/lib/fisk/instructions/vexpandps.rb +12 -12
- data/lib/fisk/instructions/vextractf128.rb +6 -6
- data/lib/fisk/instructions/vextractf32x4.rb +12 -12
- data/lib/fisk/instructions/vextractf32x8.rb +6 -6
- data/lib/fisk/instructions/vextractf64x2.rb +12 -12
- data/lib/fisk/instructions/vextractf64x4.rb +6 -6
- data/lib/fisk/instructions/vextracti128.rb +6 -6
- data/lib/fisk/instructions/vextracti32x4.rb +12 -12
- data/lib/fisk/instructions/vextracti32x8.rb +6 -6
- data/lib/fisk/instructions/vextracti64x2.rb +12 -12
- data/lib/fisk/instructions/vextracti64x4.rb +6 -6
- data/lib/fisk/instructions/vextractps.rb +12 -12
- data/lib/fisk/instructions/vfixupimmpd.rb +18 -18
- data/lib/fisk/instructions/vfixupimmps.rb +18 -18
- data/lib/fisk/instructions/vfixupimmsd.rb +6 -6
- data/lib/fisk/instructions/vfixupimmss.rb +6 -6
- data/lib/fisk/instructions/vfmadd132pd.rb +20 -20
- data/lib/fisk/instructions/vfmadd132ps.rb +20 -20
- data/lib/fisk/instructions/vfmadd132sd.rb +8 -8
- data/lib/fisk/instructions/vfmadd132ss.rb +8 -8
- data/lib/fisk/instructions/vfmadd213pd.rb +20 -20
- data/lib/fisk/instructions/vfmadd213ps.rb +20 -20
- data/lib/fisk/instructions/vfmadd213sd.rb +8 -8
- data/lib/fisk/instructions/vfmadd213ss.rb +8 -8
- data/lib/fisk/instructions/vfmadd231pd.rb +20 -20
- data/lib/fisk/instructions/vfmadd231ps.rb +20 -20
- data/lib/fisk/instructions/vfmadd231sd.rb +8 -8
- data/lib/fisk/instructions/vfmadd231ss.rb +8 -8
- data/lib/fisk/instructions/vfmaddpd.rb +16 -16
- data/lib/fisk/instructions/vfmaddps.rb +16 -16
- data/lib/fisk/instructions/vfmaddsd.rb +8 -8
- data/lib/fisk/instructions/vfmaddss.rb +8 -8
- data/lib/fisk/instructions/vfmaddsub132pd.rb +20 -20
- data/lib/fisk/instructions/vfmaddsub132ps.rb +20 -20
- data/lib/fisk/instructions/vfmaddsub213pd.rb +20 -20
- data/lib/fisk/instructions/vfmaddsub213ps.rb +20 -20
- data/lib/fisk/instructions/vfmaddsub231pd.rb +20 -20
- data/lib/fisk/instructions/vfmaddsub231ps.rb +20 -20
- data/lib/fisk/instructions/vfmaddsubpd.rb +16 -16
- data/lib/fisk/instructions/vfmaddsubps.rb +16 -16
- data/lib/fisk/instructions/vfmsub132pd.rb +20 -20
- data/lib/fisk/instructions/vfmsub132ps.rb +20 -20
- data/lib/fisk/instructions/vfmsub132sd.rb +8 -8
- data/lib/fisk/instructions/vfmsub132ss.rb +8 -8
- data/lib/fisk/instructions/vfmsub213pd.rb +20 -20
- data/lib/fisk/instructions/vfmsub213ps.rb +20 -20
- data/lib/fisk/instructions/vfmsub213sd.rb +8 -8
- data/lib/fisk/instructions/vfmsub213ss.rb +8 -8
- data/lib/fisk/instructions/vfmsub231pd.rb +20 -20
- data/lib/fisk/instructions/vfmsub231ps.rb +20 -20
- data/lib/fisk/instructions/vfmsub231sd.rb +8 -8
- data/lib/fisk/instructions/vfmsub231ss.rb +8 -8
- data/lib/fisk/instructions/vfmsubadd132pd.rb +20 -20
- data/lib/fisk/instructions/vfmsubadd132ps.rb +20 -20
- data/lib/fisk/instructions/vfmsubadd213pd.rb +20 -20
- data/lib/fisk/instructions/vfmsubadd213ps.rb +20 -20
- data/lib/fisk/instructions/vfmsubadd231pd.rb +20 -20
- data/lib/fisk/instructions/vfmsubadd231ps.rb +20 -20
- data/lib/fisk/instructions/vfmsubaddpd.rb +16 -16
- data/lib/fisk/instructions/vfmsubaddps.rb +16 -16
- data/lib/fisk/instructions/vfmsubpd.rb +16 -16
- data/lib/fisk/instructions/vfmsubps.rb +16 -16
- data/lib/fisk/instructions/vfmsubsd.rb +8 -8
- data/lib/fisk/instructions/vfmsubss.rb +8 -8
- data/lib/fisk/instructions/vfnmadd132pd.rb +20 -20
- data/lib/fisk/instructions/vfnmadd132ps.rb +20 -20
- data/lib/fisk/instructions/vfnmadd132sd.rb +8 -8
- data/lib/fisk/instructions/vfnmadd132ss.rb +8 -8
- data/lib/fisk/instructions/vfnmadd213pd.rb +20 -20
- data/lib/fisk/instructions/vfnmadd213ps.rb +20 -20
- data/lib/fisk/instructions/vfnmadd213sd.rb +8 -8
- data/lib/fisk/instructions/vfnmadd213ss.rb +8 -8
- data/lib/fisk/instructions/vfnmadd231pd.rb +20 -20
- data/lib/fisk/instructions/vfnmadd231ps.rb +20 -20
- data/lib/fisk/instructions/vfnmadd231sd.rb +8 -8
- data/lib/fisk/instructions/vfnmadd231ss.rb +8 -8
- data/lib/fisk/instructions/vfnmaddpd.rb +16 -16
- data/lib/fisk/instructions/vfnmaddps.rb +16 -16
- data/lib/fisk/instructions/vfnmaddsd.rb +8 -8
- data/lib/fisk/instructions/vfnmaddss.rb +8 -8
- data/lib/fisk/instructions/vfnmsub132pd.rb +20 -20
- data/lib/fisk/instructions/vfnmsub132ps.rb +20 -20
- data/lib/fisk/instructions/vfnmsub132sd.rb +8 -8
- data/lib/fisk/instructions/vfnmsub132ss.rb +8 -8
- data/lib/fisk/instructions/vfnmsub213pd.rb +20 -20
- data/lib/fisk/instructions/vfnmsub213ps.rb +20 -20
- data/lib/fisk/instructions/vfnmsub213sd.rb +8 -8
- data/lib/fisk/instructions/vfnmsub213ss.rb +8 -8
- data/lib/fisk/instructions/vfnmsub231pd.rb +20 -20
- data/lib/fisk/instructions/vfnmsub231ps.rb +20 -20
- data/lib/fisk/instructions/vfnmsub231sd.rb +8 -8
- data/lib/fisk/instructions/vfnmsub231ss.rb +8 -8
- data/lib/fisk/instructions/vfnmsubpd.rb +16 -16
- data/lib/fisk/instructions/vfnmsubps.rb +16 -16
- data/lib/fisk/instructions/vfnmsubsd.rb +8 -8
- data/lib/fisk/instructions/vfnmsubss.rb +8 -8
- data/lib/fisk/instructions/vfpclasspd.rb +18 -18
- data/lib/fisk/instructions/vfpclassps.rb +18 -18
- data/lib/fisk/instructions/vfpclasssd.rb +6 -6
- data/lib/fisk/instructions/vfpclassss.rb +6 -6
- data/lib/fisk/instructions/vfrczpd.rb +8 -8
- data/lib/fisk/instructions/vfrczps.rb +8 -8
- data/lib/fisk/instructions/vfrczsd.rb +4 -4
- data/lib/fisk/instructions/vfrczss.rb +4 -4
- data/lib/fisk/instructions/vgatherdpd.rb +10 -10
- data/lib/fisk/instructions/vgatherdps.rb +10 -10
- data/lib/fisk/instructions/vgatherpf0dpd.rb +1 -1
- data/lib/fisk/instructions/vgatherpf0dps.rb +1 -1
- data/lib/fisk/instructions/vgatherpf0qpd.rb +1 -1
- data/lib/fisk/instructions/vgatherpf0qps.rb +1 -1
- data/lib/fisk/instructions/vgatherpf1dpd.rb +1 -1
- data/lib/fisk/instructions/vgatherpf1dps.rb +1 -1
- data/lib/fisk/instructions/vgatherpf1qpd.rb +1 -1
- data/lib/fisk/instructions/vgatherpf1qps.rb +1 -1
- data/lib/fisk/instructions/vgatherqpd.rb +10 -10
- data/lib/fisk/instructions/vgatherqps.rb +10 -10
- data/lib/fisk/instructions/vgetexppd.rb +12 -12
- data/lib/fisk/instructions/vgetexpps.rb +12 -12
- data/lib/fisk/instructions/vgetexpsd.rb +4 -4
- data/lib/fisk/instructions/vgetexpss.rb +4 -4
- data/lib/fisk/instructions/vgetmantpd.rb +18 -18
- data/lib/fisk/instructions/vgetmantps.rb +18 -18
- data/lib/fisk/instructions/vgetmantsd.rb +6 -6
- data/lib/fisk/instructions/vgetmantss.rb +6 -6
- data/lib/fisk/instructions/vhaddpd.rb +8 -8
- data/lib/fisk/instructions/vhaddps.rb +8 -8
- data/lib/fisk/instructions/vhsubpd.rb +8 -8
- data/lib/fisk/instructions/vhsubps.rb +8 -8
- data/lib/fisk/instructions/vinsertf128.rb +6 -6
- data/lib/fisk/instructions/vinsertf32x4.rb +12 -12
- data/lib/fisk/instructions/vinsertf32x8.rb +6 -6
- data/lib/fisk/instructions/vinsertf64x2.rb +12 -12
- data/lib/fisk/instructions/vinsertf64x4.rb +6 -6
- data/lib/fisk/instructions/vinserti128.rb +6 -6
- data/lib/fisk/instructions/vinserti32x4.rb +12 -12
- data/lib/fisk/instructions/vinserti32x8.rb +6 -6
- data/lib/fisk/instructions/vinserti64x2.rb +12 -12
- data/lib/fisk/instructions/vinserti64x4.rb +6 -6
- data/lib/fisk/instructions/vinsertps.rb +12 -12
- data/lib/fisk/instructions/vlddqu.rb +4 -4
- data/lib/fisk/instructions/vldmxcsr.rb +1 -1
- data/lib/fisk/instructions/vmaskmovdqu.rb +2 -2
- data/lib/fisk/instructions/vmaskmovpd.rb +8 -8
- data/lib/fisk/instructions/vmaskmovps.rb +8 -8
- data/lib/fisk/instructions/vmaxpd.rb +20 -20
- data/lib/fisk/instructions/vmaxps.rb +20 -20
- data/lib/fisk/instructions/vmaxsd.rb +8 -8
- data/lib/fisk/instructions/vmaxss.rb +8 -8
- data/lib/fisk/instructions/vminpd.rb +20 -20
- data/lib/fisk/instructions/vminps.rb +20 -20
- data/lib/fisk/instructions/vminsd.rb +8 -8
- data/lib/fisk/instructions/vminss.rb +8 -8
- data/lib/fisk/instructions/vmovapd.rb +40 -40
- data/lib/fisk/instructions/vmovaps.rb +40 -40
- data/lib/fisk/instructions/vmovd.rb +16 -16
- data/lib/fisk/instructions/vmovddup.rb +20 -20
- data/lib/fisk/instructions/vmovdqa.rb +16 -16
- data/lib/fisk/instructions/vmovdqa32.rb +24 -24
- data/lib/fisk/instructions/vmovdqa64.rb +24 -24
- data/lib/fisk/instructions/vmovdqu.rb +16 -16
- data/lib/fisk/instructions/vmovdqu16.rb +24 -24
- data/lib/fisk/instructions/vmovdqu32.rb +24 -24
- data/lib/fisk/instructions/vmovdqu64.rb +24 -24
- data/lib/fisk/instructions/vmovdqu8.rb +24 -24
- data/lib/fisk/instructions/vmovhlps.rb +4 -4
- data/lib/fisk/instructions/vmovhpd.rb +8 -8
- data/lib/fisk/instructions/vmovhps.rb +8 -8
- data/lib/fisk/instructions/vmovlhps.rb +4 -4
- data/lib/fisk/instructions/vmovlpd.rb +8 -8
- data/lib/fisk/instructions/vmovlps.rb +8 -8
- data/lib/fisk/instructions/vmovmskpd.rb +4 -4
- data/lib/fisk/instructions/vmovmskps.rb +4 -4
- data/lib/fisk/instructions/vmovntdq.rb +10 -10
- data/lib/fisk/instructions/vmovntdqa.rb +10 -10
- data/lib/fisk/instructions/vmovntpd.rb +10 -10
- data/lib/fisk/instructions/vmovntps.rb +10 -10
- data/lib/fisk/instructions/vmovq.rb +32 -32
- data/lib/fisk/instructions/vmovsd.rb +16 -16
- data/lib/fisk/instructions/vmovshdup.rb +20 -20
- data/lib/fisk/instructions/vmovsldup.rb +20 -20
- data/lib/fisk/instructions/vmovss.rb +16 -16
- data/lib/fisk/instructions/vmovupd.rb +40 -40
- data/lib/fisk/instructions/vmovups.rb +40 -40
- data/lib/fisk/instructions/vmpsadbw.rb +12 -12
- data/lib/fisk/instructions/vmulpd.rb +20 -20
- data/lib/fisk/instructions/vmulps.rb +20 -20
- data/lib/fisk/instructions/vmulsd.rb +8 -8
- data/lib/fisk/instructions/vmulss.rb +8 -8
- data/lib/fisk/instructions/vorpd.rb +20 -20
- data/lib/fisk/instructions/vorps.rb +20 -20
- data/lib/fisk/instructions/vpabsb.rb +20 -20
- data/lib/fisk/instructions/vpabsd.rb +20 -20
- data/lib/fisk/instructions/vpabsq.rb +12 -12
- data/lib/fisk/instructions/vpabsw.rb +20 -20
- data/lib/fisk/instructions/vpackssdw.rb +20 -20
- data/lib/fisk/instructions/vpacksswb.rb +20 -20
- data/lib/fisk/instructions/vpackusdw.rb +20 -20
- data/lib/fisk/instructions/vpackuswb.rb +20 -20
- data/lib/fisk/instructions/vpaddb.rb +20 -20
- data/lib/fisk/instructions/vpaddd.rb +20 -20
- data/lib/fisk/instructions/vpaddq.rb +20 -20
- data/lib/fisk/instructions/vpaddsb.rb +20 -20
- data/lib/fisk/instructions/vpaddsw.rb +20 -20
- data/lib/fisk/instructions/vpaddusb.rb +20 -20
- data/lib/fisk/instructions/vpaddusw.rb +20 -20
- data/lib/fisk/instructions/vpaddw.rb +20 -20
- data/lib/fisk/instructions/vpalignr.rb +30 -30
- data/lib/fisk/instructions/vpand.rb +8 -8
- data/lib/fisk/instructions/vpandd.rb +12 -12
- data/lib/fisk/instructions/vpandn.rb +8 -8
- data/lib/fisk/instructions/vpandnd.rb +12 -12
- data/lib/fisk/instructions/vpandnq.rb +12 -12
- data/lib/fisk/instructions/vpandq.rb +12 -12
- data/lib/fisk/instructions/vpavgb.rb +20 -20
- data/lib/fisk/instructions/vpavgw.rb +20 -20
- data/lib/fisk/instructions/vpblendd.rb +12 -12
- data/lib/fisk/instructions/vpblendmb.rb +12 -12
- data/lib/fisk/instructions/vpblendmd.rb +12 -12
- data/lib/fisk/instructions/vpblendmq.rb +12 -12
- data/lib/fisk/instructions/vpblendmw.rb +12 -12
- data/lib/fisk/instructions/vpblendvb.rb +8 -8
- data/lib/fisk/instructions/vpblendw.rb +12 -12
- data/lib/fisk/instructions/vpbroadcastb.rb +26 -26
- data/lib/fisk/instructions/vpbroadcastd.rb +26 -26
- data/lib/fisk/instructions/vpbroadcastmb2q.rb +6 -6
- data/lib/fisk/instructions/vpbroadcastmw2d.rb +6 -6
- data/lib/fisk/instructions/vpbroadcastq.rb +26 -26
- data/lib/fisk/instructions/vpbroadcastw.rb +26 -26
- data/lib/fisk/instructions/vpclmulqdq.rb +6 -6
- data/lib/fisk/instructions/vpcmov.rb +16 -16
- data/lib/fisk/instructions/vpcmpb.rb +18 -18
- data/lib/fisk/instructions/vpcmpd.rb +18 -18
- data/lib/fisk/instructions/vpcmpeqb.rb +20 -20
- data/lib/fisk/instructions/vpcmpeqd.rb +20 -20
- data/lib/fisk/instructions/vpcmpeqq.rb +20 -20
- data/lib/fisk/instructions/vpcmpeqw.rb +20 -20
- data/lib/fisk/instructions/vpcmpestri.rb +6 -6
- data/lib/fisk/instructions/vpcmpestrm.rb +6 -6
- data/lib/fisk/instructions/vpcmpgtb.rb +20 -20
- data/lib/fisk/instructions/vpcmpgtd.rb +20 -20
- data/lib/fisk/instructions/vpcmpgtq.rb +20 -20
- data/lib/fisk/instructions/vpcmpgtw.rb +20 -20
- data/lib/fisk/instructions/vpcmpistri.rb +6 -6
- data/lib/fisk/instructions/vpcmpistrm.rb +6 -6
- data/lib/fisk/instructions/vpcmpq.rb +18 -18
- data/lib/fisk/instructions/vpcmpub.rb +18 -18
- data/lib/fisk/instructions/vpcmpud.rb +18 -18
- data/lib/fisk/instructions/vpcmpuq.rb +18 -18
- data/lib/fisk/instructions/vpcmpuw.rb +18 -18
- data/lib/fisk/instructions/vpcmpw.rb +18 -18
- data/lib/fisk/instructions/vpcomb.rb +6 -6
- data/lib/fisk/instructions/vpcomd.rb +6 -6
- data/lib/fisk/instructions/vpcompressd.rb +12 -12
- data/lib/fisk/instructions/vpcompressq.rb +12 -12
- data/lib/fisk/instructions/vpcomq.rb +6 -6
- data/lib/fisk/instructions/vpcomub.rb +6 -6
- data/lib/fisk/instructions/vpcomud.rb +6 -6
- data/lib/fisk/instructions/vpcomuq.rb +6 -6
- data/lib/fisk/instructions/vpcomuw.rb +6 -6
- data/lib/fisk/instructions/vpcomw.rb +6 -6
- data/lib/fisk/instructions/vpconflictd.rb +12 -12
- data/lib/fisk/instructions/vpconflictq.rb +12 -12
- data/lib/fisk/instructions/vperm2f128.rb +6 -6
- data/lib/fisk/instructions/vperm2i128.rb +6 -6
- data/lib/fisk/instructions/vpermb.rb +12 -12
- data/lib/fisk/instructions/vpermd.rb +12 -12
- data/lib/fisk/instructions/vpermi2b.rb +12 -12
- data/lib/fisk/instructions/vpermi2d.rb +12 -12
- data/lib/fisk/instructions/vpermi2pd.rb +12 -12
- data/lib/fisk/instructions/vpermi2ps.rb +12 -12
- data/lib/fisk/instructions/vpermi2q.rb +12 -12
- data/lib/fisk/instructions/vpermi2w.rb +12 -12
- data/lib/fisk/instructions/vpermil2pd.rb +16 -16
- data/lib/fisk/instructions/vpermil2ps.rb +16 -16
- data/lib/fisk/instructions/vpermilpd.rb +50 -50
- data/lib/fisk/instructions/vpermilps.rb +50 -50
- data/lib/fisk/instructions/vpermpd.rb +26 -26
- data/lib/fisk/instructions/vpermps.rb +12 -12
- data/lib/fisk/instructions/vpermq.rb +26 -26
- data/lib/fisk/instructions/vpermt2b.rb +12 -12
- data/lib/fisk/instructions/vpermt2d.rb +12 -12
- data/lib/fisk/instructions/vpermt2pd.rb +12 -12
- data/lib/fisk/instructions/vpermt2ps.rb +12 -12
- data/lib/fisk/instructions/vpermt2q.rb +12 -12
- data/lib/fisk/instructions/vpermt2w.rb +12 -12
- data/lib/fisk/instructions/vpermw.rb +12 -12
- data/lib/fisk/instructions/vpexpandd.rb +12 -12
- data/lib/fisk/instructions/vpexpandq.rb +12 -12
- data/lib/fisk/instructions/vpextrb.rb +12 -12
- data/lib/fisk/instructions/vpextrd.rb +12 -12
- data/lib/fisk/instructions/vpextrq.rb +12 -12
- data/lib/fisk/instructions/vpextrw.rb +18 -18
- data/lib/fisk/instructions/vpgatherdd.rb +10 -10
- data/lib/fisk/instructions/vpgatherdq.rb +10 -10
- data/lib/fisk/instructions/vpgatherqd.rb +10 -10
- data/lib/fisk/instructions/vpgatherqq.rb +10 -10
- data/lib/fisk/instructions/vphaddbd.rb +4 -4
- data/lib/fisk/instructions/vphaddbq.rb +4 -4
- data/lib/fisk/instructions/vphaddbw.rb +4 -4
- data/lib/fisk/instructions/vphaddd.rb +8 -8
- data/lib/fisk/instructions/vphadddq.rb +4 -4
- data/lib/fisk/instructions/vphaddsw.rb +8 -8
- data/lib/fisk/instructions/vphaddubd.rb +4 -4
- data/lib/fisk/instructions/vphaddubq.rb +4 -4
- data/lib/fisk/instructions/vphaddubw.rb +4 -4
- data/lib/fisk/instructions/vphaddudq.rb +4 -4
- data/lib/fisk/instructions/vphadduwd.rb +4 -4
- data/lib/fisk/instructions/vphadduwq.rb +4 -4
- data/lib/fisk/instructions/vphaddw.rb +8 -8
- data/lib/fisk/instructions/vphaddwd.rb +4 -4
- data/lib/fisk/instructions/vphaddwq.rb +4 -4
- data/lib/fisk/instructions/vphminposuw.rb +4 -4
- data/lib/fisk/instructions/vphsubbw.rb +4 -4
- data/lib/fisk/instructions/vphsubd.rb +8 -8
- data/lib/fisk/instructions/vphsubdq.rb +4 -4
- data/lib/fisk/instructions/vphsubsw.rb +8 -8
- data/lib/fisk/instructions/vphsubw.rb +8 -8
- data/lib/fisk/instructions/vphsubwd.rb +4 -4
- data/lib/fisk/instructions/vpinsrb.rb +12 -12
- data/lib/fisk/instructions/vpinsrd.rb +12 -12
- data/lib/fisk/instructions/vpinsrq.rb +12 -12
- data/lib/fisk/instructions/vpinsrw.rb +12 -12
- data/lib/fisk/instructions/vplzcntd.rb +12 -12
- data/lib/fisk/instructions/vplzcntq.rb +12 -12
- data/lib/fisk/instructions/vpmacsdd.rb +4 -4
- data/lib/fisk/instructions/vpmacsdqh.rb +4 -4
- data/lib/fisk/instructions/vpmacsdql.rb +4 -4
- data/lib/fisk/instructions/vpmacssdd.rb +4 -4
- data/lib/fisk/instructions/vpmacssdqh.rb +4 -4
- data/lib/fisk/instructions/vpmacssdql.rb +4 -4
- data/lib/fisk/instructions/vpmacsswd.rb +4 -4
- data/lib/fisk/instructions/vpmacssww.rb +4 -4
- data/lib/fisk/instructions/vpmacswd.rb +4 -4
- data/lib/fisk/instructions/vpmacsww.rb +4 -4
- data/lib/fisk/instructions/vpmadcsswd.rb +4 -4
- data/lib/fisk/instructions/vpmadcswd.rb +4 -4
- data/lib/fisk/instructions/vpmadd52huq.rb +12 -12
- data/lib/fisk/instructions/vpmadd52luq.rb +12 -12
- data/lib/fisk/instructions/vpmaddubsw.rb +20 -20
- data/lib/fisk/instructions/vpmaddwd.rb +20 -20
- data/lib/fisk/instructions/vpmaskmovd.rb +8 -8
- data/lib/fisk/instructions/vpmaskmovq.rb +8 -8
- data/lib/fisk/instructions/vpmaxsb.rb +20 -20
- data/lib/fisk/instructions/vpmaxsd.rb +20 -20
- data/lib/fisk/instructions/vpmaxsq.rb +12 -12
- data/lib/fisk/instructions/vpmaxsw.rb +20 -20
- data/lib/fisk/instructions/vpmaxub.rb +20 -20
- data/lib/fisk/instructions/vpmaxud.rb +20 -20
- data/lib/fisk/instructions/vpmaxuq.rb +12 -12
- data/lib/fisk/instructions/vpmaxuw.rb +20 -20
- data/lib/fisk/instructions/vpminsb.rb +20 -20
- data/lib/fisk/instructions/vpminsd.rb +20 -20
- data/lib/fisk/instructions/vpminsq.rb +12 -12
- data/lib/fisk/instructions/vpminsw.rb +20 -20
- data/lib/fisk/instructions/vpminub.rb +20 -20
- data/lib/fisk/instructions/vpminud.rb +20 -20
- data/lib/fisk/instructions/vpminuq.rb +12 -12
- data/lib/fisk/instructions/vpminuw.rb +20 -20
- data/lib/fisk/instructions/vpmovb2m.rb +6 -6
- data/lib/fisk/instructions/vpmovd2m.rb +6 -6
- data/lib/fisk/instructions/vpmovdb.rb +12 -12
- data/lib/fisk/instructions/vpmovdw.rb +12 -12
- data/lib/fisk/instructions/vpmovm2b.rb +6 -6
- data/lib/fisk/instructions/vpmovm2d.rb +6 -6
- data/lib/fisk/instructions/vpmovm2q.rb +6 -6
- data/lib/fisk/instructions/vpmovm2w.rb +6 -6
- data/lib/fisk/instructions/vpmovmskb.rb +4 -4
- data/lib/fisk/instructions/vpmovq2m.rb +6 -6
- data/lib/fisk/instructions/vpmovqb.rb +12 -12
- data/lib/fisk/instructions/vpmovqd.rb +12 -12
- data/lib/fisk/instructions/vpmovqw.rb +12 -12
- data/lib/fisk/instructions/vpmovsdb.rb +12 -12
- data/lib/fisk/instructions/vpmovsdw.rb +12 -12
- data/lib/fisk/instructions/vpmovsqb.rb +12 -12
- data/lib/fisk/instructions/vpmovsqd.rb +12 -12
- data/lib/fisk/instructions/vpmovsqw.rb +12 -12
- data/lib/fisk/instructions/vpmovswb.rb +12 -12
- data/lib/fisk/instructions/vpmovsxbd.rb +20 -20
- data/lib/fisk/instructions/vpmovsxbq.rb +20 -20
- data/lib/fisk/instructions/vpmovsxbw.rb +20 -20
- data/lib/fisk/instructions/vpmovsxdq.rb +20 -20
- data/lib/fisk/instructions/vpmovsxwd.rb +20 -20
- data/lib/fisk/instructions/vpmovsxwq.rb +20 -20
- data/lib/fisk/instructions/vpmovusdb.rb +12 -12
- data/lib/fisk/instructions/vpmovusdw.rb +12 -12
- data/lib/fisk/instructions/vpmovusqb.rb +12 -12
- data/lib/fisk/instructions/vpmovusqd.rb +12 -12
- data/lib/fisk/instructions/vpmovusqw.rb +12 -12
- data/lib/fisk/instructions/vpmovuswb.rb +12 -12
- data/lib/fisk/instructions/vpmovw2m.rb +6 -6
- data/lib/fisk/instructions/vpmovwb.rb +12 -12
- data/lib/fisk/instructions/vpmovzxbd.rb +20 -20
- data/lib/fisk/instructions/vpmovzxbq.rb +20 -20
- data/lib/fisk/instructions/vpmovzxbw.rb +20 -20
- data/lib/fisk/instructions/vpmovzxdq.rb +20 -20
- data/lib/fisk/instructions/vpmovzxwd.rb +20 -20
- data/lib/fisk/instructions/vpmovzxwq.rb +20 -20
- data/lib/fisk/instructions/vpmuldq.rb +20 -20
- data/lib/fisk/instructions/vpmulhrsw.rb +20 -20
- data/lib/fisk/instructions/vpmulhuw.rb +20 -20
- data/lib/fisk/instructions/vpmulhw.rb +20 -20
- data/lib/fisk/instructions/vpmulld.rb +20 -20
- data/lib/fisk/instructions/vpmullq.rb +12 -12
- data/lib/fisk/instructions/vpmullw.rb +20 -20
- data/lib/fisk/instructions/vpmultishiftqb.rb +12 -12
- data/lib/fisk/instructions/vpmuludq.rb +20 -20
- data/lib/fisk/instructions/vpopcntd.rb +4 -4
- data/lib/fisk/instructions/vpopcntq.rb +4 -4
- data/lib/fisk/instructions/vpor.rb +8 -8
- data/lib/fisk/instructions/vpord.rb +12 -12
- data/lib/fisk/instructions/vporq.rb +12 -12
- data/lib/fisk/instructions/vpperm.rb +8 -8
- data/lib/fisk/instructions/vprold.rb +12 -12
- data/lib/fisk/instructions/vprolq.rb +12 -12
- data/lib/fisk/instructions/vprolvd.rb +12 -12
- data/lib/fisk/instructions/vprolvq.rb +12 -12
- data/lib/fisk/instructions/vprord.rb +12 -12
- data/lib/fisk/instructions/vprorq.rb +12 -12
- data/lib/fisk/instructions/vprorvd.rb +12 -12
- data/lib/fisk/instructions/vprorvq.rb +12 -12
- data/lib/fisk/instructions/vprotb.rb +14 -14
- data/lib/fisk/instructions/vprotd.rb +14 -14
- data/lib/fisk/instructions/vprotq.rb +14 -14
- data/lib/fisk/instructions/vprotw.rb +14 -14
- data/lib/fisk/instructions/vpsadbw.rb +20 -20
- data/lib/fisk/instructions/vpscatterdd.rb +6 -6
- data/lib/fisk/instructions/vpscatterdq.rb +6 -6
- data/lib/fisk/instructions/vpscatterqd.rb +6 -6
- data/lib/fisk/instructions/vpscatterqq.rb +6 -6
- data/lib/fisk/instructions/vpshab.rb +8 -8
- data/lib/fisk/instructions/vpshad.rb +8 -8
- data/lib/fisk/instructions/vpshaq.rb +8 -8
- data/lib/fisk/instructions/vpshaw.rb +8 -8
- data/lib/fisk/instructions/vpshlb.rb +8 -8
- data/lib/fisk/instructions/vpshld.rb +8 -8
- data/lib/fisk/instructions/vpshlq.rb +8 -8
- data/lib/fisk/instructions/vpshlw.rb +8 -8
- data/lib/fisk/instructions/vpshufb.rb +20 -20
- data/lib/fisk/instructions/vpshufd.rb +30 -30
- data/lib/fisk/instructions/vpshufhw.rb +30 -30
- data/lib/fisk/instructions/vpshuflw.rb +30 -30
- data/lib/fisk/instructions/vpsignb.rb +8 -8
- data/lib/fisk/instructions/vpsignd.rb +8 -8
- data/lib/fisk/instructions/vpsignw.rb +8 -8
- data/lib/fisk/instructions/vpslld.rb +36 -36
- data/lib/fisk/instructions/vpslldq.rb +16 -16
- data/lib/fisk/instructions/vpsllq.rb +36 -36
- data/lib/fisk/instructions/vpsllvd.rb +20 -20
- data/lib/fisk/instructions/vpsllvq.rb +20 -20
- data/lib/fisk/instructions/vpsllvw.rb +12 -12
- data/lib/fisk/instructions/vpsllw.rb +36 -36
- data/lib/fisk/instructions/vpsrad.rb +36 -36
- data/lib/fisk/instructions/vpsraq.rb +24 -24
- data/lib/fisk/instructions/vpsravd.rb +20 -20
- data/lib/fisk/instructions/vpsravq.rb +12 -12
- data/lib/fisk/instructions/vpsravw.rb +12 -12
- data/lib/fisk/instructions/vpsraw.rb +36 -36
- data/lib/fisk/instructions/vpsrld.rb +36 -36
- data/lib/fisk/instructions/vpsrldq.rb +16 -16
- data/lib/fisk/instructions/vpsrlq.rb +36 -36
- data/lib/fisk/instructions/vpsrlvd.rb +20 -20
- data/lib/fisk/instructions/vpsrlvq.rb +20 -20
- data/lib/fisk/instructions/vpsrlvw.rb +12 -12
- data/lib/fisk/instructions/vpsrlw.rb +36 -36
- data/lib/fisk/instructions/vpsubb.rb +20 -20
- data/lib/fisk/instructions/vpsubd.rb +20 -20
- data/lib/fisk/instructions/vpsubq.rb +20 -20
- data/lib/fisk/instructions/vpsubsb.rb +20 -20
- data/lib/fisk/instructions/vpsubsw.rb +20 -20
- data/lib/fisk/instructions/vpsubusb.rb +20 -20
- data/lib/fisk/instructions/vpsubusw.rb +20 -20
- data/lib/fisk/instructions/vpsubw.rb +20 -20
- data/lib/fisk/instructions/vpternlogd.rb +18 -18
- data/lib/fisk/instructions/vpternlogq.rb +18 -18
- data/lib/fisk/instructions/vptest.rb +8 -8
- data/lib/fisk/instructions/vptestmb.rb +12 -12
- data/lib/fisk/instructions/vptestmd.rb +12 -12
- data/lib/fisk/instructions/vptestmq.rb +12 -12
- data/lib/fisk/instructions/vptestmw.rb +12 -12
- data/lib/fisk/instructions/vptestnmb.rb +12 -12
- data/lib/fisk/instructions/vptestnmd.rb +12 -12
- data/lib/fisk/instructions/vptestnmq.rb +12 -12
- data/lib/fisk/instructions/vptestnmw.rb +12 -12
- data/lib/fisk/instructions/vpunpckhbw.rb +20 -20
- data/lib/fisk/instructions/vpunpckhdq.rb +20 -20
- data/lib/fisk/instructions/vpunpckhqdq.rb +20 -20
- data/lib/fisk/instructions/vpunpckhwd.rb +20 -20
- data/lib/fisk/instructions/vpunpcklbw.rb +20 -20
- data/lib/fisk/instructions/vpunpckldq.rb +20 -20
- data/lib/fisk/instructions/vpunpcklqdq.rb +20 -20
- data/lib/fisk/instructions/vpunpcklwd.rb +20 -20
- data/lib/fisk/instructions/vpxor.rb +8 -8
- data/lib/fisk/instructions/vpxord.rb +12 -12
- data/lib/fisk/instructions/vpxorq.rb +12 -12
- data/lib/fisk/instructions/vrangepd.rb +18 -18
- data/lib/fisk/instructions/vrangeps.rb +18 -18
- data/lib/fisk/instructions/vrangesd.rb +6 -6
- data/lib/fisk/instructions/vrangess.rb +6 -6
- data/lib/fisk/instructions/vrcp14pd.rb +12 -12
- data/lib/fisk/instructions/vrcp14ps.rb +12 -12
- data/lib/fisk/instructions/vrcp14sd.rb +4 -4
- data/lib/fisk/instructions/vrcp14ss.rb +4 -4
- data/lib/fisk/instructions/vrcp28pd.rb +4 -4
- data/lib/fisk/instructions/vrcp28ps.rb +4 -4
- data/lib/fisk/instructions/vrcp28sd.rb +4 -4
- data/lib/fisk/instructions/vrcp28ss.rb +4 -4
- data/lib/fisk/instructions/vrcpps.rb +8 -8
- data/lib/fisk/instructions/vrcpss.rb +4 -4
- data/lib/fisk/instructions/vreducepd.rb +18 -18
- data/lib/fisk/instructions/vreduceps.rb +18 -18
- data/lib/fisk/instructions/vreducesd.rb +6 -6
- data/lib/fisk/instructions/vreducess.rb +6 -6
- data/lib/fisk/instructions/vrndscalepd.rb +18 -18
- data/lib/fisk/instructions/vrndscaleps.rb +18 -18
- data/lib/fisk/instructions/vrndscalesd.rb +6 -6
- data/lib/fisk/instructions/vrndscaless.rb +6 -6
- data/lib/fisk/instructions/vroundpd.rb +12 -12
- data/lib/fisk/instructions/vroundps.rb +12 -12
- data/lib/fisk/instructions/vroundsd.rb +6 -6
- data/lib/fisk/instructions/vroundss.rb +6 -6
- data/lib/fisk/instructions/vrsqrt14pd.rb +12 -12
- data/lib/fisk/instructions/vrsqrt14ps.rb +12 -12
- data/lib/fisk/instructions/vrsqrt14sd.rb +4 -4
- data/lib/fisk/instructions/vrsqrt14ss.rb +4 -4
- data/lib/fisk/instructions/vrsqrt28pd.rb +4 -4
- data/lib/fisk/instructions/vrsqrt28ps.rb +4 -4
- data/lib/fisk/instructions/vrsqrt28sd.rb +4 -4
- data/lib/fisk/instructions/vrsqrt28ss.rb +4 -4
- data/lib/fisk/instructions/vrsqrtps.rb +8 -8
- data/lib/fisk/instructions/vrsqrtss.rb +4 -4
- data/lib/fisk/instructions/vscalefpd.rb +12 -12
- data/lib/fisk/instructions/vscalefps.rb +12 -12
- data/lib/fisk/instructions/vscalefsd.rb +4 -4
- data/lib/fisk/instructions/vscalefss.rb +4 -4
- data/lib/fisk/instructions/vscatterdpd.rb +6 -6
- data/lib/fisk/instructions/vscatterdps.rb +6 -6
- data/lib/fisk/instructions/vscatterpf0dpd.rb +1 -1
- data/lib/fisk/instructions/vscatterpf0dps.rb +1 -1
- data/lib/fisk/instructions/vscatterpf0qpd.rb +1 -1
- data/lib/fisk/instructions/vscatterpf0qps.rb +1 -1
- data/lib/fisk/instructions/vscatterpf1dpd.rb +1 -1
- data/lib/fisk/instructions/vscatterpf1dps.rb +1 -1
- data/lib/fisk/instructions/vscatterpf1qpd.rb +1 -1
- data/lib/fisk/instructions/vscatterpf1qps.rb +1 -1
- data/lib/fisk/instructions/vscatterqpd.rb +6 -6
- data/lib/fisk/instructions/vscatterqps.rb +6 -6
- data/lib/fisk/instructions/vshuff32x4.rb +12 -12
- data/lib/fisk/instructions/vshuff64x2.rb +12 -12
- data/lib/fisk/instructions/vshufi32x4.rb +12 -12
- data/lib/fisk/instructions/vshufi64x2.rb +12 -12
- data/lib/fisk/instructions/vshufpd.rb +30 -30
- data/lib/fisk/instructions/vshufps.rb +30 -30
- data/lib/fisk/instructions/vsqrtpd.rb +20 -20
- data/lib/fisk/instructions/vsqrtps.rb +20 -20
- data/lib/fisk/instructions/vsqrtsd.rb +8 -8
- data/lib/fisk/instructions/vsqrtss.rb +8 -8
- data/lib/fisk/instructions/vstmxcsr.rb +1 -1
- data/lib/fisk/instructions/vsubpd.rb +20 -20
- data/lib/fisk/instructions/vsubps.rb +20 -20
- data/lib/fisk/instructions/vsubsd.rb +8 -8
- data/lib/fisk/instructions/vsubss.rb +8 -8
- data/lib/fisk/instructions/vtestpd.rb +8 -8
- data/lib/fisk/instructions/vtestps.rb +8 -8
- data/lib/fisk/instructions/vucomisd.rb +8 -8
- data/lib/fisk/instructions/vucomiss.rb +8 -8
- data/lib/fisk/instructions/vunpckhpd.rb +20 -20
- data/lib/fisk/instructions/vunpckhps.rb +20 -20
- data/lib/fisk/instructions/vunpcklpd.rb +20 -20
- data/lib/fisk/instructions/vunpcklps.rb +20 -20
- data/lib/fisk/instructions/vxorpd.rb +20 -20
- data/lib/fisk/instructions/vxorps.rb +20 -20
- data/lib/fisk/instructions/xadd.rb +36 -36
- data/lib/fisk/instructions/xchg.rb +84 -84
- data/lib/fisk/instructions/xor.rb +125 -125
- data/lib/fisk/instructions/xorpd.rb +9 -9
- data/lib/fisk/instructions/xorps.rb +9 -9
- data/lib/fisk/version.rb +3 -0
- data/test/helper.rb +5 -0
- data/test/test_cfg.rb +246 -0
- data/test/test_fisk.rb +108 -6
- data/test/test_register_allocation.rb +201 -0
- data/test/test_run_fisk.rb +6 -6
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42d5818c354d7ee2347266ca997e314615a23f832687a30dc05578a2e92b6310
|
4
|
+
data.tar.gz: '06428fa873eed75d9ee07bdedd1fa848a51dfaa826dd38ce661c6b267509e3a8'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ccbb718f81f5856f19dfca980a3f7d39e7a96cdc8dcd43922fb7e90e89d16d87d20cb07ccc54cf09809a9c3020504ab3ea8742bad65b77edc83cf94015c5794
|
7
|
+
data.tar.gz: 8e9182cb31c8d29dd260e35d607a525536a5964cacc814898a2ac696ec3f8f2b9671f982a698c8b725e380eb7bff54c07f1a84c6bbc25540ab7bfcd0388ca8e6
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Fisk - A Pure Ruby Assembler
|
2
2
|
|
3
|
+
Tired of writing Ruby in Ruby? Now you can write assembly in Ruby with Fisk!
|
4
|
+
|
3
5
|
This is a pure Ruby x86-64 assembler (I guess). I'm not 100% sure if it counts
|
4
6
|
as pure Ruby because it just reads an XML file and metaprograms most of it.
|
5
7
|
Anyway, you can use it to write assembly in Ruby, then have it assembled.
|
@@ -24,7 +26,60 @@ binary = fisk.asm do
|
|
24
26
|
end
|
25
27
|
```
|
26
28
|
|
27
|
-
|
29
|
+
Fisk uses Intel assembly syntax, so the first operand is the *destination*, and
|
30
|
+
the second operand is the source. So for example `mov rax, imm8(1)` means "put
|
31
|
+
an immediate that is 8 bits wide with the value of 1 in the RAX register".
|
32
|
+
|
33
|
+
## Sizes and Memory Operands
|
34
|
+
|
35
|
+
In order to select the right x86 instruction to emit, Fisk needs to know the
|
36
|
+
types of the operands. Register types are already implied, but things like
|
37
|
+
immediates and memory operands need to be specified.
|
38
|
+
|
39
|
+
Below are a few examples.
|
40
|
+
|
41
|
+
Putting a 32 bit immediate in the RAX register:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
mov rax, imm32(0xFFF)
|
45
|
+
```
|
46
|
+
|
47
|
+
Dereferencing the value in RAX and storing the value in the RAX register:
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
mov rax, m64(rax)
|
51
|
+
```
|
52
|
+
|
53
|
+
Dereferencing the value 8 bytes away RAX and storing the value in the R9 register:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
mov r9, m64(rax, 8)
|
57
|
+
```
|
58
|
+
|
59
|
+
## Register Allocation
|
60
|
+
|
61
|
+
Fisk supports simple register assignment. You can make temporary registers,
|
62
|
+
then have Fisk assign registers for you. For example:
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
fisk = Fisk.new
|
66
|
+
|
67
|
+
# Make some temporary registers
|
68
|
+
reg1 = fisk.register("temp1")
|
69
|
+
reg2 = fisk.register("temp2")
|
70
|
+
|
71
|
+
# XOR the two virtual registers
|
72
|
+
fisk.xor reg1, reg2
|
73
|
+
|
74
|
+
# Ask Fisk to assign registers from the pool of registers passed in
|
75
|
+
fisk.assign_registers([fisk.r9, fisk.r10])
|
76
|
+
```
|
77
|
+
|
78
|
+
Currently, Fisk won't spill registers for you, it just raises an exception.
|
79
|
+
|
80
|
+
## Executing Assembly
|
81
|
+
|
82
|
+
Now, it's not very fun to assemble something unless you can execute it. So
|
28
83
|
here is an example of how to execute the above assembly. This assembly code
|
29
84
|
will send an interrupt and tell the debugger to stop. So let's write the
|
30
85
|
machine code to some executable memory, and call it from a Ruby program that we
|
data/bin/build-machine.rb
CHANGED
@@ -8,7 +8,7 @@ def parse_rex v
|
|
8
8
|
when /^(\d+)$/
|
9
9
|
v
|
10
10
|
when /^#(\d+)$/
|
11
|
-
"
|
11
|
+
"operands[#{$1.to_i}].rex_value"
|
12
12
|
else
|
13
13
|
raise NotImplementedError, v
|
14
14
|
end
|
@@ -23,7 +23,7 @@ def parse_operand_value v
|
|
23
23
|
when /^(\d+)$/
|
24
24
|
v
|
25
25
|
when /^#(\d+)$/
|
26
|
-
"operands[#{$1.to_i}].
|
26
|
+
"operands[#{$1.to_i}].op_value"
|
27
27
|
else
|
28
28
|
raise NotImplementedError, v
|
29
29
|
end
|
data/fisk.gemspec
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
$: << File.expand_path("lib")
|
2
|
+
|
3
|
+
require "fisk/version"
|
4
|
+
|
1
5
|
Gem::Specification.new do |s|
|
2
6
|
s.name = "fisk"
|
3
|
-
s.version =
|
7
|
+
s.version = Fisk::VERSION
|
4
8
|
s.summary = "Write assembly in Ruby!"
|
5
9
|
s.description = "Tired of writing Ruby in Ruby? Now you can write assembly in Ruby!"
|
6
10
|
s.authors = ["Aaron Patterson"]
|
data/lib/fisk.rb
CHANGED
@@ -1,32 +1,85 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "stringio"
|
4
|
+
require "set"
|
5
|
+
|
4
6
|
require "fisk/instructions"
|
7
|
+
require "fisk/basic_block"
|
8
|
+
require "fisk/errors"
|
9
|
+
require "fisk/version"
|
5
10
|
|
6
11
|
class Fisk
|
7
|
-
class Operand
|
8
|
-
def type; value; end
|
12
|
+
class Operand
|
9
13
|
def works? type; self.type == type; end
|
10
14
|
def unknown_label?; false; end
|
15
|
+
def register?; false; end
|
16
|
+
def temp_register?; false; end
|
11
17
|
def extended_register?; false; end
|
12
18
|
def m64?; false; end
|
19
|
+
|
20
|
+
def rex_value
|
21
|
+
value >> 3
|
22
|
+
end
|
23
|
+
|
24
|
+
def op_value
|
25
|
+
value
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class ValueOperand < Operand
|
30
|
+
attr_reader :value
|
31
|
+
alias :type :value
|
32
|
+
|
33
|
+
def initialize value
|
34
|
+
@value = value
|
35
|
+
end
|
13
36
|
end
|
14
37
|
|
15
38
|
module Registers
|
16
39
|
class Register < Operand
|
17
|
-
attr_reader :name, :type
|
40
|
+
attr_reader :name, :type, :value
|
18
41
|
|
19
42
|
def initialize name, type, value
|
20
43
|
@name = name
|
21
44
|
@type = type
|
22
|
-
|
45
|
+
@value = value
|
23
46
|
end
|
24
47
|
|
25
48
|
def works? type
|
26
49
|
type == self.name || type == self.type
|
27
50
|
end
|
28
51
|
|
29
|
-
def
|
52
|
+
def op_value
|
53
|
+
value & 0x7
|
54
|
+
end
|
55
|
+
|
56
|
+
def extended_register?; @value > 7; end
|
57
|
+
end
|
58
|
+
|
59
|
+
class Temp < Operand
|
60
|
+
attr_reader :name, :type
|
61
|
+
attr_accessor :register, :start_point, :end_point
|
62
|
+
|
63
|
+
def initialize name, type
|
64
|
+
@name = name
|
65
|
+
@type = type
|
66
|
+
@start_point = nil
|
67
|
+
@end_point = nil
|
68
|
+
end
|
69
|
+
|
70
|
+
def temp_register?; true; end
|
71
|
+
|
72
|
+
def extended_register?
|
73
|
+
@register.extended_register?
|
74
|
+
end
|
75
|
+
|
76
|
+
def rex_value
|
77
|
+
@register.rex_value
|
78
|
+
end
|
79
|
+
|
80
|
+
def value
|
81
|
+
@register.value
|
82
|
+
end
|
30
83
|
end
|
31
84
|
|
32
85
|
EAX = Register.new "eax", "r32", 0
|
@@ -50,6 +103,12 @@ class Fisk
|
|
50
103
|
i += 8
|
51
104
|
const_set "R#{i}", Register.new("r#{i}", "r64", i)
|
52
105
|
end
|
106
|
+
|
107
|
+
# List of *caller* saved registers for the C calling convention
|
108
|
+
CALLER_SAVED = [ RDI, RSI, RDX, RCX, R8, R9, R10, R11 ]
|
109
|
+
|
110
|
+
# List of *callee* saved registers for the C calling convention
|
111
|
+
CALLEE_SAVED = [ RBX, RSP, RBP, R12, R13, R14, R15 ]
|
53
112
|
end
|
54
113
|
|
55
114
|
|
@@ -57,11 +116,14 @@ class Fisk
|
|
57
116
|
attr_reader :displacement
|
58
117
|
|
59
118
|
def initialize register, displacement
|
60
|
-
super(register.value)
|
61
119
|
@register = register
|
62
120
|
@displacement = displacement
|
63
121
|
end
|
64
122
|
|
123
|
+
def value
|
124
|
+
@register.value
|
125
|
+
end
|
126
|
+
|
65
127
|
def type
|
66
128
|
"m64"
|
67
129
|
end
|
@@ -73,62 +135,50 @@ class Fisk
|
|
73
135
|
M64.new x, displacement
|
74
136
|
end
|
75
137
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
"imm32"
|
85
|
-
end
|
86
|
-
end
|
138
|
+
# Define all immediate value methods of different sizes
|
139
|
+
[8, 16, 32, 64].each do |size|
|
140
|
+
class_eval <<~eostr, __FILE__, __LINE__ + 1
|
141
|
+
class Imm#{size} < ValueOperand
|
142
|
+
def type
|
143
|
+
"imm#{size}"
|
144
|
+
end
|
145
|
+
end
|
87
146
|
|
88
|
-
|
89
|
-
|
90
|
-
"imm64"
|
91
|
-
end
|
147
|
+
def imm#{size} val; Imm#{size}.new(val.to_i); end
|
148
|
+
eostr
|
92
149
|
end
|
93
150
|
|
94
|
-
class Rel8 <
|
151
|
+
class Rel8 < ValueOperand
|
95
152
|
def type
|
96
153
|
"rel8"
|
97
154
|
end
|
98
155
|
end
|
99
156
|
|
100
|
-
class Rel32 <
|
157
|
+
class Rel32 < ValueOperand
|
101
158
|
def type
|
102
159
|
"rel32"
|
103
160
|
end
|
104
161
|
end
|
105
162
|
|
106
|
-
class MOffs64 <
|
163
|
+
class MOffs64 < ValueOperand
|
107
164
|
def type
|
108
165
|
"moffs64"
|
109
166
|
end
|
110
167
|
end
|
111
168
|
|
112
|
-
class Lit <
|
169
|
+
class Lit < ValueOperand
|
113
170
|
def type
|
114
171
|
value.to_s
|
115
172
|
end
|
116
173
|
end
|
117
174
|
|
118
|
-
attr_reader :position
|
119
|
-
|
120
|
-
def initialize
|
121
|
-
@instructions = []
|
122
|
-
@labels = {}
|
123
|
-
@position = 0
|
124
|
-
end
|
125
|
-
|
126
175
|
class UnknownLabel < Struct.new(:name)
|
127
176
|
def works? type
|
128
177
|
type == "rel32"
|
129
178
|
end
|
130
179
|
|
131
180
|
def unknown_label?; true; end
|
181
|
+
def temp_register?; false; end
|
132
182
|
|
133
183
|
def value
|
134
184
|
label = assembler.label_for(name)
|
@@ -138,19 +188,8 @@ class Fisk
|
|
138
188
|
|
139
189
|
class Label < Struct.new(:name)
|
140
190
|
def label?; true; end
|
141
|
-
|
142
|
-
|
143
|
-
def label name
|
144
|
-
UnknownLabel.new(name)
|
145
|
-
end
|
146
|
-
|
147
|
-
def make_label name
|
148
|
-
@instructions << Label.new(name)
|
149
|
-
end
|
150
|
-
|
151
|
-
Registers.constants.grep(/^[A-Z0-9]*$/).each do |const|
|
152
|
-
val = Registers.const_get const
|
153
|
-
define_method(const.downcase) { val }
|
191
|
+
def jump?; false; end
|
192
|
+
def has_temp_registers?; false; end
|
154
193
|
end
|
155
194
|
|
156
195
|
class Instruction
|
@@ -160,6 +199,18 @@ class Fisk
|
|
160
199
|
@operands = operands
|
161
200
|
end
|
162
201
|
|
202
|
+
def jump?
|
203
|
+
false
|
204
|
+
end
|
205
|
+
|
206
|
+
def has_temp_registers?
|
207
|
+
@operands.any?(&:temp_register?)
|
208
|
+
end
|
209
|
+
|
210
|
+
def temp_registers
|
211
|
+
@operands.find_all(&:temp_register?)
|
212
|
+
end
|
213
|
+
|
163
214
|
def encodings
|
164
215
|
@form.encodings
|
165
216
|
end
|
@@ -185,6 +236,16 @@ class Fisk
|
|
185
236
|
@saved_pos = nil
|
186
237
|
end
|
187
238
|
|
239
|
+
def jump?
|
240
|
+
true
|
241
|
+
end
|
242
|
+
|
243
|
+
def target
|
244
|
+
@operand.name
|
245
|
+
end
|
246
|
+
|
247
|
+
def has_temp_registers?; false; end
|
248
|
+
|
188
249
|
def encode buffer, labels
|
189
250
|
# Estimate by using a rel32 offset
|
190
251
|
form = find_form "rel32"
|
@@ -228,22 +289,147 @@ class Fisk
|
|
228
289
|
end
|
229
290
|
end
|
230
291
|
|
292
|
+
def initialize
|
293
|
+
@instructions = []
|
294
|
+
@labels = {}
|
295
|
+
# A set of temp registers recorded as we see them (not at allocation time)
|
296
|
+
@temp_registers = Set.new
|
297
|
+
yield self if block_given?
|
298
|
+
end
|
299
|
+
|
300
|
+
# Mark a temporary register as "done being used" at this point in the
|
301
|
+
# instructions. Using the register after passing the register to this
|
302
|
+
# method results in undefined behavior.
|
303
|
+
def release_register reg
|
304
|
+
if reg.end_point
|
305
|
+
raise Errors::AlreadyReleasedError, "register #{reg.name} already released at #{reg.end_point}"
|
306
|
+
end
|
307
|
+
|
308
|
+
reg.end_point = (@instructions.length - 1)
|
309
|
+
end
|
310
|
+
|
311
|
+
# Releases all registers that haven't already been released
|
312
|
+
def release_all_registers
|
313
|
+
@temp_registers.each do |reg|
|
314
|
+
next if reg.end_point
|
315
|
+
release_register reg
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
# Return a list of basic blocks for the instructions
|
320
|
+
def basic_blocks
|
321
|
+
cfg.blocks
|
322
|
+
end
|
323
|
+
|
324
|
+
# Return a cfg for these instructions. The CFG includes connected basic
|
325
|
+
# blocks as well as any temporary registers
|
326
|
+
def cfg
|
327
|
+
CFG.build @instructions
|
328
|
+
end
|
329
|
+
|
330
|
+
# Create a label to be used with jump instructions. For example:
|
331
|
+
#
|
332
|
+
# fisk.jmp(fisk.label(:foo))
|
333
|
+
# fisk.int(lit(3))
|
334
|
+
# fisk.put_label(:foo)
|
335
|
+
#
|
336
|
+
def label name
|
337
|
+
UnknownLabel.new(name)
|
338
|
+
end
|
339
|
+
|
340
|
+
# Insert a label named +name+ at the current position in the instructions.
|
341
|
+
def put_label name
|
342
|
+
@instructions << Label.new(name)
|
343
|
+
self
|
344
|
+
end
|
345
|
+
alias :make_label :put_label
|
346
|
+
|
347
|
+
# Allocate and return a new register. These registers will be replaced with
|
348
|
+
# real registers when `assign_registers` is called.
|
349
|
+
def register name = "temp"
|
350
|
+
Registers::Temp.new name, "r64"
|
351
|
+
end
|
352
|
+
|
353
|
+
# Assign registers to any temporary registers. Only registers in +list+
|
354
|
+
# will be used when selecting register assignments
|
355
|
+
def assign_registers list, local: false
|
356
|
+
temp_registers = @temp_registers
|
357
|
+
|
358
|
+
# This mutates the temp registers, setting their end_point based on
|
359
|
+
# the CFG
|
360
|
+
self.cfg unless local
|
361
|
+
|
362
|
+
temp_registers.each do |reg|
|
363
|
+
unless reg.end_point
|
364
|
+
raise Errors::UnreleasedRegisterError, "Register #{reg.name} hasn't been released"
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
temp_registers = temp_registers.sort_by(&:start_point)
|
369
|
+
|
370
|
+
active = []
|
371
|
+
free_registers = list.reverse
|
372
|
+
register_count = list.length
|
373
|
+
|
374
|
+
temp_registers.each do |temp_reg|
|
375
|
+
# expire old intervals
|
376
|
+
active, dead = active.sort_by(&:end_point).partition do |j|
|
377
|
+
j.end_point >= temp_reg.start_point
|
378
|
+
end
|
379
|
+
|
380
|
+
# Add unused registers back to the free register list
|
381
|
+
dead.each { |tr| free_registers << tr.register }
|
382
|
+
|
383
|
+
if active.length == register_count
|
384
|
+
raise NotImplementedError, "Register spilled"
|
385
|
+
end
|
386
|
+
|
387
|
+
temp_reg.register = free_registers.pop
|
388
|
+
active << temp_reg
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
Registers.constants.grep(/^[A-Z0-9]*$/).each do |const|
|
393
|
+
val = Registers.const_get const
|
394
|
+
define_method(const.downcase) { val }
|
395
|
+
end
|
396
|
+
|
231
397
|
include Fisk::Instructions::DSLMethods
|
232
398
|
|
233
399
|
def moffs64 val
|
234
400
|
MOffs64.new val
|
235
401
|
end
|
236
402
|
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
403
|
+
# Create a signed immediate value of the right width
|
404
|
+
def imm val
|
405
|
+
if val >= -0x7F - 1 && val <= 0x7F
|
406
|
+
imm8 val
|
407
|
+
elsif val >= -0x7FFF - 1 && val <= 0x7FFF
|
408
|
+
imm16 val
|
409
|
+
elsif val >= -0x7FFFFFFF - 1 && val <= 0x7FFFFFFF
|
410
|
+
imm32 val
|
411
|
+
elsif val >= -0x7FFFFFFFFFFFFFFF - 1 && val <= 0x7FFFFFFFFFFFFFFF
|
412
|
+
imm64 val
|
413
|
+
else
|
414
|
+
raise ArgumentError, "#{val} is larger than a 64 bit int"
|
415
|
+
end
|
243
416
|
end
|
244
417
|
|
245
|
-
|
246
|
-
|
418
|
+
# Create an unsigned immediate value of the right width
|
419
|
+
def uimm val
|
420
|
+
if val < 0
|
421
|
+
raise ArgumentError, "#{val} is negative"
|
422
|
+
elsif val <= 0xFF
|
423
|
+
imm8 val
|
424
|
+
elsif val <= 0xFFFF
|
425
|
+
imm16 val
|
426
|
+
elsif val <= 0xFFFFFFFF
|
427
|
+
imm32 val
|
428
|
+
elsif val <= 0xFFFFFFFFFFFFFFFF
|
429
|
+
imm64 val
|
430
|
+
else
|
431
|
+
raise ArgumentError, "#{val} is too large for a 64 bit int"
|
432
|
+
end
|
247
433
|
end
|
248
434
|
|
249
435
|
def rel8 val
|
@@ -255,26 +441,34 @@ class Fisk
|
|
255
441
|
end
|
256
442
|
|
257
443
|
def lit val
|
258
|
-
# to_s because we're getting the value from JSON as a string
|
259
444
|
Lit.new val
|
260
445
|
end
|
261
446
|
|
447
|
+
# Instance eval's a given block and writes encoded instructions to +buf+.
|
448
|
+
# For example:
|
449
|
+
#
|
450
|
+
# fisk = Fisk.new
|
451
|
+
# fisk.asm do
|
452
|
+
# mov r9, imm64(32)
|
453
|
+
# end
|
454
|
+
#
|
262
455
|
def asm buf = StringIO.new(''.b), &block
|
263
|
-
@position = 0
|
264
456
|
instance_eval(&block)
|
265
|
-
|
457
|
+
write_to buf
|
266
458
|
buf
|
267
459
|
end
|
268
460
|
|
461
|
+
# Encodes all instructions and returns a binary string with the encoded
|
462
|
+
# instructions.
|
269
463
|
def to_binary
|
270
464
|
io = StringIO.new ''.b
|
271
|
-
|
465
|
+
write_to io
|
272
466
|
io.string
|
273
467
|
end
|
274
468
|
|
275
|
-
|
276
|
-
|
277
|
-
def
|
469
|
+
# Encode all instructions and write them to +buffer+. +buffer+ should be an
|
470
|
+
# IO object.
|
471
|
+
def write_to buffer
|
278
472
|
labels = {}
|
279
473
|
unresolved = []
|
280
474
|
@instructions.each do |insn|
|
@@ -294,6 +488,8 @@ class Fisk
|
|
294
488
|
insn.encode buffer, labels
|
295
489
|
end
|
296
490
|
buffer.seek pos, IO::SEEK_SET
|
491
|
+
|
492
|
+
buffer
|
297
493
|
end
|
298
494
|
|
299
495
|
def gen_with_insn insns, params
|
@@ -307,20 +503,42 @@ class Fisk
|
|
307
503
|
end
|
308
504
|
end
|
309
505
|
|
310
|
-
|
506
|
+
if forms.length == 0
|
507
|
+
valid_forms = insns.forms.map { |form|
|
508
|
+
" #{insns.name} #{form.operands.map(&:type).join(", ")}"
|
509
|
+
}.join "\n"
|
510
|
+
msg = <<~eostr
|
511
|
+
Couldn't find instruction #{insns.name} #{params.map(&:type).join(", ")}
|
512
|
+
Valid forms:
|
513
|
+
#{valid_forms}
|
514
|
+
eostr
|
515
|
+
raise NotImplementedError, msg
|
516
|
+
end
|
517
|
+
|
518
|
+
form = forms.first
|
311
519
|
|
312
520
|
insn = nil
|
313
521
|
|
314
|
-
|
522
|
+
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"
|
526
|
+
end
|
527
|
+
insn = UnresolvedInstruction.new(insns, form, params.first)
|
528
|
+
end
|
529
|
+
|
530
|
+
if param.temp_register?
|
531
|
+
if param.end_point
|
532
|
+
raise Errors::UseAfterInvalidationError, "Register #{param.name} used after release"
|
533
|
+
end
|
534
|
+
@temp_registers << param
|
535
|
+
|
536
|
+
param.start_point ||= @instructions.length
|
537
|
+
end
|
538
|
+
end
|
539
|
+
|
540
|
+
insn ||= Instruction.new(insns, form, params)
|
315
541
|
|
316
|
-
insn = if params.any?(&:unknown_label?)
|
317
|
-
if params.length > 1
|
318
|
-
raise ArgumentError, "labels only work with single param jump instructions"
|
319
|
-
end
|
320
|
-
UnresolvedInstruction.new(insns, form, params.first)
|
321
|
-
else
|
322
|
-
Instruction.new(insns, form, params)
|
323
|
-
end
|
324
542
|
@instructions << insn
|
325
543
|
|
326
544
|
self
|