crabstone 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES.md +61 -0
  3. data/LICENSE +25 -0
  4. data/MANIFEST +312 -0
  5. data/README.md +103 -0
  6. data/Rakefile +27 -0
  7. data/bin/genconst +66 -0
  8. data/bin/genreg +99 -0
  9. data/crabstone.gemspec +27 -0
  10. data/examples/hello_world.rb +43 -0
  11. data/lib/arch/arm.rb +128 -0
  12. data/lib/arch/arm64.rb +167 -0
  13. data/lib/arch/arm64_const.rb +1055 -0
  14. data/lib/arch/arm64_registers.rb +295 -0
  15. data/lib/arch/arm_const.rb +777 -0
  16. data/lib/arch/arm_registers.rb +149 -0
  17. data/lib/arch/mips.rb +78 -0
  18. data/lib/arch/mips_const.rb +850 -0
  19. data/lib/arch/mips_registers.rb +208 -0
  20. data/lib/arch/ppc.rb +90 -0
  21. data/lib/arch/ppc_const.rb +1181 -0
  22. data/lib/arch/ppc_registers.rb +209 -0
  23. data/lib/arch/sparc.rb +79 -0
  24. data/lib/arch/sparc_const.rb +461 -0
  25. data/lib/arch/sparc_registers.rb +121 -0
  26. data/lib/arch/systemz.rb +79 -0
  27. data/lib/arch/sysz_const.rb +779 -0
  28. data/lib/arch/sysz_registers.rb +66 -0
  29. data/lib/arch/x86.rb +107 -0
  30. data/lib/arch/x86_const.rb +1698 -0
  31. data/lib/arch/x86_registers.rb +265 -0
  32. data/lib/arch/xcore.rb +78 -0
  33. data/lib/arch/xcore_const.rb +185 -0
  34. data/lib/arch/xcore_registers.rb +57 -0
  35. data/lib/crabstone.rb +564 -0
  36. data/test/MC/AArch64/basic-a64-instructions.s.cs +2014 -0
  37. data/test/MC/AArch64/gicv3-regs.s.cs +111 -0
  38. data/test/MC/AArch64/neon-2velem.s.cs +113 -0
  39. data/test/MC/AArch64/neon-3vdiff.s.cs +143 -0
  40. data/test/MC/AArch64/neon-aba-abd.s.cs +28 -0
  41. data/test/MC/AArch64/neon-across.s.cs +40 -0
  42. data/test/MC/AArch64/neon-add-pairwise.s.cs +11 -0
  43. data/test/MC/AArch64/neon-add-sub-instructions.s.cs +21 -0
  44. data/test/MC/AArch64/neon-bitwise-instructions.s.cs +17 -0
  45. data/test/MC/AArch64/neon-compare-instructions.s.cs +136 -0
  46. data/test/MC/AArch64/neon-crypto.s.cs +15 -0
  47. data/test/MC/AArch64/neon-extract.s.cs +3 -0
  48. data/test/MC/AArch64/neon-facge-facgt.s.cs +13 -0
  49. data/test/MC/AArch64/neon-frsqrt-frecp.s.cs +7 -0
  50. data/test/MC/AArch64/neon-halving-add-sub.s.cs +25 -0
  51. data/test/MC/AArch64/neon-max-min-pairwise.s.cs +37 -0
  52. data/test/MC/AArch64/neon-max-min.s.cs +37 -0
  53. data/test/MC/AArch64/neon-mla-mls-instructions.s.cs +19 -0
  54. data/test/MC/AArch64/neon-mov.s.cs +74 -0
  55. data/test/MC/AArch64/neon-mul-div-instructions.s.cs +24 -0
  56. data/test/MC/AArch64/neon-perm.s.cs +43 -0
  57. data/test/MC/AArch64/neon-rounding-halving-add.s.cs +13 -0
  58. data/test/MC/AArch64/neon-rounding-shift.s.cs +15 -0
  59. data/test/MC/AArch64/neon-saturating-add-sub.s.cs +29 -0
  60. data/test/MC/AArch64/neon-saturating-rounding-shift.s.cs +15 -0
  61. data/test/MC/AArch64/neon-saturating-shift.s.cs +15 -0
  62. data/test/MC/AArch64/neon-scalar-abs.s.cs +8 -0
  63. data/test/MC/AArch64/neon-scalar-add-sub.s.cs +3 -0
  64. data/test/MC/AArch64/neon-scalar-by-elem-mla.s.cs +13 -0
  65. data/test/MC/AArch64/neon-scalar-by-elem-mul.s.cs +13 -0
  66. data/test/MC/AArch64/neon-scalar-by-elem-saturating-mla.s.cs +15 -0
  67. data/test/MC/AArch64/neon-scalar-by-elem-saturating-mul.s.cs +18 -0
  68. data/test/MC/AArch64/neon-scalar-compare.s.cs +12 -0
  69. data/test/MC/AArch64/neon-scalar-cvt.s.cs +34 -0
  70. data/test/MC/AArch64/neon-scalar-dup.s.cs +23 -0
  71. data/test/MC/AArch64/neon-scalar-extract-narrow.s.cs +10 -0
  72. data/test/MC/AArch64/neon-scalar-fp-compare.s.cs +21 -0
  73. data/test/MC/AArch64/neon-scalar-mul.s.cs +13 -0
  74. data/test/MC/AArch64/neon-scalar-neg.s.cs +6 -0
  75. data/test/MC/AArch64/neon-scalar-recip.s.cs +11 -0
  76. data/test/MC/AArch64/neon-scalar-reduce-pairwise.s.cs +3 -0
  77. data/test/MC/AArch64/neon-scalar-rounding-shift.s.cs +3 -0
  78. data/test/MC/AArch64/neon-scalar-saturating-add-sub.s.cs +25 -0
  79. data/test/MC/AArch64/neon-scalar-saturating-rounding-shift.s.cs +9 -0
  80. data/test/MC/AArch64/neon-scalar-saturating-shift.s.cs +9 -0
  81. data/test/MC/AArch64/neon-scalar-shift-imm.s.cs +42 -0
  82. data/test/MC/AArch64/neon-scalar-shift.s.cs +3 -0
  83. data/test/MC/AArch64/neon-shift-left-long.s.cs +13 -0
  84. data/test/MC/AArch64/neon-shift.s.cs +22 -0
  85. data/test/MC/AArch64/neon-simd-copy.s.cs +42 -0
  86. data/test/MC/AArch64/neon-simd-ldst-multi-elem.s.cs +197 -0
  87. data/test/MC/AArch64/neon-simd-ldst-one-elem.s.cs +129 -0
  88. data/test/MC/AArch64/neon-simd-misc.s.cs +213 -0
  89. data/test/MC/AArch64/neon-simd-post-ldst-multi-elem.s.cs +107 -0
  90. data/test/MC/AArch64/neon-simd-shift.s.cs +151 -0
  91. data/test/MC/AArch64/neon-tbl.s.cs +21 -0
  92. data/test/MC/AArch64/trace-regs.s.cs +383 -0
  93. data/test/MC/ARM/arm-aliases.s.cs +7 -0
  94. data/test/MC/ARM/arm-arithmetic-aliases.s.cs +50 -0
  95. data/test/MC/ARM/arm-it-block.s.cs +2 -0
  96. data/test/MC/ARM/arm-memory-instructions.s.cs +138 -0
  97. data/test/MC/ARM/arm-shift-encoding.s.cs +50 -0
  98. data/test/MC/ARM/arm-thumb-trustzone.s.cs +3 -0
  99. data/test/MC/ARM/arm-trustzone.s.cs +3 -0
  100. data/test/MC/ARM/arm_addrmode2.s.cs +15 -0
  101. data/test/MC/ARM/arm_addrmode3.s.cs +9 -0
  102. data/test/MC/ARM/arm_instructions.s.cs +25 -0
  103. data/test/MC/ARM/basic-arm-instructions-v8.s.cs +10 -0
  104. data/test/MC/ARM/basic-arm-instructions.s.cs +997 -0
  105. data/test/MC/ARM/basic-thumb-instructions.s.cs +130 -0
  106. data/test/MC/ARM/basic-thumb2-instructions-v8.s.cs +1 -0
  107. data/test/MC/ARM/basic-thumb2-instructions.s.cs +1242 -0
  108. data/test/MC/ARM/crc32-thumb.s.cs +7 -0
  109. data/test/MC/ARM/crc32.s.cs +7 -0
  110. data/test/MC/ARM/dot-req.s.cs +3 -0
  111. data/test/MC/ARM/fp-armv8.s.cs +52 -0
  112. data/test/MC/ARM/idiv-thumb.s.cs +3 -0
  113. data/test/MC/ARM/idiv.s.cs +3 -0
  114. data/test/MC/ARM/load-store-acquire-release-v8-thumb.s.cs +15 -0
  115. data/test/MC/ARM/load-store-acquire-release-v8.s.cs +15 -0
  116. data/test/MC/ARM/mode-switch.s.cs +7 -0
  117. data/test/MC/ARM/neon-abs-encoding.s.cs +15 -0
  118. data/test/MC/ARM/neon-absdiff-encoding.s.cs +39 -0
  119. data/test/MC/ARM/neon-add-encoding.s.cs +119 -0
  120. data/test/MC/ARM/neon-bitcount-encoding.s.cs +15 -0
  121. data/test/MC/ARM/neon-bitwise-encoding.s.cs +126 -0
  122. data/test/MC/ARM/neon-cmp-encoding.s.cs +88 -0
  123. data/test/MC/ARM/neon-convert-encoding.s.cs +27 -0
  124. data/test/MC/ARM/neon-crypto.s.cs +16 -0
  125. data/test/MC/ARM/neon-dup-encoding.s.cs +13 -0
  126. data/test/MC/ARM/neon-minmax-encoding.s.cs +57 -0
  127. data/test/MC/ARM/neon-mov-encoding.s.cs +76 -0
  128. data/test/MC/ARM/neon-mul-accum-encoding.s.cs +39 -0
  129. data/test/MC/ARM/neon-mul-encoding.s.cs +72 -0
  130. data/test/MC/ARM/neon-neg-encoding.s.cs +15 -0
  131. data/test/MC/ARM/neon-pairwise-encoding.s.cs +47 -0
  132. data/test/MC/ARM/neon-reciprocal-encoding.s.cs +13 -0
  133. data/test/MC/ARM/neon-reverse-encoding.s.cs +13 -0
  134. data/test/MC/ARM/neon-satshift-encoding.s.cs +75 -0
  135. data/test/MC/ARM/neon-shift-encoding.s.cs +238 -0
  136. data/test/MC/ARM/neon-shiftaccum-encoding.s.cs +97 -0
  137. data/test/MC/ARM/neon-shuffle-encoding.s.cs +59 -0
  138. data/test/MC/ARM/neon-sub-encoding.s.cs +82 -0
  139. data/test/MC/ARM/neon-table-encoding.s.cs +9 -0
  140. data/test/MC/ARM/neon-v8.s.cs +38 -0
  141. data/test/MC/ARM/neon-vld-encoding.s.cs +213 -0
  142. data/test/MC/ARM/neon-vst-encoding.s.cs +120 -0
  143. data/test/MC/ARM/neon-vswp.s.cs +3 -0
  144. data/test/MC/ARM/neont2-abs-encoding.s.cs +15 -0
  145. data/test/MC/ARM/neont2-absdiff-encoding.s.cs +39 -0
  146. data/test/MC/ARM/neont2-add-encoding.s.cs +65 -0
  147. data/test/MC/ARM/neont2-bitcount-encoding.s.cs +15 -0
  148. data/test/MC/ARM/neont2-bitwise-encoding.s.cs +15 -0
  149. data/test/MC/ARM/neont2-cmp-encoding.s.cs +17 -0
  150. data/test/MC/ARM/neont2-convert-encoding.s.cs +19 -0
  151. data/test/MC/ARM/neont2-dup-encoding.s.cs +19 -0
  152. data/test/MC/ARM/neont2-minmax-encoding.s.cs +57 -0
  153. data/test/MC/ARM/neont2-mov-encoding.s.cs +58 -0
  154. data/test/MC/ARM/neont2-mul-accum-encoding.s.cs +41 -0
  155. data/test/MC/ARM/neont2-mul-encoding.s.cs +31 -0
  156. data/test/MC/ARM/neont2-neg-encoding.s.cs +15 -0
  157. data/test/MC/ARM/neont2-pairwise-encoding.s.cs +43 -0
  158. data/test/MC/ARM/neont2-reciprocal-encoding.s.cs +13 -0
  159. data/test/MC/ARM/neont2-reverse-encoding.s.cs +13 -0
  160. data/test/MC/ARM/neont2-satshift-encoding.s.cs +75 -0
  161. data/test/MC/ARM/neont2-shift-encoding.s.cs +80 -0
  162. data/test/MC/ARM/neont2-shiftaccum-encoding.s.cs +97 -0
  163. data/test/MC/ARM/neont2-shuffle-encoding.s.cs +23 -0
  164. data/test/MC/ARM/neont2-sub-encoding.s.cs +23 -0
  165. data/test/MC/ARM/neont2-table-encoding.s.cs +9 -0
  166. data/test/MC/ARM/neont2-vld-encoding.s.cs +51 -0
  167. data/test/MC/ARM/neont2-vst-encoding.s.cs +48 -0
  168. data/test/MC/ARM/simple-fp-encoding.s.cs +157 -0
  169. data/test/MC/ARM/thumb-fp-armv8.s.cs +51 -0
  170. data/test/MC/ARM/thumb-hints.s.cs +12 -0
  171. data/test/MC/ARM/thumb-neon-crypto.s.cs +16 -0
  172. data/test/MC/ARM/thumb-neon-v8.s.cs +38 -0
  173. data/test/MC/ARM/thumb-shift-encoding.s.cs +19 -0
  174. data/test/MC/ARM/thumb.s.cs +19 -0
  175. data/test/MC/ARM/thumb2-b.w-encodingT4.s.cs +2 -0
  176. data/test/MC/ARM/thumb2-branches.s.cs +85 -0
  177. data/test/MC/ARM/thumb2-mclass.s.cs +41 -0
  178. data/test/MC/ARM/thumb2-narrow-dp.ll.cs +379 -0
  179. data/test/MC/ARM/thumb2-pldw.s.cs +2 -0
  180. data/test/MC/ARM/vfp4-thumb.s.cs +13 -0
  181. data/test/MC/ARM/vfp4.s.cs +13 -0
  182. data/test/MC/ARM/vpush-vpop-thumb.s.cs +9 -0
  183. data/test/MC/ARM/vpush-vpop.s.cs +9 -0
  184. data/test/MC/Mips/hilo-addressing.s.cs +4 -0
  185. data/test/MC/Mips/micromips-alu-instructions-EB.s.cs +33 -0
  186. data/test/MC/Mips/micromips-alu-instructions.s.cs +33 -0
  187. data/test/MC/Mips/micromips-branch-instructions-EB.s.cs +11 -0
  188. data/test/MC/Mips/micromips-branch-instructions.s.cs +11 -0
  189. data/test/MC/Mips/micromips-expansions.s.cs +20 -0
  190. data/test/MC/Mips/micromips-jump-instructions-EB.s.cs +5 -0
  191. data/test/MC/Mips/micromips-jump-instructions.s.cs +6 -0
  192. data/test/MC/Mips/micromips-loadstore-instructions-EB.s.cs +9 -0
  193. data/test/MC/Mips/micromips-loadstore-instructions.s.cs +9 -0
  194. data/test/MC/Mips/micromips-loadstore-unaligned-EB.s.cs +5 -0
  195. data/test/MC/Mips/micromips-loadstore-unaligned.s.cs +5 -0
  196. data/test/MC/Mips/micromips-movcond-instructions-EB.s.cs +5 -0
  197. data/test/MC/Mips/micromips-movcond-instructions.s.cs +5 -0
  198. data/test/MC/Mips/micromips-multiply-instructions-EB.s.cs +5 -0
  199. data/test/MC/Mips/micromips-multiply-instructions.s.cs +5 -0
  200. data/test/MC/Mips/micromips-shift-instructions-EB.s.cs +9 -0
  201. data/test/MC/Mips/micromips-shift-instructions.s.cs +9 -0
  202. data/test/MC/Mips/micromips-trap-instructions-EB.s.cs +13 -0
  203. data/test/MC/Mips/micromips-trap-instructions.s.cs +13 -0
  204. data/test/MC/Mips/mips-alu-instructions.s.cs +53 -0
  205. data/test/MC/Mips/mips-control-instructions-64.s.cs +33 -0
  206. data/test/MC/Mips/mips-control-instructions.s.cs +33 -0
  207. data/test/MC/Mips/mips-coprocessor-encodings.s.cs +17 -0
  208. data/test/MC/Mips/mips-dsp-instructions.s.cs +43 -0
  209. data/test/MC/Mips/mips-expansions.s.cs +20 -0
  210. data/test/MC/Mips/mips-fpu-instructions.s.cs +93 -0
  211. data/test/MC/Mips/mips-jump-instructions.s.cs +1 -0
  212. data/test/MC/Mips/mips-memory-instructions.s.cs +17 -0
  213. data/test/MC/Mips/mips-register-names.s.cs +33 -0
  214. data/test/MC/Mips/mips64-alu-instructions.s.cs +47 -0
  215. data/test/MC/Mips/mips64-instructions.s.cs +3 -0
  216. data/test/MC/Mips/mips64-register-names.s.cs +33 -0
  217. data/test/MC/Mips/mips_directives.s.cs +12 -0
  218. data/test/MC/Mips/nabi-regs.s.cs +12 -0
  219. data/test/MC/Mips/set-at-directive.s.cs +6 -0
  220. data/test/MC/Mips/test_2r.s.cs +16 -0
  221. data/test/MC/Mips/test_2rf.s.cs +33 -0
  222. data/test/MC/Mips/test_3r.s.cs +243 -0
  223. data/test/MC/Mips/test_3rf.s.cs +83 -0
  224. data/test/MC/Mips/test_bit.s.cs +49 -0
  225. data/test/MC/Mips/test_cbranch.s.cs +11 -0
  226. data/test/MC/Mips/test_ctrlregs.s.cs +33 -0
  227. data/test/MC/Mips/test_elm.s.cs +16 -0
  228. data/test/MC/Mips/test_elm_insert.s.cs +4 -0
  229. data/test/MC/Mips/test_elm_insve.s.cs +5 -0
  230. data/test/MC/Mips/test_i10.s.cs +5 -0
  231. data/test/MC/Mips/test_i5.s.cs +45 -0
  232. data/test/MC/Mips/test_i8.s.cs +11 -0
  233. data/test/MC/Mips/test_lsa.s.cs +5 -0
  234. data/test/MC/Mips/test_mi10.s.cs +24 -0
  235. data/test/MC/Mips/test_vec.s.cs +8 -0
  236. data/test/MC/PowerPC/ppc64-encoding-bookII.s.cs +25 -0
  237. data/test/MC/PowerPC/ppc64-encoding-bookIII.s.cs +35 -0
  238. data/test/MC/PowerPC/ppc64-encoding-ext.s.cs +535 -0
  239. data/test/MC/PowerPC/ppc64-encoding-fp.s.cs +110 -0
  240. data/test/MC/PowerPC/ppc64-encoding-vmx.s.cs +170 -0
  241. data/test/MC/PowerPC/ppc64-encoding.s.cs +202 -0
  242. data/test/MC/PowerPC/ppc64-operands.s.cs +32 -0
  243. data/test/MC/README +6 -0
  244. data/test/MC/Sparc/sparc-alu-instructions.s.cs +47 -0
  245. data/test/MC/Sparc/sparc-atomic-instructions.s.cs +7 -0
  246. data/test/MC/Sparc/sparc-ctrl-instructions.s.cs +11 -0
  247. data/test/MC/Sparc/sparc-fp-instructions.s.cs +59 -0
  248. data/test/MC/Sparc/sparc-mem-instructions.s.cs +25 -0
  249. data/test/MC/Sparc/sparc-vis.s.cs +2 -0
  250. data/test/MC/Sparc/sparc64-alu-instructions.s.cs +13 -0
  251. data/test/MC/Sparc/sparc64-ctrl-instructions.s.cs +102 -0
  252. data/test/MC/Sparc/sparcv8-instructions.s.cs +7 -0
  253. data/test/MC/Sparc/sparcv9-instructions.s.cs +1 -0
  254. data/test/MC/SystemZ/insn-good-z196.s.cs +589 -0
  255. data/test/MC/SystemZ/insn-good.s.cs +2265 -0
  256. data/test/MC/SystemZ/regs-good.s.cs +45 -0
  257. data/test/MC/X86/3DNow.s.cs +29 -0
  258. data/test/MC/X86/address-size.s.cs +5 -0
  259. data/test/MC/X86/avx512-encodings.s.cs +12 -0
  260. data/test/MC/X86/intel-syntax-encoding.s.cs +30 -0
  261. data/test/MC/X86/x86-32-avx.s.cs +833 -0
  262. data/test/MC/X86/x86-32-fma3.s.cs +169 -0
  263. data/test/MC/X86/x86-32-ms-inline-asm.s.cs +27 -0
  264. data/test/MC/X86/x86_64-avx-clmul-encoding.s.cs +11 -0
  265. data/test/MC/X86/x86_64-avx-encoding.s.cs +1058 -0
  266. data/test/MC/X86/x86_64-bmi-encoding.s.cs +51 -0
  267. data/test/MC/X86/x86_64-encoding.s.cs +59 -0
  268. data/test/MC/X86/x86_64-fma3-encoding.s.cs +169 -0
  269. data/test/MC/X86/x86_64-fma4-encoding.s.cs +98 -0
  270. data/test/MC/X86/x86_64-hle-encoding.s.cs +3 -0
  271. data/test/MC/X86/x86_64-imm-widths.s.cs +27 -0
  272. data/test/MC/X86/x86_64-rand-encoding.s.cs +13 -0
  273. data/test/MC/X86/x86_64-rtm-encoding.s.cs +4 -0
  274. data/test/MC/X86/x86_64-sse4a.s.cs +1 -0
  275. data/test/MC/X86/x86_64-tbm-encoding.s.cs +40 -0
  276. data/test/MC/X86/x86_64-xop-encoding.s.cs +152 -0
  277. data/test/README +6 -0
  278. data/test/test.rb +205 -0
  279. data/test/test.rb.SPEC +235 -0
  280. data/test/test_arm.rb +202 -0
  281. data/test/test_arm.rb.SPEC +275 -0
  282. data/test/test_arm64.rb +150 -0
  283. data/test/test_arm64.rb.SPEC +116 -0
  284. data/test/test_detail.rb +228 -0
  285. data/test/test_detail.rb.SPEC +322 -0
  286. data/test/test_exhaustive.rb +80 -0
  287. data/test/test_mips.rb +118 -0
  288. data/test/test_mips.rb.SPEC +91 -0
  289. data/test/test_ppc.rb +137 -0
  290. data/test/test_ppc.rb.SPEC +84 -0
  291. data/test/test_sanity.rb +83 -0
  292. data/test/test_skipdata.rb +111 -0
  293. data/test/test_skipdata.rb.SPEC +58 -0
  294. data/test/test_sparc.rb +113 -0
  295. data/test/test_sparc.rb.SPEC +116 -0
  296. data/test/test_sysz.rb +111 -0
  297. data/test/test_sysz.rb.SPEC +61 -0
  298. data/test/test_x86.rb +189 -0
  299. data/test/test_x86.rb.SPEC +579 -0
  300. data/test/test_xcore.rb +100 -0
  301. data/test/test_xcore.rb.SPEC +75 -0
  302. metadata +393 -0
@@ -0,0 +1,209 @@
1
+ # Library by Nguyen Anh Quynh
2
+ # Original binding by Nguyen Anh Quynh and Tan Sheng Di
3
+ # Additional binding work by Ben Nagy
4
+ # (c) 2013 COSEINC. All Rights Reserved.
5
+
6
+ # THIS FILE WAS AUTO-GENERATED -- DO NOT EDIT!
7
+ # Command: ./genreg /Users/ben/src/capstone/bindings/python/capstone/
8
+ # 2015-05-02T13:24:07+12:00
9
+
10
+ module Crabstone
11
+ module PPC
12
+ REG_LOOKUP = {
13
+ 'INVALID' => 0,
14
+ 'CARRY' => 1,
15
+ 'CC' => 2,
16
+ 'CR0' => 3,
17
+ 'CR1' => 4,
18
+ 'CR2' => 5,
19
+ 'CR3' => 6,
20
+ 'CR4' => 7,
21
+ 'CR5' => 8,
22
+ 'CR6' => 9,
23
+ 'CR7' => 10,
24
+ 'CTR' => 11,
25
+ 'F0' => 12,
26
+ 'F1' => 13,
27
+ 'F2' => 14,
28
+ 'F3' => 15,
29
+ 'F4' => 16,
30
+ 'F5' => 17,
31
+ 'F6' => 18,
32
+ 'F7' => 19,
33
+ 'F8' => 20,
34
+ 'F9' => 21,
35
+ 'F10' => 22,
36
+ 'F11' => 23,
37
+ 'F12' => 24,
38
+ 'F13' => 25,
39
+ 'F14' => 26,
40
+ 'F15' => 27,
41
+ 'F16' => 28,
42
+ 'F17' => 29,
43
+ 'F18' => 30,
44
+ 'F19' => 31,
45
+ 'F20' => 32,
46
+ 'F21' => 33,
47
+ 'F22' => 34,
48
+ 'F23' => 35,
49
+ 'F24' => 36,
50
+ 'F25' => 37,
51
+ 'F26' => 38,
52
+ 'F27' => 39,
53
+ 'F28' => 40,
54
+ 'F29' => 41,
55
+ 'F30' => 42,
56
+ 'F31' => 43,
57
+ 'LR' => 44,
58
+ 'R0' => 45,
59
+ 'R1' => 46,
60
+ 'R2' => 47,
61
+ 'R3' => 48,
62
+ 'R4' => 49,
63
+ 'R5' => 50,
64
+ 'R6' => 51,
65
+ 'R7' => 52,
66
+ 'R8' => 53,
67
+ 'R9' => 54,
68
+ 'R10' => 55,
69
+ 'R11' => 56,
70
+ 'R12' => 57,
71
+ 'R13' => 58,
72
+ 'R14' => 59,
73
+ 'R15' => 60,
74
+ 'R16' => 61,
75
+ 'R17' => 62,
76
+ 'R18' => 63,
77
+ 'R19' => 64,
78
+ 'R20' => 65,
79
+ 'R21' => 66,
80
+ 'R22' => 67,
81
+ 'R23' => 68,
82
+ 'R24' => 69,
83
+ 'R25' => 70,
84
+ 'R26' => 71,
85
+ 'R27' => 72,
86
+ 'R28' => 73,
87
+ 'R29' => 74,
88
+ 'R30' => 75,
89
+ 'R31' => 76,
90
+ 'V0' => 77,
91
+ 'V1' => 78,
92
+ 'V2' => 79,
93
+ 'V3' => 80,
94
+ 'V4' => 81,
95
+ 'V5' => 82,
96
+ 'V6' => 83,
97
+ 'V7' => 84,
98
+ 'V8' => 85,
99
+ 'V9' => 86,
100
+ 'V10' => 87,
101
+ 'V11' => 88,
102
+ 'V12' => 89,
103
+ 'V13' => 90,
104
+ 'V14' => 91,
105
+ 'V15' => 92,
106
+ 'V16' => 93,
107
+ 'V17' => 94,
108
+ 'V18' => 95,
109
+ 'V19' => 96,
110
+ 'V20' => 97,
111
+ 'V21' => 98,
112
+ 'V22' => 99,
113
+ 'V23' => 100,
114
+ 'V24' => 101,
115
+ 'V25' => 102,
116
+ 'V26' => 103,
117
+ 'V27' => 104,
118
+ 'V28' => 105,
119
+ 'V29' => 106,
120
+ 'V30' => 107,
121
+ 'V31' => 108,
122
+ 'VRSAVE' => 109,
123
+ 'VS0' => 110,
124
+ 'VS1' => 111,
125
+ 'VS2' => 112,
126
+ 'VS3' => 113,
127
+ 'VS4' => 114,
128
+ 'VS5' => 115,
129
+ 'VS6' => 116,
130
+ 'VS7' => 117,
131
+ 'VS8' => 118,
132
+ 'VS9' => 119,
133
+ 'VS10' => 120,
134
+ 'VS11' => 121,
135
+ 'VS12' => 122,
136
+ 'VS13' => 123,
137
+ 'VS14' => 124,
138
+ 'VS15' => 125,
139
+ 'VS16' => 126,
140
+ 'VS17' => 127,
141
+ 'VS18' => 128,
142
+ 'VS19' => 129,
143
+ 'VS20' => 130,
144
+ 'VS21' => 131,
145
+ 'VS22' => 132,
146
+ 'VS23' => 133,
147
+ 'VS24' => 134,
148
+ 'VS25' => 135,
149
+ 'VS26' => 136,
150
+ 'VS27' => 137,
151
+ 'VS28' => 138,
152
+ 'VS29' => 139,
153
+ 'VS30' => 140,
154
+ 'VS31' => 141,
155
+ 'VS32' => 142,
156
+ 'VS33' => 143,
157
+ 'VS34' => 144,
158
+ 'VS35' => 145,
159
+ 'VS36' => 146,
160
+ 'VS37' => 147,
161
+ 'VS38' => 148,
162
+ 'VS39' => 149,
163
+ 'VS40' => 150,
164
+ 'VS41' => 151,
165
+ 'VS42' => 152,
166
+ 'VS43' => 153,
167
+ 'VS44' => 154,
168
+ 'VS45' => 155,
169
+ 'VS46' => 156,
170
+ 'VS47' => 157,
171
+ 'VS48' => 158,
172
+ 'VS49' => 159,
173
+ 'VS50' => 160,
174
+ 'VS51' => 161,
175
+ 'VS52' => 162,
176
+ 'VS53' => 163,
177
+ 'VS54' => 164,
178
+ 'VS55' => 165,
179
+ 'VS56' => 166,
180
+ 'VS57' => 167,
181
+ 'VS58' => 168,
182
+ 'VS59' => 169,
183
+ 'VS60' => 170,
184
+ 'VS61' => 171,
185
+ 'VS62' => 172,
186
+ 'VS63' => 173,
187
+ 'RM' => 174,
188
+ 'CTR8' => 175,
189
+ 'LR8' => 176,
190
+ 'CR1EQ' => 177
191
+ }
192
+
193
+ ID_LOOKUP = REG_LOOKUP.invert
194
+
195
+ # alias registers
196
+
197
+ SYM_LOOKUP = Hash[REG_LOOKUP.map {|k,v| [k.downcase.to_sym,v]}]
198
+
199
+ def self.register reg
200
+ return reg if ID_LOOKUP[reg]
201
+ return SYM_LOOKUP[reg] if SYM_LOOKUP[reg]
202
+ if reg.respond_to? :upcase
203
+ return REG_LOOKUP[reg.upcase] || REG_LOOKUP['INVALID']
204
+ end
205
+ REG_LOOKUP['INVALID']
206
+ end
207
+
208
+ end
209
+ end
@@ -0,0 +1,79 @@
1
+ # Library by Nguyen Anh Quynh
2
+ # Original binding by Nguyen Anh Quynh and Tan Sheng Di
3
+ # Additional binding work by Ben Nagy
4
+ # (c) 2013 COSEINC. All Rights Reserved.
5
+
6
+ require 'ffi'
7
+
8
+ require_relative 'sparc_const'
9
+
10
+ module Crabstone
11
+ module Sparc
12
+
13
+ class MemoryOperand < FFI::Struct
14
+ layout(
15
+ :base, :uint8,
16
+ :index, :uint8,
17
+ :disp, :int32
18
+ )
19
+ end
20
+
21
+ class OperandValue < FFI::Union
22
+ layout(
23
+ :reg, :uint,
24
+ :imm, :int32,
25
+ :mem, MemoryOperand
26
+ )
27
+ end
28
+
29
+ class Operand < FFI::Struct
30
+ layout(
31
+ :type, :uint,
32
+ :value, OperandValue
33
+ )
34
+
35
+ def value
36
+ case self[:type]
37
+ when OP_REG
38
+ self[:value][:reg]
39
+ when OP_IMM
40
+ self[:value][:imm]
41
+ when OP_MEM
42
+ self[:value][:mem]
43
+ else
44
+ nil
45
+ end
46
+ end
47
+
48
+ def reg?
49
+ self[:type] == OP_REG
50
+ end
51
+
52
+ def imm?
53
+ self[:type] == OP_IMM
54
+ end
55
+
56
+ def mem?
57
+ self[:type] == OP_MEM
58
+ end
59
+
60
+ def valid?
61
+ [OP_MEM, OP_IMM, OP_REG].include? self[:type]
62
+ end
63
+ end
64
+
65
+ class Instruction < FFI::Struct
66
+ layout(
67
+ :cc, :uint,
68
+ :hint, :uint,
69
+ :op_count, :uint8,
70
+ :operands, [Operand, 4],
71
+ )
72
+
73
+ def operands
74
+ self[:operands].take_while {|op| op[:type].nonzero?}
75
+ end
76
+
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,461 @@
1
+ # Library by Nguyen Anh Quynh
2
+ # Original binding by Nguyen Anh Quynh and Tan Sheng Di
3
+ # Additional binding work by Ben Nagy
4
+ # (c) 2013 COSEINC. All Rights Reserved.
5
+
6
+ # THIS FILE WAS AUTO-GENERATED -- DO NOT EDIT!
7
+ # Command: ./genconst /Users/ben/src/capstone/bindings/python/capstone/
8
+ # 2015-05-02T13:24:01+12:00
9
+
10
+ module Crabstone
11
+ module Sparc
12
+
13
+ # Enums corresponding to Sparc condition codes, both icc's and fcc's.
14
+
15
+ CC_INVALID = 0
16
+
17
+ # Integer condition codes
18
+ CC_ICC_A = 8+256
19
+ CC_ICC_N = 0+256
20
+ CC_ICC_NE = 9+256
21
+ CC_ICC_E = 1+256
22
+ CC_ICC_G = 10+256
23
+ CC_ICC_LE = 2+256
24
+ CC_ICC_GE = 11+256
25
+ CC_ICC_L = 3+256
26
+ CC_ICC_GU = 12+256
27
+ CC_ICC_LEU = 4+256
28
+ CC_ICC_CC = 13+256
29
+ CC_ICC_CS = 5+256
30
+ CC_ICC_POS = 14+256
31
+ CC_ICC_NEG = 6+256
32
+ CC_ICC_VC = 15+256
33
+ CC_ICC_VS = 7+256
34
+
35
+ # Floating condition codes
36
+ CC_FCC_A = 8+16+256
37
+ CC_FCC_N = 0+16+256
38
+ CC_FCC_U = 7+16+256
39
+ CC_FCC_G = 6+16+256
40
+ CC_FCC_UG = 5+16+256
41
+ CC_FCC_L = 4+16+256
42
+ CC_FCC_UL = 3+16+256
43
+ CC_FCC_LG = 2+16+256
44
+ CC_FCC_NE = 1+16+256
45
+ CC_FCC_E = 9+16+256
46
+ CC_FCC_UE = 10+16+256
47
+ CC_FCC_GE = 11+16+256
48
+ CC_FCC_UGE = 12+16+256
49
+ CC_FCC_LE = 13+16+256
50
+ CC_FCC_ULE = 14+16+256
51
+ CC_FCC_O = 15+16+256
52
+
53
+ # Branch hint
54
+
55
+ HINT_INVALID = 0
56
+ HINT_A = 1<<0
57
+ HINT_PT = 1<<1
58
+ HINT_PN = 1<<2
59
+
60
+ # Operand type for instruction's operands
61
+
62
+ OP_INVALID = 0
63
+ OP_REG = 1
64
+ OP_IMM = 2
65
+ OP_MEM = 3
66
+
67
+ # SPARC registers
68
+
69
+ REG_INVALID = 0
70
+ REG_F0 = 1
71
+ REG_F1 = 2
72
+ REG_F2 = 3
73
+ REG_F3 = 4
74
+ REG_F4 = 5
75
+ REG_F5 = 6
76
+ REG_F6 = 7
77
+ REG_F7 = 8
78
+ REG_F8 = 9
79
+ REG_F9 = 10
80
+ REG_F10 = 11
81
+ REG_F11 = 12
82
+ REG_F12 = 13
83
+ REG_F13 = 14
84
+ REG_F14 = 15
85
+ REG_F15 = 16
86
+ REG_F16 = 17
87
+ REG_F17 = 18
88
+ REG_F18 = 19
89
+ REG_F19 = 20
90
+ REG_F20 = 21
91
+ REG_F21 = 22
92
+ REG_F22 = 23
93
+ REG_F23 = 24
94
+ REG_F24 = 25
95
+ REG_F25 = 26
96
+ REG_F26 = 27
97
+ REG_F27 = 28
98
+ REG_F28 = 29
99
+ REG_F29 = 30
100
+ REG_F30 = 31
101
+ REG_F31 = 32
102
+ REG_F32 = 33
103
+ REG_F34 = 34
104
+ REG_F36 = 35
105
+ REG_F38 = 36
106
+ REG_F40 = 37
107
+ REG_F42 = 38
108
+ REG_F44 = 39
109
+ REG_F46 = 40
110
+ REG_F48 = 41
111
+ REG_F50 = 42
112
+ REG_F52 = 43
113
+ REG_F54 = 44
114
+ REG_F56 = 45
115
+ REG_F58 = 46
116
+ REG_F60 = 47
117
+ REG_F62 = 48
118
+ REG_FCC0 = 49
119
+ REG_FCC1 = 50
120
+ REG_FCC2 = 51
121
+ REG_FCC3 = 52
122
+ REG_FP = 53
123
+ REG_G0 = 54
124
+ REG_G1 = 55
125
+ REG_G2 = 56
126
+ REG_G3 = 57
127
+ REG_G4 = 58
128
+ REG_G5 = 59
129
+ REG_G6 = 60
130
+ REG_G7 = 61
131
+ REG_I0 = 62
132
+ REG_I1 = 63
133
+ REG_I2 = 64
134
+ REG_I3 = 65
135
+ REG_I4 = 66
136
+ REG_I5 = 67
137
+ REG_I7 = 68
138
+ REG_ICC = 69
139
+ REG_L0 = 70
140
+ REG_L1 = 71
141
+ REG_L2 = 72
142
+ REG_L3 = 73
143
+ REG_L4 = 74
144
+ REG_L5 = 75
145
+ REG_L6 = 76
146
+ REG_L7 = 77
147
+ REG_O0 = 78
148
+ REG_O1 = 79
149
+ REG_O2 = 80
150
+ REG_O3 = 81
151
+ REG_O4 = 82
152
+ REG_O5 = 83
153
+ REG_O7 = 84
154
+ REG_SP = 85
155
+ REG_Y = 86
156
+ REG_XCC = 87
157
+ REG_ENDING = 88
158
+ REG_O6 = REG_SP
159
+ REG_I6 = REG_FP
160
+
161
+ # SPARC instruction
162
+
163
+ INS_INVALID = 0
164
+ INS_ADDCC = 1
165
+ INS_ADDX = 2
166
+ INS_ADDXCC = 3
167
+ INS_ADDXC = 4
168
+ INS_ADDXCCC = 5
169
+ INS_ADD = 6
170
+ INS_ALIGNADDR = 7
171
+ INS_ALIGNADDRL = 8
172
+ INS_ANDCC = 9
173
+ INS_ANDNCC = 10
174
+ INS_ANDN = 11
175
+ INS_AND = 12
176
+ INS_ARRAY16 = 13
177
+ INS_ARRAY32 = 14
178
+ INS_ARRAY8 = 15
179
+ INS_B = 16
180
+ INS_JMP = 17
181
+ INS_BMASK = 18
182
+ INS_FB = 19
183
+ INS_BRGEZ = 20
184
+ INS_BRGZ = 21
185
+ INS_BRLEZ = 22
186
+ INS_BRLZ = 23
187
+ INS_BRNZ = 24
188
+ INS_BRZ = 25
189
+ INS_BSHUFFLE = 26
190
+ INS_CALL = 27
191
+ INS_CASX = 28
192
+ INS_CAS = 29
193
+ INS_CMASK16 = 30
194
+ INS_CMASK32 = 31
195
+ INS_CMASK8 = 32
196
+ INS_CMP = 33
197
+ INS_EDGE16 = 34
198
+ INS_EDGE16L = 35
199
+ INS_EDGE16LN = 36
200
+ INS_EDGE16N = 37
201
+ INS_EDGE32 = 38
202
+ INS_EDGE32L = 39
203
+ INS_EDGE32LN = 40
204
+ INS_EDGE32N = 41
205
+ INS_EDGE8 = 42
206
+ INS_EDGE8L = 43
207
+ INS_EDGE8LN = 44
208
+ INS_EDGE8N = 45
209
+ INS_FABSD = 46
210
+ INS_FABSQ = 47
211
+ INS_FABSS = 48
212
+ INS_FADDD = 49
213
+ INS_FADDQ = 50
214
+ INS_FADDS = 51
215
+ INS_FALIGNDATA = 52
216
+ INS_FAND = 53
217
+ INS_FANDNOT1 = 54
218
+ INS_FANDNOT1S = 55
219
+ INS_FANDNOT2 = 56
220
+ INS_FANDNOT2S = 57
221
+ INS_FANDS = 58
222
+ INS_FCHKSM16 = 59
223
+ INS_FCMPD = 60
224
+ INS_FCMPEQ16 = 61
225
+ INS_FCMPEQ32 = 62
226
+ INS_FCMPGT16 = 63
227
+ INS_FCMPGT32 = 64
228
+ INS_FCMPLE16 = 65
229
+ INS_FCMPLE32 = 66
230
+ INS_FCMPNE16 = 67
231
+ INS_FCMPNE32 = 68
232
+ INS_FCMPQ = 69
233
+ INS_FCMPS = 70
234
+ INS_FDIVD = 71
235
+ INS_FDIVQ = 72
236
+ INS_FDIVS = 73
237
+ INS_FDMULQ = 74
238
+ INS_FDTOI = 75
239
+ INS_FDTOQ = 76
240
+ INS_FDTOS = 77
241
+ INS_FDTOX = 78
242
+ INS_FEXPAND = 79
243
+ INS_FHADDD = 80
244
+ INS_FHADDS = 81
245
+ INS_FHSUBD = 82
246
+ INS_FHSUBS = 83
247
+ INS_FITOD = 84
248
+ INS_FITOQ = 85
249
+ INS_FITOS = 86
250
+ INS_FLCMPD = 87
251
+ INS_FLCMPS = 88
252
+ INS_FLUSHW = 89
253
+ INS_FMEAN16 = 90
254
+ INS_FMOVD = 91
255
+ INS_FMOVQ = 92
256
+ INS_FMOVRDGEZ = 93
257
+ INS_FMOVRQGEZ = 94
258
+ INS_FMOVRSGEZ = 95
259
+ INS_FMOVRDGZ = 96
260
+ INS_FMOVRQGZ = 97
261
+ INS_FMOVRSGZ = 98
262
+ INS_FMOVRDLEZ = 99
263
+ INS_FMOVRQLEZ = 100
264
+ INS_FMOVRSLEZ = 101
265
+ INS_FMOVRDLZ = 102
266
+ INS_FMOVRQLZ = 103
267
+ INS_FMOVRSLZ = 104
268
+ INS_FMOVRDNZ = 105
269
+ INS_FMOVRQNZ = 106
270
+ INS_FMOVRSNZ = 107
271
+ INS_FMOVRDZ = 108
272
+ INS_FMOVRQZ = 109
273
+ INS_FMOVRSZ = 110
274
+ INS_FMOVS = 111
275
+ INS_FMUL8SUX16 = 112
276
+ INS_FMUL8ULX16 = 113
277
+ INS_FMUL8X16 = 114
278
+ INS_FMUL8X16AL = 115
279
+ INS_FMUL8X16AU = 116
280
+ INS_FMULD = 117
281
+ INS_FMULD8SUX16 = 118
282
+ INS_FMULD8ULX16 = 119
283
+ INS_FMULQ = 120
284
+ INS_FMULS = 121
285
+ INS_FNADDD = 122
286
+ INS_FNADDS = 123
287
+ INS_FNAND = 124
288
+ INS_FNANDS = 125
289
+ INS_FNEGD = 126
290
+ INS_FNEGQ = 127
291
+ INS_FNEGS = 128
292
+ INS_FNHADDD = 129
293
+ INS_FNHADDS = 130
294
+ INS_FNOR = 131
295
+ INS_FNORS = 132
296
+ INS_FNOT1 = 133
297
+ INS_FNOT1S = 134
298
+ INS_FNOT2 = 135
299
+ INS_FNOT2S = 136
300
+ INS_FONE = 137
301
+ INS_FONES = 138
302
+ INS_FOR = 139
303
+ INS_FORNOT1 = 140
304
+ INS_FORNOT1S = 141
305
+ INS_FORNOT2 = 142
306
+ INS_FORNOT2S = 143
307
+ INS_FORS = 144
308
+ INS_FPACK16 = 145
309
+ INS_FPACK32 = 146
310
+ INS_FPACKFIX = 147
311
+ INS_FPADD16 = 148
312
+ INS_FPADD16S = 149
313
+ INS_FPADD32 = 150
314
+ INS_FPADD32S = 151
315
+ INS_FPADD64 = 152
316
+ INS_FPMERGE = 153
317
+ INS_FPSUB16 = 154
318
+ INS_FPSUB16S = 155
319
+ INS_FPSUB32 = 156
320
+ INS_FPSUB32S = 157
321
+ INS_FQTOD = 158
322
+ INS_FQTOI = 159
323
+ INS_FQTOS = 160
324
+ INS_FQTOX = 161
325
+ INS_FSLAS16 = 162
326
+ INS_FSLAS32 = 163
327
+ INS_FSLL16 = 164
328
+ INS_FSLL32 = 165
329
+ INS_FSMULD = 166
330
+ INS_FSQRTD = 167
331
+ INS_FSQRTQ = 168
332
+ INS_FSQRTS = 169
333
+ INS_FSRA16 = 170
334
+ INS_FSRA32 = 171
335
+ INS_FSRC1 = 172
336
+ INS_FSRC1S = 173
337
+ INS_FSRC2 = 174
338
+ INS_FSRC2S = 175
339
+ INS_FSRL16 = 176
340
+ INS_FSRL32 = 177
341
+ INS_FSTOD = 178
342
+ INS_FSTOI = 179
343
+ INS_FSTOQ = 180
344
+ INS_FSTOX = 181
345
+ INS_FSUBD = 182
346
+ INS_FSUBQ = 183
347
+ INS_FSUBS = 184
348
+ INS_FXNOR = 185
349
+ INS_FXNORS = 186
350
+ INS_FXOR = 187
351
+ INS_FXORS = 188
352
+ INS_FXTOD = 189
353
+ INS_FXTOQ = 190
354
+ INS_FXTOS = 191
355
+ INS_FZERO = 192
356
+ INS_FZEROS = 193
357
+ INS_JMPL = 194
358
+ INS_LDD = 195
359
+ INS_LD = 196
360
+ INS_LDQ = 197
361
+ INS_LDSB = 198
362
+ INS_LDSH = 199
363
+ INS_LDSW = 200
364
+ INS_LDUB = 201
365
+ INS_LDUH = 202
366
+ INS_LDX = 203
367
+ INS_LZCNT = 204
368
+ INS_MEMBAR = 205
369
+ INS_MOVDTOX = 206
370
+ INS_MOV = 207
371
+ INS_MOVRGEZ = 208
372
+ INS_MOVRGZ = 209
373
+ INS_MOVRLEZ = 210
374
+ INS_MOVRLZ = 211
375
+ INS_MOVRNZ = 212
376
+ INS_MOVRZ = 213
377
+ INS_MOVSTOSW = 214
378
+ INS_MOVSTOUW = 215
379
+ INS_MULX = 216
380
+ INS_NOP = 217
381
+ INS_ORCC = 218
382
+ INS_ORNCC = 219
383
+ INS_ORN = 220
384
+ INS_OR = 221
385
+ INS_PDIST = 222
386
+ INS_PDISTN = 223
387
+ INS_POPC = 224
388
+ INS_RD = 225
389
+ INS_RESTORE = 226
390
+ INS_RETT = 227
391
+ INS_SAVE = 228
392
+ INS_SDIVCC = 229
393
+ INS_SDIVX = 230
394
+ INS_SDIV = 231
395
+ INS_SETHI = 232
396
+ INS_SHUTDOWN = 233
397
+ INS_SIAM = 234
398
+ INS_SLLX = 235
399
+ INS_SLL = 236
400
+ INS_SMULCC = 237
401
+ INS_SMUL = 238
402
+ INS_SRAX = 239
403
+ INS_SRA = 240
404
+ INS_SRLX = 241
405
+ INS_SRL = 242
406
+ INS_STBAR = 243
407
+ INS_STB = 244
408
+ INS_STD = 245
409
+ INS_ST = 246
410
+ INS_STH = 247
411
+ INS_STQ = 248
412
+ INS_STX = 249
413
+ INS_SUBCC = 250
414
+ INS_SUBX = 251
415
+ INS_SUBXCC = 252
416
+ INS_SUB = 253
417
+ INS_SWAP = 254
418
+ INS_TADDCCTV = 255
419
+ INS_TADDCC = 256
420
+ INS_T = 257
421
+ INS_TSUBCCTV = 258
422
+ INS_TSUBCC = 259
423
+ INS_UDIVCC = 260
424
+ INS_UDIVX = 261
425
+ INS_UDIV = 262
426
+ INS_UMULCC = 263
427
+ INS_UMULXHI = 264
428
+ INS_UMUL = 265
429
+ INS_UNIMP = 266
430
+ INS_FCMPED = 267
431
+ INS_FCMPEQ = 268
432
+ INS_FCMPES = 269
433
+ INS_WR = 270
434
+ INS_XMULX = 271
435
+ INS_XMULXHI = 272
436
+ INS_XNORCC = 273
437
+ INS_XNOR = 274
438
+ INS_XORCC = 275
439
+ INS_XOR = 276
440
+ INS_RET = 277
441
+ INS_RETL = 278
442
+ INS_ENDING = 279
443
+
444
+ # Group of SPARC instructions
445
+
446
+ GRP_INVALID = 0
447
+
448
+ # Generic groups
449
+ GRP_JUMP = 1
450
+
451
+ # Architecture-specific groups
452
+ GRP_HARDQUAD = 128
453
+ GRP_V9 = 129
454
+ GRP_VIS = 130
455
+ GRP_VIS2 = 131
456
+ GRP_VIS3 = 132
457
+ GRP_32BIT = 133
458
+ GRP_64BIT = 134
459
+ GRP_ENDING = 135
460
+ end
461
+ end