crabstone 3.0.3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES.md +45 -42
- data/README.md +16 -33
- data/lib/crabstone.rb +5 -557
- data/lib/crabstone/arch.rb +37 -0
- data/lib/{arch → crabstone/arch/3}/arm.rb +28 -49
- data/lib/crabstone/arch/3/arm64.rb +124 -0
- data/lib/{arch → crabstone/arch/3}/arm64_const.rb +45 -86
- data/lib/{arch → crabstone/arch/3}/arm_const.rb +19 -47
- data/lib/crabstone/arch/3/mips.rb +57 -0
- data/lib/{arch → crabstone/arch/3}/mips_const.rb +18 -38
- data/lib/crabstone/arch/3/ppc.rb +73 -0
- data/lib/{arch → crabstone/arch/3}/ppc_const.rb +27 -43
- data/lib/crabstone/arch/3/sparc.rb +60 -0
- data/lib/{arch → crabstone/arch/3}/sparc_const.rb +49 -67
- data/lib/crabstone/arch/3/sysz.rb +67 -0
- data/lib/{arch → crabstone/arch/3}/sysz_const.rb +11 -25
- data/lib/crabstone/arch/3/x86.rb +82 -0
- data/lib/{arch → crabstone/arch/3}/x86_const.rb +15 -36
- data/lib/crabstone/arch/3/xcore.rb +59 -0
- data/lib/{arch → crabstone/arch/3}/xcore_const.rb +10 -22
- data/lib/crabstone/arch/4/arm.rb +110 -0
- data/lib/crabstone/arch/4/arm64.rb +125 -0
- data/lib/crabstone/arch/4/arm64_const.rb +1016 -0
- data/lib/crabstone/arch/4/arm_const.rb +785 -0
- data/lib/crabstone/arch/4/evm.rb +20 -0
- data/lib/crabstone/arch/4/evm_const.rb +161 -0
- data/lib/crabstone/arch/4/m680x.rb +106 -0
- data/lib/crabstone/arch/4/m680x_const.rb +426 -0
- data/lib/crabstone/arch/4/m68k.rb +129 -0
- data/lib/crabstone/arch/4/m68k_const.rb +496 -0
- data/lib/crabstone/arch/4/mips.rb +57 -0
- data/lib/crabstone/arch/4/mips_const.rb +869 -0
- data/lib/crabstone/arch/4/ppc.rb +73 -0
- data/lib/crabstone/arch/4/ppc_const.rb +1375 -0
- data/lib/crabstone/arch/4/sparc.rb +60 -0
- data/lib/crabstone/arch/4/sparc_const.rb +439 -0
- data/lib/crabstone/arch/4/sysz.rb +67 -0
- data/lib/crabstone/arch/4/sysz_const.rb +763 -0
- data/lib/crabstone/arch/4/tms320c64x.rb +87 -0
- data/lib/crabstone/arch/4/tms320c64x_const.rb +287 -0
- data/lib/crabstone/arch/4/x86.rb +91 -0
- data/lib/crabstone/arch/4/x86_const.rb +1972 -0
- data/lib/crabstone/arch/4/xcore.rb +59 -0
- data/lib/crabstone/arch/4/xcore_const.rb +171 -0
- data/lib/crabstone/arch/extension.rb +27 -0
- data/lib/crabstone/arch/register.rb +36 -0
- data/lib/crabstone/binding.rb +60 -0
- data/lib/crabstone/binding/3/detail.rb +36 -0
- data/lib/crabstone/binding/3/instruction.rb +23 -0
- data/lib/crabstone/binding/4/detail.rb +40 -0
- data/lib/crabstone/binding/4/instruction.rb +23 -0
- data/lib/crabstone/binding/structs.rb +32 -0
- data/lib/crabstone/constants.rb +110 -0
- data/lib/crabstone/cs_version.rb +49 -0
- data/lib/crabstone/disassembler.rb +153 -0
- data/lib/crabstone/error.rb +60 -0
- data/lib/crabstone/instruction.rb +183 -0
- data/lib/crabstone/version.rb +5 -0
- metadata +128 -324
- data/MANIFEST +0 -312
- data/Rakefile +0 -27
- data/bin/genconst +0 -66
- data/bin/genreg +0 -99
- data/crabstone.gemspec +0 -27
- data/examples/hello_world.rb +0 -43
- data/lib/arch/arm64.rb +0 -167
- data/lib/arch/arm64_registers.rb +0 -295
- data/lib/arch/arm_registers.rb +0 -149
- data/lib/arch/mips.rb +0 -78
- data/lib/arch/mips_registers.rb +0 -208
- data/lib/arch/ppc.rb +0 -90
- data/lib/arch/ppc_registers.rb +0 -209
- data/lib/arch/sparc.rb +0 -79
- data/lib/arch/sparc_registers.rb +0 -121
- data/lib/arch/systemz.rb +0 -79
- data/lib/arch/sysz_registers.rb +0 -66
- data/lib/arch/x86.rb +0 -107
- data/lib/arch/x86_registers.rb +0 -265
- data/lib/arch/xcore.rb +0 -78
- data/lib/arch/xcore_registers.rb +0 -57
- data/test/MC/AArch64/basic-a64-instructions.s.cs +0 -2014
- data/test/MC/AArch64/gicv3-regs.s.cs +0 -111
- data/test/MC/AArch64/neon-2velem.s.cs +0 -113
- data/test/MC/AArch64/neon-3vdiff.s.cs +0 -143
- data/test/MC/AArch64/neon-aba-abd.s.cs +0 -28
- data/test/MC/AArch64/neon-across.s.cs +0 -40
- data/test/MC/AArch64/neon-add-pairwise.s.cs +0 -11
- data/test/MC/AArch64/neon-add-sub-instructions.s.cs +0 -21
- data/test/MC/AArch64/neon-bitwise-instructions.s.cs +0 -17
- data/test/MC/AArch64/neon-compare-instructions.s.cs +0 -136
- data/test/MC/AArch64/neon-crypto.s.cs +0 -15
- data/test/MC/AArch64/neon-extract.s.cs +0 -3
- data/test/MC/AArch64/neon-facge-facgt.s.cs +0 -13
- data/test/MC/AArch64/neon-frsqrt-frecp.s.cs +0 -7
- data/test/MC/AArch64/neon-halving-add-sub.s.cs +0 -25
- data/test/MC/AArch64/neon-max-min-pairwise.s.cs +0 -37
- data/test/MC/AArch64/neon-max-min.s.cs +0 -37
- data/test/MC/AArch64/neon-mla-mls-instructions.s.cs +0 -19
- data/test/MC/AArch64/neon-mov.s.cs +0 -74
- data/test/MC/AArch64/neon-mul-div-instructions.s.cs +0 -24
- data/test/MC/AArch64/neon-perm.s.cs +0 -43
- data/test/MC/AArch64/neon-rounding-halving-add.s.cs +0 -13
- data/test/MC/AArch64/neon-rounding-shift.s.cs +0 -15
- data/test/MC/AArch64/neon-saturating-add-sub.s.cs +0 -29
- data/test/MC/AArch64/neon-saturating-rounding-shift.s.cs +0 -15
- data/test/MC/AArch64/neon-saturating-shift.s.cs +0 -15
- data/test/MC/AArch64/neon-scalar-abs.s.cs +0 -8
- data/test/MC/AArch64/neon-scalar-add-sub.s.cs +0 -3
- data/test/MC/AArch64/neon-scalar-by-elem-mla.s.cs +0 -13
- data/test/MC/AArch64/neon-scalar-by-elem-mul.s.cs +0 -13
- data/test/MC/AArch64/neon-scalar-by-elem-saturating-mla.s.cs +0 -15
- data/test/MC/AArch64/neon-scalar-by-elem-saturating-mul.s.cs +0 -18
- data/test/MC/AArch64/neon-scalar-compare.s.cs +0 -12
- data/test/MC/AArch64/neon-scalar-cvt.s.cs +0 -34
- data/test/MC/AArch64/neon-scalar-dup.s.cs +0 -23
- data/test/MC/AArch64/neon-scalar-extract-narrow.s.cs +0 -10
- data/test/MC/AArch64/neon-scalar-fp-compare.s.cs +0 -21
- data/test/MC/AArch64/neon-scalar-mul.s.cs +0 -13
- data/test/MC/AArch64/neon-scalar-neg.s.cs +0 -6
- data/test/MC/AArch64/neon-scalar-recip.s.cs +0 -11
- data/test/MC/AArch64/neon-scalar-reduce-pairwise.s.cs +0 -3
- data/test/MC/AArch64/neon-scalar-rounding-shift.s.cs +0 -3
- data/test/MC/AArch64/neon-scalar-saturating-add-sub.s.cs +0 -25
- data/test/MC/AArch64/neon-scalar-saturating-rounding-shift.s.cs +0 -9
- data/test/MC/AArch64/neon-scalar-saturating-shift.s.cs +0 -9
- data/test/MC/AArch64/neon-scalar-shift-imm.s.cs +0 -42
- data/test/MC/AArch64/neon-scalar-shift.s.cs +0 -3
- data/test/MC/AArch64/neon-shift-left-long.s.cs +0 -13
- data/test/MC/AArch64/neon-shift.s.cs +0 -22
- data/test/MC/AArch64/neon-simd-copy.s.cs +0 -42
- data/test/MC/AArch64/neon-simd-ldst-multi-elem.s.cs +0 -197
- data/test/MC/AArch64/neon-simd-ldst-one-elem.s.cs +0 -129
- data/test/MC/AArch64/neon-simd-misc.s.cs +0 -213
- data/test/MC/AArch64/neon-simd-post-ldst-multi-elem.s.cs +0 -107
- data/test/MC/AArch64/neon-simd-shift.s.cs +0 -151
- data/test/MC/AArch64/neon-tbl.s.cs +0 -21
- data/test/MC/AArch64/trace-regs.s.cs +0 -383
- data/test/MC/ARM/arm-aliases.s.cs +0 -7
- data/test/MC/ARM/arm-arithmetic-aliases.s.cs +0 -50
- data/test/MC/ARM/arm-it-block.s.cs +0 -2
- data/test/MC/ARM/arm-memory-instructions.s.cs +0 -138
- data/test/MC/ARM/arm-shift-encoding.s.cs +0 -50
- data/test/MC/ARM/arm-thumb-trustzone.s.cs +0 -3
- data/test/MC/ARM/arm-trustzone.s.cs +0 -3
- data/test/MC/ARM/arm_addrmode2.s.cs +0 -15
- data/test/MC/ARM/arm_addrmode3.s.cs +0 -9
- data/test/MC/ARM/arm_instructions.s.cs +0 -25
- data/test/MC/ARM/basic-arm-instructions-v8.s.cs +0 -10
- data/test/MC/ARM/basic-arm-instructions.s.cs +0 -997
- data/test/MC/ARM/basic-thumb-instructions.s.cs +0 -130
- data/test/MC/ARM/basic-thumb2-instructions-v8.s.cs +0 -1
- data/test/MC/ARM/basic-thumb2-instructions.s.cs +0 -1242
- data/test/MC/ARM/crc32-thumb.s.cs +0 -7
- data/test/MC/ARM/crc32.s.cs +0 -7
- data/test/MC/ARM/dot-req.s.cs +0 -3
- data/test/MC/ARM/fp-armv8.s.cs +0 -52
- data/test/MC/ARM/idiv-thumb.s.cs +0 -3
- data/test/MC/ARM/idiv.s.cs +0 -3
- data/test/MC/ARM/load-store-acquire-release-v8-thumb.s.cs +0 -15
- data/test/MC/ARM/load-store-acquire-release-v8.s.cs +0 -15
- data/test/MC/ARM/mode-switch.s.cs +0 -7
- data/test/MC/ARM/neon-abs-encoding.s.cs +0 -15
- data/test/MC/ARM/neon-absdiff-encoding.s.cs +0 -39
- data/test/MC/ARM/neon-add-encoding.s.cs +0 -119
- data/test/MC/ARM/neon-bitcount-encoding.s.cs +0 -15
- data/test/MC/ARM/neon-bitwise-encoding.s.cs +0 -126
- data/test/MC/ARM/neon-cmp-encoding.s.cs +0 -88
- data/test/MC/ARM/neon-convert-encoding.s.cs +0 -27
- data/test/MC/ARM/neon-crypto.s.cs +0 -16
- data/test/MC/ARM/neon-dup-encoding.s.cs +0 -13
- data/test/MC/ARM/neon-minmax-encoding.s.cs +0 -57
- data/test/MC/ARM/neon-mov-encoding.s.cs +0 -76
- data/test/MC/ARM/neon-mul-accum-encoding.s.cs +0 -39
- data/test/MC/ARM/neon-mul-encoding.s.cs +0 -72
- data/test/MC/ARM/neon-neg-encoding.s.cs +0 -15
- data/test/MC/ARM/neon-pairwise-encoding.s.cs +0 -47
- data/test/MC/ARM/neon-reciprocal-encoding.s.cs +0 -13
- data/test/MC/ARM/neon-reverse-encoding.s.cs +0 -13
- data/test/MC/ARM/neon-satshift-encoding.s.cs +0 -75
- data/test/MC/ARM/neon-shift-encoding.s.cs +0 -238
- data/test/MC/ARM/neon-shiftaccum-encoding.s.cs +0 -97
- data/test/MC/ARM/neon-shuffle-encoding.s.cs +0 -59
- data/test/MC/ARM/neon-sub-encoding.s.cs +0 -82
- data/test/MC/ARM/neon-table-encoding.s.cs +0 -9
- data/test/MC/ARM/neon-v8.s.cs +0 -38
- data/test/MC/ARM/neon-vld-encoding.s.cs +0 -213
- data/test/MC/ARM/neon-vst-encoding.s.cs +0 -120
- data/test/MC/ARM/neon-vswp.s.cs +0 -3
- data/test/MC/ARM/neont2-abs-encoding.s.cs +0 -15
- data/test/MC/ARM/neont2-absdiff-encoding.s.cs +0 -39
- data/test/MC/ARM/neont2-add-encoding.s.cs +0 -65
- data/test/MC/ARM/neont2-bitcount-encoding.s.cs +0 -15
- data/test/MC/ARM/neont2-bitwise-encoding.s.cs +0 -15
- data/test/MC/ARM/neont2-cmp-encoding.s.cs +0 -17
- data/test/MC/ARM/neont2-convert-encoding.s.cs +0 -19
- data/test/MC/ARM/neont2-dup-encoding.s.cs +0 -19
- data/test/MC/ARM/neont2-minmax-encoding.s.cs +0 -57
- data/test/MC/ARM/neont2-mov-encoding.s.cs +0 -58
- data/test/MC/ARM/neont2-mul-accum-encoding.s.cs +0 -41
- data/test/MC/ARM/neont2-mul-encoding.s.cs +0 -31
- data/test/MC/ARM/neont2-neg-encoding.s.cs +0 -15
- data/test/MC/ARM/neont2-pairwise-encoding.s.cs +0 -43
- data/test/MC/ARM/neont2-reciprocal-encoding.s.cs +0 -13
- data/test/MC/ARM/neont2-reverse-encoding.s.cs +0 -13
- data/test/MC/ARM/neont2-satshift-encoding.s.cs +0 -75
- data/test/MC/ARM/neont2-shift-encoding.s.cs +0 -80
- data/test/MC/ARM/neont2-shiftaccum-encoding.s.cs +0 -97
- data/test/MC/ARM/neont2-shuffle-encoding.s.cs +0 -23
- data/test/MC/ARM/neont2-sub-encoding.s.cs +0 -23
- data/test/MC/ARM/neont2-table-encoding.s.cs +0 -9
- data/test/MC/ARM/neont2-vld-encoding.s.cs +0 -51
- data/test/MC/ARM/neont2-vst-encoding.s.cs +0 -48
- data/test/MC/ARM/simple-fp-encoding.s.cs +0 -157
- data/test/MC/ARM/thumb-fp-armv8.s.cs +0 -51
- data/test/MC/ARM/thumb-hints.s.cs +0 -12
- data/test/MC/ARM/thumb-neon-crypto.s.cs +0 -16
- data/test/MC/ARM/thumb-neon-v8.s.cs +0 -38
- data/test/MC/ARM/thumb-shift-encoding.s.cs +0 -19
- data/test/MC/ARM/thumb.s.cs +0 -19
- data/test/MC/ARM/thumb2-b.w-encodingT4.s.cs +0 -2
- data/test/MC/ARM/thumb2-branches.s.cs +0 -85
- data/test/MC/ARM/thumb2-mclass.s.cs +0 -41
- data/test/MC/ARM/thumb2-narrow-dp.ll.cs +0 -379
- data/test/MC/ARM/thumb2-pldw.s.cs +0 -2
- data/test/MC/ARM/vfp4-thumb.s.cs +0 -13
- data/test/MC/ARM/vfp4.s.cs +0 -13
- data/test/MC/ARM/vpush-vpop-thumb.s.cs +0 -9
- data/test/MC/ARM/vpush-vpop.s.cs +0 -9
- data/test/MC/Mips/hilo-addressing.s.cs +0 -4
- data/test/MC/Mips/micromips-alu-instructions-EB.s.cs +0 -33
- data/test/MC/Mips/micromips-alu-instructions.s.cs +0 -33
- data/test/MC/Mips/micromips-branch-instructions-EB.s.cs +0 -11
- data/test/MC/Mips/micromips-branch-instructions.s.cs +0 -11
- data/test/MC/Mips/micromips-expansions.s.cs +0 -20
- data/test/MC/Mips/micromips-jump-instructions-EB.s.cs +0 -5
- data/test/MC/Mips/micromips-jump-instructions.s.cs +0 -6
- data/test/MC/Mips/micromips-loadstore-instructions-EB.s.cs +0 -9
- data/test/MC/Mips/micromips-loadstore-instructions.s.cs +0 -9
- data/test/MC/Mips/micromips-loadstore-unaligned-EB.s.cs +0 -5
- data/test/MC/Mips/micromips-loadstore-unaligned.s.cs +0 -5
- data/test/MC/Mips/micromips-movcond-instructions-EB.s.cs +0 -5
- data/test/MC/Mips/micromips-movcond-instructions.s.cs +0 -5
- data/test/MC/Mips/micromips-multiply-instructions-EB.s.cs +0 -5
- data/test/MC/Mips/micromips-multiply-instructions.s.cs +0 -5
- data/test/MC/Mips/micromips-shift-instructions-EB.s.cs +0 -9
- data/test/MC/Mips/micromips-shift-instructions.s.cs +0 -9
- data/test/MC/Mips/micromips-trap-instructions-EB.s.cs +0 -13
- data/test/MC/Mips/micromips-trap-instructions.s.cs +0 -13
- data/test/MC/Mips/mips-alu-instructions.s.cs +0 -53
- data/test/MC/Mips/mips-control-instructions-64.s.cs +0 -33
- data/test/MC/Mips/mips-control-instructions.s.cs +0 -33
- data/test/MC/Mips/mips-coprocessor-encodings.s.cs +0 -17
- data/test/MC/Mips/mips-dsp-instructions.s.cs +0 -43
- data/test/MC/Mips/mips-expansions.s.cs +0 -20
- data/test/MC/Mips/mips-fpu-instructions.s.cs +0 -93
- data/test/MC/Mips/mips-jump-instructions.s.cs +0 -1
- data/test/MC/Mips/mips-memory-instructions.s.cs +0 -17
- data/test/MC/Mips/mips-register-names.s.cs +0 -33
- data/test/MC/Mips/mips64-alu-instructions.s.cs +0 -47
- data/test/MC/Mips/mips64-instructions.s.cs +0 -3
- data/test/MC/Mips/mips64-register-names.s.cs +0 -33
- data/test/MC/Mips/mips_directives.s.cs +0 -12
- data/test/MC/Mips/nabi-regs.s.cs +0 -12
- data/test/MC/Mips/set-at-directive.s.cs +0 -6
- data/test/MC/Mips/test_2r.s.cs +0 -16
- data/test/MC/Mips/test_2rf.s.cs +0 -33
- data/test/MC/Mips/test_3r.s.cs +0 -243
- data/test/MC/Mips/test_3rf.s.cs +0 -83
- data/test/MC/Mips/test_bit.s.cs +0 -49
- data/test/MC/Mips/test_cbranch.s.cs +0 -11
- data/test/MC/Mips/test_ctrlregs.s.cs +0 -33
- data/test/MC/Mips/test_elm.s.cs +0 -16
- data/test/MC/Mips/test_elm_insert.s.cs +0 -4
- data/test/MC/Mips/test_elm_insve.s.cs +0 -5
- data/test/MC/Mips/test_i10.s.cs +0 -5
- data/test/MC/Mips/test_i5.s.cs +0 -45
- data/test/MC/Mips/test_i8.s.cs +0 -11
- data/test/MC/Mips/test_lsa.s.cs +0 -5
- data/test/MC/Mips/test_mi10.s.cs +0 -24
- data/test/MC/Mips/test_vec.s.cs +0 -8
- data/test/MC/PowerPC/ppc64-encoding-bookII.s.cs +0 -25
- data/test/MC/PowerPC/ppc64-encoding-bookIII.s.cs +0 -35
- data/test/MC/PowerPC/ppc64-encoding-ext.s.cs +0 -535
- data/test/MC/PowerPC/ppc64-encoding-fp.s.cs +0 -110
- data/test/MC/PowerPC/ppc64-encoding-vmx.s.cs +0 -170
- data/test/MC/PowerPC/ppc64-encoding.s.cs +0 -202
- data/test/MC/PowerPC/ppc64-operands.s.cs +0 -32
- data/test/MC/README +0 -6
- data/test/MC/Sparc/sparc-alu-instructions.s.cs +0 -47
- data/test/MC/Sparc/sparc-atomic-instructions.s.cs +0 -7
- data/test/MC/Sparc/sparc-ctrl-instructions.s.cs +0 -11
- data/test/MC/Sparc/sparc-fp-instructions.s.cs +0 -59
- data/test/MC/Sparc/sparc-mem-instructions.s.cs +0 -25
- data/test/MC/Sparc/sparc-vis.s.cs +0 -2
- data/test/MC/Sparc/sparc64-alu-instructions.s.cs +0 -13
- data/test/MC/Sparc/sparc64-ctrl-instructions.s.cs +0 -102
- data/test/MC/Sparc/sparcv8-instructions.s.cs +0 -7
- data/test/MC/Sparc/sparcv9-instructions.s.cs +0 -1
- data/test/MC/SystemZ/insn-good-z196.s.cs +0 -589
- data/test/MC/SystemZ/insn-good.s.cs +0 -2265
- data/test/MC/SystemZ/regs-good.s.cs +0 -45
- data/test/MC/X86/3DNow.s.cs +0 -29
- data/test/MC/X86/address-size.s.cs +0 -5
- data/test/MC/X86/avx512-encodings.s.cs +0 -12
- data/test/MC/X86/intel-syntax-encoding.s.cs +0 -30
- data/test/MC/X86/x86-32-avx.s.cs +0 -833
- data/test/MC/X86/x86-32-fma3.s.cs +0 -169
- data/test/MC/X86/x86-32-ms-inline-asm.s.cs +0 -27
- data/test/MC/X86/x86_64-avx-clmul-encoding.s.cs +0 -11
- data/test/MC/X86/x86_64-avx-encoding.s.cs +0 -1058
- data/test/MC/X86/x86_64-bmi-encoding.s.cs +0 -51
- data/test/MC/X86/x86_64-encoding.s.cs +0 -59
- data/test/MC/X86/x86_64-fma3-encoding.s.cs +0 -169
- data/test/MC/X86/x86_64-fma4-encoding.s.cs +0 -98
- data/test/MC/X86/x86_64-hle-encoding.s.cs +0 -3
- data/test/MC/X86/x86_64-imm-widths.s.cs +0 -27
- data/test/MC/X86/x86_64-rand-encoding.s.cs +0 -13
- data/test/MC/X86/x86_64-rtm-encoding.s.cs +0 -4
- data/test/MC/X86/x86_64-sse4a.s.cs +0 -1
- data/test/MC/X86/x86_64-tbm-encoding.s.cs +0 -40
- data/test/MC/X86/x86_64-xop-encoding.s.cs +0 -152
- data/test/README +0 -6
- data/test/test.rb +0 -205
- data/test/test.rb.SPEC +0 -235
- data/test/test_arm.rb +0 -202
- data/test/test_arm.rb.SPEC +0 -275
- data/test/test_arm64.rb +0 -150
- data/test/test_arm64.rb.SPEC +0 -116
- data/test/test_detail.rb +0 -228
- data/test/test_detail.rb.SPEC +0 -322
- data/test/test_exhaustive.rb +0 -80
- data/test/test_mips.rb +0 -118
- data/test/test_mips.rb.SPEC +0 -91
- data/test/test_ppc.rb +0 -137
- data/test/test_ppc.rb.SPEC +0 -84
- data/test/test_sanity.rb +0 -83
- data/test/test_skipdata.rb +0 -111
- data/test/test_skipdata.rb.SPEC +0 -58
- data/test/test_sparc.rb +0 -113
- data/test/test_sparc.rb.SPEC +0 -116
- data/test/test_sysz.rb +0 -111
- data/test/test_sysz.rb.SPEC +0 -61
- data/test/test_x86.rb +0 -189
- data/test/test_x86.rb.SPEC +0 -579
- data/test/test_xcore.rb +0 -100
- data/test/test_xcore.rb.SPEC +0 -75
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# THIS FILE WAS AUTO-GENERATED -- DO NOT EDIT!
|
4
|
+
|
5
|
+
require 'ffi'
|
6
|
+
|
7
|
+
require 'crabstone/arch/extension'
|
8
|
+
require_relative 'tms320c64x_const'
|
9
|
+
|
10
|
+
module Crabstone
|
11
|
+
module TMS320C64X
|
12
|
+
class OperandMemory < FFI::Struct
|
13
|
+
layout(
|
14
|
+
:base, :int,
|
15
|
+
:disp, :int,
|
16
|
+
:unit, :int,
|
17
|
+
:scaled, :int,
|
18
|
+
:disptype, :int,
|
19
|
+
:direction, :int,
|
20
|
+
:modify, :int
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
class OperandValue < FFI::Union
|
25
|
+
layout(
|
26
|
+
:reg, :uint,
|
27
|
+
:imm, :int,
|
28
|
+
:mem, OperandMemory
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
class Operand < FFI::Struct
|
33
|
+
layout(
|
34
|
+
:type, :uint,
|
35
|
+
:value, OperandValue
|
36
|
+
)
|
37
|
+
|
38
|
+
include Crabstone::Extension::Operand
|
39
|
+
|
40
|
+
def reg?
|
41
|
+
[
|
42
|
+
OP_REG,
|
43
|
+
OP_REGPAIR
|
44
|
+
].include?(self[:type])
|
45
|
+
end
|
46
|
+
|
47
|
+
def imm?
|
48
|
+
self[:type] == OP_IMM
|
49
|
+
end
|
50
|
+
|
51
|
+
def mem?
|
52
|
+
self[:type] == OP_MEM
|
53
|
+
end
|
54
|
+
|
55
|
+
def regpair?
|
56
|
+
self[:type] == OP_REGPAIR
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
class Condition < FFI::Struct
|
61
|
+
layout(
|
62
|
+
:reg, :uint,
|
63
|
+
:zero, :uint
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
class FunctionalUnit < FFI::Struct
|
68
|
+
layout(
|
69
|
+
:unit, :uint,
|
70
|
+
:side, :uint,
|
71
|
+
:crosspath, :uint
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
class Instruction < FFI::Struct
|
76
|
+
layout(
|
77
|
+
:op_count, :uint8,
|
78
|
+
:operands, [Operand, 8],
|
79
|
+
:condition, Condition,
|
80
|
+
:funit, FunctionalUnit,
|
81
|
+
:parallel, :uint
|
82
|
+
)
|
83
|
+
|
84
|
+
include Crabstone::Extension::Instruction
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,287 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# THIS FILE WAS AUTO-GENERATED -- DO NOT EDIT!
|
4
|
+
|
5
|
+
require 'crabstone/arch/register'
|
6
|
+
|
7
|
+
module Crabstone
|
8
|
+
module TMS320C64X
|
9
|
+
OP_INVALID = 0
|
10
|
+
OP_REG = 1
|
11
|
+
OP_IMM = 2
|
12
|
+
OP_MEM = 3
|
13
|
+
OP_REGPAIR = 64
|
14
|
+
|
15
|
+
MEM_DISP_INVALID = 0
|
16
|
+
MEM_DISP_CONSTANT = 1
|
17
|
+
MEM_DISP_REGISTER = 2
|
18
|
+
|
19
|
+
MEM_DIR_INVALID = 0
|
20
|
+
MEM_DIR_FW = 1
|
21
|
+
MEM_DIR_BW = 2
|
22
|
+
|
23
|
+
MEM_MOD_INVALID = 0
|
24
|
+
MEM_MOD_NO = 1
|
25
|
+
MEM_MOD_PRE = 2
|
26
|
+
MEM_MOD_POST = 3
|
27
|
+
|
28
|
+
REG_INVALID = 0
|
29
|
+
REG_AMR = 1
|
30
|
+
REG_CSR = 2
|
31
|
+
REG_DIER = 3
|
32
|
+
REG_DNUM = 4
|
33
|
+
REG_ECR = 5
|
34
|
+
REG_GFPGFR = 6
|
35
|
+
REG_GPLYA = 7
|
36
|
+
REG_GPLYB = 8
|
37
|
+
REG_ICR = 9
|
38
|
+
REG_IER = 10
|
39
|
+
REG_IERR = 11
|
40
|
+
REG_ILC = 12
|
41
|
+
REG_IRP = 13
|
42
|
+
REG_ISR = 14
|
43
|
+
REG_ISTP = 15
|
44
|
+
REG_ITSR = 16
|
45
|
+
REG_NRP = 17
|
46
|
+
REG_NTSR = 18
|
47
|
+
REG_REP = 19
|
48
|
+
REG_RILC = 20
|
49
|
+
REG_SSR = 21
|
50
|
+
REG_TSCH = 22
|
51
|
+
REG_TSCL = 23
|
52
|
+
REG_TSR = 24
|
53
|
+
REG_A0 = 25
|
54
|
+
REG_A1 = 26
|
55
|
+
REG_A2 = 27
|
56
|
+
REG_A3 = 28
|
57
|
+
REG_A4 = 29
|
58
|
+
REG_A5 = 30
|
59
|
+
REG_A6 = 31
|
60
|
+
REG_A7 = 32
|
61
|
+
REG_A8 = 33
|
62
|
+
REG_A9 = 34
|
63
|
+
REG_A10 = 35
|
64
|
+
REG_A11 = 36
|
65
|
+
REG_A12 = 37
|
66
|
+
REG_A13 = 38
|
67
|
+
REG_A14 = 39
|
68
|
+
REG_A15 = 40
|
69
|
+
REG_A16 = 41
|
70
|
+
REG_A17 = 42
|
71
|
+
REG_A18 = 43
|
72
|
+
REG_A19 = 44
|
73
|
+
REG_A20 = 45
|
74
|
+
REG_A21 = 46
|
75
|
+
REG_A22 = 47
|
76
|
+
REG_A23 = 48
|
77
|
+
REG_A24 = 49
|
78
|
+
REG_A25 = 50
|
79
|
+
REG_A26 = 51
|
80
|
+
REG_A27 = 52
|
81
|
+
REG_A28 = 53
|
82
|
+
REG_A29 = 54
|
83
|
+
REG_A30 = 55
|
84
|
+
REG_A31 = 56
|
85
|
+
REG_B0 = 57
|
86
|
+
REG_B1 = 58
|
87
|
+
REG_B2 = 59
|
88
|
+
REG_B3 = 60
|
89
|
+
REG_B4 = 61
|
90
|
+
REG_B5 = 62
|
91
|
+
REG_B6 = 63
|
92
|
+
REG_B7 = 64
|
93
|
+
REG_B8 = 65
|
94
|
+
REG_B9 = 66
|
95
|
+
REG_B10 = 67
|
96
|
+
REG_B11 = 68
|
97
|
+
REG_B12 = 69
|
98
|
+
REG_B13 = 70
|
99
|
+
REG_B14 = 71
|
100
|
+
REG_B15 = 72
|
101
|
+
REG_B16 = 73
|
102
|
+
REG_B17 = 74
|
103
|
+
REG_B18 = 75
|
104
|
+
REG_B19 = 76
|
105
|
+
REG_B20 = 77
|
106
|
+
REG_B21 = 78
|
107
|
+
REG_B22 = 79
|
108
|
+
REG_B23 = 80
|
109
|
+
REG_B24 = 81
|
110
|
+
REG_B25 = 82
|
111
|
+
REG_B26 = 83
|
112
|
+
REG_B27 = 84
|
113
|
+
REG_B28 = 85
|
114
|
+
REG_B29 = 86
|
115
|
+
REG_B30 = 87
|
116
|
+
REG_B31 = 88
|
117
|
+
REG_PCE1 = 89
|
118
|
+
REG_ENDING = 90
|
119
|
+
REG_EFR = REG_ECR
|
120
|
+
REG_IFR = REG_ISR
|
121
|
+
|
122
|
+
INS_INVALID = 0
|
123
|
+
INS_ABS = 1
|
124
|
+
INS_ABS2 = 2
|
125
|
+
INS_ADD = 3
|
126
|
+
INS_ADD2 = 4
|
127
|
+
INS_ADD4 = 5
|
128
|
+
INS_ADDAB = 6
|
129
|
+
INS_ADDAD = 7
|
130
|
+
INS_ADDAH = 8
|
131
|
+
INS_ADDAW = 9
|
132
|
+
INS_ADDK = 10
|
133
|
+
INS_ADDKPC = 11
|
134
|
+
INS_ADDU = 12
|
135
|
+
INS_AND = 13
|
136
|
+
INS_ANDN = 14
|
137
|
+
INS_AVG2 = 15
|
138
|
+
INS_AVGU4 = 16
|
139
|
+
INS_B = 17
|
140
|
+
INS_BDEC = 18
|
141
|
+
INS_BITC4 = 19
|
142
|
+
INS_BNOP = 20
|
143
|
+
INS_BPOS = 21
|
144
|
+
INS_CLR = 22
|
145
|
+
INS_CMPEQ = 23
|
146
|
+
INS_CMPEQ2 = 24
|
147
|
+
INS_CMPEQ4 = 25
|
148
|
+
INS_CMPGT = 26
|
149
|
+
INS_CMPGT2 = 27
|
150
|
+
INS_CMPGTU4 = 28
|
151
|
+
INS_CMPLT = 29
|
152
|
+
INS_CMPLTU = 30
|
153
|
+
INS_DEAL = 31
|
154
|
+
INS_DOTP2 = 32
|
155
|
+
INS_DOTPN2 = 33
|
156
|
+
INS_DOTPNRSU2 = 34
|
157
|
+
INS_DOTPRSU2 = 35
|
158
|
+
INS_DOTPSU4 = 36
|
159
|
+
INS_DOTPU4 = 37
|
160
|
+
INS_EXT = 38
|
161
|
+
INS_EXTU = 39
|
162
|
+
INS_GMPGTU = 40
|
163
|
+
INS_GMPY4 = 41
|
164
|
+
INS_LDB = 42
|
165
|
+
INS_LDBU = 43
|
166
|
+
INS_LDDW = 44
|
167
|
+
INS_LDH = 45
|
168
|
+
INS_LDHU = 46
|
169
|
+
INS_LDNDW = 47
|
170
|
+
INS_LDNW = 48
|
171
|
+
INS_LDW = 49
|
172
|
+
INS_LMBD = 50
|
173
|
+
INS_MAX2 = 51
|
174
|
+
INS_MAXU4 = 52
|
175
|
+
INS_MIN2 = 53
|
176
|
+
INS_MINU4 = 54
|
177
|
+
INS_MPY = 55
|
178
|
+
INS_MPY2 = 56
|
179
|
+
INS_MPYH = 57
|
180
|
+
INS_MPYHI = 58
|
181
|
+
INS_MPYHIR = 59
|
182
|
+
INS_MPYHL = 60
|
183
|
+
INS_MPYHLU = 61
|
184
|
+
INS_MPYHSLU = 62
|
185
|
+
INS_MPYHSU = 63
|
186
|
+
INS_MPYHU = 64
|
187
|
+
INS_MPYHULS = 65
|
188
|
+
INS_MPYHUS = 66
|
189
|
+
INS_MPYLH = 67
|
190
|
+
INS_MPYLHU = 68
|
191
|
+
INS_MPYLI = 69
|
192
|
+
INS_MPYLIR = 70
|
193
|
+
INS_MPYLSHU = 71
|
194
|
+
INS_MPYLUHS = 72
|
195
|
+
INS_MPYSU = 73
|
196
|
+
INS_MPYSU4 = 74
|
197
|
+
INS_MPYU = 75
|
198
|
+
INS_MPYU4 = 76
|
199
|
+
INS_MPYUS = 77
|
200
|
+
INS_MVC = 78
|
201
|
+
INS_MVD = 79
|
202
|
+
INS_MVK = 80
|
203
|
+
INS_MVKL = 81
|
204
|
+
INS_MVKLH = 82
|
205
|
+
INS_NOP = 83
|
206
|
+
INS_NORM = 84
|
207
|
+
INS_OR = 85
|
208
|
+
INS_PACK2 = 86
|
209
|
+
INS_PACKH2 = 87
|
210
|
+
INS_PACKH4 = 88
|
211
|
+
INS_PACKHL2 = 89
|
212
|
+
INS_PACKL4 = 90
|
213
|
+
INS_PACKLH2 = 91
|
214
|
+
INS_ROTL = 92
|
215
|
+
INS_SADD = 93
|
216
|
+
INS_SADD2 = 94
|
217
|
+
INS_SADDU4 = 95
|
218
|
+
INS_SADDUS2 = 96
|
219
|
+
INS_SAT = 97
|
220
|
+
INS_SET = 98
|
221
|
+
INS_SHFL = 99
|
222
|
+
INS_SHL = 100
|
223
|
+
INS_SHLMB = 101
|
224
|
+
INS_SHR = 102
|
225
|
+
INS_SHR2 = 103
|
226
|
+
INS_SHRMB = 104
|
227
|
+
INS_SHRU = 105
|
228
|
+
INS_SHRU2 = 106
|
229
|
+
INS_SMPY = 107
|
230
|
+
INS_SMPY2 = 108
|
231
|
+
INS_SMPYH = 109
|
232
|
+
INS_SMPYHL = 110
|
233
|
+
INS_SMPYLH = 111
|
234
|
+
INS_SPACK2 = 112
|
235
|
+
INS_SPACKU4 = 113
|
236
|
+
INS_SSHL = 114
|
237
|
+
INS_SSHVL = 115
|
238
|
+
INS_SSHVR = 116
|
239
|
+
INS_SSUB = 117
|
240
|
+
INS_STB = 118
|
241
|
+
INS_STDW = 119
|
242
|
+
INS_STH = 120
|
243
|
+
INS_STNDW = 121
|
244
|
+
INS_STNW = 122
|
245
|
+
INS_STW = 123
|
246
|
+
INS_SUB = 124
|
247
|
+
INS_SUB2 = 125
|
248
|
+
INS_SUB4 = 126
|
249
|
+
INS_SUBAB = 127
|
250
|
+
INS_SUBABS4 = 128
|
251
|
+
INS_SUBAH = 129
|
252
|
+
INS_SUBAW = 130
|
253
|
+
INS_SUBC = 131
|
254
|
+
INS_SUBU = 132
|
255
|
+
INS_SWAP4 = 133
|
256
|
+
INS_UNPKHU4 = 134
|
257
|
+
INS_UNPKLU4 = 135
|
258
|
+
INS_XOR = 136
|
259
|
+
INS_XPND2 = 137
|
260
|
+
INS_XPND4 = 138
|
261
|
+
INS_IDLE = 139
|
262
|
+
INS_MV = 140
|
263
|
+
INS_NEG = 141
|
264
|
+
INS_NOT = 142
|
265
|
+
INS_SWAP2 = 143
|
266
|
+
INS_ZERO = 144
|
267
|
+
INS_ENDING = 145
|
268
|
+
|
269
|
+
GRP_INVALID = 0
|
270
|
+
GRP_JUMP = 1
|
271
|
+
GRP_FUNIT_D = 128
|
272
|
+
GRP_FUNIT_L = 129
|
273
|
+
GRP_FUNIT_M = 130
|
274
|
+
GRP_FUNIT_S = 131
|
275
|
+
GRP_FUNIT_NO = 132
|
276
|
+
GRP_ENDING = 133
|
277
|
+
|
278
|
+
FUNIT_INVALID = 0
|
279
|
+
FUNIT_D = 1
|
280
|
+
FUNIT_L = 2
|
281
|
+
FUNIT_M = 3
|
282
|
+
FUNIT_S = 4
|
283
|
+
FUNIT_NO = 5
|
284
|
+
|
285
|
+
extend Register
|
286
|
+
end
|
287
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# THIS FILE WAS AUTO-GENERATED -- DO NOT EDIT!
|
4
|
+
|
5
|
+
require 'ffi'
|
6
|
+
|
7
|
+
require 'crabstone/arch/extension'
|
8
|
+
require_relative 'x86_const'
|
9
|
+
|
10
|
+
module Crabstone
|
11
|
+
module X86
|
12
|
+
class OperandMemory < FFI::Struct
|
13
|
+
layout(
|
14
|
+
:segment, :uint,
|
15
|
+
:base, :uint,
|
16
|
+
:index, :uint,
|
17
|
+
:scale, :int,
|
18
|
+
:disp, :long
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
class OperandValue < FFI::Union
|
23
|
+
layout(
|
24
|
+
:reg, :uint,
|
25
|
+
:imm, :long,
|
26
|
+
:mem, OperandMemory
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
class Operand < FFI::Struct
|
31
|
+
layout(
|
32
|
+
:type, :uint,
|
33
|
+
:value, OperandValue,
|
34
|
+
:size, :uint8,
|
35
|
+
:access, :uint8,
|
36
|
+
:avx_bcast, :uint,
|
37
|
+
:avx_zero_opmask, :bool
|
38
|
+
)
|
39
|
+
|
40
|
+
include Crabstone::Extension::Operand
|
41
|
+
|
42
|
+
def reg?
|
43
|
+
self[:type] == OP_REG
|
44
|
+
end
|
45
|
+
|
46
|
+
def imm?
|
47
|
+
self[:type] == OP_IMM
|
48
|
+
end
|
49
|
+
|
50
|
+
def mem?
|
51
|
+
self[:type] == OP_MEM
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class Instruction < FFI::Struct
|
56
|
+
layout(
|
57
|
+
:modrm_offset, :uint8,
|
58
|
+
:disp_offset, :uint8,
|
59
|
+
:disp_size, :uint8,
|
60
|
+
:imm_offset, :uint8,
|
61
|
+
:imm_size, :uint8
|
62
|
+
)
|
63
|
+
|
64
|
+
include Crabstone::Extension::Instruction
|
65
|
+
end
|
66
|
+
|
67
|
+
class Instruction < FFI::Struct
|
68
|
+
layout(
|
69
|
+
:prefix, [:uint8, 4],
|
70
|
+
:opcode, [:uint8, 4],
|
71
|
+
:rex, :uint8,
|
72
|
+
:addr_size, :uint8,
|
73
|
+
:modrm, :uint8,
|
74
|
+
:sib, :uint8,
|
75
|
+
:disp, :long,
|
76
|
+
:sib_index, :uint,
|
77
|
+
:sib_scale, :int8,
|
78
|
+
:sib_base, :uint,
|
79
|
+
:xop_cc, :uint,
|
80
|
+
:sse_cc, :uint,
|
81
|
+
:avx_cc, :uint,
|
82
|
+
:avx_sae, :bool,
|
83
|
+
:avx_rm, :uint,
|
84
|
+
:eflags, :ulong,
|
85
|
+
:op_count, :uint8,
|
86
|
+
:operands, [Operand, 8],
|
87
|
+
:encoding, Instruction
|
88
|
+
)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|