fisk 1.0.0 → 2.0.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 +2 -2
- data/Rakefile +9 -3
- data/bin/build-machine.rb +44 -2
- data/bin/instruction.rb.erb +91 -0
- data/bin/instructions.rb.erb +45 -0
- data/fisk.gemspec +12 -0
- data/lib/fisk.rb +138 -50
- data/lib/fisk/encoding.rb +61 -0
- data/lib/fisk/helpers.rb +7 -0
- data/lib/fisk/instructions.rb +5054 -0
- data/lib/fisk/instructions/adc.rb +760 -0
- data/lib/fisk/instructions/adcx.rb +113 -0
- data/lib/fisk/instructions/add.rb +760 -0
- data/lib/fisk/instructions/addpd.rb +59 -0
- data/lib/fisk/instructions/addps.rb +57 -0
- data/lib/fisk/instructions/addsd.rb +59 -0
- data/lib/fisk/instructions/addss.rb +59 -0
- data/lib/fisk/instructions/addsubpd.rb +59 -0
- data/lib/fisk/instructions/addsubps.rb +59 -0
- data/lib/fisk/instructions/adox.rb +113 -0
- data/lib/fisk/instructions/aesdec.rb +61 -0
- data/lib/fisk/instructions/aesdeclast.rb +61 -0
- data/lib/fisk/instructions/aesenc.rb +61 -0
- data/lib/fisk/instructions/aesenclast.rb +61 -0
- data/lib/fisk/instructions/aesimc.rb +61 -0
- data/lib/fisk/instructions/aeskeygenassist.rb +65 -0
- data/lib/fisk/instructions/and.rb +760 -0
- data/lib/fisk/instructions/andn.rb +85 -0
- data/lib/fisk/instructions/andnpd.rb +59 -0
- data/lib/fisk/instructions/andnps.rb +57 -0
- data/lib/fisk/instructions/andpd.rb +59 -0
- data/lib/fisk/instructions/andps.rb +57 -0
- data/lib/fisk/instructions/bextr.rb +165 -0
- data/lib/fisk/instructions/blcfill.rb +81 -0
- data/lib/fisk/instructions/blci.rb +81 -0
- data/lib/fisk/instructions/blcic.rb +81 -0
- data/lib/fisk/instructions/blcmsk.rb +81 -0
- data/lib/fisk/instructions/blcs.rb +81 -0
- data/lib/fisk/instructions/blendpd.rb +65 -0
- data/lib/fisk/instructions/blendps.rb +65 -0
- data/lib/fisk/instructions/blendvpd.rb +63 -0
- data/lib/fisk/instructions/blendvps.rb +63 -0
- data/lib/fisk/instructions/blsfill.rb +81 -0
- data/lib/fisk/instructions/blsi.rb +81 -0
- data/lib/fisk/instructions/blsic.rb +81 -0
- data/lib/fisk/instructions/blsmsk.rb +81 -0
- data/lib/fisk/instructions/blsr.rb +81 -0
- data/lib/fisk/instructions/bsf.rb +155 -0
- data/lib/fisk/instructions/bsr.rb +155 -0
- data/lib/fisk/instructions/bswap.rb +47 -0
- data/lib/fisk/instructions/bt.rb +307 -0
- data/lib/fisk/instructions/btc.rb +307 -0
- data/lib/fisk/instructions/btr.rb +307 -0
- data/lib/fisk/instructions/bts.rb +307 -0
- data/lib/fisk/instructions/bzhi.rb +85 -0
- data/lib/fisk/instructions/call.rb +66 -0
- data/lib/fisk/instructions/cbw.rb +21 -0
- data/lib/fisk/instructions/cdq.rb +20 -0
- data/lib/fisk/instructions/cdqe.rb +26 -0
- data/lib/fisk/instructions/clc.rb +20 -0
- data/lib/fisk/instructions/cld.rb +20 -0
- data/lib/fisk/instructions/clflush.rb +32 -0
- data/lib/fisk/instructions/clflushopt.rb +33 -0
- data/lib/fisk/instructions/clwb.rb +33 -0
- data/lib/fisk/instructions/clzero.rb +22 -0
- data/lib/fisk/instructions/cmc.rb +20 -0
- data/lib/fisk/instructions/cmova.rb +155 -0
- data/lib/fisk/instructions/cmovae.rb +155 -0
- data/lib/fisk/instructions/cmovb.rb +155 -0
- data/lib/fisk/instructions/cmovbe.rb +155 -0
- data/lib/fisk/instructions/cmovc.rb +155 -0
- data/lib/fisk/instructions/cmove.rb +155 -0
- data/lib/fisk/instructions/cmovg.rb +155 -0
- data/lib/fisk/instructions/cmovge.rb +155 -0
- data/lib/fisk/instructions/cmovl.rb +155 -0
- data/lib/fisk/instructions/cmovle.rb +155 -0
- data/lib/fisk/instructions/cmovna.rb +155 -0
- data/lib/fisk/instructions/cmovnae.rb +155 -0
- data/lib/fisk/instructions/cmovnb.rb +155 -0
- data/lib/fisk/instructions/cmovnbe.rb +155 -0
- data/lib/fisk/instructions/cmovnc.rb +155 -0
- data/lib/fisk/instructions/cmovne.rb +155 -0
- data/lib/fisk/instructions/cmovng.rb +155 -0
- data/lib/fisk/instructions/cmovnge.rb +155 -0
- data/lib/fisk/instructions/cmovnl.rb +155 -0
- data/lib/fisk/instructions/cmovnle.rb +155 -0
- data/lib/fisk/instructions/cmovno.rb +155 -0
- data/lib/fisk/instructions/cmovnp.rb +155 -0
- data/lib/fisk/instructions/cmovns.rb +155 -0
- data/lib/fisk/instructions/cmovnz.rb +155 -0
- data/lib/fisk/instructions/cmovo.rb +155 -0
- data/lib/fisk/instructions/cmovp.rb +155 -0
- data/lib/fisk/instructions/cmovpe.rb +155 -0
- data/lib/fisk/instructions/cmovpo.rb +155 -0
- data/lib/fisk/instructions/cmovs.rb +155 -0
- data/lib/fisk/instructions/cmovz.rb +155 -0
- data/lib/fisk/instructions/cmp.rb +760 -0
- data/lib/fisk/instructions/cmppd.rb +63 -0
- data/lib/fisk/instructions/cmpps.rb +61 -0
- data/lib/fisk/instructions/cmpsd.rb +63 -0
- data/lib/fisk/instructions/cmpss.rb +63 -0
- data/lib/fisk/instructions/cmpxchg.rb +203 -0
- data/lib/fisk/instructions/cmpxchg16b.rb +32 -0
- data/lib/fisk/instructions/cmpxchg8b.rb +32 -0
- data/lib/fisk/instructions/comisd.rb +59 -0
- data/lib/fisk/instructions/comiss.rb +57 -0
- data/lib/fisk/instructions/cpuid.rb +21 -0
- data/lib/fisk/instructions/cqo.rb +26 -0
- data/lib/fisk/instructions/crc32.rb +271 -0
- data/lib/fisk/instructions/cvtdq2pd.rb +59 -0
- data/lib/fisk/instructions/cvtdq2ps.rb +57 -0
- data/lib/fisk/instructions/cvtpd2dq.rb +59 -0
- data/lib/fisk/instructions/cvtpd2pi.rb +59 -0
- data/lib/fisk/instructions/cvtpd2ps.rb +59 -0
- data/lib/fisk/instructions/cvtpi2pd.rb +59 -0
- data/lib/fisk/instructions/cvtpi2ps.rb +57 -0
- data/lib/fisk/instructions/cvtps2dq.rb +59 -0
- data/lib/fisk/instructions/cvtps2pd.rb +57 -0
- data/lib/fisk/instructions/cvtps2pi.rb +57 -0
- data/lib/fisk/instructions/cvtsd2si.rb +109 -0
- data/lib/fisk/instructions/cvtsd2ss.rb +59 -0
- data/lib/fisk/instructions/cvtsi2sd.rb +109 -0
- data/lib/fisk/instructions/cvtsi2ss.rb +109 -0
- data/lib/fisk/instructions/cvtss2sd.rb +59 -0
- data/lib/fisk/instructions/cvtss2si.rb +109 -0
- data/lib/fisk/instructions/cvttpd2dq.rb +59 -0
- data/lib/fisk/instructions/cvttpd2pi.rb +59 -0
- data/lib/fisk/instructions/cvttps2dq.rb +59 -0
- data/lib/fisk/instructions/cvttps2pi.rb +57 -0
- data/lib/fisk/instructions/cvttsd2si.rb +109 -0
- data/lib/fisk/instructions/cvttss2si.rb +109 -0
- data/lib/fisk/instructions/cwd.rb +21 -0
- data/lib/fisk/instructions/cwde.rb +20 -0
- data/lib/fisk/instructions/dec.rb +187 -0
- data/lib/fisk/instructions/div.rb +187 -0
- data/lib/fisk/instructions/divpd.rb +59 -0
- data/lib/fisk/instructions/divps.rb +57 -0
- data/lib/fisk/instructions/divsd.rb +59 -0
- data/lib/fisk/instructions/divss.rb +59 -0
- data/lib/fisk/instructions/dppd.rb +65 -0
- data/lib/fisk/instructions/dpps.rb +65 -0
- data/lib/fisk/instructions/emms.rb +21 -0
- data/lib/fisk/instructions/extractps.rb +65 -0
- data/lib/fisk/instructions/extrq.rb +62 -0
- data/lib/fisk/instructions/femms.rb +21 -0
- data/lib/fisk/instructions/haddpd.rb +59 -0
- data/lib/fisk/instructions/haddps.rb +59 -0
- data/lib/fisk/instructions/hsubpd.rb +59 -0
- data/lib/fisk/instructions/hsubps.rb +59 -0
- data/lib/fisk/instructions/idiv.rb +187 -0
- data/lib/fisk/instructions/imul.rb +637 -0
- data/lib/fisk/instructions/inc.rb +187 -0
- data/lib/fisk/instructions/insertps.rb +65 -0
- data/lib/fisk/instructions/insertq.rb +63 -0
- data/lib/fisk/instructions/int.rb +34 -0
- data/lib/fisk/instructions/ja.rb +36 -0
- data/lib/fisk/instructions/jae.rb +36 -0
- data/lib/fisk/instructions/jb.rb +36 -0
- data/lib/fisk/instructions/jbe.rb +36 -0
- data/lib/fisk/instructions/jc.rb +36 -0
- data/lib/fisk/instructions/je.rb +36 -0
- data/lib/fisk/instructions/jecxz.rb +22 -0
- data/lib/fisk/instructions/jg.rb +36 -0
- data/lib/fisk/instructions/jge.rb +36 -0
- data/lib/fisk/instructions/jl.rb +36 -0
- data/lib/fisk/instructions/jle.rb +36 -0
- data/lib/fisk/instructions/jmp.rb +79 -0
- data/lib/fisk/instructions/jna.rb +36 -0
- data/lib/fisk/instructions/jnae.rb +36 -0
- data/lib/fisk/instructions/jnb.rb +36 -0
- data/lib/fisk/instructions/jnbe.rb +36 -0
- data/lib/fisk/instructions/jnc.rb +36 -0
- data/lib/fisk/instructions/jne.rb +36 -0
- data/lib/fisk/instructions/jng.rb +36 -0
- data/lib/fisk/instructions/jnge.rb +36 -0
- data/lib/fisk/instructions/jnl.rb +36 -0
- data/lib/fisk/instructions/jnle.rb +36 -0
- data/lib/fisk/instructions/jno.rb +36 -0
- data/lib/fisk/instructions/jnp.rb +36 -0
- data/lib/fisk/instructions/jns.rb +36 -0
- data/lib/fisk/instructions/jnz.rb +36 -0
- data/lib/fisk/instructions/jo.rb +36 -0
- data/lib/fisk/instructions/jp.rb +36 -0
- data/lib/fisk/instructions/jpe.rb +36 -0
- data/lib/fisk/instructions/jpo.rb +36 -0
- data/lib/fisk/instructions/jrcxz.rb +22 -0
- data/lib/fisk/instructions/js.rb +36 -0
- data/lib/fisk/instructions/jz.rb +36 -0
- data/lib/fisk/instructions/kaddb.rb +28 -0
- data/lib/fisk/instructions/kaddd.rb +28 -0
- data/lib/fisk/instructions/kaddq.rb +28 -0
- data/lib/fisk/instructions/kaddw.rb +28 -0
- data/lib/fisk/instructions/kandb.rb +28 -0
- data/lib/fisk/instructions/kandd.rb +28 -0
- data/lib/fisk/instructions/kandnb.rb +28 -0
- data/lib/fisk/instructions/kandnd.rb +28 -0
- data/lib/fisk/instructions/kandnq.rb +28 -0
- data/lib/fisk/instructions/kandnw.rb +28 -0
- data/lib/fisk/instructions/kandq.rb +28 -0
- data/lib/fisk/instructions/kandw.rb +28 -0
- data/lib/fisk/instructions/kmovb.rb +99 -0
- data/lib/fisk/instructions/kmovd.rb +99 -0
- data/lib/fisk/instructions/kmovq.rb +99 -0
- data/lib/fisk/instructions/kmovw.rb +99 -0
- data/lib/fisk/instructions/knotb.rb +27 -0
- data/lib/fisk/instructions/knotd.rb +27 -0
- data/lib/fisk/instructions/knotq.rb +27 -0
- data/lib/fisk/instructions/knotw.rb +27 -0
- data/lib/fisk/instructions/korb.rb +28 -0
- data/lib/fisk/instructions/kord.rb +28 -0
- data/lib/fisk/instructions/korq.rb +28 -0
- data/lib/fisk/instructions/kortestb.rb +27 -0
- data/lib/fisk/instructions/kortestd.rb +27 -0
- data/lib/fisk/instructions/kortestq.rb +27 -0
- data/lib/fisk/instructions/kortestw.rb +27 -0
- data/lib/fisk/instructions/korw.rb +28 -0
- data/lib/fisk/instructions/kshiftlb.rb +29 -0
- data/lib/fisk/instructions/kshiftld.rb +29 -0
- data/lib/fisk/instructions/kshiftlq.rb +29 -0
- data/lib/fisk/instructions/kshiftlw.rb +29 -0
- data/lib/fisk/instructions/kshiftrb.rb +29 -0
- data/lib/fisk/instructions/kshiftrd.rb +29 -0
- data/lib/fisk/instructions/kshiftrq.rb +29 -0
- data/lib/fisk/instructions/kshiftrw.rb +29 -0
- data/lib/fisk/instructions/ktestb.rb +27 -0
- data/lib/fisk/instructions/ktestd.rb +27 -0
- data/lib/fisk/instructions/ktestq.rb +27 -0
- data/lib/fisk/instructions/ktestw.rb +27 -0
- data/lib/fisk/instructions/kunpckbw.rb +28 -0
- data/lib/fisk/instructions/kunpckdq.rb +28 -0
- data/lib/fisk/instructions/kunpckwd.rb +28 -0
- data/lib/fisk/instructions/kxnorb.rb +28 -0
- data/lib/fisk/instructions/kxnord.rb +28 -0
- data/lib/fisk/instructions/kxnorq.rb +28 -0
- data/lib/fisk/instructions/kxnorw.rb +28 -0
- data/lib/fisk/instructions/kxorb.rb +28 -0
- data/lib/fisk/instructions/kxord.rb +28 -0
- data/lib/fisk/instructions/kxorq.rb +28 -0
- data/lib/fisk/instructions/kxorw.rb +28 -0
- data/lib/fisk/instructions/lddqu.rb +34 -0
- data/lib/fisk/instructions/ldmxcsr.rb +32 -0
- data/lib/fisk/instructions/lea.rb +79 -0
- data/lib/fisk/instructions/lfence.rb +22 -0
- data/lib/fisk/instructions/lzcnt.rb +161 -0
- data/lib/fisk/instructions/maskmovdqu.rb +34 -0
- data/lib/fisk/instructions/maskmovq.rb +33 -0
- data/lib/fisk/instructions/maxpd.rb +59 -0
- data/lib/fisk/instructions/maxps.rb +57 -0
- data/lib/fisk/instructions/maxsd.rb +59 -0
- data/lib/fisk/instructions/maxss.rb +59 -0
- data/lib/fisk/instructions/mfence.rb +22 -0
- data/lib/fisk/instructions/minpd.rb +59 -0
- data/lib/fisk/instructions/minps.rb +57 -0
- data/lib/fisk/instructions/minsd.rb +59 -0
- data/lib/fisk/instructions/minss.rb +59 -0
- data/lib/fisk/instructions/monitor.rb +22 -0
- data/lib/fisk/instructions/monitorx.rb +22 -0
- data/lib/fisk/instructions/mov.rb +682 -0
- data/lib/fisk/instructions/movapd.rb +103 -0
- data/lib/fisk/instructions/movaps.rb +99 -0
- data/lib/fisk/instructions/movbe.rb +161 -0
- data/lib/fisk/instructions/movd.rb +205 -0
- data/lib/fisk/instructions/movddup.rb +59 -0
- data/lib/fisk/instructions/movdq2q.rb +34 -0
- data/lib/fisk/instructions/movdqa.rb +103 -0
- data/lib/fisk/instructions/movdqu.rb +103 -0
- data/lib/fisk/instructions/movhlps.rb +33 -0
- data/lib/fisk/instructions/movhpd.rb +59 -0
- data/lib/fisk/instructions/movhps.rb +57 -0
- data/lib/fisk/instructions/movlhps.rb +33 -0
- data/lib/fisk/instructions/movlpd.rb +59 -0
- data/lib/fisk/instructions/movlps.rb +57 -0
- data/lib/fisk/instructions/movmskpd.rb +34 -0
- data/lib/fisk/instructions/movmskps.rb +33 -0
- data/lib/fisk/instructions/movntdq.rb +34 -0
- data/lib/fisk/instructions/movntdqa.rb +35 -0
- data/lib/fisk/instructions/movnti.rb +57 -0
- data/lib/fisk/instructions/movntpd.rb +34 -0
- data/lib/fisk/instructions/movntps.rb +33 -0
- data/lib/fisk/instructions/movntq.rb +33 -0
- data/lib/fisk/instructions/movntsd.rb +34 -0
- data/lib/fisk/instructions/movntss.rb +34 -0
- data/lib/fisk/instructions/movq.rb +365 -0
- data/lib/fisk/instructions/movq2dq.rb +34 -0
- data/lib/fisk/instructions/movsd.rb +103 -0
- data/lib/fisk/instructions/movshdup.rb +59 -0
- data/lib/fisk/instructions/movsldup.rb +59 -0
- data/lib/fisk/instructions/movss.rb +103 -0
- data/lib/fisk/instructions/movsx.rb +251 -0
- data/lib/fisk/instructions/movsxd.rb +55 -0
- data/lib/fisk/instructions/movupd.rb +103 -0
- data/lib/fisk/instructions/movups.rb +99 -0
- data/lib/fisk/instructions/movzx.rb +251 -0
- data/lib/fisk/instructions/mpsadbw.rb +65 -0
- data/lib/fisk/instructions/mul.rb +187 -0
- data/lib/fisk/instructions/mulpd.rb +59 -0
- data/lib/fisk/instructions/mulps.rb +57 -0
- data/lib/fisk/instructions/mulsd.rb +59 -0
- data/lib/fisk/instructions/mulss.rb +59 -0
- data/lib/fisk/instructions/mulx.rb +85 -0
- data/lib/fisk/instructions/mwait.rb +22 -0
- data/lib/fisk/instructions/mwaitx.rb +22 -0
- data/lib/fisk/instructions/neg.rb +187 -0
- data/lib/fisk/instructions/nop.rb +20 -0
- data/lib/fisk/instructions/not.rb +187 -0
- data/lib/fisk/instructions/or.rb +760 -0
- data/lib/fisk/instructions/orpd.rb +59 -0
- data/lib/fisk/instructions/orps.rb +57 -0
- data/lib/fisk/instructions/pabsb.rb +111 -0
- data/lib/fisk/instructions/pabsd.rb +111 -0
- data/lib/fisk/instructions/pabsw.rb +111 -0
- data/lib/fisk/instructions/packssdw.rb +107 -0
- data/lib/fisk/instructions/packsswb.rb +107 -0
- data/lib/fisk/instructions/packusdw.rb +61 -0
- data/lib/fisk/instructions/packuswb.rb +107 -0
- data/lib/fisk/instructions/paddb.rb +107 -0
- data/lib/fisk/instructions/paddd.rb +107 -0
- data/lib/fisk/instructions/paddq.rb +107 -0
- data/lib/fisk/instructions/paddsb.rb +107 -0
- data/lib/fisk/instructions/paddsw.rb +107 -0
- data/lib/fisk/instructions/paddusb.rb +107 -0
- data/lib/fisk/instructions/paddusw.rb +107 -0
- data/lib/fisk/instructions/paddw.rb +107 -0
- data/lib/fisk/instructions/palignr.rb +119 -0
- data/lib/fisk/instructions/pand.rb +107 -0
- data/lib/fisk/instructions/pandn.rb +107 -0
- data/lib/fisk/instructions/pause.rb +21 -0
- data/lib/fisk/instructions/pavgb.rb +107 -0
- data/lib/fisk/instructions/pavgusb.rb +59 -0
- data/lib/fisk/instructions/pavgw.rb +107 -0
- data/lib/fisk/instructions/pblendvb.rb +63 -0
- data/lib/fisk/instructions/pblendw.rb +65 -0
- data/lib/fisk/instructions/pclmulqdq.rb +65 -0
- data/lib/fisk/instructions/pcmpeqb.rb +107 -0
- data/lib/fisk/instructions/pcmpeqd.rb +107 -0
- data/lib/fisk/instructions/pcmpeqq.rb +61 -0
- data/lib/fisk/instructions/pcmpeqw.rb +107 -0
- data/lib/fisk/instructions/pcmpestri.rb +65 -0
- data/lib/fisk/instructions/pcmpestrm.rb +65 -0
- data/lib/fisk/instructions/pcmpgtb.rb +107 -0
- data/lib/fisk/instructions/pcmpgtd.rb +107 -0
- data/lib/fisk/instructions/pcmpgtq.rb +61 -0
- data/lib/fisk/instructions/pcmpgtw.rb +107 -0
- data/lib/fisk/instructions/pcmpistri.rb +65 -0
- data/lib/fisk/instructions/pcmpistrm.rb +65 -0
- data/lib/fisk/instructions/pdep.rb +85 -0
- data/lib/fisk/instructions/pext.rb +85 -0
- data/lib/fisk/instructions/pextrb.rb +65 -0
- data/lib/fisk/instructions/pextrd.rb +65 -0
- data/lib/fisk/instructions/pextrq.rb +65 -0
- data/lib/fisk/instructions/pextrw.rb +111 -0
- data/lib/fisk/instructions/pf2id.rb +59 -0
- data/lib/fisk/instructions/pf2iw.rb +59 -0
- data/lib/fisk/instructions/pfacc.rb +59 -0
- data/lib/fisk/instructions/pfadd.rb +59 -0
- data/lib/fisk/instructions/pfcmpeq.rb +59 -0
- data/lib/fisk/instructions/pfcmpge.rb +59 -0
- data/lib/fisk/instructions/pfcmpgt.rb +59 -0
- data/lib/fisk/instructions/pfmax.rb +59 -0
- data/lib/fisk/instructions/pfmin.rb +59 -0
- data/lib/fisk/instructions/pfmul.rb +59 -0
- data/lib/fisk/instructions/pfnacc.rb +59 -0
- data/lib/fisk/instructions/pfpnacc.rb +59 -0
- data/lib/fisk/instructions/pfrcp.rb +59 -0
- data/lib/fisk/instructions/pfrcpit1.rb +59 -0
- data/lib/fisk/instructions/pfrcpit2.rb +59 -0
- data/lib/fisk/instructions/pfrsqit1.rb +59 -0
- data/lib/fisk/instructions/pfrsqrt.rb +59 -0
- data/lib/fisk/instructions/pfsub.rb +59 -0
- data/lib/fisk/instructions/pfsubr.rb +59 -0
- data/lib/fisk/instructions/phaddd.rb +111 -0
- data/lib/fisk/instructions/phaddsw.rb +111 -0
- data/lib/fisk/instructions/phaddw.rb +111 -0
- data/lib/fisk/instructions/phminposuw.rb +61 -0
- data/lib/fisk/instructions/phsubd.rb +111 -0
- data/lib/fisk/instructions/phsubsw.rb +111 -0
- data/lib/fisk/instructions/phsubw.rb +111 -0
- data/lib/fisk/instructions/pi2fd.rb +59 -0
- data/lib/fisk/instructions/pi2fw.rb +59 -0
- data/lib/fisk/instructions/pinsrb.rb +65 -0
- data/lib/fisk/instructions/pinsrd.rb +65 -0
- data/lib/fisk/instructions/pinsrq.rb +65 -0
- data/lib/fisk/instructions/pinsrw.rb +115 -0
- data/lib/fisk/instructions/pmaddubsw.rb +111 -0
- data/lib/fisk/instructions/pmaddwd.rb +107 -0
- data/lib/fisk/instructions/pmaxsb.rb +61 -0
- data/lib/fisk/instructions/pmaxsd.rb +61 -0
- data/lib/fisk/instructions/pmaxsw.rb +107 -0
- data/lib/fisk/instructions/pmaxub.rb +107 -0
- data/lib/fisk/instructions/pmaxud.rb +61 -0
- data/lib/fisk/instructions/pmaxuw.rb +61 -0
- data/lib/fisk/instructions/pminsb.rb +61 -0
- data/lib/fisk/instructions/pminsd.rb +61 -0
- data/lib/fisk/instructions/pminsw.rb +107 -0
- data/lib/fisk/instructions/pminub.rb +107 -0
- data/lib/fisk/instructions/pminud.rb +61 -0
- data/lib/fisk/instructions/pminuw.rb +61 -0
- data/lib/fisk/instructions/pmovmskb.rb +58 -0
- data/lib/fisk/instructions/pmovsxbd.rb +61 -0
- data/lib/fisk/instructions/pmovsxbq.rb +61 -0
- data/lib/fisk/instructions/pmovsxbw.rb +61 -0
- data/lib/fisk/instructions/pmovsxdq.rb +61 -0
- data/lib/fisk/instructions/pmovsxwd.rb +61 -0
- data/lib/fisk/instructions/pmovsxwq.rb +61 -0
- data/lib/fisk/instructions/pmovzxbd.rb +61 -0
- data/lib/fisk/instructions/pmovzxbq.rb +61 -0
- data/lib/fisk/instructions/pmovzxbw.rb +61 -0
- data/lib/fisk/instructions/pmovzxdq.rb +61 -0
- data/lib/fisk/instructions/pmovzxwd.rb +61 -0
- data/lib/fisk/instructions/pmovzxwq.rb +61 -0
- data/lib/fisk/instructions/pmuldq.rb +61 -0
- data/lib/fisk/instructions/pmulhrsw.rb +111 -0
- data/lib/fisk/instructions/pmulhrw.rb +59 -0
- data/lib/fisk/instructions/pmulhuw.rb +107 -0
- data/lib/fisk/instructions/pmulhw.rb +107 -0
- data/lib/fisk/instructions/pmulld.rb +61 -0
- data/lib/fisk/instructions/pmullw.rb +107 -0
- data/lib/fisk/instructions/pmuludq.rb +107 -0
- data/lib/fisk/instructions/pop.rb +126 -0
- data/lib/fisk/instructions/popcnt.rb +161 -0
- data/lib/fisk/instructions/por.rb +107 -0
- data/lib/fisk/instructions/prefetch.rb +32 -0
- data/lib/fisk/instructions/prefetchnta.rb +32 -0
- data/lib/fisk/instructions/prefetcht0.rb +32 -0
- data/lib/fisk/instructions/prefetcht1.rb +32 -0
- data/lib/fisk/instructions/prefetcht2.rb +32 -0
- data/lib/fisk/instructions/prefetchw.rb +32 -0
- data/lib/fisk/instructions/prefetchwt1.rb +32 -0
- data/lib/fisk/instructions/psadbw.rb +107 -0
- data/lib/fisk/instructions/pshufb.rb +111 -0
- data/lib/fisk/instructions/pshufd.rb +63 -0
- data/lib/fisk/instructions/pshufhw.rb +63 -0
- data/lib/fisk/instructions/pshuflw.rb +63 -0
- data/lib/fisk/instructions/pshufw.rb +61 -0
- data/lib/fisk/instructions/psignb.rb +111 -0
- data/lib/fisk/instructions/psignd.rb +111 -0
- data/lib/fisk/instructions/psignw.rb +111 -0
- data/lib/fisk/instructions/pslld.rb +158 -0
- data/lib/fisk/instructions/pslldq.rb +35 -0
- data/lib/fisk/instructions/psllq.rb +158 -0
- data/lib/fisk/instructions/psllw.rb +158 -0
- data/lib/fisk/instructions/psrad.rb +158 -0
- data/lib/fisk/instructions/psraw.rb +158 -0
- data/lib/fisk/instructions/psrld.rb +158 -0
- data/lib/fisk/instructions/psrldq.rb +35 -0
- data/lib/fisk/instructions/psrlq.rb +158 -0
- data/lib/fisk/instructions/psrlw.rb +158 -0
- data/lib/fisk/instructions/psubb.rb +107 -0
- data/lib/fisk/instructions/psubd.rb +107 -0
- data/lib/fisk/instructions/psubq.rb +107 -0
- data/lib/fisk/instructions/psubsb.rb +107 -0
- data/lib/fisk/instructions/psubsw.rb +107 -0
- data/lib/fisk/instructions/psubusb.rb +107 -0
- data/lib/fisk/instructions/psubusw.rb +107 -0
- data/lib/fisk/instructions/psubw.rb +107 -0
- data/lib/fisk/instructions/pswapd.rb +59 -0
- data/lib/fisk/instructions/ptest.rb +61 -0
- data/lib/fisk/instructions/punpckhbw.rb +107 -0
- data/lib/fisk/instructions/punpckhdq.rb +107 -0
- data/lib/fisk/instructions/punpckhqdq.rb +59 -0
- data/lib/fisk/instructions/punpckhwd.rb +107 -0
- data/lib/fisk/instructions/punpcklbw.rb +107 -0
- data/lib/fisk/instructions/punpckldq.rb +107 -0
- data/lib/fisk/instructions/punpcklqdq.rb +59 -0
- data/lib/fisk/instructions/punpcklwd.rb +107 -0
- data/lib/fisk/instructions/push.rb +152 -0
- data/lib/fisk/instructions/pxor.rb +107 -0
- data/lib/fisk/instructions/rcl.rb +575 -0
- data/lib/fisk/instructions/rcpps.rb +57 -0
- data/lib/fisk/instructions/rcpss.rb +59 -0
- data/lib/fisk/instructions/rcr.rb +575 -0
- data/lib/fisk/instructions/rdrand.rb +79 -0
- data/lib/fisk/instructions/rdseed.rb +79 -0
- data/lib/fisk/instructions/rdtsc.rb +21 -0
- data/lib/fisk/instructions/rdtscp.rb +22 -0
- data/lib/fisk/instructions/ret.rb +33 -0
- data/lib/fisk/instructions/rol.rb +575 -0
- data/lib/fisk/instructions/ror.rb +575 -0
- data/lib/fisk/instructions/rorx.rb +89 -0
- data/lib/fisk/instructions/roundpd.rb +65 -0
- data/lib/fisk/instructions/roundps.rb +65 -0
- data/lib/fisk/instructions/roundsd.rb +65 -0
- data/lib/fisk/instructions/roundss.rb +65 -0
- data/lib/fisk/instructions/rsqrtps.rb +57 -0
- data/lib/fisk/instructions/rsqrtss.rb +59 -0
- data/lib/fisk/instructions/sal.rb +575 -0
- data/lib/fisk/instructions/sar.rb +575 -0
- data/lib/fisk/instructions/sarx.rb +85 -0
- data/lib/fisk/instructions/sbb.rb +760 -0
- data/lib/fisk/instructions/seta.rb +55 -0
- data/lib/fisk/instructions/setae.rb +55 -0
- data/lib/fisk/instructions/setb.rb +55 -0
- data/lib/fisk/instructions/setbe.rb +55 -0
- data/lib/fisk/instructions/setc.rb +55 -0
- data/lib/fisk/instructions/sete.rb +55 -0
- data/lib/fisk/instructions/setg.rb +55 -0
- data/lib/fisk/instructions/setge.rb +55 -0
- data/lib/fisk/instructions/setl.rb +55 -0
- data/lib/fisk/instructions/setle.rb +55 -0
- data/lib/fisk/instructions/setna.rb +55 -0
- data/lib/fisk/instructions/setnae.rb +55 -0
- data/lib/fisk/instructions/setnb.rb +55 -0
- data/lib/fisk/instructions/setnbe.rb +55 -0
- data/lib/fisk/instructions/setnc.rb +55 -0
- data/lib/fisk/instructions/setne.rb +55 -0
- data/lib/fisk/instructions/setng.rb +55 -0
- data/lib/fisk/instructions/setnge.rb +55 -0
- data/lib/fisk/instructions/setnl.rb +55 -0
- data/lib/fisk/instructions/setnle.rb +55 -0
- data/lib/fisk/instructions/setno.rb +55 -0
- data/lib/fisk/instructions/setnp.rb +55 -0
- data/lib/fisk/instructions/setns.rb +55 -0
- data/lib/fisk/instructions/setnz.rb +55 -0
- data/lib/fisk/instructions/seto.rb +55 -0
- data/lib/fisk/instructions/setp.rb +55 -0
- data/lib/fisk/instructions/setpe.rb +55 -0
- data/lib/fisk/instructions/setpo.rb +55 -0
- data/lib/fisk/instructions/sets.rb +55 -0
- data/lib/fisk/instructions/setz.rb +55 -0
- data/lib/fisk/instructions/sfence.rb +22 -0
- data/lib/fisk/instructions/sha1msg1.rb +59 -0
- data/lib/fisk/instructions/sha1msg2.rb +59 -0
- data/lib/fisk/instructions/sha1nexte.rb +59 -0
- data/lib/fisk/instructions/sha1rnds4.rb +63 -0
- data/lib/fisk/instructions/sha256msg1.rb +59 -0
- data/lib/fisk/instructions/sha256msg2.rb +59 -0
- data/lib/fisk/instructions/sha256rnds2.rb +61 -0
- data/lib/fisk/instructions/shl.rb +575 -0
- data/lib/fisk/instructions/shld.rb +319 -0
- data/lib/fisk/instructions/shlx.rb +85 -0
- data/lib/fisk/instructions/shr.rb +575 -0
- data/lib/fisk/instructions/shrd.rb +319 -0
- data/lib/fisk/instructions/shrx.rb +85 -0
- data/lib/fisk/instructions/shufpd.rb +63 -0
- data/lib/fisk/instructions/shufps.rb +61 -0
- data/lib/fisk/instructions/sqrtpd.rb +59 -0
- data/lib/fisk/instructions/sqrtps.rb +57 -0
- data/lib/fisk/instructions/sqrtsd.rb +59 -0
- data/lib/fisk/instructions/sqrtss.rb +59 -0
- data/lib/fisk/instructions/stc.rb +20 -0
- data/lib/fisk/instructions/std.rb +20 -0
- data/lib/fisk/instructions/stmxcsr.rb +32 -0
- data/lib/fisk/instructions/sub.rb +760 -0
- data/lib/fisk/instructions/subpd.rb +59 -0
- data/lib/fisk/instructions/subps.rb +57 -0
- data/lib/fisk/instructions/subsd.rb +59 -0
- data/lib/fisk/instructions/subss.rb +59 -0
- data/lib/fisk/instructions/syscall.rb +21 -0
- data/lib/fisk/instructions/t1mskc.rb +81 -0
- data/lib/fisk/instructions/test.rb +452 -0
- data/lib/fisk/instructions/tzcnt.rb +161 -0
- data/lib/fisk/instructions/tzmsk.rb +81 -0
- data/lib/fisk/instructions/ucomisd.rb +59 -0
- data/lib/fisk/instructions/ucomiss.rb +57 -0
- data/lib/fisk/instructions/ud2.rb +21 -0
- data/lib/fisk/instructions/unpckhpd.rb +59 -0
- data/lib/fisk/instructions/unpckhps.rb +57 -0
- data/lib/fisk/instructions/unpcklpd.rb +59 -0
- data/lib/fisk/instructions/unpcklps.rb +57 -0
- data/lib/fisk/instructions/vaddpd.rb +200 -0
- data/lib/fisk/instructions/vaddps.rb +200 -0
- data/lib/fisk/instructions/vaddsd.rb +86 -0
- data/lib/fisk/instructions/vaddss.rb +86 -0
- data/lib/fisk/instructions/vaddsubpd.rb +85 -0
- data/lib/fisk/instructions/vaddsubps.rb +85 -0
- data/lib/fisk/instructions/vaesdec.rb +47 -0
- data/lib/fisk/instructions/vaesdeclast.rb +47 -0
- data/lib/fisk/instructions/vaesenc.rb +47 -0
- data/lib/fisk/instructions/vaesenclast.rb +47 -0
- data/lib/fisk/instructions/vaesimc.rb +45 -0
- data/lib/fisk/instructions/vaeskeygenassist.rb +49 -0
- data/lib/fisk/instructions/valignd.rb +135 -0
- data/lib/fisk/instructions/valignq.rb +135 -0
- data/lib/fisk/instructions/vandnpd.rb +199 -0
- data/lib/fisk/instructions/vandnps.rb +199 -0
- data/lib/fisk/instructions/vandpd.rb +199 -0
- data/lib/fisk/instructions/vandps.rb +199 -0
- data/lib/fisk/instructions/vblendmpd.rb +123 -0
- data/lib/fisk/instructions/vblendmps.rb +123 -0
- data/lib/fisk/instructions/vblendpd.rb +93 -0
- data/lib/fisk/instructions/vblendps.rb +93 -0
- data/lib/fisk/instructions/vblendvpd.rb +93 -0
- data/lib/fisk/instructions/vblendvps.rb +93 -0
- data/lib/fisk/instructions/vbroadcastf128.rb +27 -0
- data/lib/fisk/instructions/vbroadcastf32x2.rb +81 -0
- data/lib/fisk/instructions/vbroadcastf32x4.rb +45 -0
- data/lib/fisk/instructions/vbroadcastf32x8.rb +27 -0
- data/lib/fisk/instructions/vbroadcastf64x2.rb +45 -0
- data/lib/fisk/instructions/vbroadcastf64x4.rb +27 -0
- data/lib/fisk/instructions/vbroadcasti128.rb +27 -0
- data/lib/fisk/instructions/vbroadcasti32x2.rb +117 -0
- data/lib/fisk/instructions/vbroadcasti32x4.rb +45 -0
- data/lib/fisk/instructions/vbroadcasti32x8.rb +27 -0
- data/lib/fisk/instructions/vbroadcasti64x2.rb +45 -0
- data/lib/fisk/instructions/vbroadcasti64x4.rb +27 -0
- data/lib/fisk/instructions/vbroadcastsd.rb +117 -0
- data/lib/fisk/instructions/vbroadcastss.rb +153 -0
- data/lib/fisk/instructions/vcmppd.rb +220 -0
- data/lib/fisk/instructions/vcmpps.rb +220 -0
- data/lib/fisk/instructions/vcmpsd.rb +94 -0
- data/lib/fisk/instructions/vcmpss.rb +94 -0
- data/lib/fisk/instructions/vcomisd.rb +82 -0
- data/lib/fisk/instructions/vcomiss.rb +82 -0
- data/lib/fisk/instructions/vcompresspd.rb +117 -0
- data/lib/fisk/instructions/vcompressps.rb +117 -0
- data/lib/fisk/instructions/vcvtdq2pd.rb +189 -0
- data/lib/fisk/instructions/vcvtdq2ps.rb +190 -0
- data/lib/fisk/instructions/vcvtpd2dq.rb +190 -0
- data/lib/fisk/instructions/vcvtpd2ps.rb +190 -0
- data/lib/fisk/instructions/vcvtpd2qq.rb +118 -0
- data/lib/fisk/instructions/vcvtpd2udq.rb +118 -0
- data/lib/fisk/instructions/vcvtpd2uqq.rb +118 -0
- data/lib/fisk/instructions/vcvtph2ps.rb +190 -0
- data/lib/fisk/instructions/vcvtps2dq.rb +190 -0
- data/lib/fisk/instructions/vcvtps2pd.rb +190 -0
- data/lib/fisk/instructions/vcvtps2ph.rb +210 -0
- data/lib/fisk/instructions/vcvtps2qq.rb +118 -0
- data/lib/fisk/instructions/vcvtps2udq.rb +118 -0
- data/lib/fisk/instructions/vcvtps2uqq.rb +118 -0
- data/lib/fisk/instructions/vcvtqq2pd.rb +118 -0
- data/lib/fisk/instructions/vcvtqq2ps.rb +118 -0
- data/lib/fisk/instructions/vcvtsd2si.rb +155 -0
- data/lib/fisk/instructions/vcvtsd2ss.rb +86 -0
- data/lib/fisk/instructions/vcvtsd2usi.rb +83 -0
- data/lib/fisk/instructions/vcvtsi2sd.rb +162 -0
- data/lib/fisk/instructions/vcvtsi2ss.rb +163 -0
- data/lib/fisk/instructions/vcvtss2sd.rb +86 -0
- data/lib/fisk/instructions/vcvtss2si.rb +155 -0
- data/lib/fisk/instructions/vcvtss2usi.rb +83 -0
- data/lib/fisk/instructions/vcvttpd2dq.rb +190 -0
- data/lib/fisk/instructions/vcvttpd2qq.rb +118 -0
- data/lib/fisk/instructions/vcvttpd2udq.rb +118 -0
- data/lib/fisk/instructions/vcvttpd2uqq.rb +118 -0
- data/lib/fisk/instructions/vcvttps2dq.rb +190 -0
- data/lib/fisk/instructions/vcvttps2qq.rb +118 -0
- data/lib/fisk/instructions/vcvttps2udq.rb +118 -0
- data/lib/fisk/instructions/vcvttps2uqq.rb +118 -0
- data/lib/fisk/instructions/vcvttsd2si.rb +155 -0
- data/lib/fisk/instructions/vcvttsd2usi.rb +83 -0
- data/lib/fisk/instructions/vcvttss2si.rb +155 -0
- data/lib/fisk/instructions/vcvttss2usi.rb +83 -0
- data/lib/fisk/instructions/vcvtudq2pd.rb +117 -0
- data/lib/fisk/instructions/vcvtudq2ps.rb +118 -0
- data/lib/fisk/instructions/vcvtuqq2pd.rb +118 -0
- data/lib/fisk/instructions/vcvtuqq2ps.rb +118 -0
- data/lib/fisk/instructions/vcvtusi2sd.rb +86 -0
- data/lib/fisk/instructions/vcvtusi2ss.rb +87 -0
- data/lib/fisk/instructions/vdbpsadbw.rb +135 -0
- data/lib/fisk/instructions/vdivpd.rb +200 -0
- data/lib/fisk/instructions/vdivps.rb +200 -0
- data/lib/fisk/instructions/vdivsd.rb +86 -0
- data/lib/fisk/instructions/vdivss.rb +86 -0
- data/lib/fisk/instructions/vdppd.rb +51 -0
- data/lib/fisk/instructions/vdpps.rb +93 -0
- data/lib/fisk/instructions/vexp2pd.rb +46 -0
- data/lib/fisk/instructions/vexp2ps.rb +46 -0
- data/lib/fisk/instructions/vexpandpd.rb +117 -0
- data/lib/fisk/instructions/vexpandps.rb +117 -0
- data/lib/fisk/instructions/vextractf128.rb +49 -0
- data/lib/fisk/instructions/vextractf32x4.rb +89 -0
- data/lib/fisk/instructions/vextractf32x8.rb +49 -0
- data/lib/fisk/instructions/vextractf64x2.rb +89 -0
- data/lib/fisk/instructions/vextractf64x4.rb +49 -0
- data/lib/fisk/instructions/vextracti128.rb +49 -0
- data/lib/fisk/instructions/vextracti32x4.rb +89 -0
- data/lib/fisk/instructions/vextracti32x8.rb +49 -0
- data/lib/fisk/instructions/vextracti64x2.rb +89 -0
- data/lib/fisk/instructions/vextracti64x4.rb +49 -0
- data/lib/fisk/instructions/vextractps.rb +89 -0
- data/lib/fisk/instructions/vfixupimmpd.rb +136 -0
- data/lib/fisk/instructions/vfixupimmps.rb +136 -0
- data/lib/fisk/instructions/vfixupimmsd.rb +52 -0
- data/lib/fisk/instructions/vfixupimmss.rb +52 -0
- data/lib/fisk/instructions/vfmadd132pd.rb +200 -0
- data/lib/fisk/instructions/vfmadd132ps.rb +200 -0
- data/lib/fisk/instructions/vfmadd132sd.rb +86 -0
- data/lib/fisk/instructions/vfmadd132ss.rb +86 -0
- data/lib/fisk/instructions/vfmadd213pd.rb +200 -0
- data/lib/fisk/instructions/vfmadd213ps.rb +200 -0
- data/lib/fisk/instructions/vfmadd213sd.rb +86 -0
- data/lib/fisk/instructions/vfmadd213ss.rb +86 -0
- data/lib/fisk/instructions/vfmadd231pd.rb +200 -0
- data/lib/fisk/instructions/vfmadd231ps.rb +200 -0
- data/lib/fisk/instructions/vfmadd231sd.rb +86 -0
- data/lib/fisk/instructions/vfmadd231ss.rb +86 -0
- data/lib/fisk/instructions/vfmaddpd.rb +161 -0
- data/lib/fisk/instructions/vfmaddps.rb +161 -0
- data/lib/fisk/instructions/vfmaddsd.rb +85 -0
- data/lib/fisk/instructions/vfmaddss.rb +85 -0
- data/lib/fisk/instructions/vfmaddsub132pd.rb +200 -0
- data/lib/fisk/instructions/vfmaddsub132ps.rb +200 -0
- data/lib/fisk/instructions/vfmaddsub213pd.rb +200 -0
- data/lib/fisk/instructions/vfmaddsub213ps.rb +200 -0
- data/lib/fisk/instructions/vfmaddsub231pd.rb +200 -0
- data/lib/fisk/instructions/vfmaddsub231ps.rb +200 -0
- data/lib/fisk/instructions/vfmaddsubpd.rb +161 -0
- data/lib/fisk/instructions/vfmaddsubps.rb +161 -0
- data/lib/fisk/instructions/vfmsub132pd.rb +200 -0
- data/lib/fisk/instructions/vfmsub132ps.rb +200 -0
- data/lib/fisk/instructions/vfmsub132sd.rb +86 -0
- data/lib/fisk/instructions/vfmsub132ss.rb +86 -0
- data/lib/fisk/instructions/vfmsub213pd.rb +200 -0
- data/lib/fisk/instructions/vfmsub213ps.rb +200 -0
- data/lib/fisk/instructions/vfmsub213sd.rb +86 -0
- data/lib/fisk/instructions/vfmsub213ss.rb +86 -0
- data/lib/fisk/instructions/vfmsub231pd.rb +200 -0
- data/lib/fisk/instructions/vfmsub231ps.rb +200 -0
- data/lib/fisk/instructions/vfmsub231sd.rb +86 -0
- data/lib/fisk/instructions/vfmsub231ss.rb +86 -0
- data/lib/fisk/instructions/vfmsubadd132pd.rb +200 -0
- data/lib/fisk/instructions/vfmsubadd132ps.rb +200 -0
- data/lib/fisk/instructions/vfmsubadd213pd.rb +200 -0
- data/lib/fisk/instructions/vfmsubadd213ps.rb +200 -0
- data/lib/fisk/instructions/vfmsubadd231pd.rb +200 -0
- data/lib/fisk/instructions/vfmsubadd231ps.rb +200 -0
- data/lib/fisk/instructions/vfmsubaddpd.rb +161 -0
- data/lib/fisk/instructions/vfmsubaddps.rb +161 -0
- data/lib/fisk/instructions/vfmsubpd.rb +161 -0
- data/lib/fisk/instructions/vfmsubps.rb +161 -0
- data/lib/fisk/instructions/vfmsubsd.rb +85 -0
- data/lib/fisk/instructions/vfmsubss.rb +85 -0
- data/lib/fisk/instructions/vfnmadd132pd.rb +200 -0
- data/lib/fisk/instructions/vfnmadd132ps.rb +200 -0
- data/lib/fisk/instructions/vfnmadd132sd.rb +86 -0
- data/lib/fisk/instructions/vfnmadd132ss.rb +86 -0
- data/lib/fisk/instructions/vfnmadd213pd.rb +200 -0
- data/lib/fisk/instructions/vfnmadd213ps.rb +200 -0
- data/lib/fisk/instructions/vfnmadd213sd.rb +86 -0
- data/lib/fisk/instructions/vfnmadd213ss.rb +86 -0
- data/lib/fisk/instructions/vfnmadd231pd.rb +200 -0
- data/lib/fisk/instructions/vfnmadd231ps.rb +200 -0
- data/lib/fisk/instructions/vfnmadd231sd.rb +86 -0
- data/lib/fisk/instructions/vfnmadd231ss.rb +86 -0
- data/lib/fisk/instructions/vfnmaddpd.rb +161 -0
- data/lib/fisk/instructions/vfnmaddps.rb +161 -0
- data/lib/fisk/instructions/vfnmaddsd.rb +85 -0
- data/lib/fisk/instructions/vfnmaddss.rb +85 -0
- data/lib/fisk/instructions/vfnmsub132pd.rb +200 -0
- data/lib/fisk/instructions/vfnmsub132ps.rb +200 -0
- data/lib/fisk/instructions/vfnmsub132sd.rb +86 -0
- data/lib/fisk/instructions/vfnmsub132ss.rb +86 -0
- data/lib/fisk/instructions/vfnmsub213pd.rb +200 -0
- data/lib/fisk/instructions/vfnmsub213ps.rb +200 -0
- data/lib/fisk/instructions/vfnmsub213sd.rb +86 -0
- data/lib/fisk/instructions/vfnmsub213ss.rb +86 -0
- data/lib/fisk/instructions/vfnmsub231pd.rb +200 -0
- data/lib/fisk/instructions/vfnmsub231ps.rb +200 -0
- data/lib/fisk/instructions/vfnmsub231sd.rb +86 -0
- data/lib/fisk/instructions/vfnmsub231ss.rb +86 -0
- data/lib/fisk/instructions/vfnmsubpd.rb +161 -0
- data/lib/fisk/instructions/vfnmsubps.rb +161 -0
- data/lib/fisk/instructions/vfnmsubsd.rb +85 -0
- data/lib/fisk/instructions/vfnmsubss.rb +85 -0
- data/lib/fisk/instructions/vfpclasspd.rb +129 -0
- data/lib/fisk/instructions/vfpclassps.rb +129 -0
- data/lib/fisk/instructions/vfpclasssd.rb +49 -0
- data/lib/fisk/instructions/vfpclassss.rb +49 -0
- data/lib/fisk/instructions/vfrczpd.rb +81 -0
- data/lib/fisk/instructions/vfrczps.rb +81 -0
- data/lib/fisk/instructions/vfrczsd.rb +45 -0
- data/lib/fisk/instructions/vfrczss.rb +45 -0
- data/lib/fisk/instructions/vgatherdpd.rb +101 -0
- data/lib/fisk/instructions/vgatherdps.rb +101 -0
- data/lib/fisk/instructions/vgatherpf0dpd.rb +26 -0
- data/lib/fisk/instructions/vgatherpf0dps.rb +26 -0
- data/lib/fisk/instructions/vgatherpf0qpd.rb +26 -0
- data/lib/fisk/instructions/vgatherpf0qps.rb +26 -0
- data/lib/fisk/instructions/vgatherpf1dpd.rb +26 -0
- data/lib/fisk/instructions/vgatherpf1dps.rb +26 -0
- data/lib/fisk/instructions/vgatherpf1qpd.rb +26 -0
- data/lib/fisk/instructions/vgatherpf1qps.rb +26 -0
- data/lib/fisk/instructions/vgatherqpd.rb +101 -0
- data/lib/fisk/instructions/vgatherqps.rb +101 -0
- data/lib/fisk/instructions/vgetexppd.rb +118 -0
- data/lib/fisk/instructions/vgetexpps.rb +118 -0
- data/lib/fisk/instructions/vgetexpsd.rb +48 -0
- data/lib/fisk/instructions/vgetexpss.rb +48 -0
- data/lib/fisk/instructions/vgetmantpd.rb +130 -0
- data/lib/fisk/instructions/vgetmantps.rb +130 -0
- data/lib/fisk/instructions/vgetmantsd.rb +52 -0
- data/lib/fisk/instructions/vgetmantss.rb +52 -0
- data/lib/fisk/instructions/vhaddpd.rb +85 -0
- data/lib/fisk/instructions/vhaddps.rb +85 -0
- data/lib/fisk/instructions/vhsubpd.rb +85 -0
- data/lib/fisk/instructions/vhsubps.rb +85 -0
- data/lib/fisk/instructions/vinsertf128.rb +51 -0
- data/lib/fisk/instructions/vinsertf32x4.rb +93 -0
- data/lib/fisk/instructions/vinsertf32x8.rb +51 -0
- data/lib/fisk/instructions/vinsertf64x2.rb +93 -0
- data/lib/fisk/instructions/vinsertf64x4.rb +51 -0
- data/lib/fisk/instructions/vinserti128.rb +51 -0
- data/lib/fisk/instructions/vinserti32x4.rb +93 -0
- data/lib/fisk/instructions/vinserti32x8.rb +51 -0
- data/lib/fisk/instructions/vinserti64x2.rb +93 -0
- data/lib/fisk/instructions/vinserti64x4.rb +51 -0
- data/lib/fisk/instructions/vinsertps.rb +93 -0
- data/lib/fisk/instructions/vlddqu.rb +45 -0
- data/lib/fisk/instructions/vldmxcsr.rb +26 -0
- data/lib/fisk/instructions/vmaskmovdqu.rb +27 -0
- data/lib/fisk/instructions/vmaskmovpd.rb +85 -0
- data/lib/fisk/instructions/vmaskmovps.rb +85 -0
- data/lib/fisk/instructions/vmaxpd.rb +200 -0
- data/lib/fisk/instructions/vmaxps.rb +200 -0
- data/lib/fisk/instructions/vmaxsd.rb +86 -0
- data/lib/fisk/instructions/vmaxss.rb +86 -0
- data/lib/fisk/instructions/vminpd.rb +200 -0
- data/lib/fisk/instructions/vminps.rb +200 -0
- data/lib/fisk/instructions/vminsd.rb +86 -0
- data/lib/fisk/instructions/vminss.rb +86 -0
- data/lib/fisk/instructions/vmovapd.rb +339 -0
- data/lib/fisk/instructions/vmovaps.rb +339 -0
- data/lib/fisk/instructions/vmovd.rb +153 -0
- data/lib/fisk/instructions/vmovddup.rb +189 -0
- data/lib/fisk/instructions/vmovdqa.rb +141 -0
- data/lib/fisk/instructions/vmovdqa32.rb +207 -0
- data/lib/fisk/instructions/vmovdqa64.rb +207 -0
- data/lib/fisk/instructions/vmovdqu.rb +141 -0
- data/lib/fisk/instructions/vmovdqu16.rb +207 -0
- data/lib/fisk/instructions/vmovdqu32.rb +207 -0
- data/lib/fisk/instructions/vmovdqu64.rb +207 -0
- data/lib/fisk/instructions/vmovdqu8.rb +207 -0
- data/lib/fisk/instructions/vmovhlps.rb +47 -0
- data/lib/fisk/instructions/vmovhpd.rb +83 -0
- data/lib/fisk/instructions/vmovhps.rb +83 -0
- data/lib/fisk/instructions/vmovlhps.rb +47 -0
- data/lib/fisk/instructions/vmovlpd.rb +83 -0
- data/lib/fisk/instructions/vmovlps.rb +83 -0
- data/lib/fisk/instructions/vmovmskpd.rb +45 -0
- data/lib/fisk/instructions/vmovmskps.rb +45 -0
- data/lib/fisk/instructions/vmovntdq.rb +99 -0
- data/lib/fisk/instructions/vmovntdqa.rb +99 -0
- data/lib/fisk/instructions/vmovntpd.rb +99 -0
- data/lib/fisk/instructions/vmovntps.rb +99 -0
- data/lib/fisk/instructions/vmovq.rb +261 -0
- data/lib/fisk/instructions/vmovsd.rb +143 -0
- data/lib/fisk/instructions/vmovshdup.rb +189 -0
- data/lib/fisk/instructions/vmovsldup.rb +189 -0
- data/lib/fisk/instructions/vmovss.rb +143 -0
- data/lib/fisk/instructions/vmovupd.rb +339 -0
- data/lib/fisk/instructions/vmovups.rb +339 -0
- data/lib/fisk/instructions/vmpsadbw.rb +93 -0
- data/lib/fisk/instructions/vmulpd.rb +200 -0
- data/lib/fisk/instructions/vmulps.rb +200 -0
- data/lib/fisk/instructions/vmulsd.rb +86 -0
- data/lib/fisk/instructions/vmulss.rb +86 -0
- data/lib/fisk/instructions/vorpd.rb +199 -0
- data/lib/fisk/instructions/vorps.rb +199 -0
- data/lib/fisk/instructions/vpabsb.rb +189 -0
- data/lib/fisk/instructions/vpabsd.rb +189 -0
- data/lib/fisk/instructions/vpabsq.rb +117 -0
- data/lib/fisk/instructions/vpabsw.rb +189 -0
- data/lib/fisk/instructions/vpackssdw.rb +199 -0
- data/lib/fisk/instructions/vpacksswb.rb +199 -0
- data/lib/fisk/instructions/vpackusdw.rb +199 -0
- data/lib/fisk/instructions/vpackuswb.rb +199 -0
- data/lib/fisk/instructions/vpaddb.rb +199 -0
- data/lib/fisk/instructions/vpaddd.rb +199 -0
- data/lib/fisk/instructions/vpaddq.rb +199 -0
- data/lib/fisk/instructions/vpaddsb.rb +199 -0
- data/lib/fisk/instructions/vpaddsw.rb +199 -0
- data/lib/fisk/instructions/vpaddusb.rb +199 -0
- data/lib/fisk/instructions/vpaddusw.rb +199 -0
- data/lib/fisk/instructions/vpaddw.rb +199 -0
- data/lib/fisk/instructions/vpalignr.rb +219 -0
- data/lib/fisk/instructions/vpand.rb +85 -0
- data/lib/fisk/instructions/vpandd.rb +123 -0
- data/lib/fisk/instructions/vpandn.rb +85 -0
- data/lib/fisk/instructions/vpandnd.rb +123 -0
- data/lib/fisk/instructions/vpandnq.rb +123 -0
- data/lib/fisk/instructions/vpandq.rb +123 -0
- data/lib/fisk/instructions/vpavgb.rb +199 -0
- data/lib/fisk/instructions/vpavgw.rb +199 -0
- data/lib/fisk/instructions/vpblendd.rb +93 -0
- data/lib/fisk/instructions/vpblendmb.rb +123 -0
- data/lib/fisk/instructions/vpblendmd.rb +123 -0
- data/lib/fisk/instructions/vpblendmq.rb +123 -0
- data/lib/fisk/instructions/vpblendmw.rb +123 -0
- data/lib/fisk/instructions/vpblendvb.rb +93 -0
- data/lib/fisk/instructions/vpblendw.rb +93 -0
- data/lib/fisk/instructions/vpbroadcastb.rb +243 -0
- data/lib/fisk/instructions/vpbroadcastd.rb +243 -0
- data/lib/fisk/instructions/vpbroadcastmb2q.rb +63 -0
- data/lib/fisk/instructions/vpbroadcastmw2d.rb +63 -0
- data/lib/fisk/instructions/vpbroadcastq.rb +243 -0
- data/lib/fisk/instructions/vpbroadcastw.rb +243 -0
- data/lib/fisk/instructions/vpclmulqdq.rb +51 -0
- data/lib/fisk/instructions/vpcmov.rb +161 -0
- data/lib/fisk/instructions/vpcmpb.rb +135 -0
- data/lib/fisk/instructions/vpcmpd.rb +135 -0
- data/lib/fisk/instructions/vpcmpeqb.rb +199 -0
- data/lib/fisk/instructions/vpcmpeqd.rb +199 -0
- data/lib/fisk/instructions/vpcmpeqq.rb +199 -0
- data/lib/fisk/instructions/vpcmpeqw.rb +199 -0
- data/lib/fisk/instructions/vpcmpestri.rb +49 -0
- data/lib/fisk/instructions/vpcmpestrm.rb +49 -0
- data/lib/fisk/instructions/vpcmpgtb.rb +199 -0
- data/lib/fisk/instructions/vpcmpgtd.rb +199 -0
- data/lib/fisk/instructions/vpcmpgtq.rb +199 -0
- data/lib/fisk/instructions/vpcmpgtw.rb +199 -0
- data/lib/fisk/instructions/vpcmpistri.rb +49 -0
- data/lib/fisk/instructions/vpcmpistrm.rb +49 -0
- data/lib/fisk/instructions/vpcmpq.rb +135 -0
- data/lib/fisk/instructions/vpcmpub.rb +135 -0
- data/lib/fisk/instructions/vpcmpud.rb +135 -0
- data/lib/fisk/instructions/vpcmpuq.rb +135 -0
- data/lib/fisk/instructions/vpcmpuw.rb +135 -0
- data/lib/fisk/instructions/vpcmpw.rb +135 -0
- data/lib/fisk/instructions/vpcomb.rb +51 -0
- data/lib/fisk/instructions/vpcomd.rb +51 -0
- data/lib/fisk/instructions/vpcompressd.rb +117 -0
- data/lib/fisk/instructions/vpcompressq.rb +117 -0
- data/lib/fisk/instructions/vpcomq.rb +51 -0
- data/lib/fisk/instructions/vpcomub.rb +51 -0
- data/lib/fisk/instructions/vpcomud.rb +51 -0
- data/lib/fisk/instructions/vpcomuq.rb +51 -0
- data/lib/fisk/instructions/vpcomuw.rb +51 -0
- data/lib/fisk/instructions/vpcomw.rb +51 -0
- data/lib/fisk/instructions/vpconflictd.rb +117 -0
- data/lib/fisk/instructions/vpconflictq.rb +117 -0
- data/lib/fisk/instructions/vperm2f128.rb +51 -0
- data/lib/fisk/instructions/vperm2i128.rb +51 -0
- data/lib/fisk/instructions/vpermb.rb +123 -0
- data/lib/fisk/instructions/vpermd.rb +123 -0
- data/lib/fisk/instructions/vpermi2b.rb +123 -0
- data/lib/fisk/instructions/vpermi2d.rb +123 -0
- data/lib/fisk/instructions/vpermi2pd.rb +123 -0
- data/lib/fisk/instructions/vpermi2ps.rb +123 -0
- data/lib/fisk/instructions/vpermi2q.rb +123 -0
- data/lib/fisk/instructions/vpermi2w.rb +123 -0
- data/lib/fisk/instructions/vpermil2pd.rb +167 -0
- data/lib/fisk/instructions/vpermil2ps.rb +167 -0
- data/lib/fisk/instructions/vpermilpd.rb +399 -0
- data/lib/fisk/instructions/vpermilps.rb +399 -0
- data/lib/fisk/instructions/vpermpd.rb +205 -0
- data/lib/fisk/instructions/vpermps.rb +123 -0
- data/lib/fisk/instructions/vpermq.rb +205 -0
- data/lib/fisk/instructions/vpermt2b.rb +123 -0
- data/lib/fisk/instructions/vpermt2d.rb +123 -0
- data/lib/fisk/instructions/vpermt2pd.rb +123 -0
- data/lib/fisk/instructions/vpermt2ps.rb +123 -0
- data/lib/fisk/instructions/vpermt2q.rb +123 -0
- data/lib/fisk/instructions/vpermt2w.rb +123 -0
- data/lib/fisk/instructions/vpermw.rb +123 -0
- data/lib/fisk/instructions/vpexpandd.rb +117 -0
- data/lib/fisk/instructions/vpexpandq.rb +117 -0
- data/lib/fisk/instructions/vpextrb.rb +89 -0
- data/lib/fisk/instructions/vpextrd.rb +89 -0
- data/lib/fisk/instructions/vpextrq.rb +89 -0
- data/lib/fisk/instructions/vpextrw.rb +115 -0
- data/lib/fisk/instructions/vpgatherdd.rb +101 -0
- data/lib/fisk/instructions/vpgatherdq.rb +101 -0
- data/lib/fisk/instructions/vpgatherqd.rb +101 -0
- data/lib/fisk/instructions/vpgatherqq.rb +101 -0
- data/lib/fisk/instructions/vphaddbd.rb +45 -0
- data/lib/fisk/instructions/vphaddbq.rb +45 -0
- data/lib/fisk/instructions/vphaddbw.rb +45 -0
- data/lib/fisk/instructions/vphaddd.rb +85 -0
- data/lib/fisk/instructions/vphadddq.rb +45 -0
- data/lib/fisk/instructions/vphaddsw.rb +85 -0
- data/lib/fisk/instructions/vphaddubd.rb +45 -0
- data/lib/fisk/instructions/vphaddubq.rb +45 -0
- data/lib/fisk/instructions/vphaddubw.rb +45 -0
- data/lib/fisk/instructions/vphaddudq.rb +45 -0
- data/lib/fisk/instructions/vphadduwd.rb +45 -0
- data/lib/fisk/instructions/vphadduwq.rb +45 -0
- data/lib/fisk/instructions/vphaddw.rb +85 -0
- data/lib/fisk/instructions/vphaddwd.rb +45 -0
- data/lib/fisk/instructions/vphaddwq.rb +45 -0
- data/lib/fisk/instructions/vphminposuw.rb +45 -0
- data/lib/fisk/instructions/vphsubbw.rb +45 -0
- data/lib/fisk/instructions/vphsubd.rb +85 -0
- data/lib/fisk/instructions/vphsubdq.rb +45 -0
- data/lib/fisk/instructions/vphsubsw.rb +85 -0
- data/lib/fisk/instructions/vphsubw.rb +85 -0
- data/lib/fisk/instructions/vphsubwd.rb +45 -0
- data/lib/fisk/instructions/vpinsrb.rb +93 -0
- data/lib/fisk/instructions/vpinsrd.rb +93 -0
- data/lib/fisk/instructions/vpinsrq.rb +93 -0
- data/lib/fisk/instructions/vpinsrw.rb +93 -0
- data/lib/fisk/instructions/vplzcntd.rb +117 -0
- data/lib/fisk/instructions/vplzcntq.rb +117 -0
- data/lib/fisk/instructions/vpmacsdd.rb +51 -0
- data/lib/fisk/instructions/vpmacsdqh.rb +51 -0
- data/lib/fisk/instructions/vpmacsdql.rb +51 -0
- data/lib/fisk/instructions/vpmacssdd.rb +51 -0
- data/lib/fisk/instructions/vpmacssdqh.rb +51 -0
- data/lib/fisk/instructions/vpmacssdql.rb +51 -0
- data/lib/fisk/instructions/vpmacsswd.rb +51 -0
- data/lib/fisk/instructions/vpmacssww.rb +51 -0
- data/lib/fisk/instructions/vpmacswd.rb +51 -0
- data/lib/fisk/instructions/vpmacsww.rb +51 -0
- data/lib/fisk/instructions/vpmadcsswd.rb +51 -0
- data/lib/fisk/instructions/vpmadcswd.rb +51 -0
- data/lib/fisk/instructions/vpmadd52huq.rb +123 -0
- data/lib/fisk/instructions/vpmadd52luq.rb +123 -0
- data/lib/fisk/instructions/vpmaddubsw.rb +199 -0
- data/lib/fisk/instructions/vpmaddwd.rb +199 -0
- data/lib/fisk/instructions/vpmaskmovd.rb +85 -0
- data/lib/fisk/instructions/vpmaskmovq.rb +85 -0
- data/lib/fisk/instructions/vpmaxsb.rb +199 -0
- data/lib/fisk/instructions/vpmaxsd.rb +199 -0
- data/lib/fisk/instructions/vpmaxsq.rb +123 -0
- data/lib/fisk/instructions/vpmaxsw.rb +199 -0
- data/lib/fisk/instructions/vpmaxub.rb +199 -0
- data/lib/fisk/instructions/vpmaxud.rb +199 -0
- data/lib/fisk/instructions/vpmaxuq.rb +123 -0
- data/lib/fisk/instructions/vpmaxuw.rb +199 -0
- data/lib/fisk/instructions/vpminsb.rb +199 -0
- data/lib/fisk/instructions/vpminsd.rb +199 -0
- data/lib/fisk/instructions/vpminsq.rb +123 -0
- data/lib/fisk/instructions/vpminsw.rb +199 -0
- data/lib/fisk/instructions/vpminub.rb +199 -0
- data/lib/fisk/instructions/vpminud.rb +199 -0
- data/lib/fisk/instructions/vpminuq.rb +123 -0
- data/lib/fisk/instructions/vpminuw.rb +199 -0
- data/lib/fisk/instructions/vpmovb2m.rb +63 -0
- data/lib/fisk/instructions/vpmovd2m.rb +63 -0
- data/lib/fisk/instructions/vpmovdb.rb +117 -0
- data/lib/fisk/instructions/vpmovdw.rb +117 -0
- data/lib/fisk/instructions/vpmovm2b.rb +63 -0
- data/lib/fisk/instructions/vpmovm2d.rb +63 -0
- data/lib/fisk/instructions/vpmovm2q.rb +63 -0
- data/lib/fisk/instructions/vpmovm2w.rb +63 -0
- data/lib/fisk/instructions/vpmovmskb.rb +45 -0
- data/lib/fisk/instructions/vpmovq2m.rb +63 -0
- data/lib/fisk/instructions/vpmovqb.rb +117 -0
- data/lib/fisk/instructions/vpmovqd.rb +117 -0
- data/lib/fisk/instructions/vpmovqw.rb +117 -0
- data/lib/fisk/instructions/vpmovsdb.rb +117 -0
- data/lib/fisk/instructions/vpmovsdw.rb +117 -0
- data/lib/fisk/instructions/vpmovsqb.rb +117 -0
- data/lib/fisk/instructions/vpmovsqd.rb +117 -0
- data/lib/fisk/instructions/vpmovsqw.rb +117 -0
- data/lib/fisk/instructions/vpmovswb.rb +117 -0
- data/lib/fisk/instructions/vpmovsxbd.rb +189 -0
- data/lib/fisk/instructions/vpmovsxbq.rb +189 -0
- data/lib/fisk/instructions/vpmovsxbw.rb +189 -0
- data/lib/fisk/instructions/vpmovsxdq.rb +189 -0
- data/lib/fisk/instructions/vpmovsxwd.rb +189 -0
- data/lib/fisk/instructions/vpmovsxwq.rb +189 -0
- data/lib/fisk/instructions/vpmovusdb.rb +117 -0
- data/lib/fisk/instructions/vpmovusdw.rb +117 -0
- data/lib/fisk/instructions/vpmovusqb.rb +117 -0
- data/lib/fisk/instructions/vpmovusqd.rb +117 -0
- data/lib/fisk/instructions/vpmovusqw.rb +117 -0
- data/lib/fisk/instructions/vpmovuswb.rb +117 -0
- data/lib/fisk/instructions/vpmovw2m.rb +63 -0
- data/lib/fisk/instructions/vpmovwb.rb +117 -0
- data/lib/fisk/instructions/vpmovzxbd.rb +189 -0
- data/lib/fisk/instructions/vpmovzxbq.rb +189 -0
- data/lib/fisk/instructions/vpmovzxbw.rb +189 -0
- data/lib/fisk/instructions/vpmovzxdq.rb +189 -0
- data/lib/fisk/instructions/vpmovzxwd.rb +189 -0
- data/lib/fisk/instructions/vpmovzxwq.rb +189 -0
- data/lib/fisk/instructions/vpmuldq.rb +199 -0
- data/lib/fisk/instructions/vpmulhrsw.rb +199 -0
- data/lib/fisk/instructions/vpmulhuw.rb +199 -0
- data/lib/fisk/instructions/vpmulhw.rb +199 -0
- data/lib/fisk/instructions/vpmulld.rb +199 -0
- data/lib/fisk/instructions/vpmullq.rb +123 -0
- data/lib/fisk/instructions/vpmullw.rb +199 -0
- data/lib/fisk/instructions/vpmultishiftqb.rb +123 -0
- data/lib/fisk/instructions/vpmuludq.rb +199 -0
- data/lib/fisk/instructions/vpopcntd.rb +45 -0
- data/lib/fisk/instructions/vpopcntq.rb +45 -0
- data/lib/fisk/instructions/vpor.rb +85 -0
- data/lib/fisk/instructions/vpord.rb +123 -0
- data/lib/fisk/instructions/vporq.rb +123 -0
- data/lib/fisk/instructions/vpperm.rb +85 -0
- data/lib/fisk/instructions/vprold.rb +129 -0
- data/lib/fisk/instructions/vprolq.rb +129 -0
- data/lib/fisk/instructions/vprolvd.rb +123 -0
- data/lib/fisk/instructions/vprolvq.rb +123 -0
- data/lib/fisk/instructions/vprord.rb +129 -0
- data/lib/fisk/instructions/vprorq.rb +129 -0
- data/lib/fisk/instructions/vprorvd.rb +123 -0
- data/lib/fisk/instructions/vprorvq.rb +123 -0
- data/lib/fisk/instructions/vprotb.rb +118 -0
- data/lib/fisk/instructions/vprotd.rb +118 -0
- data/lib/fisk/instructions/vprotq.rb +118 -0
- data/lib/fisk/instructions/vprotw.rb +118 -0
- data/lib/fisk/instructions/vpsadbw.rb +199 -0
- data/lib/fisk/instructions/vpscatterdd.rb +63 -0
- data/lib/fisk/instructions/vpscatterdq.rb +63 -0
- data/lib/fisk/instructions/vpscatterqd.rb +63 -0
- data/lib/fisk/instructions/vpscatterqq.rb +63 -0
- data/lib/fisk/instructions/vpshab.rb +78 -0
- data/lib/fisk/instructions/vpshad.rb +78 -0
- data/lib/fisk/instructions/vpshaq.rb +78 -0
- data/lib/fisk/instructions/vpshaw.rb +78 -0
- data/lib/fisk/instructions/vpshlb.rb +78 -0
- data/lib/fisk/instructions/vpshld.rb +78 -0
- data/lib/fisk/instructions/vpshlq.rb +78 -0
- data/lib/fisk/instructions/vpshlw.rb +78 -0
- data/lib/fisk/instructions/vpshufb.rb +199 -0
- data/lib/fisk/instructions/vpshufd.rb +209 -0
- data/lib/fisk/instructions/vpshufhw.rb +209 -0
- data/lib/fisk/instructions/vpshuflw.rb +209 -0
- data/lib/fisk/instructions/vpsignb.rb +85 -0
- data/lib/fisk/instructions/vpsignd.rb +85 -0
- data/lib/fisk/instructions/vpsignw.rb +85 -0
- data/lib/fisk/instructions/vpslld.rb +359 -0
- data/lib/fisk/instructions/vpslldq.rb +169 -0
- data/lib/fisk/instructions/vpsllq.rb +359 -0
- data/lib/fisk/instructions/vpsllvd.rb +199 -0
- data/lib/fisk/instructions/vpsllvq.rb +199 -0
- data/lib/fisk/instructions/vpsllvw.rb +123 -0
- data/lib/fisk/instructions/vpsllw.rb +359 -0
- data/lib/fisk/instructions/vpsrad.rb +359 -0
- data/lib/fisk/instructions/vpsraq.rb +243 -0
- data/lib/fisk/instructions/vpsravd.rb +199 -0
- data/lib/fisk/instructions/vpsravq.rb +123 -0
- data/lib/fisk/instructions/vpsravw.rb +123 -0
- data/lib/fisk/instructions/vpsraw.rb +359 -0
- data/lib/fisk/instructions/vpsrld.rb +359 -0
- data/lib/fisk/instructions/vpsrldq.rb +169 -0
- data/lib/fisk/instructions/vpsrlq.rb +359 -0
- data/lib/fisk/instructions/vpsrlvd.rb +199 -0
- data/lib/fisk/instructions/vpsrlvq.rb +199 -0
- data/lib/fisk/instructions/vpsrlvw.rb +123 -0
- data/lib/fisk/instructions/vpsrlw.rb +359 -0
- data/lib/fisk/instructions/vpsubb.rb +199 -0
- data/lib/fisk/instructions/vpsubd.rb +199 -0
- data/lib/fisk/instructions/vpsubq.rb +199 -0
- data/lib/fisk/instructions/vpsubsb.rb +199 -0
- data/lib/fisk/instructions/vpsubsw.rb +199 -0
- data/lib/fisk/instructions/vpsubusb.rb +199 -0
- data/lib/fisk/instructions/vpsubusw.rb +199 -0
- data/lib/fisk/instructions/vpsubw.rb +199 -0
- data/lib/fisk/instructions/vpternlogd.rb +135 -0
- data/lib/fisk/instructions/vpternlogq.rb +135 -0
- data/lib/fisk/instructions/vptest.rb +81 -0
- data/lib/fisk/instructions/vptestmb.rb +123 -0
- data/lib/fisk/instructions/vptestmd.rb +123 -0
- data/lib/fisk/instructions/vptestmq.rb +123 -0
- data/lib/fisk/instructions/vptestmw.rb +123 -0
- data/lib/fisk/instructions/vptestnmb.rb +123 -0
- data/lib/fisk/instructions/vptestnmd.rb +123 -0
- data/lib/fisk/instructions/vptestnmq.rb +123 -0
- data/lib/fisk/instructions/vptestnmw.rb +123 -0
- data/lib/fisk/instructions/vpunpckhbw.rb +199 -0
- data/lib/fisk/instructions/vpunpckhdq.rb +199 -0
- data/lib/fisk/instructions/vpunpckhqdq.rb +199 -0
- data/lib/fisk/instructions/vpunpckhwd.rb +199 -0
- data/lib/fisk/instructions/vpunpcklbw.rb +199 -0
- data/lib/fisk/instructions/vpunpckldq.rb +199 -0
- data/lib/fisk/instructions/vpunpcklqdq.rb +199 -0
- data/lib/fisk/instructions/vpunpcklwd.rb +199 -0
- data/lib/fisk/instructions/vpxor.rb +85 -0
- data/lib/fisk/instructions/vpxord.rb +123 -0
- data/lib/fisk/instructions/vpxorq.rb +123 -0
- data/lib/fisk/instructions/vrangepd.rb +136 -0
- data/lib/fisk/instructions/vrangeps.rb +136 -0
- data/lib/fisk/instructions/vrangesd.rb +52 -0
- data/lib/fisk/instructions/vrangess.rb +52 -0
- data/lib/fisk/instructions/vrcp14pd.rb +117 -0
- data/lib/fisk/instructions/vrcp14ps.rb +117 -0
- data/lib/fisk/instructions/vrcp14sd.rb +47 -0
- data/lib/fisk/instructions/vrcp14ss.rb +47 -0
- data/lib/fisk/instructions/vrcp28pd.rb +46 -0
- data/lib/fisk/instructions/vrcp28ps.rb +46 -0
- data/lib/fisk/instructions/vrcp28sd.rb +48 -0
- data/lib/fisk/instructions/vrcp28ss.rb +48 -0
- data/lib/fisk/instructions/vrcpps.rb +81 -0
- data/lib/fisk/instructions/vrcpss.rb +47 -0
- data/lib/fisk/instructions/vreducepd.rb +129 -0
- data/lib/fisk/instructions/vreduceps.rb +129 -0
- data/lib/fisk/instructions/vreducesd.rb +51 -0
- data/lib/fisk/instructions/vreducess.rb +51 -0
- data/lib/fisk/instructions/vrndscalepd.rb +130 -0
- data/lib/fisk/instructions/vrndscaleps.rb +130 -0
- data/lib/fisk/instructions/vrndscalesd.rb +52 -0
- data/lib/fisk/instructions/vrndscaless.rb +52 -0
- data/lib/fisk/instructions/vroundpd.rb +89 -0
- data/lib/fisk/instructions/vroundps.rb +89 -0
- data/lib/fisk/instructions/vroundsd.rb +51 -0
- data/lib/fisk/instructions/vroundss.rb +51 -0
- data/lib/fisk/instructions/vrsqrt14pd.rb +117 -0
- data/lib/fisk/instructions/vrsqrt14ps.rb +117 -0
- data/lib/fisk/instructions/vrsqrt14sd.rb +47 -0
- data/lib/fisk/instructions/vrsqrt14ss.rb +47 -0
- data/lib/fisk/instructions/vrsqrt28pd.rb +46 -0
- data/lib/fisk/instructions/vrsqrt28ps.rb +46 -0
- data/lib/fisk/instructions/vrsqrt28sd.rb +48 -0
- data/lib/fisk/instructions/vrsqrt28ss.rb +48 -0
- data/lib/fisk/instructions/vrsqrtps.rb +81 -0
- data/lib/fisk/instructions/vrsqrtss.rb +47 -0
- data/lib/fisk/instructions/vscalefpd.rb +124 -0
- data/lib/fisk/instructions/vscalefps.rb +124 -0
- data/lib/fisk/instructions/vscalefsd.rb +48 -0
- data/lib/fisk/instructions/vscalefss.rb +48 -0
- data/lib/fisk/instructions/vscatterdpd.rb +63 -0
- data/lib/fisk/instructions/vscatterdps.rb +63 -0
- data/lib/fisk/instructions/vscatterpf0dpd.rb +26 -0
- data/lib/fisk/instructions/vscatterpf0dps.rb +26 -0
- data/lib/fisk/instructions/vscatterpf0qpd.rb +26 -0
- data/lib/fisk/instructions/vscatterpf0qps.rb +26 -0
- data/lib/fisk/instructions/vscatterpf1dpd.rb +26 -0
- data/lib/fisk/instructions/vscatterpf1dps.rb +26 -0
- data/lib/fisk/instructions/vscatterpf1qpd.rb +26 -0
- data/lib/fisk/instructions/vscatterpf1qps.rb +26 -0
- data/lib/fisk/instructions/vscatterqpd.rb +63 -0
- data/lib/fisk/instructions/vscatterqps.rb +63 -0
- data/lib/fisk/instructions/vshuff32x4.rb +93 -0
- data/lib/fisk/instructions/vshuff64x2.rb +93 -0
- data/lib/fisk/instructions/vshufi32x4.rb +93 -0
- data/lib/fisk/instructions/vshufi64x2.rb +93 -0
- data/lib/fisk/instructions/vshufpd.rb +219 -0
- data/lib/fisk/instructions/vshufps.rb +219 -0
- data/lib/fisk/instructions/vsqrtpd.rb +190 -0
- data/lib/fisk/instructions/vsqrtps.rb +190 -0
- data/lib/fisk/instructions/vsqrtsd.rb +86 -0
- data/lib/fisk/instructions/vsqrtss.rb +86 -0
- data/lib/fisk/instructions/vstmxcsr.rb +26 -0
- data/lib/fisk/instructions/vsubpd.rb +200 -0
- data/lib/fisk/instructions/vsubps.rb +200 -0
- data/lib/fisk/instructions/vsubsd.rb +86 -0
- data/lib/fisk/instructions/vsubss.rb +86 -0
- data/lib/fisk/instructions/vtestpd.rb +81 -0
- data/lib/fisk/instructions/vtestps.rb +81 -0
- data/lib/fisk/instructions/vucomisd.rb +82 -0
- data/lib/fisk/instructions/vucomiss.rb +82 -0
- data/lib/fisk/instructions/vunpckhpd.rb +199 -0
- data/lib/fisk/instructions/vunpckhps.rb +199 -0
- data/lib/fisk/instructions/vunpcklpd.rb +199 -0
- data/lib/fisk/instructions/vunpcklps.rb +199 -0
- data/lib/fisk/instructions/vxorpd.rb +199 -0
- data/lib/fisk/instructions/vxorps.rb +199 -0
- data/lib/fisk/instructions/vzeroall.rb +21 -0
- data/lib/fisk/instructions/vzeroupper.rb +21 -0
- data/lib/fisk/instructions/xadd.rb +203 -0
- data/lib/fisk/instructions/xchg.rb +473 -0
- data/lib/fisk/instructions/xgetbv.rb +22 -0
- data/lib/fisk/instructions/xlatb.rb +37 -0
- data/lib/fisk/instructions/xor.rb +760 -0
- data/lib/fisk/instructions/xorpd.rb +59 -0
- data/lib/fisk/instructions/xorps.rb +57 -0
- data/test/helper.rb +6 -0
- data/test/test_fisk.rb +53 -0
- data/test/test_run_fisk.rb +78 -5
- metadata +1234 -6
- data/bin/machine.rb.erb +0 -100
- data/lib/fisk/machine.rb +0 -35
- data/lib/fisk/machine/encoding.rb +0 -78
- data/lib/fisk/machine/generated.rb +0 -124746
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0809155eef95d321b2e39b2c3a801f5ed987f74e409ba40285a30f530964c558'
|
4
|
+
data.tar.gz: 0b44765ae9dd4d4611c9db1af5a49bbe8659ce4dba3e6a7ac8887e17ebdb6e4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1835a32e1579e07b1a7cf101a85ea94dee3471cb2c5c64e66a385a59807b8c049e1218c8b8152d7aa562757d585d3d7700b435b5791fd42ddaccabf99a403973
|
7
|
+
data.tar.gz: 90a32029797fb6f0a101fcfc81e3352e69294ac2bd02a48f9f3e077dde900b4d3a917e413b4f65be599cdf3a0fd4f3b0a5419a043774d16292eae9821aaa6e82
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Fisk - A Pure Ruby Assembler
|
2
2
|
|
3
|
-
This is a pure Ruby assembler (I guess). I'm not 100% sure if it counts
|
4
|
-
pure Ruby because it just reads an XML file and metaprograms most of it.
|
3
|
+
This is a pure Ruby x86-64 assembler (I guess). I'm not 100% sure if it counts
|
4
|
+
as pure Ruby because it just reads an XML file and metaprograms most of it.
|
5
5
|
Anyway, you can use it to write assembly in Ruby, then have it assembled.
|
6
6
|
|
7
7
|
I named it after Wilson Fisk mainly because it reminds me of [this
|
data/Rakefile
CHANGED
@@ -5,7 +5,8 @@ ENV["MT_NO_PLUGINS"] = "1"
|
|
5
5
|
|
6
6
|
XML_FILE = "tmp/Opcodes/opcodes/x86_64.xml"
|
7
7
|
LICENCE_FILE = "tmp/Opcodes/license.rst"
|
8
|
-
LIB_FILE = "lib/fisk/
|
8
|
+
LIB_FILE = "lib/fisk/instructions.rb"
|
9
|
+
INSNS_DIR = "lib/fisk/instructions"
|
9
10
|
|
10
11
|
file XML_FILE do
|
11
12
|
Dir.mkdir 'tmp' unless File.directory?("tmp")
|
@@ -13,11 +14,16 @@ file XML_FILE do
|
|
13
14
|
sh "git clone https://github.com/Maratyszcza/Opcodes.git"
|
14
15
|
end
|
15
16
|
|
16
|
-
file
|
17
|
-
|
17
|
+
file INSNS_DIR do
|
18
|
+
Dir.mkdir 'lib/fisk/instructions' unless File.directory?("lib/fisk/instructions")
|
19
|
+
end
|
20
|
+
|
21
|
+
file LIB_FILE => [XML_FILE, INSNS_DIR] do
|
22
|
+
ruby "bin/build-machine.rb #{XML_FILE} #{LICENCE_FILE} #{INSNS_DIR} > #{LIB_FILE}"
|
18
23
|
end
|
19
24
|
|
20
25
|
CLEAN.include LIB_FILE
|
26
|
+
CLEAN.include INSNS_DIR
|
21
27
|
|
22
28
|
Rake::TestTask.new do |t|
|
23
29
|
t.libs << "test"
|
data/bin/build-machine.rb
CHANGED
@@ -2,10 +2,52 @@ require "nokogiri"
|
|
2
2
|
require "stringio"
|
3
3
|
require "erb"
|
4
4
|
|
5
|
+
def parse_rex v
|
6
|
+
if v
|
7
|
+
case v
|
8
|
+
when /^(\d+)$/
|
9
|
+
v
|
10
|
+
when /^#(\d+)$/
|
11
|
+
"(operands[#{$1.to_i}].value >> 3)"
|
12
|
+
else
|
13
|
+
raise NotImplementedError, v
|
14
|
+
end
|
15
|
+
else
|
16
|
+
0
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def parse_operand_value v
|
21
|
+
if v
|
22
|
+
case v
|
23
|
+
when /^(\d+)$/
|
24
|
+
v
|
25
|
+
when /^#(\d+)$/
|
26
|
+
"operands[#{$1.to_i}].value"
|
27
|
+
else
|
28
|
+
raise NotImplementedError, v
|
29
|
+
end
|
30
|
+
else
|
31
|
+
0
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
5
35
|
doc = Nokogiri::XML(File.binread(ARGV[0]))
|
6
36
|
unique_operands = doc.css("Operand").map { |node|
|
7
37
|
%w{ type input output }.map { |x| node[x] }
|
8
38
|
}.uniq
|
9
39
|
license = File.readlines(ARGV[1])
|
10
|
-
|
11
|
-
|
40
|
+
insns_dir = ARGV[2]
|
41
|
+
|
42
|
+
instruction_template = ERB.new File.read("bin/instruction.rb.erb"), trim_mode: "-"
|
43
|
+
|
44
|
+
doc.root.children.each do |instruction|
|
45
|
+
next unless instruction.name == "Instruction"
|
46
|
+
name = instruction["name"]
|
47
|
+
insn_source = instruction_template.result(binding)
|
48
|
+
file_name = File.join(insns_dir, "#{name.downcase}.rb")
|
49
|
+
File.binwrite file_name, insn_source
|
50
|
+
end
|
51
|
+
|
52
|
+
instructions_rb = ERB.new File.read("bin/instructions.rb.erb"), trim_mode: "-"
|
53
|
+
puts instructions_rb.result(binding)
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Fisk
|
4
|
+
module Instructions
|
5
|
+
<%- name = instruction["name"] -%>
|
6
|
+
# Instruction <%= name %>
|
7
|
+
forms = []
|
8
|
+
<%-
|
9
|
+
instruction.children.each do |form|
|
10
|
+
next unless form.name == "InstructionForm"
|
11
|
+
-%>
|
12
|
+
operands = []
|
13
|
+
encodings = []
|
14
|
+
<%-
|
15
|
+
operands = form.children.reject(&:text?).find_all { |c| c.name == "Operand" }
|
16
|
+
-%>
|
17
|
+
# <%= form["gas-name"] %>: <%= operands.map { |op| op["type"] }.join(", ") %>
|
18
|
+
<%-
|
19
|
+
form.children.each do |child|
|
20
|
+
next if child.text?
|
21
|
+
case child.name
|
22
|
+
-%>
|
23
|
+
<%- when "Operand" -%>
|
24
|
+
operands << OPERAND_TYPES[<%= unique_operands.index(%w{ type input output }.map { |n| child[n] }) %>]
|
25
|
+
<%-
|
26
|
+
when "Encoding"
|
27
|
+
size = 0
|
28
|
+
-%>
|
29
|
+
encodings << Class.new(Fisk::Encoding) {
|
30
|
+
def encode buffer, operands
|
31
|
+
<%-
|
32
|
+
child.children.each do |encoding|
|
33
|
+
next if encoding.text?
|
34
|
+
case encoding.name
|
35
|
+
when "Opcode"
|
36
|
+
size += 1
|
37
|
+
-%>
|
38
|
+
add_opcode buffer, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= parse_operand_value encoding["addend"] %>
|
39
|
+
<%-
|
40
|
+
when "Immediate"
|
41
|
+
size += encoding["size"].to_i
|
42
|
+
-%>
|
43
|
+
add_immediate buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>
|
44
|
+
<%-
|
45
|
+
when "CodeOffset"
|
46
|
+
size += encoding["size"].to_i
|
47
|
+
-%>
|
48
|
+
add_code_offset buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>
|
49
|
+
<%-
|
50
|
+
when "REX"
|
51
|
+
size += 1 unless encoding["mandatory"] == "false"
|
52
|
+
-%>
|
53
|
+
add_rex(buffer, operands,
|
54
|
+
<%= !(encoding["mandatory"] == "false") %>,
|
55
|
+
<%= parse_rex encoding["W"] %>,
|
56
|
+
<%= parse_rex encoding["R"] %>,
|
57
|
+
<%= parse_rex encoding["X"] %>,
|
58
|
+
<%= parse_rex encoding["B"] %>)
|
59
|
+
<%-
|
60
|
+
when "ModRM"
|
61
|
+
size += 1
|
62
|
+
-%>
|
63
|
+
add_modrm(buffer, operands,
|
64
|
+
<%= encoding["mode"].to_i(2) %>,
|
65
|
+
<%= parse_operand_value encoding["reg"] %>,
|
66
|
+
<%= parse_operand_value encoding["rm"] %>)
|
67
|
+
<%- when "Prefix" -%>
|
68
|
+
add_prefix buffer, operands, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= encoding["mandatory"] %>
|
69
|
+
<%- when "DataOffset" -%>
|
70
|
+
add_data_offset buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>
|
71
|
+
<%- else -%>
|
72
|
+
add_<%= encoding.name %> buffer, operands
|
73
|
+
<%- end -%>
|
74
|
+
<%- end -%>
|
75
|
+
end
|
76
|
+
|
77
|
+
def bytesize; <%= size %>; end
|
78
|
+
}.new
|
79
|
+
<%- when "ISA" -%>
|
80
|
+
<%- when "ImplicitOperand" -%>
|
81
|
+
<%-
|
82
|
+
else
|
83
|
+
raise NotImplementedError, child.name
|
84
|
+
-%>
|
85
|
+
<%- end -%>
|
86
|
+
<%- end -%>
|
87
|
+
forms << Form.new(operands, encodings)
|
88
|
+
<%- end -%>
|
89
|
+
<%= name %> = Instruction.new(<%= name.dump %>, forms)
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
<%= license.map { |x| "# #{x.chomp} " }.join "\n" %>
|
4
|
+
|
5
|
+
require "fisk/encoding"
|
6
|
+
|
7
|
+
class Fisk
|
8
|
+
module Instructions
|
9
|
+
Operand = Struct.new(:type, :input, :output)
|
10
|
+
Form = Struct.new(:operands, :encodings)
|
11
|
+
Instruction = Struct.new(:name, :forms)
|
12
|
+
|
13
|
+
OPERAND_TYPES = [
|
14
|
+
<%- unique_operands.each do |u_op| -%>
|
15
|
+
Operand.new(<%= u_op[0].dump %>, <%= u_op[1] || "nil" %>, <%= u_op[2] || "nil" %>),
|
16
|
+
<% end %>
|
17
|
+
]
|
18
|
+
|
19
|
+
def self.instruction_names
|
20
|
+
constants - [:Operand, :OPERAND_TYPES]
|
21
|
+
end
|
22
|
+
<%-
|
23
|
+
doc.root.children.each do |instruction|
|
24
|
+
next unless instruction.name == "Instruction"
|
25
|
+
name = instruction["name"]
|
26
|
+
-%>
|
27
|
+
autoload :<%= name %>, "fisk/instructions/<%= name.downcase %>"
|
28
|
+
<%-
|
29
|
+
end
|
30
|
+
-%>
|
31
|
+
module DSLMethods
|
32
|
+
<%-
|
33
|
+
doc.root.children.each do |instruction|
|
34
|
+
next unless instruction.name == "Instruction"
|
35
|
+
name = instruction["name"]
|
36
|
+
-%>
|
37
|
+
def <%= name.downcase %>(*params)
|
38
|
+
gen_with_insn Fisk::Instructions::<%= name %>, params
|
39
|
+
end
|
40
|
+
<%-
|
41
|
+
end
|
42
|
+
-%>
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/fisk.gemspec
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "fisk"
|
3
|
+
s.version = "2.0.0"
|
4
|
+
s.summary = "Write assembly in Ruby!"
|
5
|
+
s.description = "Tired of writing Ruby in Ruby? Now you can write assembly in Ruby!"
|
6
|
+
s.authors = ["Aaron Patterson"]
|
7
|
+
s.email = "tenderlove@ruby-lang.org"
|
8
|
+
s.files = `git ls-files -z`.split("\x0")
|
9
|
+
s.test_files = s.files.grep(%r{^test/})
|
10
|
+
s.homepage = "https://github.com/tenderlove/fisk"
|
11
|
+
s.license = "Apache-2.0"
|
12
|
+
end
|
data/lib/fisk.rb
CHANGED
@@ -1,16 +1,32 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
4
|
-
require "fisk/
|
3
|
+
require "stringio"
|
4
|
+
require "fisk/instructions"
|
5
5
|
|
6
6
|
class Fisk
|
7
|
+
class Operand < Struct.new(:value)
|
8
|
+
def type; value; end
|
9
|
+
def works? type; self.type == type; end
|
10
|
+
def unknown_label?; false; end
|
11
|
+
def extended_register?; false; end
|
12
|
+
def m64?; false; end
|
13
|
+
end
|
14
|
+
|
7
15
|
module Registers
|
8
|
-
class Register <
|
16
|
+
class Register < Operand
|
17
|
+
attr_reader :name, :type
|
18
|
+
|
19
|
+
def initialize name, type, value
|
20
|
+
@name = name
|
21
|
+
@type = type
|
22
|
+
super(value)
|
23
|
+
end
|
24
|
+
|
9
25
|
def works? type
|
10
26
|
type == self.name || type == self.type
|
11
27
|
end
|
12
28
|
|
13
|
-
def
|
29
|
+
def extended_register?; value > 7; end
|
14
30
|
end
|
15
31
|
|
16
32
|
EAX = Register.new "eax", "r32", 0
|
@@ -36,20 +52,25 @@ class Fisk
|
|
36
52
|
end
|
37
53
|
end
|
38
54
|
|
39
|
-
class Operand < Struct.new(:value)
|
40
|
-
def type; value; end
|
41
|
-
def works? type; self.type == type; end
|
42
|
-
def unknown_label?; false; end
|
43
|
-
end
|
44
55
|
|
45
56
|
class M64 < Operand
|
57
|
+
attr_reader :displacement
|
58
|
+
|
59
|
+
def initialize register, displacement
|
60
|
+
super(register.value)
|
61
|
+
@register = register
|
62
|
+
@displacement = displacement
|
63
|
+
end
|
64
|
+
|
46
65
|
def type
|
47
66
|
"m64"
|
48
67
|
end
|
68
|
+
|
69
|
+
def m64?; true; end
|
49
70
|
end
|
50
71
|
|
51
|
-
def m64 x
|
52
|
-
M64.new x
|
72
|
+
def m64 x, displacement = 0
|
73
|
+
M64.new x, displacement
|
53
74
|
end
|
54
75
|
|
55
76
|
class Imm8 < Operand
|
@@ -102,7 +123,7 @@ class Fisk
|
|
102
123
|
@position = 0
|
103
124
|
end
|
104
125
|
|
105
|
-
class UnknownLabel < Struct.new(:name
|
126
|
+
class UnknownLabel < Struct.new(:name)
|
106
127
|
def works? type
|
107
128
|
type == "rel32"
|
108
129
|
end
|
@@ -115,19 +136,16 @@ class Fisk
|
|
115
136
|
end
|
116
137
|
end
|
117
138
|
|
118
|
-
class Label < Struct.new(:name
|
119
|
-
|
120
|
-
|
121
|
-
def label_for name
|
122
|
-
@labels.fetch name
|
139
|
+
class Label < Struct.new(:name)
|
140
|
+
def label?; true; end
|
123
141
|
end
|
124
142
|
|
125
143
|
def label name
|
126
|
-
UnknownLabel.new(name
|
144
|
+
UnknownLabel.new(name)
|
127
145
|
end
|
128
146
|
|
129
147
|
def make_label name
|
130
|
-
@
|
148
|
+
@instructions << Label.new(name)
|
131
149
|
end
|
132
150
|
|
133
151
|
Registers.constants.grep(/^[A-Z0-9]*$/).each do |const|
|
@@ -136,60 +154,82 @@ class Fisk
|
|
136
154
|
end
|
137
155
|
|
138
156
|
class Instruction
|
139
|
-
|
140
|
-
|
141
|
-
def initialize insn, operands, position
|
157
|
+
def initialize insn, form, operands
|
142
158
|
@insn = insn
|
159
|
+
@form = form
|
143
160
|
@operands = operands
|
144
|
-
@position = position
|
145
161
|
end
|
146
162
|
|
147
163
|
def encodings
|
148
|
-
@
|
164
|
+
@form.encodings
|
149
165
|
end
|
150
166
|
|
151
|
-
def encode buffer
|
152
|
-
encoding = @
|
167
|
+
def encode buffer, labels
|
168
|
+
encoding = @form.encodings.first
|
153
169
|
encoding.encode buffer, @operands
|
170
|
+
true
|
154
171
|
end
|
155
172
|
|
156
173
|
def bytesize
|
157
|
-
@
|
174
|
+
@form.encodings.first.bytesize
|
158
175
|
end
|
176
|
+
|
177
|
+
def label?; false; end
|
159
178
|
end
|
160
179
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
180
|
+
class UnresolvedInstruction
|
181
|
+
def initialize insn, form, operand
|
182
|
+
@insn = insn
|
183
|
+
@form = form
|
184
|
+
@operand = operand
|
185
|
+
@saved_pos = nil
|
186
|
+
end
|
187
|
+
|
188
|
+
def encode buffer, labels
|
189
|
+
# Estimate by using a rel32 offset
|
190
|
+
form = find_form "rel32"
|
191
|
+
encoding = form.encodings.first
|
192
|
+
operand_klass = Rel32
|
193
|
+
|
194
|
+
if labels.key? @operand.name
|
195
|
+
if @saved_pos
|
196
|
+
# Only use rel32 if we saved the position
|
197
|
+
buffer.seek @saved_pos, IO::SEEK_SET
|
198
|
+
else
|
199
|
+
estimated_offset = labels[@operand.name] - (buffer.pos + encoding.bytesize)
|
200
|
+
|
201
|
+
if estimated_offset >= -128 && estimated_offset <= 127
|
202
|
+
# fits in a rel8
|
203
|
+
operand_klass = Rel8
|
204
|
+
form = find_form "rel8"
|
205
|
+
encoding = form.encodings.first
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
jump_len = -(buffer.pos + encoding.bytesize - labels[@operand.name])
|
210
|
+
encoding.encode buffer, [operand_klass.new(jump_len)]
|
211
|
+
true
|
168
212
|
else
|
213
|
+
# We've hit a label that doesn't exist yet
|
214
|
+
# Save the buffer position so we can seek back to it later
|
215
|
+
@saved_pos = buffer.pos
|
216
|
+
# Write 5 bytes to reserve our spot
|
217
|
+
encoding.bytesize.times { buffer.putc 0 }
|
169
218
|
false
|
170
219
|
end
|
171
220
|
end
|
172
221
|
|
173
|
-
|
174
|
-
|
175
|
-
insn = nil
|
176
|
-
|
177
|
-
insn = forms.first
|
178
|
-
|
179
|
-
insn = Instruction.new(insn, params, position)
|
180
|
-
@position += insn.bytesize
|
181
|
-
@instructions << insn
|
182
|
-
params.each { |param| param.insn = insn if param.unknown_label? }
|
222
|
+
def label?; false; end
|
183
223
|
|
184
|
-
|
185
|
-
end
|
224
|
+
private
|
186
225
|
|
187
|
-
|
188
|
-
|
189
|
-
gen insn, params
|
226
|
+
def find_form form_type
|
227
|
+
@insn.forms.find { |form| form.operands.first.type == form_type }
|
190
228
|
end
|
191
229
|
end
|
192
230
|
|
231
|
+
include Fisk::Instructions::DSLMethods
|
232
|
+
|
193
233
|
def moffs64 val
|
194
234
|
MOffs64.new val
|
195
235
|
end
|
@@ -235,6 +275,54 @@ class Fisk
|
|
235
275
|
private
|
236
276
|
|
237
277
|
def write_to_buffer buffer
|
238
|
-
|
278
|
+
labels = {}
|
279
|
+
unresolved = []
|
280
|
+
@instructions.each do |insn|
|
281
|
+
if insn.label?
|
282
|
+
labels[insn.name] = buffer.pos
|
283
|
+
else
|
284
|
+
unless insn.encode buffer, labels
|
285
|
+
unresolved << insn
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
return if unresolved.empty?
|
291
|
+
|
292
|
+
pos = buffer.pos
|
293
|
+
unresolved.each do |insn|
|
294
|
+
insn.encode buffer, labels
|
295
|
+
end
|
296
|
+
buffer.seek pos, IO::SEEK_SET
|
297
|
+
end
|
298
|
+
|
299
|
+
def gen_with_insn insns, params
|
300
|
+
forms = insns.forms.find_all do |insn|
|
301
|
+
if insn.operands.length == params.length
|
302
|
+
params.zip(insn.operands).all? { |want_op, have_op|
|
303
|
+
want_op.works?(have_op.type)
|
304
|
+
}
|
305
|
+
else
|
306
|
+
false
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
raise NotImplementedError, "couldn't find instruction #{name}" if forms.length == 0
|
311
|
+
|
312
|
+
insn = nil
|
313
|
+
|
314
|
+
form = forms.first
|
315
|
+
|
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
|
+
@instructions << insn
|
325
|
+
|
326
|
+
self
|
239
327
|
end
|
240
328
|
end
|