fisk 2.0.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +34 -0
- data/CODE_OF_CONDUCT.md +78 -0
- data/Gemfile +1 -2
- data/README.md +62 -2
- data/Rakefile +4 -2
- data/bin/build-machine.rb +16 -2
- data/bin/instruction.rb.erb +31 -57
- data/bin/instructions.rb.erb +34 -4
- data/fisk.gemspec +10 -1
- data/lib/fisk/basic_block.rb +162 -0
- data/lib/fisk/encoding.rb +83 -17
- data/lib/fisk/errors.rb +50 -0
- data/lib/fisk/helpers.rb +33 -2
- data/lib/fisk/instructions/adc.rb +561 -595
- data/lib/fisk/instructions/adcx.rb +85 -89
- data/lib/fisk/instructions/add.rb +561 -595
- data/lib/fisk/instructions/addpd.rb +42 -44
- data/lib/fisk/instructions/addps.rb +40 -42
- data/lib/fisk/instructions/addsd.rb +42 -44
- data/lib/fisk/instructions/addss.rb +42 -44
- data/lib/fisk/instructions/addsubpd.rb +42 -44
- data/lib/fisk/instructions/addsubps.rb +42 -44
- data/lib/fisk/instructions/adox.rb +85 -89
- data/lib/fisk/instructions/aesdec.rb +44 -46
- data/lib/fisk/instructions/aesdeclast.rb +44 -46
- data/lib/fisk/instructions/aesenc.rb +44 -46
- data/lib/fisk/instructions/aesenclast.rb +44 -46
- data/lib/fisk/instructions/aesimc.rb +44 -46
- data/lib/fisk/instructions/aeskeygenassist.rb +48 -50
- data/lib/fisk/instructions/and.rb +561 -595
- data/lib/fisk/instructions/andn.rb +67 -71
- data/lib/fisk/instructions/andnpd.rb +42 -44
- data/lib/fisk/instructions/andnps.rb +40 -42
- data/lib/fisk/instructions/andpd.rb +42 -44
- data/lib/fisk/instructions/andps.rb +40 -42
- data/lib/fisk/instructions/bextr.rb +135 -143
- data/lib/fisk/instructions/blcfill.rb +59 -63
- data/lib/fisk/instructions/blci.rb +59 -63
- data/lib/fisk/instructions/blcic.rb +59 -63
- data/lib/fisk/instructions/blcmsk.rb +59 -63
- data/lib/fisk/instructions/blcs.rb +59 -63
- data/lib/fisk/instructions/blendpd.rb +48 -50
- data/lib/fisk/instructions/blendps.rb +48 -50
- data/lib/fisk/instructions/blendvpd.rb +46 -48
- data/lib/fisk/instructions/blendvps.rb +46 -48
- data/lib/fisk/instructions/blsfill.rb +59 -63
- data/lib/fisk/instructions/blsi.rb +59 -63
- data/lib/fisk/instructions/blsic.rb +59 -63
- data/lib/fisk/instructions/blsmsk.rb +59 -63
- data/lib/fisk/instructions/blsr.rb +59 -63
- data/lib/fisk/instructions/bsf.rb +116 -122
- data/lib/fisk/instructions/bsr.rb +116 -122
- data/lib/fisk/instructions/bswap.rb +29 -31
- data/lib/fisk/instructions/bt.rb +223 -235
- data/lib/fisk/instructions/btc.rb +223 -235
- data/lib/fisk/instructions/btr.rb +223 -235
- data/lib/fisk/instructions/bts.rb +223 -235
- data/lib/fisk/instructions/bzhi.rb +67 -71
- data/lib/fisk/instructions/call.rb +43 -46
- data/lib/fisk/instructions/cbw.rb +13 -14
- data/lib/fisk/instructions/cdq.rb +12 -13
- data/lib/fisk/instructions/cdqe.rb +14 -15
- data/lib/fisk/instructions/clc.rb +12 -13
- data/lib/fisk/instructions/cld.rb +12 -13
- data/lib/fisk/instructions/clflush.rb +19 -20
- data/lib/fisk/instructions/clflushopt.rb +20 -21
- data/lib/fisk/instructions/clwb.rb +20 -21
- data/lib/fisk/instructions/clzero.rb +14 -15
- data/lib/fisk/instructions/cmc.rb +12 -13
- data/lib/fisk/instructions/cmova.rb +116 -122
- data/lib/fisk/instructions/cmovae.rb +116 -122
- data/lib/fisk/instructions/cmovb.rb +116 -122
- data/lib/fisk/instructions/cmovbe.rb +116 -122
- data/lib/fisk/instructions/cmovc.rb +116 -122
- data/lib/fisk/instructions/cmove.rb +116 -122
- data/lib/fisk/instructions/cmovg.rb +116 -122
- data/lib/fisk/instructions/cmovge.rb +116 -122
- data/lib/fisk/instructions/cmovl.rb +116 -122
- data/lib/fisk/instructions/cmovle.rb +116 -122
- data/lib/fisk/instructions/cmovna.rb +116 -122
- data/lib/fisk/instructions/cmovnae.rb +116 -122
- data/lib/fisk/instructions/cmovnb.rb +116 -122
- data/lib/fisk/instructions/cmovnbe.rb +116 -122
- data/lib/fisk/instructions/cmovnc.rb +116 -122
- data/lib/fisk/instructions/cmovne.rb +116 -122
- data/lib/fisk/instructions/cmovng.rb +116 -122
- data/lib/fisk/instructions/cmovnge.rb +116 -122
- data/lib/fisk/instructions/cmovnl.rb +116 -122
- data/lib/fisk/instructions/cmovnle.rb +116 -122
- data/lib/fisk/instructions/cmovno.rb +116 -122
- data/lib/fisk/instructions/cmovnp.rb +116 -122
- data/lib/fisk/instructions/cmovns.rb +116 -122
- data/lib/fisk/instructions/cmovnz.rb +116 -122
- data/lib/fisk/instructions/cmovo.rb +116 -122
- data/lib/fisk/instructions/cmovp.rb +116 -122
- data/lib/fisk/instructions/cmovpe.rb +116 -122
- data/lib/fisk/instructions/cmovpo.rb +116 -122
- data/lib/fisk/instructions/cmovs.rb +116 -122
- data/lib/fisk/instructions/cmovz.rb +116 -122
- data/lib/fisk/instructions/cmp.rb +561 -595
- data/lib/fisk/instructions/cmppd.rb +46 -48
- data/lib/fisk/instructions/cmpps.rb +44 -46
- data/lib/fisk/instructions/cmpsd.rb +46 -48
- data/lib/fisk/instructions/cmpss.rb +46 -48
- data/lib/fisk/instructions/cmpxchg.rb +153 -161
- data/lib/fisk/instructions/cmpxchg16b.rb +19 -20
- data/lib/fisk/instructions/cmpxchg8b.rb +19 -20
- data/lib/fisk/instructions/comisd.rb +42 -44
- data/lib/fisk/instructions/comiss.rb +40 -42
- data/lib/fisk/instructions/cpuid.rb +13 -14
- data/lib/fisk/instructions/cqo.rb +14 -15
- data/lib/fisk/instructions/crc32.rb +210 -220
- data/lib/fisk/instructions/cvtdq2pd.rb +42 -44
- data/lib/fisk/instructions/cvtdq2ps.rb +40 -42
- data/lib/fisk/instructions/cvtpd2dq.rb +42 -44
- data/lib/fisk/instructions/cvtpd2pi.rb +42 -44
- data/lib/fisk/instructions/cvtpd2ps.rb +42 -44
- data/lib/fisk/instructions/cvtpi2pd.rb +42 -44
- data/lib/fisk/instructions/cvtpi2ps.rb +40 -42
- data/lib/fisk/instructions/cvtps2dq.rb +42 -44
- data/lib/fisk/instructions/cvtps2pd.rb +40 -42
- data/lib/fisk/instructions/cvtps2pi.rb +40 -42
- data/lib/fisk/instructions/cvtsd2si.rb +81 -85
- data/lib/fisk/instructions/cvtsd2ss.rb +42 -44
- data/lib/fisk/instructions/cvtsi2sd.rb +81 -85
- data/lib/fisk/instructions/cvtsi2ss.rb +81 -85
- data/lib/fisk/instructions/cvtss2sd.rb +42 -44
- data/lib/fisk/instructions/cvtss2si.rb +81 -85
- data/lib/fisk/instructions/cvttpd2dq.rb +42 -44
- data/lib/fisk/instructions/cvttpd2pi.rb +42 -44
- data/lib/fisk/instructions/cvttps2dq.rb +42 -44
- data/lib/fisk/instructions/cvttps2pi.rb +40 -42
- data/lib/fisk/instructions/cvttsd2si.rb +81 -85
- data/lib/fisk/instructions/cvttss2si.rb +81 -85
- data/lib/fisk/instructions/cwd.rb +13 -14
- data/lib/fisk/instructions/cwde.rb +12 -13
- data/lib/fisk/instructions/dec.rb +121 -129
- data/lib/fisk/instructions/div.rb +121 -129
- data/lib/fisk/instructions/divpd.rb +42 -44
- data/lib/fisk/instructions/divps.rb +40 -42
- data/lib/fisk/instructions/divsd.rb +42 -44
- data/lib/fisk/instructions/divss.rb +42 -44
- data/lib/fisk/instructions/dppd.rb +48 -50
- data/lib/fisk/instructions/dpps.rb +48 -50
- data/lib/fisk/instructions/emms.rb +13 -14
- data/lib/fisk/instructions/extractps.rb +48 -50
- data/lib/fisk/instructions/extrq.rb +42 -44
- data/lib/fisk/instructions/femms.rb +13 -14
- data/lib/fisk/instructions/haddpd.rb +42 -44
- data/lib/fisk/instructions/haddps.rb +42 -44
- data/lib/fisk/instructions/hsubpd.rb +42 -44
- data/lib/fisk/instructions/hsubps.rb +42 -44
- data/lib/fisk/instructions/idiv.rb +121 -129
- data/lib/fisk/instructions/imul.rb +481 -507
- data/lib/fisk/instructions/inc.rb +121 -129
- data/lib/fisk/instructions/insertps.rb +48 -50
- data/lib/fisk/instructions/insertq.rb +45 -47
- data/lib/fisk/instructions/int.rb +24 -26
- data/lib/fisk/instructions/ja.rb +26 -28
- data/lib/fisk/instructions/jae.rb +26 -28
- data/lib/fisk/instructions/jb.rb +26 -28
- data/lib/fisk/instructions/jbe.rb +26 -28
- data/lib/fisk/instructions/jc.rb +26 -28
- data/lib/fisk/instructions/je.rb +26 -28
- data/lib/fisk/instructions/jecxz.rb +14 -15
- data/lib/fisk/instructions/jg.rb +26 -28
- data/lib/fisk/instructions/jge.rb +26 -28
- data/lib/fisk/instructions/jl.rb +26 -28
- data/lib/fisk/instructions/jle.rb +26 -28
- data/lib/fisk/instructions/jmp.rb +54 -58
- data/lib/fisk/instructions/jna.rb +26 -28
- data/lib/fisk/instructions/jnae.rb +26 -28
- data/lib/fisk/instructions/jnb.rb +26 -28
- data/lib/fisk/instructions/jnbe.rb +26 -28
- data/lib/fisk/instructions/jnc.rb +26 -28
- data/lib/fisk/instructions/jne.rb +26 -28
- data/lib/fisk/instructions/jng.rb +26 -28
- data/lib/fisk/instructions/jnge.rb +26 -28
- data/lib/fisk/instructions/jnl.rb +26 -28
- data/lib/fisk/instructions/jnle.rb +26 -28
- data/lib/fisk/instructions/jno.rb +26 -28
- data/lib/fisk/instructions/jnp.rb +26 -28
- data/lib/fisk/instructions/jns.rb +26 -28
- data/lib/fisk/instructions/jnz.rb +26 -28
- data/lib/fisk/instructions/jo.rb +26 -28
- data/lib/fisk/instructions/jp.rb +26 -28
- data/lib/fisk/instructions/jpe.rb +26 -28
- data/lib/fisk/instructions/jpo.rb +26 -28
- data/lib/fisk/instructions/jrcxz.rb +14 -15
- data/lib/fisk/instructions/js.rb +26 -28
- data/lib/fisk/instructions/jz.rb +26 -28
- data/lib/fisk/instructions/kaddb.rb +19 -20
- data/lib/fisk/instructions/kaddd.rb +19 -20
- data/lib/fisk/instructions/kaddq.rb +19 -20
- data/lib/fisk/instructions/kaddw.rb +19 -20
- data/lib/fisk/instructions/kandb.rb +19 -20
- data/lib/fisk/instructions/kandd.rb +19 -20
- data/lib/fisk/instructions/kandnb.rb +19 -20
- data/lib/fisk/instructions/kandnd.rb +19 -20
- data/lib/fisk/instructions/kandnq.rb +19 -20
- data/lib/fisk/instructions/kandnw.rb +19 -20
- data/lib/fisk/instructions/kandq.rb +19 -20
- data/lib/fisk/instructions/kandw.rb +19 -20
- data/lib/fisk/instructions/kmovb.rb +78 -83
- data/lib/fisk/instructions/kmovd.rb +78 -83
- data/lib/fisk/instructions/kmovq.rb +78 -83
- data/lib/fisk/instructions/kmovw.rb +78 -83
- data/lib/fisk/instructions/knotb.rb +18 -19
- data/lib/fisk/instructions/knotd.rb +18 -19
- data/lib/fisk/instructions/knotq.rb +18 -19
- data/lib/fisk/instructions/knotw.rb +18 -19
- data/lib/fisk/instructions/korb.rb +19 -20
- data/lib/fisk/instructions/kord.rb +19 -20
- data/lib/fisk/instructions/korq.rb +19 -20
- data/lib/fisk/instructions/kortestb.rb +18 -19
- data/lib/fisk/instructions/kortestd.rb +18 -19
- data/lib/fisk/instructions/kortestq.rb +18 -19
- data/lib/fisk/instructions/kortestw.rb +18 -19
- data/lib/fisk/instructions/korw.rb +19 -20
- data/lib/fisk/instructions/kshiftlb.rb +20 -21
- data/lib/fisk/instructions/kshiftld.rb +20 -21
- data/lib/fisk/instructions/kshiftlq.rb +20 -21
- data/lib/fisk/instructions/kshiftlw.rb +20 -21
- data/lib/fisk/instructions/kshiftrb.rb +20 -21
- data/lib/fisk/instructions/kshiftrd.rb +20 -21
- data/lib/fisk/instructions/kshiftrq.rb +20 -21
- data/lib/fisk/instructions/kshiftrw.rb +20 -21
- data/lib/fisk/instructions/ktestb.rb +18 -19
- data/lib/fisk/instructions/ktestd.rb +18 -19
- data/lib/fisk/instructions/ktestq.rb +18 -19
- data/lib/fisk/instructions/ktestw.rb +18 -19
- data/lib/fisk/instructions/kunpckbw.rb +19 -20
- data/lib/fisk/instructions/kunpckdq.rb +19 -20
- data/lib/fisk/instructions/kunpckwd.rb +19 -20
- data/lib/fisk/instructions/kxnorb.rb +19 -20
- data/lib/fisk/instructions/kxnord.rb +19 -20
- data/lib/fisk/instructions/kxnorq.rb +19 -20
- data/lib/fisk/instructions/kxnorw.rb +19 -20
- data/lib/fisk/instructions/kxorb.rb +19 -20
- data/lib/fisk/instructions/kxord.rb +19 -20
- data/lib/fisk/instructions/kxorq.rb +19 -20
- data/lib/fisk/instructions/kxorw.rb +19 -20
- data/lib/fisk/instructions/lddqu.rb +23 -24
- data/lib/fisk/instructions/ldmxcsr.rb +19 -20
- data/lib/fisk/instructions/lea.rb +58 -61
- data/lib/fisk/instructions/lfence.rb +14 -15
- data/lib/fisk/instructions/lzcnt.rb +122 -128
- data/lib/fisk/instructions/maskmovdqu.rb +22 -23
- data/lib/fisk/instructions/maskmovq.rb +21 -22
- data/lib/fisk/instructions/maxpd.rb +42 -44
- data/lib/fisk/instructions/maxps.rb +40 -42
- data/lib/fisk/instructions/maxsd.rb +42 -44
- data/lib/fisk/instructions/maxss.rb +42 -44
- data/lib/fisk/instructions/mfence.rb +14 -15
- data/lib/fisk/instructions/minpd.rb +42 -44
- data/lib/fisk/instructions/minps.rb +40 -42
- data/lib/fisk/instructions/minsd.rb +42 -44
- data/lib/fisk/instructions/minss.rb +42 -44
- data/lib/fisk/instructions/monitor.rb +14 -15
- data/lib/fisk/instructions/monitorx.rb +14 -15
- data/lib/fisk/instructions/mov.rb +503 -535
- data/lib/fisk/instructions/movapd.rb +76 -80
- data/lib/fisk/instructions/movaps.rb +72 -76
- data/lib/fisk/instructions/movbe.rb +125 -131
- data/lib/fisk/instructions/movd.rb +159 -167
- data/lib/fisk/instructions/movddup.rb +42 -44
- data/lib/fisk/instructions/movdq2q.rb +22 -23
- data/lib/fisk/instructions/movdqa.rb +76 -80
- data/lib/fisk/instructions/movdqu.rb +76 -80
- data/lib/fisk/instructions/movhlps.rb +21 -22
- data/lib/fisk/instructions/movhpd.rb +43 -45
- data/lib/fisk/instructions/movhps.rb +41 -43
- data/lib/fisk/instructions/movlhps.rb +21 -22
- data/lib/fisk/instructions/movlpd.rb +43 -45
- data/lib/fisk/instructions/movlps.rb +41 -43
- data/lib/fisk/instructions/movmskpd.rb +22 -23
- data/lib/fisk/instructions/movmskps.rb +21 -22
- data/lib/fisk/instructions/movntdq.rb +23 -24
- data/lib/fisk/instructions/movntdqa.rb +24 -25
- data/lib/fisk/instructions/movnti.rb +41 -43
- data/lib/fisk/instructions/movntpd.rb +23 -24
- data/lib/fisk/instructions/movntps.rb +22 -23
- data/lib/fisk/instructions/movntq.rb +22 -23
- data/lib/fisk/instructions/movntsd.rb +23 -24
- data/lib/fisk/instructions/movntss.rb +23 -24
- data/lib/fisk/instructions/movq.rb +277 -293
- data/lib/fisk/instructions/movq2dq.rb +22 -23
- data/lib/fisk/instructions/movsd.rb +76 -80
- data/lib/fisk/instructions/movshdup.rb +42 -44
- data/lib/fisk/instructions/movsldup.rb +42 -44
- data/lib/fisk/instructions/movss.rb +76 -80
- data/lib/fisk/instructions/movsx.rb +195 -205
- data/lib/fisk/instructions/movsxd.rb +38 -40
- data/lib/fisk/instructions/movupd.rb +76 -80
- data/lib/fisk/instructions/movups.rb +72 -76
- data/lib/fisk/instructions/movzx.rb +195 -205
- data/lib/fisk/instructions/mpsadbw.rb +48 -50
- data/lib/fisk/instructions/mul.rb +121 -129
- data/lib/fisk/instructions/mulpd.rb +42 -44
- data/lib/fisk/instructions/mulps.rb +40 -42
- data/lib/fisk/instructions/mulsd.rb +42 -44
- data/lib/fisk/instructions/mulss.rb +42 -44
- data/lib/fisk/instructions/mulx.rb +67 -71
- data/lib/fisk/instructions/mwait.rb +14 -15
- data/lib/fisk/instructions/mwaitx.rb +14 -15
- data/lib/fisk/instructions/neg.rb +121 -129
- data/lib/fisk/instructions/nop.rb +12 -13
- data/lib/fisk/instructions/not.rb +121 -129
- data/lib/fisk/instructions/or.rb +561 -595
- data/lib/fisk/instructions/orpd.rb +42 -44
- data/lib/fisk/instructions/orps.rb +40 -42
- data/lib/fisk/instructions/pabsb.rb +83 -87
- data/lib/fisk/instructions/pabsd.rb +83 -87
- data/lib/fisk/instructions/pabsw.rb +83 -87
- data/lib/fisk/instructions/packssdw.rb +79 -83
- data/lib/fisk/instructions/packsswb.rb +79 -83
- data/lib/fisk/instructions/packusdw.rb +44 -46
- data/lib/fisk/instructions/packuswb.rb +79 -83
- data/lib/fisk/instructions/paddb.rb +79 -83
- data/lib/fisk/instructions/paddd.rb +79 -83
- data/lib/fisk/instructions/paddq.rb +79 -83
- data/lib/fisk/instructions/paddsb.rb +79 -83
- data/lib/fisk/instructions/paddsw.rb +79 -83
- data/lib/fisk/instructions/paddusb.rb +79 -83
- data/lib/fisk/instructions/paddusw.rb +79 -83
- data/lib/fisk/instructions/paddw.rb +79 -83
- data/lib/fisk/instructions/palignr.rb +91 -95
- data/lib/fisk/instructions/pand.rb +79 -83
- data/lib/fisk/instructions/pandn.rb +79 -83
- data/lib/fisk/instructions/pause.rb +13 -14
- data/lib/fisk/instructions/pavgb.rb +79 -83
- data/lib/fisk/instructions/pavgusb.rb +42 -44
- data/lib/fisk/instructions/pavgw.rb +79 -83
- data/lib/fisk/instructions/pblendvb.rb +46 -48
- data/lib/fisk/instructions/pblendw.rb +48 -50
- data/lib/fisk/instructions/pclmulqdq.rb +48 -50
- data/lib/fisk/instructions/pcmpeqb.rb +79 -83
- data/lib/fisk/instructions/pcmpeqd.rb +79 -83
- data/lib/fisk/instructions/pcmpeqq.rb +44 -46
- data/lib/fisk/instructions/pcmpeqw.rb +79 -83
- data/lib/fisk/instructions/pcmpestri.rb +48 -50
- data/lib/fisk/instructions/pcmpestrm.rb +48 -50
- data/lib/fisk/instructions/pcmpgtb.rb +79 -83
- data/lib/fisk/instructions/pcmpgtd.rb +79 -83
- data/lib/fisk/instructions/pcmpgtq.rb +44 -46
- data/lib/fisk/instructions/pcmpgtw.rb +79 -83
- data/lib/fisk/instructions/pcmpistri.rb +48 -50
- data/lib/fisk/instructions/pcmpistrm.rb +48 -50
- data/lib/fisk/instructions/pdep.rb +67 -71
- data/lib/fisk/instructions/pext.rb +67 -71
- data/lib/fisk/instructions/pextrb.rb +48 -50
- data/lib/fisk/instructions/pextrd.rb +48 -50
- data/lib/fisk/instructions/pextrq.rb +48 -50
- data/lib/fisk/instructions/pextrw.rb +83 -87
- data/lib/fisk/instructions/pf2id.rb +42 -44
- data/lib/fisk/instructions/pf2iw.rb +42 -44
- data/lib/fisk/instructions/pfacc.rb +42 -44
- data/lib/fisk/instructions/pfadd.rb +42 -44
- data/lib/fisk/instructions/pfcmpeq.rb +42 -44
- data/lib/fisk/instructions/pfcmpge.rb +42 -44
- data/lib/fisk/instructions/pfcmpgt.rb +42 -44
- data/lib/fisk/instructions/pfmax.rb +42 -44
- data/lib/fisk/instructions/pfmin.rb +42 -44
- data/lib/fisk/instructions/pfmul.rb +42 -44
- data/lib/fisk/instructions/pfnacc.rb +42 -44
- data/lib/fisk/instructions/pfpnacc.rb +42 -44
- data/lib/fisk/instructions/pfrcp.rb +42 -44
- data/lib/fisk/instructions/pfrcpit1.rb +42 -44
- data/lib/fisk/instructions/pfrcpit2.rb +42 -44
- data/lib/fisk/instructions/pfrsqit1.rb +42 -44
- data/lib/fisk/instructions/pfrsqrt.rb +42 -44
- data/lib/fisk/instructions/pfsub.rb +42 -44
- data/lib/fisk/instructions/pfsubr.rb +42 -44
- data/lib/fisk/instructions/phaddd.rb +83 -87
- data/lib/fisk/instructions/phaddsw.rb +83 -87
- data/lib/fisk/instructions/phaddw.rb +83 -87
- data/lib/fisk/instructions/phminposuw.rb +44 -46
- data/lib/fisk/instructions/phsubd.rb +83 -87
- data/lib/fisk/instructions/phsubsw.rb +83 -87
- data/lib/fisk/instructions/phsubw.rb +83 -87
- data/lib/fisk/instructions/pi2fd.rb +42 -44
- data/lib/fisk/instructions/pi2fw.rb +42 -44
- data/lib/fisk/instructions/pinsrb.rb +48 -50
- data/lib/fisk/instructions/pinsrd.rb +48 -50
- data/lib/fisk/instructions/pinsrq.rb +48 -50
- data/lib/fisk/instructions/pinsrw.rb +87 -91
- data/lib/fisk/instructions/pmaddubsw.rb +83 -87
- data/lib/fisk/instructions/pmaddwd.rb +79 -83
- data/lib/fisk/instructions/pmaxsb.rb +44 -46
- data/lib/fisk/instructions/pmaxsd.rb +44 -46
- data/lib/fisk/instructions/pmaxsw.rb +79 -83
- data/lib/fisk/instructions/pmaxub.rb +79 -83
- data/lib/fisk/instructions/pmaxud.rb +44 -46
- data/lib/fisk/instructions/pmaxuw.rb +44 -46
- data/lib/fisk/instructions/pminsb.rb +44 -46
- data/lib/fisk/instructions/pminsd.rb +44 -46
- data/lib/fisk/instructions/pminsw.rb +79 -83
- data/lib/fisk/instructions/pminub.rb +79 -83
- data/lib/fisk/instructions/pminud.rb +44 -46
- data/lib/fisk/instructions/pminuw.rb +44 -46
- data/lib/fisk/instructions/pmovmskb.rb +40 -42
- data/lib/fisk/instructions/pmovsxbd.rb +44 -46
- data/lib/fisk/instructions/pmovsxbq.rb +44 -46
- data/lib/fisk/instructions/pmovsxbw.rb +44 -46
- data/lib/fisk/instructions/pmovsxdq.rb +44 -46
- data/lib/fisk/instructions/pmovsxwd.rb +44 -46
- data/lib/fisk/instructions/pmovsxwq.rb +44 -46
- data/lib/fisk/instructions/pmovzxbd.rb +44 -46
- data/lib/fisk/instructions/pmovzxbq.rb +44 -46
- data/lib/fisk/instructions/pmovzxbw.rb +44 -46
- data/lib/fisk/instructions/pmovzxdq.rb +44 -46
- data/lib/fisk/instructions/pmovzxwd.rb +44 -46
- data/lib/fisk/instructions/pmovzxwq.rb +44 -46
- data/lib/fisk/instructions/pmuldq.rb +44 -46
- data/lib/fisk/instructions/pmulhrsw.rb +83 -87
- data/lib/fisk/instructions/pmulhrw.rb +42 -44
- data/lib/fisk/instructions/pmulhuw.rb +79 -83
- data/lib/fisk/instructions/pmulhw.rb +79 -83
- data/lib/fisk/instructions/pmulld.rb +44 -46
- data/lib/fisk/instructions/pmullw.rb +79 -83
- data/lib/fisk/instructions/pmuludq.rb +79 -83
- data/lib/fisk/instructions/pop.rb +80 -86
- data/lib/fisk/instructions/popcnt.rb +122 -128
- data/lib/fisk/instructions/por.rb +79 -83
- data/lib/fisk/instructions/prefetch.rb +19 -20
- data/lib/fisk/instructions/prefetchnta.rb +19 -20
- data/lib/fisk/instructions/prefetcht0.rb +19 -20
- data/lib/fisk/instructions/prefetcht1.rb +19 -20
- data/lib/fisk/instructions/prefetcht2.rb +19 -20
- data/lib/fisk/instructions/prefetchw.rb +19 -20
- data/lib/fisk/instructions/prefetchwt1.rb +19 -20
- data/lib/fisk/instructions/psadbw.rb +79 -83
- data/lib/fisk/instructions/pshufb.rb +83 -87
- data/lib/fisk/instructions/pshufd.rb +46 -48
- data/lib/fisk/instructions/pshufhw.rb +46 -48
- data/lib/fisk/instructions/pshuflw.rb +46 -48
- data/lib/fisk/instructions/pshufw.rb +44 -46
- data/lib/fisk/instructions/psignb.rb +83 -87
- data/lib/fisk/instructions/psignd.rb +83 -87
- data/lib/fisk/instructions/psignw.rb +83 -87
- data/lib/fisk/instructions/pslld.rb +114 -120
- data/lib/fisk/instructions/pslldq.rb +21 -22
- data/lib/fisk/instructions/psllq.rb +114 -120
- data/lib/fisk/instructions/psllw.rb +114 -120
- data/lib/fisk/instructions/psrad.rb +114 -120
- data/lib/fisk/instructions/psraw.rb +114 -120
- data/lib/fisk/instructions/psrld.rb +114 -120
- data/lib/fisk/instructions/psrldq.rb +21 -22
- data/lib/fisk/instructions/psrlq.rb +114 -120
- data/lib/fisk/instructions/psrlw.rb +114 -120
- data/lib/fisk/instructions/psubb.rb +79 -83
- data/lib/fisk/instructions/psubd.rb +79 -83
- data/lib/fisk/instructions/psubq.rb +79 -83
- data/lib/fisk/instructions/psubsb.rb +79 -83
- data/lib/fisk/instructions/psubsw.rb +79 -83
- data/lib/fisk/instructions/psubusb.rb +79 -83
- data/lib/fisk/instructions/psubusw.rb +79 -83
- data/lib/fisk/instructions/psubw.rb +79 -83
- data/lib/fisk/instructions/pswapd.rb +42 -44
- data/lib/fisk/instructions/ptest.rb +44 -46
- data/lib/fisk/instructions/punpckhbw.rb +79 -83
- data/lib/fisk/instructions/punpckhdq.rb +79 -83
- data/lib/fisk/instructions/punpckhqdq.rb +42 -44
- data/lib/fisk/instructions/punpckhwd.rb +79 -83
- data/lib/fisk/instructions/punpcklbw.rb +79 -83
- data/lib/fisk/instructions/punpckldq.rb +79 -83
- data/lib/fisk/instructions/punpcklqdq.rb +42 -44
- data/lib/fisk/instructions/punpcklwd.rb +79 -83
- data/lib/fisk/instructions/push.rb +102 -110
- data/lib/fisk/instructions/pxor.rb +79 -83
- data/lib/fisk/instructions/rcl.rb +389 -413
- data/lib/fisk/instructions/rcpps.rb +40 -42
- data/lib/fisk/instructions/rcpss.rb +42 -44
- data/lib/fisk/instructions/rcr.rb +389 -413
- data/lib/fisk/instructions/rdrand.rb +49 -52
- data/lib/fisk/instructions/rdseed.rb +49 -52
- data/lib/fisk/instructions/rdtsc.rb +13 -14
- data/lib/fisk/instructions/rdtscp.rb +14 -15
- data/lib/fisk/instructions/ret.rb +23 -25
- data/lib/fisk/instructions/rol.rb +389 -413
- data/lib/fisk/instructions/ror.rb +389 -413
- data/lib/fisk/instructions/rorx.rb +71 -75
- data/lib/fisk/instructions/roundpd.rb +48 -50
- data/lib/fisk/instructions/roundps.rb +48 -50
- data/lib/fisk/instructions/roundsd.rb +48 -50
- data/lib/fisk/instructions/roundss.rb +48 -50
- data/lib/fisk/instructions/rsqrtps.rb +40 -42
- data/lib/fisk/instructions/rsqrtss.rb +42 -44
- data/lib/fisk/instructions/sal.rb +389 -413
- data/lib/fisk/instructions/sar.rb +389 -413
- data/lib/fisk/instructions/sarx.rb +67 -71
- data/lib/fisk/instructions/sbb.rb +561 -595
- data/lib/fisk/instructions/seta.rb +34 -36
- data/lib/fisk/instructions/setae.rb +34 -36
- data/lib/fisk/instructions/setb.rb +34 -36
- data/lib/fisk/instructions/setbe.rb +34 -36
- data/lib/fisk/instructions/setc.rb +34 -36
- data/lib/fisk/instructions/sete.rb +34 -36
- data/lib/fisk/instructions/setg.rb +34 -36
- data/lib/fisk/instructions/setge.rb +34 -36
- data/lib/fisk/instructions/setl.rb +34 -36
- data/lib/fisk/instructions/setle.rb +34 -36
- data/lib/fisk/instructions/setna.rb +34 -36
- data/lib/fisk/instructions/setnae.rb +34 -36
- data/lib/fisk/instructions/setnb.rb +34 -36
- data/lib/fisk/instructions/setnbe.rb +34 -36
- data/lib/fisk/instructions/setnc.rb +34 -36
- data/lib/fisk/instructions/setne.rb +34 -36
- data/lib/fisk/instructions/setng.rb +34 -36
- data/lib/fisk/instructions/setnge.rb +34 -36
- data/lib/fisk/instructions/setnl.rb +34 -36
- data/lib/fisk/instructions/setnle.rb +34 -36
- data/lib/fisk/instructions/setno.rb +34 -36
- data/lib/fisk/instructions/setnp.rb +34 -36
- data/lib/fisk/instructions/setns.rb +34 -36
- data/lib/fisk/instructions/setnz.rb +34 -36
- data/lib/fisk/instructions/seto.rb +34 -36
- data/lib/fisk/instructions/setp.rb +34 -36
- data/lib/fisk/instructions/setpe.rb +34 -36
- data/lib/fisk/instructions/setpo.rb +34 -36
- data/lib/fisk/instructions/sets.rb +34 -36
- data/lib/fisk/instructions/setz.rb +34 -36
- data/lib/fisk/instructions/sfence.rb +14 -15
- data/lib/fisk/instructions/sha1msg1.rb +42 -44
- data/lib/fisk/instructions/sha1msg2.rb +42 -44
- data/lib/fisk/instructions/sha1nexte.rb +42 -44
- data/lib/fisk/instructions/sha1rnds4.rb +46 -48
- data/lib/fisk/instructions/sha256msg1.rb +42 -44
- data/lib/fisk/instructions/sha256msg2.rb +42 -44
- data/lib/fisk/instructions/sha256rnds2.rb +44 -46
- data/lib/fisk/instructions/shl.rb +389 -413
- data/lib/fisk/instructions/shld.rb +247 -259
- data/lib/fisk/instructions/shlx.rb +67 -71
- data/lib/fisk/instructions/shr.rb +389 -413
- data/lib/fisk/instructions/shrd.rb +247 -259
- data/lib/fisk/instructions/shrx.rb +67 -71
- data/lib/fisk/instructions/shufpd.rb +46 -48
- data/lib/fisk/instructions/shufps.rb +44 -46
- data/lib/fisk/instructions/sqrtpd.rb +42 -44
- data/lib/fisk/instructions/sqrtps.rb +40 -42
- data/lib/fisk/instructions/sqrtsd.rb +42 -44
- data/lib/fisk/instructions/sqrtss.rb +42 -44
- data/lib/fisk/instructions/stc.rb +12 -13
- data/lib/fisk/instructions/std.rb +12 -13
- data/lib/fisk/instructions/stmxcsr.rb +19 -20
- data/lib/fisk/instructions/sub.rb +561 -595
- data/lib/fisk/instructions/subpd.rb +42 -44
- data/lib/fisk/instructions/subps.rb +40 -42
- data/lib/fisk/instructions/subsd.rb +42 -44
- data/lib/fisk/instructions/subss.rb +42 -44
- data/lib/fisk/instructions/syscall.rb +13 -14
- data/lib/fisk/instructions/t1mskc.rb +59 -63
- data/lib/fisk/instructions/test.rb +334 -354
- data/lib/fisk/instructions/tzcnt.rb +122 -128
- data/lib/fisk/instructions/tzmsk.rb +59 -63
- data/lib/fisk/instructions/ucomisd.rb +42 -44
- data/lib/fisk/instructions/ucomiss.rb +40 -42
- data/lib/fisk/instructions/ud2.rb +13 -14
- data/lib/fisk/instructions/unpckhpd.rb +42 -44
- data/lib/fisk/instructions/unpckhps.rb +40 -42
- data/lib/fisk/instructions/unpcklpd.rb +42 -44
- data/lib/fisk/instructions/unpcklps.rb +40 -42
- data/lib/fisk/instructions/vaddpd.rb +164 -174
- data/lib/fisk/instructions/vaddps.rb +164 -174
- data/lib/fisk/instructions/vaddsd.rb +68 -72
- data/lib/fisk/instructions/vaddss.rb +68 -72
- data/lib/fisk/instructions/vaddsubpd.rb +67 -71
- data/lib/fisk/instructions/vaddsubps.rb +67 -71
- data/lib/fisk/instructions/vaesdec.rb +35 -37
- data/lib/fisk/instructions/vaesdeclast.rb +35 -37
- data/lib/fisk/instructions/vaesenc.rb +35 -37
- data/lib/fisk/instructions/vaesenclast.rb +35 -37
- data/lib/fisk/instructions/vaesimc.rb +33 -35
- data/lib/fisk/instructions/vaeskeygenassist.rb +37 -39
- data/lib/fisk/instructions/valignd.rb +111 -117
- data/lib/fisk/instructions/valignq.rb +111 -117
- data/lib/fisk/instructions/vandnpd.rb +163 -173
- data/lib/fisk/instructions/vandnps.rb +163 -173
- data/lib/fisk/instructions/vandpd.rb +163 -173
- data/lib/fisk/instructions/vandps.rb +163 -173
- data/lib/fisk/instructions/vblendmpd.rb +99 -105
- data/lib/fisk/instructions/vblendmps.rb +99 -105
- data/lib/fisk/instructions/vblendpd.rb +75 -79
- data/lib/fisk/instructions/vblendps.rb +75 -79
- data/lib/fisk/instructions/vblendvpd.rb +75 -79
- data/lib/fisk/instructions/vblendvps.rb +75 -79
- data/lib/fisk/instructions/vbroadcastf128.rb +18 -19
- data/lib/fisk/instructions/vbroadcastf32x2.rb +63 -67
- data/lib/fisk/instructions/vbroadcastf32x4.rb +33 -35
- data/lib/fisk/instructions/vbroadcastf32x8.rb +18 -19
- data/lib/fisk/instructions/vbroadcastf64x2.rb +33 -35
- data/lib/fisk/instructions/vbroadcastf64x4.rb +18 -19
- data/lib/fisk/instructions/vbroadcasti128.rb +18 -19
- data/lib/fisk/instructions/vbroadcasti32x2.rb +93 -99
- data/lib/fisk/instructions/vbroadcasti32x4.rb +33 -35
- data/lib/fisk/instructions/vbroadcasti32x8.rb +18 -19
- data/lib/fisk/instructions/vbroadcasti64x2.rb +33 -35
- data/lib/fisk/instructions/vbroadcasti64x4.rb +18 -19
- data/lib/fisk/instructions/vbroadcastsd.rb +93 -99
- data/lib/fisk/instructions/vbroadcastss.rb +123 -131
- data/lib/fisk/instructions/vcmppd.rb +184 -194
- data/lib/fisk/instructions/vcmpps.rb +184 -194
- data/lib/fisk/instructions/vcmpsd.rb +76 -80
- data/lib/fisk/instructions/vcmpss.rb +76 -80
- data/lib/fisk/instructions/vcomisd.rb +64 -68
- data/lib/fisk/instructions/vcomiss.rb +64 -68
- data/lib/fisk/instructions/vcompresspd.rb +93 -99
- data/lib/fisk/instructions/vcompressps.rb +93 -99
- data/lib/fisk/instructions/vcvtdq2pd.rb +153 -163
- data/lib/fisk/instructions/vcvtdq2ps.rb +154 -164
- data/lib/fisk/instructions/vcvtpd2dq.rb +154 -164
- data/lib/fisk/instructions/vcvtpd2ps.rb +154 -164
- data/lib/fisk/instructions/vcvtpd2qq.rb +94 -100
- data/lib/fisk/instructions/vcvtpd2udq.rb +94 -100
- data/lib/fisk/instructions/vcvtpd2uqq.rb +94 -100
- data/lib/fisk/instructions/vcvtph2ps.rb +154 -164
- data/lib/fisk/instructions/vcvtps2dq.rb +154 -164
- data/lib/fisk/instructions/vcvtps2pd.rb +154 -164
- data/lib/fisk/instructions/vcvtps2ph.rb +174 -184
- data/lib/fisk/instructions/vcvtps2qq.rb +94 -100
- data/lib/fisk/instructions/vcvtps2udq.rb +94 -100
- data/lib/fisk/instructions/vcvtps2uqq.rb +94 -100
- data/lib/fisk/instructions/vcvtqq2pd.rb +94 -100
- data/lib/fisk/instructions/vcvtqq2ps.rb +94 -100
- data/lib/fisk/instructions/vcvtsd2si.rb +125 -133
- data/lib/fisk/instructions/vcvtsd2ss.rb +68 -72
- data/lib/fisk/instructions/vcvtsd2usi.rb +65 -69
- data/lib/fisk/instructions/vcvtsi2sd.rb +132 -140
- data/lib/fisk/instructions/vcvtsi2ss.rb +133 -141
- data/lib/fisk/instructions/vcvtss2sd.rb +68 -72
- data/lib/fisk/instructions/vcvtss2si.rb +125 -133
- data/lib/fisk/instructions/vcvtss2usi.rb +65 -69
- data/lib/fisk/instructions/vcvttpd2dq.rb +154 -164
- data/lib/fisk/instructions/vcvttpd2qq.rb +94 -100
- data/lib/fisk/instructions/vcvttpd2udq.rb +94 -100
- data/lib/fisk/instructions/vcvttpd2uqq.rb +94 -100
- data/lib/fisk/instructions/vcvttps2dq.rb +154 -164
- data/lib/fisk/instructions/vcvttps2qq.rb +94 -100
- data/lib/fisk/instructions/vcvttps2udq.rb +94 -100
- data/lib/fisk/instructions/vcvttps2uqq.rb +94 -100
- data/lib/fisk/instructions/vcvttsd2si.rb +125 -133
- data/lib/fisk/instructions/vcvttsd2usi.rb +65 -69
- data/lib/fisk/instructions/vcvttss2si.rb +125 -133
- data/lib/fisk/instructions/vcvttss2usi.rb +65 -69
- data/lib/fisk/instructions/vcvtudq2pd.rb +93 -99
- data/lib/fisk/instructions/vcvtudq2ps.rb +94 -100
- data/lib/fisk/instructions/vcvtuqq2pd.rb +94 -100
- data/lib/fisk/instructions/vcvtuqq2ps.rb +94 -100
- data/lib/fisk/instructions/vcvtusi2sd.rb +68 -72
- data/lib/fisk/instructions/vcvtusi2ss.rb +69 -73
- data/lib/fisk/instructions/vdbpsadbw.rb +111 -117
- data/lib/fisk/instructions/vdivpd.rb +164 -174
- data/lib/fisk/instructions/vdivps.rb +164 -174
- data/lib/fisk/instructions/vdivsd.rb +68 -72
- data/lib/fisk/instructions/vdivss.rb +68 -72
- data/lib/fisk/instructions/vdppd.rb +39 -41
- data/lib/fisk/instructions/vdpps.rb +75 -79
- data/lib/fisk/instructions/vexp2pd.rb +34 -36
- data/lib/fisk/instructions/vexp2ps.rb +34 -36
- data/lib/fisk/instructions/vexpandpd.rb +93 -99
- data/lib/fisk/instructions/vexpandps.rb +93 -99
- data/lib/fisk/instructions/vextractf128.rb +37 -39
- data/lib/fisk/instructions/vextractf32x4.rb +71 -75
- data/lib/fisk/instructions/vextractf32x8.rb +37 -39
- data/lib/fisk/instructions/vextractf64x2.rb +71 -75
- data/lib/fisk/instructions/vextractf64x4.rb +37 -39
- data/lib/fisk/instructions/vextracti128.rb +37 -39
- data/lib/fisk/instructions/vextracti32x4.rb +71 -75
- data/lib/fisk/instructions/vextracti32x8.rb +37 -39
- data/lib/fisk/instructions/vextracti64x2.rb +71 -75
- data/lib/fisk/instructions/vextracti64x4.rb +37 -39
- data/lib/fisk/instructions/vextractps.rb +71 -75
- data/lib/fisk/instructions/vfixupimmpd.rb +112 -118
- data/lib/fisk/instructions/vfixupimmps.rb +112 -118
- data/lib/fisk/instructions/vfixupimmsd.rb +40 -42
- data/lib/fisk/instructions/vfixupimmss.rb +40 -42
- data/lib/fisk/instructions/vfmadd132pd.rb +164 -174
- data/lib/fisk/instructions/vfmadd132ps.rb +164 -174
- data/lib/fisk/instructions/vfmadd132sd.rb +68 -72
- data/lib/fisk/instructions/vfmadd132ss.rb +68 -72
- data/lib/fisk/instructions/vfmadd213pd.rb +164 -174
- data/lib/fisk/instructions/vfmadd213ps.rb +164 -174
- data/lib/fisk/instructions/vfmadd213sd.rb +68 -72
- data/lib/fisk/instructions/vfmadd213ss.rb +68 -72
- data/lib/fisk/instructions/vfmadd231pd.rb +164 -174
- data/lib/fisk/instructions/vfmadd231ps.rb +164 -174
- data/lib/fisk/instructions/vfmadd231sd.rb +68 -72
- data/lib/fisk/instructions/vfmadd231ss.rb +68 -72
- data/lib/fisk/instructions/vfmaddpd.rb +133 -141
- data/lib/fisk/instructions/vfmaddps.rb +133 -141
- data/lib/fisk/instructions/vfmaddsd.rb +68 -72
- data/lib/fisk/instructions/vfmaddss.rb +68 -72
- data/lib/fisk/instructions/vfmaddsub132pd.rb +164 -174
- data/lib/fisk/instructions/vfmaddsub132ps.rb +164 -174
- data/lib/fisk/instructions/vfmaddsub213pd.rb +164 -174
- data/lib/fisk/instructions/vfmaddsub213ps.rb +164 -174
- data/lib/fisk/instructions/vfmaddsub231pd.rb +164 -174
- data/lib/fisk/instructions/vfmaddsub231ps.rb +164 -174
- data/lib/fisk/instructions/vfmaddsubpd.rb +133 -141
- data/lib/fisk/instructions/vfmaddsubps.rb +133 -141
- data/lib/fisk/instructions/vfmsub132pd.rb +164 -174
- data/lib/fisk/instructions/vfmsub132ps.rb +164 -174
- data/lib/fisk/instructions/vfmsub132sd.rb +68 -72
- data/lib/fisk/instructions/vfmsub132ss.rb +68 -72
- data/lib/fisk/instructions/vfmsub213pd.rb +164 -174
- data/lib/fisk/instructions/vfmsub213ps.rb +164 -174
- data/lib/fisk/instructions/vfmsub213sd.rb +68 -72
- data/lib/fisk/instructions/vfmsub213ss.rb +68 -72
- data/lib/fisk/instructions/vfmsub231pd.rb +164 -174
- data/lib/fisk/instructions/vfmsub231ps.rb +164 -174
- data/lib/fisk/instructions/vfmsub231sd.rb +68 -72
- data/lib/fisk/instructions/vfmsub231ss.rb +68 -72
- data/lib/fisk/instructions/vfmsubadd132pd.rb +164 -174
- data/lib/fisk/instructions/vfmsubadd132ps.rb +164 -174
- data/lib/fisk/instructions/vfmsubadd213pd.rb +164 -174
- data/lib/fisk/instructions/vfmsubadd213ps.rb +164 -174
- data/lib/fisk/instructions/vfmsubadd231pd.rb +164 -174
- data/lib/fisk/instructions/vfmsubadd231ps.rb +164 -174
- data/lib/fisk/instructions/vfmsubaddpd.rb +133 -141
- data/lib/fisk/instructions/vfmsubaddps.rb +133 -141
- data/lib/fisk/instructions/vfmsubpd.rb +133 -141
- data/lib/fisk/instructions/vfmsubps.rb +133 -141
- data/lib/fisk/instructions/vfmsubsd.rb +68 -72
- data/lib/fisk/instructions/vfmsubss.rb +68 -72
- data/lib/fisk/instructions/vfnmadd132pd.rb +164 -174
- data/lib/fisk/instructions/vfnmadd132ps.rb +164 -174
- data/lib/fisk/instructions/vfnmadd132sd.rb +68 -72
- data/lib/fisk/instructions/vfnmadd132ss.rb +68 -72
- data/lib/fisk/instructions/vfnmadd213pd.rb +164 -174
- data/lib/fisk/instructions/vfnmadd213ps.rb +164 -174
- data/lib/fisk/instructions/vfnmadd213sd.rb +68 -72
- data/lib/fisk/instructions/vfnmadd213ss.rb +68 -72
- data/lib/fisk/instructions/vfnmadd231pd.rb +164 -174
- data/lib/fisk/instructions/vfnmadd231ps.rb +164 -174
- data/lib/fisk/instructions/vfnmadd231sd.rb +68 -72
- data/lib/fisk/instructions/vfnmadd231ss.rb +68 -72
- data/lib/fisk/instructions/vfnmaddpd.rb +133 -141
- data/lib/fisk/instructions/vfnmaddps.rb +133 -141
- data/lib/fisk/instructions/vfnmaddsd.rb +68 -72
- data/lib/fisk/instructions/vfnmaddss.rb +68 -72
- data/lib/fisk/instructions/vfnmsub132pd.rb +164 -174
- data/lib/fisk/instructions/vfnmsub132ps.rb +164 -174
- data/lib/fisk/instructions/vfnmsub132sd.rb +68 -72
- data/lib/fisk/instructions/vfnmsub132ss.rb +68 -72
- data/lib/fisk/instructions/vfnmsub213pd.rb +164 -174
- data/lib/fisk/instructions/vfnmsub213ps.rb +164 -174
- data/lib/fisk/instructions/vfnmsub213sd.rb +68 -72
- data/lib/fisk/instructions/vfnmsub213ss.rb +68 -72
- data/lib/fisk/instructions/vfnmsub231pd.rb +164 -174
- data/lib/fisk/instructions/vfnmsub231ps.rb +164 -174
- data/lib/fisk/instructions/vfnmsub231sd.rb +68 -72
- data/lib/fisk/instructions/vfnmsub231ss.rb +68 -72
- data/lib/fisk/instructions/vfnmsubpd.rb +133 -141
- data/lib/fisk/instructions/vfnmsubps.rb +133 -141
- data/lib/fisk/instructions/vfnmsubsd.rb +68 -72
- data/lib/fisk/instructions/vfnmsubss.rb +68 -72
- data/lib/fisk/instructions/vfpclasspd.rb +105 -111
- data/lib/fisk/instructions/vfpclassps.rb +105 -111
- data/lib/fisk/instructions/vfpclasssd.rb +37 -39
- data/lib/fisk/instructions/vfpclassss.rb +37 -39
- data/lib/fisk/instructions/vfrczpd.rb +63 -67
- data/lib/fisk/instructions/vfrczps.rb +63 -67
- data/lib/fisk/instructions/vfrczsd.rb +33 -35
- data/lib/fisk/instructions/vfrczss.rb +33 -35
- data/lib/fisk/instructions/vgatherdpd.rb +80 -85
- data/lib/fisk/instructions/vgatherdps.rb +80 -85
- data/lib/fisk/instructions/vgatherpf0dpd.rb +16 -17
- data/lib/fisk/instructions/vgatherpf0dps.rb +16 -17
- data/lib/fisk/instructions/vgatherpf0qpd.rb +16 -17
- data/lib/fisk/instructions/vgatherpf0qps.rb +16 -17
- data/lib/fisk/instructions/vgatherpf1dpd.rb +16 -17
- data/lib/fisk/instructions/vgatherpf1dps.rb +16 -17
- data/lib/fisk/instructions/vgatherpf1qpd.rb +16 -17
- data/lib/fisk/instructions/vgatherpf1qps.rb +16 -17
- data/lib/fisk/instructions/vgatherqpd.rb +80 -85
- data/lib/fisk/instructions/vgatherqps.rb +80 -85
- data/lib/fisk/instructions/vgetexppd.rb +94 -100
- data/lib/fisk/instructions/vgetexpps.rb +94 -100
- data/lib/fisk/instructions/vgetexpsd.rb +36 -38
- data/lib/fisk/instructions/vgetexpss.rb +36 -38
- data/lib/fisk/instructions/vgetmantpd.rb +106 -112
- data/lib/fisk/instructions/vgetmantps.rb +106 -112
- data/lib/fisk/instructions/vgetmantsd.rb +40 -42
- data/lib/fisk/instructions/vgetmantss.rb +40 -42
- data/lib/fisk/instructions/vhaddpd.rb +67 -71
- data/lib/fisk/instructions/vhaddps.rb +67 -71
- data/lib/fisk/instructions/vhsubpd.rb +67 -71
- data/lib/fisk/instructions/vhsubps.rb +67 -71
- data/lib/fisk/instructions/vinsertf128.rb +39 -41
- data/lib/fisk/instructions/vinsertf32x4.rb +75 -79
- data/lib/fisk/instructions/vinsertf32x8.rb +39 -41
- data/lib/fisk/instructions/vinsertf64x2.rb +75 -79
- data/lib/fisk/instructions/vinsertf64x4.rb +39 -41
- data/lib/fisk/instructions/vinserti128.rb +39 -41
- data/lib/fisk/instructions/vinserti32x4.rb +75 -79
- data/lib/fisk/instructions/vinserti32x8.rb +39 -41
- data/lib/fisk/instructions/vinserti64x2.rb +75 -79
- data/lib/fisk/instructions/vinserti64x4.rb +39 -41
- data/lib/fisk/instructions/vinsertps.rb +75 -79
- data/lib/fisk/instructions/vlddqu.rb +33 -35
- data/lib/fisk/instructions/vldmxcsr.rb +16 -17
- data/lib/fisk/instructions/vmaskmovdqu.rb +18 -19
- data/lib/fisk/instructions/vmaskmovpd.rb +67 -71
- data/lib/fisk/instructions/vmaskmovps.rb +67 -71
- data/lib/fisk/instructions/vmaxpd.rb +164 -174
- data/lib/fisk/instructions/vmaxps.rb +164 -174
- data/lib/fisk/instructions/vmaxsd.rb +68 -72
- data/lib/fisk/instructions/vmaxss.rb +68 -72
- data/lib/fisk/instructions/vminpd.rb +164 -174
- data/lib/fisk/instructions/vminps.rb +164 -174
- data/lib/fisk/instructions/vminsd.rb +68 -72
- data/lib/fisk/instructions/vminss.rb +68 -72
- data/lib/fisk/instructions/vmovapd.rb +278 -298
- data/lib/fisk/instructions/vmovaps.rb +278 -298
- data/lib/fisk/instructions/vmovd.rb +123 -131
- data/lib/fisk/instructions/vmovddup.rb +153 -163
- data/lib/fisk/instructions/vmovdqa.rb +113 -121
- data/lib/fisk/instructions/vmovdqa32.rb +168 -180
- data/lib/fisk/instructions/vmovdqa64.rb +168 -180
- data/lib/fisk/instructions/vmovdqu.rb +113 -121
- data/lib/fisk/instructions/vmovdqu16.rb +168 -180
- data/lib/fisk/instructions/vmovdqu32.rb +168 -180
- data/lib/fisk/instructions/vmovdqu64.rb +168 -180
- data/lib/fisk/instructions/vmovdqu8.rb +168 -180
- data/lib/fisk/instructions/vmovhlps.rb +35 -37
- data/lib/fisk/instructions/vmovhpd.rb +65 -69
- data/lib/fisk/instructions/vmovhps.rb +65 -69
- data/lib/fisk/instructions/vmovlhps.rb +35 -37
- data/lib/fisk/instructions/vmovlpd.rb +65 -69
- data/lib/fisk/instructions/vmovlps.rb +65 -69
- data/lib/fisk/instructions/vmovmskpd.rb +33 -35
- data/lib/fisk/instructions/vmovmskps.rb +33 -35
- data/lib/fisk/instructions/vmovntdq.rb +78 -83
- data/lib/fisk/instructions/vmovntdqa.rb +78 -83
- data/lib/fisk/instructions/vmovntpd.rb +78 -83
- data/lib/fisk/instructions/vmovntps.rb +78 -83
- data/lib/fisk/instructions/vmovq.rb +213 -229
- data/lib/fisk/instructions/vmovsd.rb +115 -123
- data/lib/fisk/instructions/vmovshdup.rb +153 -163
- data/lib/fisk/instructions/vmovsldup.rb +153 -163
- data/lib/fisk/instructions/vmovss.rb +115 -123
- data/lib/fisk/instructions/vmovupd.rb +278 -298
- data/lib/fisk/instructions/vmovups.rb +278 -298
- data/lib/fisk/instructions/vmpsadbw.rb +75 -79
- data/lib/fisk/instructions/vmulpd.rb +164 -174
- data/lib/fisk/instructions/vmulps.rb +164 -174
- data/lib/fisk/instructions/vmulsd.rb +68 -72
- data/lib/fisk/instructions/vmulss.rb +68 -72
- data/lib/fisk/instructions/vorpd.rb +163 -173
- data/lib/fisk/instructions/vorps.rb +163 -173
- data/lib/fisk/instructions/vpabsb.rb +153 -163
- data/lib/fisk/instructions/vpabsd.rb +153 -163
- data/lib/fisk/instructions/vpabsq.rb +93 -99
- data/lib/fisk/instructions/vpabsw.rb +153 -163
- data/lib/fisk/instructions/vpackssdw.rb +163 -173
- data/lib/fisk/instructions/vpacksswb.rb +163 -173
- data/lib/fisk/instructions/vpackusdw.rb +163 -173
- data/lib/fisk/instructions/vpackuswb.rb +163 -173
- data/lib/fisk/instructions/vpaddb.rb +163 -173
- data/lib/fisk/instructions/vpaddd.rb +163 -173
- data/lib/fisk/instructions/vpaddq.rb +163 -173
- data/lib/fisk/instructions/vpaddsb.rb +163 -173
- data/lib/fisk/instructions/vpaddsw.rb +163 -173
- data/lib/fisk/instructions/vpaddusb.rb +163 -173
- data/lib/fisk/instructions/vpaddusw.rb +163 -173
- data/lib/fisk/instructions/vpaddw.rb +163 -173
- data/lib/fisk/instructions/vpalignr.rb +183 -193
- data/lib/fisk/instructions/vpand.rb +67 -71
- data/lib/fisk/instructions/vpandd.rb +99 -105
- data/lib/fisk/instructions/vpandn.rb +67 -71
- data/lib/fisk/instructions/vpandnd.rb +99 -105
- data/lib/fisk/instructions/vpandnq.rb +99 -105
- data/lib/fisk/instructions/vpandq.rb +99 -105
- data/lib/fisk/instructions/vpavgb.rb +163 -173
- data/lib/fisk/instructions/vpavgw.rb +163 -173
- data/lib/fisk/instructions/vpblendd.rb +75 -79
- data/lib/fisk/instructions/vpblendmb.rb +99 -105
- data/lib/fisk/instructions/vpblendmd.rb +99 -105
- data/lib/fisk/instructions/vpblendmq.rb +99 -105
- data/lib/fisk/instructions/vpblendmw.rb +99 -105
- data/lib/fisk/instructions/vpblendvb.rb +75 -79
- data/lib/fisk/instructions/vpblendw.rb +75 -79
- data/lib/fisk/instructions/vpbroadcastb.rb +198 -211
- data/lib/fisk/instructions/vpbroadcastd.rb +198 -211
- data/lib/fisk/instructions/vpbroadcastmb2q.rb +48 -51
- data/lib/fisk/instructions/vpbroadcastmw2d.rb +48 -51
- data/lib/fisk/instructions/vpbroadcastq.rb +198 -211
- data/lib/fisk/instructions/vpbroadcastw.rb +198 -211
- data/lib/fisk/instructions/vpclmulqdq.rb +39 -41
- data/lib/fisk/instructions/vpcmov.rb +133 -141
- data/lib/fisk/instructions/vpcmpb.rb +111 -117
- data/lib/fisk/instructions/vpcmpd.rb +111 -117
- data/lib/fisk/instructions/vpcmpeqb.rb +163 -173
- data/lib/fisk/instructions/vpcmpeqd.rb +163 -173
- data/lib/fisk/instructions/vpcmpeqq.rb +163 -173
- data/lib/fisk/instructions/vpcmpeqw.rb +163 -173
- data/lib/fisk/instructions/vpcmpestri.rb +37 -39
- data/lib/fisk/instructions/vpcmpestrm.rb +37 -39
- data/lib/fisk/instructions/vpcmpgtb.rb +163 -173
- data/lib/fisk/instructions/vpcmpgtd.rb +163 -173
- data/lib/fisk/instructions/vpcmpgtq.rb +163 -173
- data/lib/fisk/instructions/vpcmpgtw.rb +163 -173
- data/lib/fisk/instructions/vpcmpistri.rb +37 -39
- data/lib/fisk/instructions/vpcmpistrm.rb +37 -39
- data/lib/fisk/instructions/vpcmpq.rb +111 -117
- data/lib/fisk/instructions/vpcmpub.rb +111 -117
- data/lib/fisk/instructions/vpcmpud.rb +111 -117
- data/lib/fisk/instructions/vpcmpuq.rb +111 -117
- data/lib/fisk/instructions/vpcmpuw.rb +111 -117
- data/lib/fisk/instructions/vpcmpw.rb +111 -117
- data/lib/fisk/instructions/vpcomb.rb +39 -41
- data/lib/fisk/instructions/vpcomd.rb +39 -41
- data/lib/fisk/instructions/vpcompressd.rb +93 -99
- data/lib/fisk/instructions/vpcompressq.rb +93 -99
- data/lib/fisk/instructions/vpcomq.rb +39 -41
- data/lib/fisk/instructions/vpcomub.rb +39 -41
- data/lib/fisk/instructions/vpcomud.rb +39 -41
- data/lib/fisk/instructions/vpcomuq.rb +39 -41
- data/lib/fisk/instructions/vpcomuw.rb +39 -41
- data/lib/fisk/instructions/vpcomw.rb +39 -41
- data/lib/fisk/instructions/vpconflictd.rb +93 -99
- data/lib/fisk/instructions/vpconflictq.rb +93 -99
- data/lib/fisk/instructions/vperm2f128.rb +39 -41
- data/lib/fisk/instructions/vperm2i128.rb +39 -41
- data/lib/fisk/instructions/vpermb.rb +99 -105
- data/lib/fisk/instructions/vpermd.rb +99 -105
- data/lib/fisk/instructions/vpermi2b.rb +99 -105
- data/lib/fisk/instructions/vpermi2d.rb +99 -105
- data/lib/fisk/instructions/vpermi2pd.rb +99 -105
- data/lib/fisk/instructions/vpermi2ps.rb +99 -105
- data/lib/fisk/instructions/vpermi2q.rb +99 -105
- data/lib/fisk/instructions/vpermi2w.rb +99 -105
- data/lib/fisk/instructions/vpermil2pd.rb +139 -147
- data/lib/fisk/instructions/vpermil2ps.rb +139 -147
- data/lib/fisk/instructions/vpermilpd.rb +333 -353
- data/lib/fisk/instructions/vpermilps.rb +333 -353
- data/lib/fisk/instructions/vpermpd.rb +169 -179
- data/lib/fisk/instructions/vpermps.rb +99 -105
- data/lib/fisk/instructions/vpermq.rb +169 -179
- data/lib/fisk/instructions/vpermt2b.rb +99 -105
- data/lib/fisk/instructions/vpermt2d.rb +99 -105
- data/lib/fisk/instructions/vpermt2pd.rb +99 -105
- data/lib/fisk/instructions/vpermt2ps.rb +99 -105
- data/lib/fisk/instructions/vpermt2q.rb +99 -105
- data/lib/fisk/instructions/vpermt2w.rb +99 -105
- data/lib/fisk/instructions/vpermw.rb +99 -105
- data/lib/fisk/instructions/vpexpandd.rb +93 -99
- data/lib/fisk/instructions/vpexpandq.rb +93 -99
- data/lib/fisk/instructions/vpextrb.rb +71 -75
- data/lib/fisk/instructions/vpextrd.rb +71 -75
- data/lib/fisk/instructions/vpextrq.rb +71 -75
- data/lib/fisk/instructions/vpextrw.rb +93 -99
- data/lib/fisk/instructions/vpgatherdd.rb +80 -85
- data/lib/fisk/instructions/vpgatherdq.rb +80 -85
- data/lib/fisk/instructions/vpgatherqd.rb +80 -85
- data/lib/fisk/instructions/vpgatherqq.rb +80 -85
- data/lib/fisk/instructions/vphaddbd.rb +33 -35
- data/lib/fisk/instructions/vphaddbq.rb +33 -35
- data/lib/fisk/instructions/vphaddbw.rb +33 -35
- data/lib/fisk/instructions/vphaddd.rb +67 -71
- data/lib/fisk/instructions/vphadddq.rb +33 -35
- data/lib/fisk/instructions/vphaddsw.rb +67 -71
- data/lib/fisk/instructions/vphaddubd.rb +33 -35
- data/lib/fisk/instructions/vphaddubq.rb +33 -35
- data/lib/fisk/instructions/vphaddubw.rb +33 -35
- data/lib/fisk/instructions/vphaddudq.rb +33 -35
- data/lib/fisk/instructions/vphadduwd.rb +33 -35
- data/lib/fisk/instructions/vphadduwq.rb +33 -35
- data/lib/fisk/instructions/vphaddw.rb +67 -71
- data/lib/fisk/instructions/vphaddwd.rb +33 -35
- data/lib/fisk/instructions/vphaddwq.rb +33 -35
- data/lib/fisk/instructions/vphminposuw.rb +33 -35
- data/lib/fisk/instructions/vphsubbw.rb +33 -35
- data/lib/fisk/instructions/vphsubd.rb +67 -71
- data/lib/fisk/instructions/vphsubdq.rb +33 -35
- data/lib/fisk/instructions/vphsubsw.rb +67 -71
- data/lib/fisk/instructions/vphsubw.rb +67 -71
- data/lib/fisk/instructions/vphsubwd.rb +33 -35
- data/lib/fisk/instructions/vpinsrb.rb +75 -79
- data/lib/fisk/instructions/vpinsrd.rb +75 -79
- data/lib/fisk/instructions/vpinsrq.rb +75 -79
- data/lib/fisk/instructions/vpinsrw.rb +75 -79
- data/lib/fisk/instructions/vplzcntd.rb +93 -99
- data/lib/fisk/instructions/vplzcntq.rb +93 -99
- data/lib/fisk/instructions/vpmacsdd.rb +39 -41
- data/lib/fisk/instructions/vpmacsdqh.rb +39 -41
- data/lib/fisk/instructions/vpmacsdql.rb +39 -41
- data/lib/fisk/instructions/vpmacssdd.rb +39 -41
- data/lib/fisk/instructions/vpmacssdqh.rb +39 -41
- data/lib/fisk/instructions/vpmacssdql.rb +39 -41
- data/lib/fisk/instructions/vpmacsswd.rb +39 -41
- data/lib/fisk/instructions/vpmacssww.rb +39 -41
- data/lib/fisk/instructions/vpmacswd.rb +39 -41
- data/lib/fisk/instructions/vpmacsww.rb +39 -41
- data/lib/fisk/instructions/vpmadcsswd.rb +39 -41
- data/lib/fisk/instructions/vpmadcswd.rb +39 -41
- data/lib/fisk/instructions/vpmadd52huq.rb +99 -105
- data/lib/fisk/instructions/vpmadd52luq.rb +99 -105
- data/lib/fisk/instructions/vpmaddubsw.rb +163 -173
- data/lib/fisk/instructions/vpmaddwd.rb +163 -173
- data/lib/fisk/instructions/vpmaskmovd.rb +67 -71
- data/lib/fisk/instructions/vpmaskmovq.rb +67 -71
- data/lib/fisk/instructions/vpmaxsb.rb +163 -173
- data/lib/fisk/instructions/vpmaxsd.rb +163 -173
- data/lib/fisk/instructions/vpmaxsq.rb +99 -105
- data/lib/fisk/instructions/vpmaxsw.rb +163 -173
- data/lib/fisk/instructions/vpmaxub.rb +163 -173
- data/lib/fisk/instructions/vpmaxud.rb +163 -173
- data/lib/fisk/instructions/vpmaxuq.rb +99 -105
- data/lib/fisk/instructions/vpmaxuw.rb +163 -173
- data/lib/fisk/instructions/vpminsb.rb +163 -173
- data/lib/fisk/instructions/vpminsd.rb +163 -173
- data/lib/fisk/instructions/vpminsq.rb +99 -105
- data/lib/fisk/instructions/vpminsw.rb +163 -173
- data/lib/fisk/instructions/vpminub.rb +163 -173
- data/lib/fisk/instructions/vpminud.rb +163 -173
- data/lib/fisk/instructions/vpminuq.rb +99 -105
- data/lib/fisk/instructions/vpminuw.rb +163 -173
- data/lib/fisk/instructions/vpmovb2m.rb +48 -51
- data/lib/fisk/instructions/vpmovd2m.rb +48 -51
- data/lib/fisk/instructions/vpmovdb.rb +93 -99
- data/lib/fisk/instructions/vpmovdw.rb +93 -99
- data/lib/fisk/instructions/vpmovm2b.rb +48 -51
- data/lib/fisk/instructions/vpmovm2d.rb +48 -51
- data/lib/fisk/instructions/vpmovm2q.rb +48 -51
- data/lib/fisk/instructions/vpmovm2w.rb +48 -51
- data/lib/fisk/instructions/vpmovmskb.rb +33 -35
- data/lib/fisk/instructions/vpmovq2m.rb +48 -51
- data/lib/fisk/instructions/vpmovqb.rb +93 -99
- data/lib/fisk/instructions/vpmovqd.rb +93 -99
- data/lib/fisk/instructions/vpmovqw.rb +93 -99
- data/lib/fisk/instructions/vpmovsdb.rb +93 -99
- data/lib/fisk/instructions/vpmovsdw.rb +93 -99
- data/lib/fisk/instructions/vpmovsqb.rb +93 -99
- data/lib/fisk/instructions/vpmovsqd.rb +93 -99
- data/lib/fisk/instructions/vpmovsqw.rb +93 -99
- data/lib/fisk/instructions/vpmovswb.rb +93 -99
- data/lib/fisk/instructions/vpmovsxbd.rb +153 -163
- data/lib/fisk/instructions/vpmovsxbq.rb +153 -163
- data/lib/fisk/instructions/vpmovsxbw.rb +153 -163
- data/lib/fisk/instructions/vpmovsxdq.rb +153 -163
- data/lib/fisk/instructions/vpmovsxwd.rb +153 -163
- data/lib/fisk/instructions/vpmovsxwq.rb +153 -163
- data/lib/fisk/instructions/vpmovusdb.rb +93 -99
- data/lib/fisk/instructions/vpmovusdw.rb +93 -99
- data/lib/fisk/instructions/vpmovusqb.rb +93 -99
- data/lib/fisk/instructions/vpmovusqd.rb +93 -99
- data/lib/fisk/instructions/vpmovusqw.rb +93 -99
- data/lib/fisk/instructions/vpmovuswb.rb +93 -99
- data/lib/fisk/instructions/vpmovw2m.rb +48 -51
- data/lib/fisk/instructions/vpmovwb.rb +93 -99
- data/lib/fisk/instructions/vpmovzxbd.rb +153 -163
- data/lib/fisk/instructions/vpmovzxbq.rb +153 -163
- data/lib/fisk/instructions/vpmovzxbw.rb +153 -163
- data/lib/fisk/instructions/vpmovzxdq.rb +153 -163
- data/lib/fisk/instructions/vpmovzxwd.rb +153 -163
- data/lib/fisk/instructions/vpmovzxwq.rb +153 -163
- data/lib/fisk/instructions/vpmuldq.rb +163 -173
- data/lib/fisk/instructions/vpmulhrsw.rb +163 -173
- data/lib/fisk/instructions/vpmulhuw.rb +163 -173
- data/lib/fisk/instructions/vpmulhw.rb +163 -173
- data/lib/fisk/instructions/vpmulld.rb +163 -173
- data/lib/fisk/instructions/vpmullq.rb +99 -105
- data/lib/fisk/instructions/vpmullw.rb +163 -173
- data/lib/fisk/instructions/vpmultishiftqb.rb +99 -105
- data/lib/fisk/instructions/vpmuludq.rb +163 -173
- data/lib/fisk/instructions/vpopcntd.rb +33 -35
- data/lib/fisk/instructions/vpopcntq.rb +33 -35
- data/lib/fisk/instructions/vpor.rb +67 -71
- data/lib/fisk/instructions/vpord.rb +99 -105
- data/lib/fisk/instructions/vporq.rb +99 -105
- data/lib/fisk/instructions/vpperm.rb +68 -72
- data/lib/fisk/instructions/vprold.rb +99 -105
- data/lib/fisk/instructions/vprolq.rb +99 -105
- data/lib/fisk/instructions/vprolvd.rb +99 -105
- data/lib/fisk/instructions/vprolvq.rb +99 -105
- data/lib/fisk/instructions/vprord.rb +99 -105
- data/lib/fisk/instructions/vprorq.rb +99 -105
- data/lib/fisk/instructions/vprorvd.rb +99 -105
- data/lib/fisk/instructions/vprorvq.rb +99 -105
- data/lib/fisk/instructions/vprotb.rb +95 -101
- data/lib/fisk/instructions/vprotd.rb +95 -101
- data/lib/fisk/instructions/vprotq.rb +95 -101
- data/lib/fisk/instructions/vprotw.rb +95 -101
- data/lib/fisk/instructions/vpsadbw.rb +163 -173
- data/lib/fisk/instructions/vpscatterdd.rb +48 -51
- data/lib/fisk/instructions/vpscatterdq.rb +48 -51
- data/lib/fisk/instructions/vpscatterqd.rb +48 -51
- data/lib/fisk/instructions/vpscatterqq.rb +48 -51
- data/lib/fisk/instructions/vpshab.rb +61 -65
- data/lib/fisk/instructions/vpshad.rb +61 -65
- data/lib/fisk/instructions/vpshaq.rb +61 -65
- data/lib/fisk/instructions/vpshaw.rb +61 -65
- data/lib/fisk/instructions/vpshlb.rb +61 -65
- data/lib/fisk/instructions/vpshld.rb +61 -65
- data/lib/fisk/instructions/vpshlq.rb +61 -65
- data/lib/fisk/instructions/vpshlw.rb +61 -65
- data/lib/fisk/instructions/vpshufb.rb +163 -173
- data/lib/fisk/instructions/vpshufd.rb +173 -183
- data/lib/fisk/instructions/vpshufhw.rb +173 -183
- data/lib/fisk/instructions/vpshuflw.rb +173 -183
- data/lib/fisk/instructions/vpsignb.rb +67 -71
- data/lib/fisk/instructions/vpsignd.rb +67 -71
- data/lib/fisk/instructions/vpsignw.rb +67 -71
- data/lib/fisk/instructions/vpslld.rb +291 -309
- data/lib/fisk/instructions/vpslldq.rb +131 -139
- data/lib/fisk/instructions/vpsllq.rb +291 -309
- data/lib/fisk/instructions/vpsllvd.rb +163 -173
- data/lib/fisk/instructions/vpsllvq.rb +163 -173
- data/lib/fisk/instructions/vpsllvw.rb +99 -105
- data/lib/fisk/instructions/vpsllw.rb +291 -309
- data/lib/fisk/instructions/vpsrad.rb +291 -309
- data/lib/fisk/instructions/vpsraq.rb +195 -207
- data/lib/fisk/instructions/vpsravd.rb +163 -173
- data/lib/fisk/instructions/vpsravq.rb +99 -105
- data/lib/fisk/instructions/vpsravw.rb +99 -105
- data/lib/fisk/instructions/vpsraw.rb +291 -309
- data/lib/fisk/instructions/vpsrld.rb +291 -309
- data/lib/fisk/instructions/vpsrldq.rb +131 -139
- data/lib/fisk/instructions/vpsrlq.rb +291 -309
- data/lib/fisk/instructions/vpsrlvd.rb +163 -173
- data/lib/fisk/instructions/vpsrlvq.rb +163 -173
- data/lib/fisk/instructions/vpsrlvw.rb +99 -105
- data/lib/fisk/instructions/vpsrlw.rb +291 -309
- data/lib/fisk/instructions/vpsubb.rb +163 -173
- data/lib/fisk/instructions/vpsubd.rb +163 -173
- data/lib/fisk/instructions/vpsubq.rb +163 -173
- data/lib/fisk/instructions/vpsubsb.rb +163 -173
- data/lib/fisk/instructions/vpsubsw.rb +163 -173
- data/lib/fisk/instructions/vpsubusb.rb +163 -173
- data/lib/fisk/instructions/vpsubusw.rb +163 -173
- data/lib/fisk/instructions/vpsubw.rb +163 -173
- data/lib/fisk/instructions/vpternlogd.rb +111 -117
- data/lib/fisk/instructions/vpternlogq.rb +111 -117
- data/lib/fisk/instructions/vptest.rb +63 -67
- data/lib/fisk/instructions/vptestmb.rb +99 -105
- data/lib/fisk/instructions/vptestmd.rb +99 -105
- data/lib/fisk/instructions/vptestmq.rb +99 -105
- data/lib/fisk/instructions/vptestmw.rb +99 -105
- data/lib/fisk/instructions/vptestnmb.rb +99 -105
- data/lib/fisk/instructions/vptestnmd.rb +99 -105
- data/lib/fisk/instructions/vptestnmq.rb +99 -105
- data/lib/fisk/instructions/vptestnmw.rb +99 -105
- data/lib/fisk/instructions/vpunpckhbw.rb +163 -173
- data/lib/fisk/instructions/vpunpckhdq.rb +163 -173
- data/lib/fisk/instructions/vpunpckhqdq.rb +163 -173
- data/lib/fisk/instructions/vpunpckhwd.rb +163 -173
- data/lib/fisk/instructions/vpunpcklbw.rb +163 -173
- data/lib/fisk/instructions/vpunpckldq.rb +163 -173
- data/lib/fisk/instructions/vpunpcklqdq.rb +163 -173
- data/lib/fisk/instructions/vpunpcklwd.rb +163 -173
- data/lib/fisk/instructions/vpxor.rb +67 -71
- data/lib/fisk/instructions/vpxord.rb +99 -105
- data/lib/fisk/instructions/vpxorq.rb +99 -105
- data/lib/fisk/instructions/vrangepd.rb +112 -118
- data/lib/fisk/instructions/vrangeps.rb +112 -118
- data/lib/fisk/instructions/vrangesd.rb +40 -42
- data/lib/fisk/instructions/vrangess.rb +40 -42
- data/lib/fisk/instructions/vrcp14pd.rb +93 -99
- data/lib/fisk/instructions/vrcp14ps.rb +93 -99
- data/lib/fisk/instructions/vrcp14sd.rb +35 -37
- data/lib/fisk/instructions/vrcp14ss.rb +35 -37
- data/lib/fisk/instructions/vrcp28pd.rb +34 -36
- data/lib/fisk/instructions/vrcp28ps.rb +34 -36
- data/lib/fisk/instructions/vrcp28sd.rb +36 -38
- data/lib/fisk/instructions/vrcp28ss.rb +36 -38
- data/lib/fisk/instructions/vrcpps.rb +63 -67
- data/lib/fisk/instructions/vrcpss.rb +35 -37
- data/lib/fisk/instructions/vreducepd.rb +105 -111
- data/lib/fisk/instructions/vreduceps.rb +105 -111
- data/lib/fisk/instructions/vreducesd.rb +39 -41
- data/lib/fisk/instructions/vreducess.rb +39 -41
- data/lib/fisk/instructions/vrndscalepd.rb +106 -112
- data/lib/fisk/instructions/vrndscaleps.rb +106 -112
- data/lib/fisk/instructions/vrndscalesd.rb +40 -42
- data/lib/fisk/instructions/vrndscaless.rb +40 -42
- data/lib/fisk/instructions/vroundpd.rb +71 -75
- data/lib/fisk/instructions/vroundps.rb +71 -75
- data/lib/fisk/instructions/vroundsd.rb +39 -41
- data/lib/fisk/instructions/vroundss.rb +39 -41
- data/lib/fisk/instructions/vrsqrt14pd.rb +93 -99
- data/lib/fisk/instructions/vrsqrt14ps.rb +93 -99
- data/lib/fisk/instructions/vrsqrt14sd.rb +35 -37
- data/lib/fisk/instructions/vrsqrt14ss.rb +35 -37
- data/lib/fisk/instructions/vrsqrt28pd.rb +34 -36
- data/lib/fisk/instructions/vrsqrt28ps.rb +34 -36
- data/lib/fisk/instructions/vrsqrt28sd.rb +36 -38
- data/lib/fisk/instructions/vrsqrt28ss.rb +36 -38
- data/lib/fisk/instructions/vrsqrtps.rb +63 -67
- data/lib/fisk/instructions/vrsqrtss.rb +35 -37
- data/lib/fisk/instructions/vscalefpd.rb +100 -106
- data/lib/fisk/instructions/vscalefps.rb +100 -106
- data/lib/fisk/instructions/vscalefsd.rb +36 -38
- data/lib/fisk/instructions/vscalefss.rb +36 -38
- data/lib/fisk/instructions/vscatterdpd.rb +48 -51
- data/lib/fisk/instructions/vscatterdps.rb +48 -51
- data/lib/fisk/instructions/vscatterpf0dpd.rb +16 -17
- data/lib/fisk/instructions/vscatterpf0dps.rb +16 -17
- data/lib/fisk/instructions/vscatterpf0qpd.rb +16 -17
- data/lib/fisk/instructions/vscatterpf0qps.rb +16 -17
- data/lib/fisk/instructions/vscatterpf1dpd.rb +16 -17
- data/lib/fisk/instructions/vscatterpf1dps.rb +16 -17
- data/lib/fisk/instructions/vscatterpf1qpd.rb +16 -17
- data/lib/fisk/instructions/vscatterpf1qps.rb +16 -17
- data/lib/fisk/instructions/vscatterqpd.rb +48 -51
- data/lib/fisk/instructions/vscatterqps.rb +48 -51
- data/lib/fisk/instructions/vshuff32x4.rb +75 -79
- data/lib/fisk/instructions/vshuff64x2.rb +75 -79
- data/lib/fisk/instructions/vshufi32x4.rb +75 -79
- data/lib/fisk/instructions/vshufi64x2.rb +75 -79
- data/lib/fisk/instructions/vshufpd.rb +183 -193
- data/lib/fisk/instructions/vshufps.rb +183 -193
- data/lib/fisk/instructions/vsqrtpd.rb +154 -164
- data/lib/fisk/instructions/vsqrtps.rb +154 -164
- data/lib/fisk/instructions/vsqrtsd.rb +68 -72
- data/lib/fisk/instructions/vsqrtss.rb +68 -72
- data/lib/fisk/instructions/vstmxcsr.rb +16 -17
- data/lib/fisk/instructions/vsubpd.rb +164 -174
- data/lib/fisk/instructions/vsubps.rb +164 -174
- data/lib/fisk/instructions/vsubsd.rb +68 -72
- data/lib/fisk/instructions/vsubss.rb +68 -72
- data/lib/fisk/instructions/vtestpd.rb +63 -67
- data/lib/fisk/instructions/vtestps.rb +63 -67
- data/lib/fisk/instructions/vucomisd.rb +64 -68
- data/lib/fisk/instructions/vucomiss.rb +64 -68
- data/lib/fisk/instructions/vunpckhpd.rb +163 -173
- data/lib/fisk/instructions/vunpckhps.rb +163 -173
- data/lib/fisk/instructions/vunpcklpd.rb +163 -173
- data/lib/fisk/instructions/vunpcklps.rb +163 -173
- data/lib/fisk/instructions/vxorpd.rb +163 -173
- data/lib/fisk/instructions/vxorps.rb +163 -173
- data/lib/fisk/instructions/vzeroall.rb +13 -14
- data/lib/fisk/instructions/vzeroupper.rb +13 -14
- data/lib/fisk/instructions/xadd.rb +153 -161
- data/lib/fisk/instructions/xchg.rb +355 -377
- data/lib/fisk/instructions/xgetbv.rb +14 -15
- data/lib/fisk/instructions/xlatb.rb +23 -25
- data/lib/fisk/instructions/xor.rb +561 -595
- data/lib/fisk/instructions/xorpd.rb +42 -44
- data/lib/fisk/instructions/xorps.rb +40 -42
- data/lib/fisk/instructions.rb +30 -8
- data/lib/fisk/version.rb +3 -0
- data/lib/fisk.rb +706 -120
- data/test/helper.rb +17 -0
- data/test/test_cfg.rb +245 -0
- data/test/test_fisk.rb +480 -4
- data/test/test_fisk_written_size.rb +26 -0
- data/test/test_performance_check.rb +32 -0
- data/test/test_register_allocation.rb +220 -0
- data/test/test_run_fisk.rb +148 -6
- metadata +72 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f39cf1256e6c2030ee2f0dee50d91995cb2efff76d457a5f4c9eb25ca543059b
|
4
|
+
data.tar.gz: c4b92832e08b09b3660efeea2f1c3a629053cc4651ce7f224404e3065a7c8640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8d6c2be54f415b76997a3ffd76ee1f690a7088c17df3a83efb9b6b2830804e6621d89c8b1aeb2b935f954d6efade6d8cc5480bf203078663d1e5a17a75f311c
|
7
|
+
data.tar.gz: e1368e7bab672530a501aea3e201cdd2f72f5083708102d631165b4468df56a842a9a36d8399a901d4c46d750a4c16f195059b2a7868fbc97a216f222f8bada9
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ${{ matrix.os }}-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
os: [ubuntu, macos]
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Install libcapstone Linux
|
17
|
+
if: matrix.os == 'ubuntu'
|
18
|
+
run: |
|
19
|
+
sudo apt-get update -y
|
20
|
+
sudo apt-get install -y libcapstone-dev
|
21
|
+
|
22
|
+
- name: Install libcapstone macOS
|
23
|
+
if: matrix.os == 'macos'
|
24
|
+
run: |
|
25
|
+
brew update
|
26
|
+
brew install capstone
|
27
|
+
|
28
|
+
- name: Set up Ruby
|
29
|
+
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
|
30
|
+
with:
|
31
|
+
ruby-version: 3.0
|
32
|
+
bundler-cache: true # 'bundle install' and cache
|
33
|
+
- name: Run tests
|
34
|
+
run: bundle exec rake
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
|
2
|
+
# Contributor Covenant Code of Conduct
|
3
|
+
|
4
|
+
## Our Pledge
|
5
|
+
|
6
|
+
In the interest of fostering an open and welcoming environment, we as
|
7
|
+
contributors and maintainers pledge to make participation in our project and
|
8
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
9
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
10
|
+
level of experience, education, socio-economic status, nationality, personal
|
11
|
+
appearance, race, religion, or sexual identity and orientation.
|
12
|
+
|
13
|
+
## Our Standards
|
14
|
+
|
15
|
+
Examples of behavior that contributes to creating a positive environment
|
16
|
+
include:
|
17
|
+
|
18
|
+
* Using welcoming and inclusive language
|
19
|
+
* Being respectful of differing viewpoints and experiences
|
20
|
+
* Gracefully accepting constructive criticism
|
21
|
+
* Focusing on what is best for the community
|
22
|
+
* Showing empathy towards other community members
|
23
|
+
|
24
|
+
Examples of unacceptable behavior by participants include:
|
25
|
+
|
26
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
27
|
+
advances
|
28
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
29
|
+
* Public or private harassment
|
30
|
+
* Publishing others' private information, such as a physical or electronic
|
31
|
+
address, without explicit permission
|
32
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
33
|
+
professional setting
|
34
|
+
|
35
|
+
## Our Responsibilities
|
36
|
+
|
37
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
38
|
+
behavior and are expected to take appropriate and fair corrective action in
|
39
|
+
response to any instances of unacceptable behavior.
|
40
|
+
|
41
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
42
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
43
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
44
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
45
|
+
threatening, offensive, or harmful.
|
46
|
+
|
47
|
+
## Scope
|
48
|
+
|
49
|
+
This Code of Conduct applies within all project spaces, and it also applies when
|
50
|
+
an individual is representing the project or its community in public spaces.
|
51
|
+
Examples of representing a project or community include using an official
|
52
|
+
project e-mail address, posting via an official social media account, or acting
|
53
|
+
as an appointed representative at an online or offline event. Representation of
|
54
|
+
a project may be further defined and clarified by project maintainers.
|
55
|
+
|
56
|
+
## Enforcement
|
57
|
+
|
58
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
59
|
+
reported by contacting the project team at aaron.patterson at gmail.com. All
|
60
|
+
complaints will be reviewed and investigated and will result in a response that
|
61
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
62
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
63
|
+
Further details of specific enforcement policies may be posted separately.
|
64
|
+
|
65
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
66
|
+
faith may face temporary or permanent repercussions as determined by other
|
67
|
+
members of the project's leadership.
|
68
|
+
|
69
|
+
## Attribution
|
70
|
+
|
71
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
72
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
73
|
+
|
74
|
+
[homepage]: https://www.contributor-covenant.org
|
75
|
+
|
76
|
+
For answers to common questions about this code of conduct, see
|
77
|
+
https://www.contributor-covenant.org/faq
|
78
|
+
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
# Fisk - A Pure Ruby Assembler
|
1
|
+
# Fisk - A Pure Ruby x86-64 Assembler
|
2
|
+
|
3
|
+
Tired of writing Ruby in Ruby? Now you can write assembly in Ruby with Fisk!
|
2
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.
|
@@ -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
|
@@ -116,3 +171,8 @@ Target 0: (ruby) stopped.
|
|
116
171
|
frame #32: 0x00007fff20530621 libdyld.dylib`start + 1
|
117
172
|
frame #33: 0x00007fff20530621 libdyld.dylib`start + 1
|
118
173
|
```
|
174
|
+
|
175
|
+
Note that in order to produce a stack trace like the above, the Ruby binary must include the debugging symbols (otherwise, the `ruby` frames will not be displayed); this is accomplished by specifying the `--ggdb3` compiler flag:
|
176
|
+
|
177
|
+
- if compiling Ruby from source, use `./configure optflags=-gddb3` in the build process
|
178
|
+
- if using a version manager, refer to the help; example for RVM: `optflags="-ggdb3" rvm install 3.0.2 --disable-binary`
|
data/Rakefile
CHANGED
@@ -10,8 +10,9 @@ INSNS_DIR = "lib/fisk/instructions"
|
|
10
10
|
|
11
11
|
file XML_FILE do
|
12
12
|
Dir.mkdir 'tmp' unless File.directory?("tmp")
|
13
|
-
cd "tmp"
|
14
|
-
|
13
|
+
cd "tmp" do
|
14
|
+
sh "git clone https://github.com/Maratyszcza/Opcodes.git"
|
15
|
+
end
|
15
16
|
end
|
16
17
|
|
17
18
|
file INSNS_DIR do
|
@@ -33,3 +34,4 @@ Rake::TestTask.new do |t|
|
|
33
34
|
end
|
34
35
|
|
35
36
|
task :test => LIB_FILE
|
37
|
+
task :default => :test
|
data/bin/build-machine.rb
CHANGED
@@ -2,13 +2,27 @@ require "nokogiri"
|
|
2
2
|
require "stringio"
|
3
3
|
require "erb"
|
4
4
|
|
5
|
+
def modrm_method operands
|
6
|
+
op_types = operands.map { |x| x["type"] }
|
7
|
+
case op_types
|
8
|
+
in [/^m\d*$/, /^r\d+$/]
|
9
|
+
"add_modrm_mem_reg"
|
10
|
+
in [/^r\d+$/, /^m\d*$/]
|
11
|
+
"add_modrm_reg_mem"
|
12
|
+
in [/^r\d+$/, /^r\d+$/]
|
13
|
+
"add_modrm_reg_reg"
|
14
|
+
else
|
15
|
+
"add_modrm"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
5
19
|
def parse_rex v
|
6
20
|
if v
|
7
21
|
case v
|
8
22
|
when /^(\d+)$/
|
9
23
|
v
|
10
24
|
when /^#(\d+)$/
|
11
|
-
"
|
25
|
+
"operands[#{$1.to_i}].rex_value"
|
12
26
|
else
|
13
27
|
raise NotImplementedError, v
|
14
28
|
end
|
@@ -23,7 +37,7 @@ def parse_operand_value v
|
|
23
37
|
when /^(\d+)$/
|
24
38
|
v
|
25
39
|
when /^#(\d+)$/
|
26
|
-
"operands[#{$1.to_i}].
|
40
|
+
"operands[#{$1.to_i}].op_value"
|
27
41
|
else
|
28
42
|
raise NotImplementedError, v
|
29
43
|
end
|
data/bin/instruction.rb.erb
CHANGED
@@ -3,89 +3,63 @@
|
|
3
3
|
class Fisk
|
4
4
|
module Instructions
|
5
5
|
<%- name = instruction["name"] -%>
|
6
|
-
|
7
|
-
|
6
|
+
<%- summary = instruction["summary"] -%>
|
7
|
+
# Instruction <%= name %>: <%= summary %>
|
8
|
+
<%= name %> = Instruction.new(<%= name.dump %>, [
|
8
9
|
<%-
|
9
10
|
instruction.children.each do |form|
|
10
11
|
next unless form.name == "InstructionForm"
|
11
12
|
-%>
|
12
|
-
operands = []
|
13
|
-
encodings = []
|
14
13
|
<%-
|
15
14
|
operands = form.children.reject(&:text?).find_all { |c| c.name == "Operand" }
|
15
|
+
encodings = form.children.reject(&:text?).find_all { |c| c.name == "Encoding" }
|
16
16
|
-%>
|
17
17
|
# <%= form["gas-name"] %>: <%= operands.map { |op| op["type"] }.join(", ") %>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<%-
|
24
|
-
|
25
|
-
|
26
|
-
when "Encoding"
|
27
|
-
size = 0
|
28
|
-
-%>
|
29
|
-
encodings << Class.new(Fisk::Encoding) {
|
30
|
-
def encode buffer, operands
|
18
|
+
Form.new([
|
19
|
+
<%- operands.each do |child| -%>
|
20
|
+
OPERAND_TYPES[<%= unique_operands.index(%w{ type input output }.map { |n| child[n] }) %>],
|
21
|
+
<%- end -%>
|
22
|
+
].freeze, [
|
23
|
+
<%- encodings.each do |child| -%>
|
24
|
+
Class.new(Fisk::Encoding) {
|
25
|
+
def encode buffer, operands
|
31
26
|
<%-
|
32
27
|
child.children.each do |encoding|
|
33
28
|
next if encoding.text?
|
34
29
|
case encoding.name
|
35
30
|
when "Opcode"
|
36
|
-
size += 1
|
37
31
|
-%>
|
38
|
-
|
39
|
-
<%-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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,
|
32
|
+
add_opcode(buffer, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= parse_operand_value encoding["addend"] %>) +
|
33
|
+
<%- when "Immediate" -%>
|
34
|
+
add_immediate(buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>) +
|
35
|
+
<%- when "CodeOffset" -%>
|
36
|
+
add_code_offset(buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>) +
|
37
|
+
<%- when "REX" -%>
|
38
|
+
add_rex(buffer, operands,
|
54
39
|
<%= !(encoding["mandatory"] == "false") %>,
|
55
40
|
<%= parse_rex encoding["W"] %>,
|
56
41
|
<%= parse_rex encoding["R"] %>,
|
57
42
|
<%= parse_rex encoding["X"] %>,
|
58
|
-
<%= parse_rex encoding["B"] %>)
|
59
|
-
<%-
|
60
|
-
|
61
|
-
size += 1
|
62
|
-
-%>
|
63
|
-
add_modrm(buffer, operands,
|
43
|
+
<%= parse_rex encoding["B"] %>) +
|
44
|
+
<%- when "ModRM" -%>
|
45
|
+
<%= modrm_method(operands) %>(buffer,
|
64
46
|
<%= encoding["mode"].to_i(2) %>,
|
65
47
|
<%= parse_operand_value encoding["reg"] %>,
|
66
|
-
<%= parse_operand_value encoding["rm"]
|
48
|
+
<%= parse_operand_value encoding["rm"] %>, operands) +
|
67
49
|
<%- when "Prefix" -%>
|
68
|
-
|
50
|
+
add_prefix(buffer, operands, 0x<%= sprintf("%02X", encoding["byte"].to_i(16)) %>, <%= encoding["mandatory"] %>) +
|
69
51
|
<%- when "DataOffset" -%>
|
70
|
-
|
52
|
+
add_data_offset(buffer, <%= parse_operand_value encoding["value"] %>, <%= encoding["size"].to_i %>) +
|
71
53
|
<%- else -%>
|
72
|
-
|
54
|
+
add_<%= encoding.name %>(buffer, operands)
|
73
55
|
<%- end -%>
|
74
56
|
<%- end -%>
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
}.new
|
79
|
-
<%- when "ISA" -%>
|
80
|
-
<%- when "ImplicitOperand" -%>
|
81
|
-
<%-
|
82
|
-
else
|
83
|
-
raise NotImplementedError, child.name
|
84
|
-
-%>
|
57
|
+
0
|
58
|
+
end
|
59
|
+
}.new.freeze,
|
85
60
|
<%- end -%>
|
86
|
-
|
87
|
-
forms << Form.new(operands, encodings)
|
61
|
+
].freeze).freeze,
|
88
62
|
<%- end -%>
|
89
|
-
|
63
|
+
].freeze).freeze
|
90
64
|
end
|
91
65
|
end
|
data/bin/instructions.rb.erb
CHANGED
@@ -6,14 +6,44 @@ require "fisk/encoding"
|
|
6
6
|
|
7
7
|
class Fisk
|
8
8
|
module Instructions
|
9
|
-
Operand = Struct.new(:type, :input, :output)
|
9
|
+
Operand = Struct.new(:type, :input, :output) do
|
10
|
+
def immediate?; false; end
|
11
|
+
end
|
12
|
+
|
13
|
+
class Immediate < Operand
|
14
|
+
attr_reader :size
|
15
|
+
|
16
|
+
def initialize type, input, output, size
|
17
|
+
super(type, input, output)
|
18
|
+
@size = size
|
19
|
+
end
|
20
|
+
|
21
|
+
def immediate?; true; end
|
22
|
+
end
|
23
|
+
|
10
24
|
Form = Struct.new(:operands, :encodings)
|
11
|
-
Instruction = Struct.new(:name, :forms)
|
25
|
+
Instruction = Struct.new(:name, :forms) do
|
26
|
+
def check_performance(operands)
|
27
|
+
case name
|
28
|
+
when Instructions::MOV.name
|
29
|
+
if operands[0].register? && operands[1].register? && operands[0].name == operands[1].name
|
30
|
+
return "MOV with same register (#{operands[0].name})"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
12
35
|
|
13
36
|
OPERAND_TYPES = [
|
14
|
-
<%-
|
37
|
+
<%-
|
38
|
+
unique_operands.each do |u_op|
|
39
|
+
if u_op[0] =~ /^imm(\d+)$/
|
40
|
+
size = $1.to_i
|
41
|
+
-%>
|
42
|
+
Immediate.new(<%= u_op[0].dump %>, <%= u_op[1] || "nil" %>, <%= u_op[2] || "nil" %>, <%= size %>),
|
43
|
+
<%- else -%>
|
15
44
|
Operand.new(<%= u_op[0].dump %>, <%= u_op[1] || "nil" %>, <%= u_op[2] || "nil" %>),
|
16
|
-
|
45
|
+
<%- end -%>
|
46
|
+
<%- end -%>
|
17
47
|
]
|
18
48
|
|
19
49
|
def self.instruction_names
|
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"]
|
@@ -9,4 +13,9 @@ Gem::Specification.new do |s|
|
|
9
13
|
s.test_files = s.files.grep(%r{^test/})
|
10
14
|
s.homepage = "https://github.com/tenderlove/fisk"
|
11
15
|
s.license = "Apache-2.0"
|
16
|
+
|
17
|
+
s.add_development_dependency 'minitest', '~> 5.14'
|
18
|
+
s.add_development_dependency 'crabstone', '~> 4.0'
|
19
|
+
s.add_development_dependency 'rake', '~> 13.0'
|
20
|
+
s.add_development_dependency 'nokogiri', '~> 1.11'
|
12
21
|
end
|
@@ -0,0 +1,162 @@
|
|
1
|
+
class Fisk
|
2
|
+
class CFG < Struct.new(:variables, :blocks)
|
3
|
+
class BasicBlock < Struct.new(:name, :insns, :fall, :jump, :def, :use, :in, :out, :pred, :start_point, :end_point)
|
4
|
+
def jump?
|
5
|
+
insns.last.jump?
|
6
|
+
end
|
7
|
+
|
8
|
+
def jump_name
|
9
|
+
insns.last.target
|
10
|
+
end
|
11
|
+
|
12
|
+
def succ
|
13
|
+
list = []
|
14
|
+
list << fall if fall
|
15
|
+
list << jump if jump
|
16
|
+
list
|
17
|
+
end
|
18
|
+
|
19
|
+
def live; self.def | self.use | self.out; end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.build instructions
|
23
|
+
blocks = []
|
24
|
+
bb_index = 0
|
25
|
+
|
26
|
+
chunks = instructions.chunk { |insn|
|
27
|
+
if insn.label?
|
28
|
+
# start a new block here
|
29
|
+
bb_index += 1
|
30
|
+
end
|
31
|
+
|
32
|
+
ret_idx = bb_index
|
33
|
+
|
34
|
+
if insn.jump?
|
35
|
+
# end the block here
|
36
|
+
bb_index += 1
|
37
|
+
end
|
38
|
+
|
39
|
+
ret_idx
|
40
|
+
}.to_a
|
41
|
+
|
42
|
+
chunk_name = ->(chunk_id, insns) {
|
43
|
+
if insns.first.label?
|
44
|
+
insns.first.name
|
45
|
+
else
|
46
|
+
:"bb_#{chunk_id}"
|
47
|
+
end
|
48
|
+
}
|
49
|
+
|
50
|
+
jump_targets = {}
|
51
|
+
wants_target = []
|
52
|
+
insn_idx = 0
|
53
|
+
|
54
|
+
chunks.each_with_index do |(chunk_id, insns), idx|
|
55
|
+
prev_block = blocks.last
|
56
|
+
|
57
|
+
name = chunk_name.(chunk_id, insns)
|
58
|
+
|
59
|
+
next_chunk_id, next_insns = chunks[idx + 1]
|
60
|
+
|
61
|
+
outgoing = []
|
62
|
+
|
63
|
+
if next_chunk_id
|
64
|
+
outgoing << chunk_name.(next_chunk_id, next_insns)
|
65
|
+
end
|
66
|
+
|
67
|
+
bb = BasicBlock.new(name, insns)
|
68
|
+
bb.pred = []
|
69
|
+
bb.start_point = insn_idx
|
70
|
+
insn_idx += insns.length
|
71
|
+
bb.end_point = insn_idx - 1
|
72
|
+
|
73
|
+
if bb.jump?
|
74
|
+
target_name = bb.jump_name
|
75
|
+
|
76
|
+
# if we need to jump backwards, the label should already be filled in.
|
77
|
+
# Otherwise we need to find the block later (we're jumping forward)
|
78
|
+
if jump_targets[target_name]
|
79
|
+
jt = jump_targets[target_name]
|
80
|
+
bb.jump = jt
|
81
|
+
jt.pred << bb
|
82
|
+
else
|
83
|
+
wants_target << bb
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
jump_targets[bb.name] = bb
|
88
|
+
|
89
|
+
if prev_block
|
90
|
+
prev_block.fall = bb
|
91
|
+
bb.pred << prev_block
|
92
|
+
end
|
93
|
+
|
94
|
+
blocks << bb
|
95
|
+
end
|
96
|
+
|
97
|
+
# fill in any forward jumps
|
98
|
+
wants_target.each { |bb|
|
99
|
+
jt = jump_targets[bb.jump_name]
|
100
|
+
bb.jump = jt
|
101
|
+
jt.pred << bb
|
102
|
+
}
|
103
|
+
|
104
|
+
variables = live_variables blocks
|
105
|
+
|
106
|
+
CFG.new variables, blocks
|
107
|
+
end
|
108
|
+
|
109
|
+
def self.live_variables blocks
|
110
|
+
seen = Set.new
|
111
|
+
|
112
|
+
blocks.each do |block|
|
113
|
+
used = Set.new
|
114
|
+
defd = Set.new
|
115
|
+
|
116
|
+
block.insns.each do |insn|
|
117
|
+
if insn.has_temp_registers?
|
118
|
+
insn.temp_registers.each do |reg|
|
119
|
+
defd << reg unless seen.include?(reg)
|
120
|
+
used << reg unless defd.include?(reg)
|
121
|
+
seen << reg
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
block.use = used.to_a
|
127
|
+
block.def = defd.to_a
|
128
|
+
block.in = []
|
129
|
+
block.out = []
|
130
|
+
end
|
131
|
+
|
132
|
+
worklist = blocks.dup
|
133
|
+
while block = worklist.pop
|
134
|
+
block.out = block.succ.inject([]) { |out_registers, succ_block|
|
135
|
+
out_registers | succ_block.in
|
136
|
+
}
|
137
|
+
ins = block.in | block.use | (block.out - block.def)
|
138
|
+
|
139
|
+
if ins == block.in
|
140
|
+
# Done with this block!
|
141
|
+
block.live.each do |live_register|
|
142
|
+
live_register.end_point ||= block.end_point
|
143
|
+
|
144
|
+
if live_register.start_point > block.start_point
|
145
|
+
live_register.start_point = block.start_point
|
146
|
+
end
|
147
|
+
|
148
|
+
if live_register.end_point < block.end_point
|
149
|
+
live_register.end_point = block.end_point
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else
|
153
|
+
block.in = ins
|
154
|
+
worklist.concat(block.pred)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
seen
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|