smallworld-re 1.0.2__py3-none-any.whl → 2.0.0__py3-none-any.whl

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 (306) hide show
  1. smallworld/analyses/__init__.py +8 -0
  2. smallworld/analyses/analysis.py +8 -67
  3. smallworld/analyses/code_coverage.py +1 -2
  4. smallworld/analyses/colorizer.py +301 -534
  5. smallworld/analyses/colorizer_def_use.py +217 -0
  6. smallworld/analyses/colorizer_summary.py +173 -83
  7. smallworld/analyses/field_detection/field_analysis.py +7 -8
  8. smallworld/analyses/field_detection/hints.py +1 -1
  9. smallworld/analyses/field_detection/malloc.py +2 -2
  10. smallworld/analyses/trace_execution.py +160 -0
  11. smallworld/analyses/trace_execution_types.py +42 -0
  12. smallworld/analyses/unstable/angr/divergence.py +1 -2
  13. smallworld/analyses/unstable/angr/model.py +5 -6
  14. smallworld/analyses/unstable/angr_nwbt.py +3 -4
  15. smallworld/analyses/unstable/code_coverage.py +2 -3
  16. smallworld/analyses/unstable/code_reachable.py +2 -3
  17. smallworld/analyses/unstable/control_flow_tracer.py +2 -3
  18. smallworld/analyses/unstable/pointer_finder.py +2 -3
  19. smallworld/analyses/unstable/utils/tui.py +71 -0
  20. smallworld/emulators/__init__.py +3 -1
  21. smallworld/emulators/angr/angr.py +30 -9
  22. smallworld/emulators/angr/machdefs/__init__.py +2 -0
  23. smallworld/emulators/angr/machdefs/aarch64.py +1 -1
  24. smallworld/emulators/angr/machdefs/amd64.py +0 -4
  25. smallworld/emulators/angr/machdefs/arm.py +0 -2
  26. smallworld/emulators/angr/machdefs/i386.py +0 -2
  27. smallworld/emulators/angr/machdefs/loongarch.py +340 -0
  28. smallworld/emulators/angr/machdefs/machdef.py +1 -8
  29. smallworld/emulators/angr/machdefs/mips.py +0 -2
  30. smallworld/emulators/angr/machdefs/mips64.py +0 -2
  31. smallworld/emulators/angr/machdefs/ppc.py +1 -2
  32. smallworld/emulators/angr/machdefs/riscv.py +8 -10
  33. smallworld/emulators/angr/machdefs/xtensa.py +7 -4
  34. smallworld/emulators/emulator.py +22 -0
  35. smallworld/emulators/ghidra/__init__.py +37 -0
  36. smallworld/emulators/ghidra/ghidra.py +513 -0
  37. smallworld/emulators/ghidra/machdefs/__init__.py +31 -0
  38. smallworld/emulators/ghidra/machdefs/aarch64.py +289 -0
  39. smallworld/emulators/ghidra/machdefs/amd64.py +185 -0
  40. smallworld/emulators/ghidra/machdefs/arm.py +370 -0
  41. smallworld/emulators/ghidra/machdefs/i386.py +109 -0
  42. smallworld/emulators/ghidra/machdefs/loongarch.py +162 -0
  43. smallworld/emulators/ghidra/machdefs/machdef.py +81 -0
  44. smallworld/emulators/ghidra/machdefs/mips.py +163 -0
  45. smallworld/emulators/ghidra/machdefs/mips64.py +186 -0
  46. smallworld/emulators/ghidra/machdefs/ppc.py +98 -0
  47. smallworld/emulators/ghidra/machdefs/riscv.py +208 -0
  48. smallworld/emulators/ghidra/machdefs/xtensa.py +21 -0
  49. smallworld/emulators/ghidra/typing.py +28 -0
  50. smallworld/emulators/hookable.py +18 -4
  51. smallworld/emulators/panda/machdefs/__init__.py +2 -2
  52. smallworld/emulators/panda/machdefs/aarch64.py +186 -11
  53. smallworld/emulators/panda/machdefs/amd64.py +103 -11
  54. smallworld/emulators/panda/machdefs/arm.py +216 -20
  55. smallworld/emulators/panda/machdefs/i386.py +30 -7
  56. smallworld/emulators/panda/machdefs/machdef.py +9 -16
  57. smallworld/emulators/panda/machdefs/mips.py +49 -5
  58. smallworld/emulators/panda/machdefs/mips64.py +57 -5
  59. smallworld/emulators/panda/machdefs/ppc.py +38 -13
  60. smallworld/emulators/panda/panda.py +146 -44
  61. smallworld/emulators/unicorn/__init__.py +2 -0
  62. smallworld/emulators/unicorn/machdefs/aarch64.py +253 -264
  63. smallworld/emulators/unicorn/machdefs/amd64.py +254 -259
  64. smallworld/emulators/unicorn/machdefs/arm.py +200 -212
  65. smallworld/emulators/unicorn/machdefs/i386.py +84 -90
  66. smallworld/emulators/unicorn/machdefs/machdef.py +2 -23
  67. smallworld/emulators/unicorn/machdefs/mips.py +127 -135
  68. smallworld/emulators/unicorn/unicorn.py +52 -13
  69. smallworld/helpers.py +4 -19
  70. smallworld/hinting/hinting.py +22 -192
  71. smallworld/hinting/hints.py +50 -18
  72. smallworld/instructions/bsid.py +8 -8
  73. smallworld/logging.py +4 -2
  74. smallworld/platforms/__init__.py +12 -0
  75. smallworld/platforms/defs/__init__.py +36 -0
  76. smallworld/platforms/defs/aarch64.py +450 -0
  77. smallworld/platforms/defs/amd64.py +463 -0
  78. smallworld/platforms/defs/arm.py +519 -0
  79. smallworld/platforms/defs/i386.py +258 -0
  80. smallworld/platforms/defs/loongarch.py +270 -0
  81. smallworld/platforms/defs/mips.py +321 -0
  82. smallworld/platforms/defs/mips64.py +313 -0
  83. smallworld/platforms/defs/platformdef.py +97 -0
  84. smallworld/platforms/defs/powerpc.py +259 -0
  85. smallworld/platforms/defs/riscv.py +257 -0
  86. smallworld/platforms/defs/xtensa.py +96 -0
  87. smallworld/{platforms.py → platforms/platforms.py} +3 -0
  88. smallworld/state/cpus/__init__.py +2 -0
  89. smallworld/state/cpus/aarch64.py +0 -9
  90. smallworld/state/cpus/amd64.py +6 -28
  91. smallworld/state/cpus/arm.py +0 -11
  92. smallworld/state/cpus/cpu.py +0 -11
  93. smallworld/state/cpus/i386.py +0 -7
  94. smallworld/state/cpus/loongarch.py +299 -0
  95. smallworld/state/cpus/mips.py +4 -47
  96. smallworld/state/cpus/mips64.py +18 -58
  97. smallworld/state/cpus/powerpc.py +2 -9
  98. smallworld/state/cpus/riscv.py +1 -11
  99. smallworld/state/cpus/xtensa.py +0 -5
  100. smallworld/state/memory/code.py +44 -2
  101. smallworld/state/memory/elf/__init__.py +5 -1
  102. smallworld/state/memory/elf/coredump/__init__.py +3 -0
  103. smallworld/state/memory/elf/coredump/coredump.py +46 -0
  104. smallworld/state/memory/elf/coredump/prstatus/__init__.py +27 -0
  105. smallworld/state/memory/elf/coredump/prstatus/aarch64.py +46 -0
  106. smallworld/state/memory/elf/coredump/prstatus/amd64.py +40 -0
  107. smallworld/state/memory/elf/coredump/prstatus/arm.py +53 -0
  108. smallworld/state/memory/elf/coredump/prstatus/i386.py +30 -0
  109. smallworld/state/memory/elf/coredump/prstatus/mips.py +55 -0
  110. smallworld/state/memory/elf/coredump/prstatus/mips64.py +57 -0
  111. smallworld/state/memory/elf/coredump/prstatus/ppc.py +82 -0
  112. smallworld/state/memory/elf/coredump/prstatus/prstatus.py +129 -0
  113. smallworld/state/memory/elf/elf.py +225 -61
  114. smallworld/state/memory/elf/register_state.py +36 -0
  115. smallworld/state/memory/elf/rela/__init__.py +2 -0
  116. smallworld/state/memory/elf/rela/aarch64.py +3 -1
  117. smallworld/state/memory/elf/rela/amd64.py +4 -2
  118. smallworld/state/memory/elf/rela/arm.py +4 -2
  119. smallworld/state/memory/elf/rela/i386.py +4 -2
  120. smallworld/state/memory/elf/rela/loongarch.py +32 -0
  121. smallworld/state/memory/elf/rela/mips.py +39 -18
  122. smallworld/state/memory/elf/rela/ppc.py +31 -14
  123. smallworld/state/memory/elf/structs.py +3 -0
  124. smallworld/state/memory/heap.py +2 -2
  125. smallworld/state/memory/memory.py +18 -0
  126. smallworld/state/memory/pe/__init__.py +3 -0
  127. smallworld/state/memory/pe/pe.py +361 -0
  128. smallworld/state/memory/pe/structs.py +60 -0
  129. smallworld/state/memory/stack/__init__.py +2 -0
  130. smallworld/state/memory/stack/loongarch.py +26 -0
  131. smallworld/state/models/__init__.py +29 -2
  132. smallworld/state/models/aarch64/__init__.py +1 -0
  133. smallworld/state/models/aarch64/systemv/__init__.py +6 -0
  134. smallworld/state/models/aarch64/systemv/c99/__init__.py +12 -0
  135. smallworld/state/models/aarch64/systemv/c99/signal.py +16 -0
  136. smallworld/state/models/aarch64/systemv/c99/stdio.py +265 -0
  137. smallworld/state/models/aarch64/systemv/c99/stdlib.py +169 -0
  138. smallworld/state/models/aarch64/systemv/c99/string.py +139 -0
  139. smallworld/state/models/aarch64/systemv/c99/time.py +61 -0
  140. smallworld/state/models/aarch64/systemv/posix/__init__.py +6 -0
  141. smallworld/state/models/aarch64/systemv/posix/libgen.py +16 -0
  142. smallworld/state/models/aarch64/systemv/posix/signal.py +157 -0
  143. smallworld/state/models/aarch64/systemv/systemv.py +80 -0
  144. smallworld/state/models/amd64/__init__.py +1 -0
  145. smallworld/state/models/amd64/systemv/__init__.py +6 -0
  146. smallworld/state/models/amd64/systemv/c99/__init__.py +12 -0
  147. smallworld/state/models/amd64/systemv/c99/signal.py +16 -0
  148. smallworld/state/models/amd64/systemv/c99/stdio.py +265 -0
  149. smallworld/state/models/amd64/systemv/c99/stdlib.py +169 -0
  150. smallworld/state/models/amd64/systemv/c99/string.py +139 -0
  151. smallworld/state/models/amd64/systemv/c99/time.py +61 -0
  152. smallworld/state/models/amd64/systemv/posix/__init__.py +6 -0
  153. smallworld/state/models/amd64/systemv/posix/libgen.py +16 -0
  154. smallworld/state/models/amd64/systemv/posix/signal.py +157 -0
  155. smallworld/state/models/amd64/systemv/systemv.py +78 -0
  156. smallworld/state/models/armel/__init__.py +1 -0
  157. smallworld/state/models/armel/systemv/__init__.py +6 -0
  158. smallworld/state/models/armel/systemv/c99/__init__.py +12 -0
  159. smallworld/state/models/armel/systemv/c99/signal.py +16 -0
  160. smallworld/state/models/armel/systemv/c99/stdio.py +265 -0
  161. smallworld/state/models/armel/systemv/c99/stdlib.py +169 -0
  162. smallworld/state/models/armel/systemv/c99/string.py +139 -0
  163. smallworld/state/models/armel/systemv/c99/time.py +61 -0
  164. smallworld/state/models/armel/systemv/posix/__init__.py +6 -0
  165. smallworld/state/models/armel/systemv/posix/libgen.py +16 -0
  166. smallworld/state/models/armel/systemv/posix/signal.py +157 -0
  167. smallworld/state/models/armel/systemv/systemv.py +82 -0
  168. smallworld/state/models/armhf/__init__.py +1 -0
  169. smallworld/state/models/armhf/systemv/__init__.py +6 -0
  170. smallworld/state/models/armhf/systemv/c99/__init__.py +12 -0
  171. smallworld/state/models/armhf/systemv/c99/signal.py +16 -0
  172. smallworld/state/models/armhf/systemv/c99/stdio.py +265 -0
  173. smallworld/state/models/armhf/systemv/c99/stdlib.py +169 -0
  174. smallworld/state/models/armhf/systemv/c99/string.py +139 -0
  175. smallworld/state/models/armhf/systemv/c99/time.py +61 -0
  176. smallworld/state/models/armhf/systemv/posix/__init__.py +6 -0
  177. smallworld/state/models/armhf/systemv/posix/libgen.py +16 -0
  178. smallworld/state/models/armhf/systemv/posix/signal.py +157 -0
  179. smallworld/state/models/armhf/systemv/systemv.py +77 -0
  180. smallworld/state/models/c99/__init__.py +12 -0
  181. smallworld/state/models/c99/fmt_print.py +915 -0
  182. smallworld/state/models/c99/fmt_scan.py +864 -0
  183. smallworld/state/models/c99/math.py +362 -0
  184. smallworld/state/models/c99/signal.py +71 -0
  185. smallworld/state/models/c99/stdio.py +1305 -0
  186. smallworld/state/models/c99/stdlib.py +595 -0
  187. smallworld/state/models/c99/string.py +674 -0
  188. smallworld/state/models/c99/time.py +340 -0
  189. smallworld/state/models/c99/utils.py +89 -0
  190. smallworld/state/models/cstd.py +759 -0
  191. smallworld/state/models/errno.py +581 -0
  192. smallworld/state/models/filedesc.py +515 -0
  193. smallworld/state/models/i386/__init__.py +1 -0
  194. smallworld/state/models/i386/systemv/__init__.py +6 -0
  195. smallworld/state/models/i386/systemv/c99/__init__.py +12 -0
  196. smallworld/state/models/i386/systemv/c99/signal.py +16 -0
  197. smallworld/state/models/i386/systemv/c99/stdio.py +265 -0
  198. smallworld/state/models/i386/systemv/c99/stdlib.py +169 -0
  199. smallworld/state/models/i386/systemv/c99/string.py +139 -0
  200. smallworld/state/models/i386/systemv/c99/time.py +61 -0
  201. smallworld/state/models/i386/systemv/posix/__init__.py +6 -0
  202. smallworld/state/models/i386/systemv/posix/libgen.py +16 -0
  203. smallworld/state/models/i386/systemv/posix/signal.py +157 -0
  204. smallworld/state/models/i386/systemv/systemv.py +71 -0
  205. smallworld/state/models/loongarch64/__init__.py +1 -0
  206. smallworld/state/models/loongarch64/systemv/__init__.py +6 -0
  207. smallworld/state/models/loongarch64/systemv/c99/__init__.py +12 -0
  208. smallworld/state/models/loongarch64/systemv/c99/signal.py +16 -0
  209. smallworld/state/models/loongarch64/systemv/c99/stdio.py +265 -0
  210. smallworld/state/models/loongarch64/systemv/c99/stdlib.py +169 -0
  211. smallworld/state/models/loongarch64/systemv/c99/string.py +139 -0
  212. smallworld/state/models/loongarch64/systemv/c99/time.py +61 -0
  213. smallworld/state/models/loongarch64/systemv/posix/__init__.py +6 -0
  214. smallworld/state/models/loongarch64/systemv/posix/libgen.py +16 -0
  215. smallworld/state/models/loongarch64/systemv/posix/signal.py +157 -0
  216. smallworld/state/models/loongarch64/systemv/systemv.py +83 -0
  217. smallworld/state/models/mips/__init__.py +1 -0
  218. smallworld/state/models/mips/systemv/__init__.py +6 -0
  219. smallworld/state/models/mips/systemv/c99/__init__.py +12 -0
  220. smallworld/state/models/mips/systemv/c99/signal.py +16 -0
  221. smallworld/state/models/mips/systemv/c99/stdio.py +265 -0
  222. smallworld/state/models/mips/systemv/c99/stdlib.py +169 -0
  223. smallworld/state/models/mips/systemv/c99/string.py +139 -0
  224. smallworld/state/models/mips/systemv/c99/time.py +61 -0
  225. smallworld/state/models/mips/systemv/posix/__init__.py +6 -0
  226. smallworld/state/models/mips/systemv/posix/libgen.py +16 -0
  227. smallworld/state/models/mips/systemv/posix/signal.py +157 -0
  228. smallworld/state/models/mips/systemv/systemv.py +78 -0
  229. smallworld/state/models/mips64/__init__.py +1 -0
  230. smallworld/state/models/mips64/systemv/__init__.py +6 -0
  231. smallworld/state/models/mips64/systemv/c99/__init__.py +12 -0
  232. smallworld/state/models/mips64/systemv/c99/signal.py +16 -0
  233. smallworld/state/models/mips64/systemv/c99/stdio.py +265 -0
  234. smallworld/state/models/mips64/systemv/c99/stdlib.py +169 -0
  235. smallworld/state/models/mips64/systemv/c99/string.py +139 -0
  236. smallworld/state/models/mips64/systemv/c99/time.py +61 -0
  237. smallworld/state/models/mips64/systemv/posix/__init__.py +6 -0
  238. smallworld/state/models/mips64/systemv/posix/libgen.py +16 -0
  239. smallworld/state/models/mips64/systemv/posix/signal.py +157 -0
  240. smallworld/state/models/mips64/systemv/systemv.py +98 -0
  241. smallworld/state/models/mips64el/__init__.py +1 -0
  242. smallworld/state/models/mips64el/systemv/__init__.py +6 -0
  243. smallworld/state/models/mips64el/systemv/c99/__init__.py +12 -0
  244. smallworld/state/models/mips64el/systemv/c99/signal.py +16 -0
  245. smallworld/state/models/mips64el/systemv/c99/stdio.py +265 -0
  246. smallworld/state/models/mips64el/systemv/c99/stdlib.py +169 -0
  247. smallworld/state/models/mips64el/systemv/c99/string.py +139 -0
  248. smallworld/state/models/mips64el/systemv/c99/time.py +61 -0
  249. smallworld/state/models/mips64el/systemv/posix/__init__.py +6 -0
  250. smallworld/state/models/mips64el/systemv/posix/libgen.py +16 -0
  251. smallworld/state/models/mips64el/systemv/posix/signal.py +157 -0
  252. smallworld/state/models/mips64el/systemv/systemv.py +96 -0
  253. smallworld/state/models/mipsel/__init__.py +1 -0
  254. smallworld/state/models/mipsel/systemv/__init__.py +6 -0
  255. smallworld/state/models/mipsel/systemv/c99/__init__.py +12 -0
  256. smallworld/state/models/mipsel/systemv/c99/signal.py +16 -0
  257. smallworld/state/models/mipsel/systemv/c99/stdio.py +265 -0
  258. smallworld/state/models/mipsel/systemv/c99/stdlib.py +169 -0
  259. smallworld/state/models/mipsel/systemv/c99/string.py +139 -0
  260. smallworld/state/models/mipsel/systemv/c99/time.py +61 -0
  261. smallworld/state/models/mipsel/systemv/posix/__init__.py +6 -0
  262. smallworld/state/models/mipsel/systemv/posix/libgen.py +16 -0
  263. smallworld/state/models/mipsel/systemv/posix/signal.py +157 -0
  264. smallworld/state/models/mipsel/systemv/systemv.py +78 -0
  265. smallworld/state/models/model.py +27 -2
  266. smallworld/state/models/posix/__init__.py +6 -0
  267. smallworld/state/models/posix/libgen.py +123 -0
  268. smallworld/state/models/posix/signal.py +690 -0
  269. smallworld/state/models/powerpc/__init__.py +1 -0
  270. smallworld/state/models/powerpc/systemv/__init__.py +6 -0
  271. smallworld/state/models/powerpc/systemv/c99/__init__.py +12 -0
  272. smallworld/state/models/powerpc/systemv/c99/signal.py +16 -0
  273. smallworld/state/models/powerpc/systemv/c99/stdio.py +265 -0
  274. smallworld/state/models/powerpc/systemv/c99/stdlib.py +169 -0
  275. smallworld/state/models/powerpc/systemv/c99/string.py +139 -0
  276. smallworld/state/models/powerpc/systemv/c99/time.py +61 -0
  277. smallworld/state/models/powerpc/systemv/posix/__init__.py +6 -0
  278. smallworld/state/models/powerpc/systemv/posix/libgen.py +16 -0
  279. smallworld/state/models/powerpc/systemv/posix/signal.py +157 -0
  280. smallworld/state/models/powerpc/systemv/systemv.py +93 -0
  281. smallworld/state/models/riscv64/__init__.py +1 -0
  282. smallworld/state/models/riscv64/systemv/__init__.py +6 -0
  283. smallworld/state/models/riscv64/systemv/c99/__init__.py +12 -0
  284. smallworld/state/models/riscv64/systemv/c99/signal.py +16 -0
  285. smallworld/state/models/riscv64/systemv/c99/stdio.py +265 -0
  286. smallworld/state/models/riscv64/systemv/c99/stdlib.py +169 -0
  287. smallworld/state/models/riscv64/systemv/c99/string.py +139 -0
  288. smallworld/state/models/riscv64/systemv/c99/time.py +61 -0
  289. smallworld/state/models/riscv64/systemv/posix/__init__.py +6 -0
  290. smallworld/state/models/riscv64/systemv/posix/libgen.py +16 -0
  291. smallworld/state/models/riscv64/systemv/posix/signal.py +157 -0
  292. smallworld/state/models/riscv64/systemv/systemv.py +85 -0
  293. smallworld/state/state.py +65 -24
  294. smallworld/state/unstable/elf.py +16 -31
  295. smallworld/utils.py +6 -1
  296. {smallworld_re-1.0.2.dist-info → smallworld_re-2.0.0.dist-info}/METADATA +76 -43
  297. smallworld_re-2.0.0.dist-info/RECORD +374 -0
  298. {smallworld_re-1.0.2.dist-info → smallworld_re-2.0.0.dist-info}/WHEEL +1 -1
  299. smallworld/state/models/x86/__init__.py +0 -2
  300. smallworld/state/models/x86/microsoftcdecl.py +0 -35
  301. smallworld/state/models/x86/systemv.py +0 -240
  302. smallworld_re-1.0.2.dist-info/RECORD +0 -166
  303. /smallworld/state/models/{posix.py → _posix.py} +0 -0
  304. {smallworld_re-1.0.2.dist-info → smallworld_re-2.0.0.dist-info}/entry_points.txt +0 -0
  305. {smallworld_re-1.0.2.dist-info → smallworld_re-2.0.0.dist-info/licenses}/LICENSE.txt +0 -0
  306. {smallworld_re-1.0.2.dist-info → smallworld_re-2.0.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,3 @@
1
- import capstone
2
1
  import unicorn
3
2
 
4
3
  from ....platforms import Architecture, Byteorder
@@ -13,148 +12,144 @@ class AMD64MachineDef(UnicornMachineDef):
13
12
  uc_arch = unicorn.UC_ARCH_X86
14
13
  uc_mode = unicorn.UC_MODE_64
15
14
 
16
- cs_arch = capstone.CS_ARCH_X86
17
- cs_mode = capstone.CS_MODE_64
18
-
19
- pc_reg = "rip"
20
-
21
15
  def __init__(self):
22
16
  self._registers = {
23
17
  # *** General Purpose Registers ***
24
- "rax": (unicorn.x86_const.UC_X86_REG_RAX, "rax", 8, 0),
25
- "eax": (unicorn.x86_const.UC_X86_REG_EAX, "rax", 4, 0),
26
- "ax": (unicorn.x86_const.UC_X86_REG_AX, "rax", 2, 0),
27
- "al": (unicorn.x86_const.UC_X86_REG_AL, "rax", 1, 0),
28
- "ah": (unicorn.x86_const.UC_X86_REG_AH, "rax", 1, 1),
29
- "rbx": (unicorn.x86_const.UC_X86_REG_RBX, "rbx", 8, 0),
30
- "ebx": (unicorn.x86_const.UC_X86_REG_EBX, "rbx", 4, 0),
31
- "bx": (unicorn.x86_const.UC_X86_REG_BX, "rbx", 2, 0),
32
- "bl": (unicorn.x86_const.UC_X86_REG_BL, "rbx", 1, 0),
33
- "bh": (unicorn.x86_const.UC_X86_REG_BH, "rbx", 1, 1),
34
- "rcx": (unicorn.x86_const.UC_X86_REG_RCX, "rcx", 8, 0),
35
- "ecx": (unicorn.x86_const.UC_X86_REG_ECX, "rcx", 4, 0),
36
- "cx": (unicorn.x86_const.UC_X86_REG_CX, "rcx", 2, 0),
37
- "cl": (unicorn.x86_const.UC_X86_REG_CL, "rcx", 1, 0),
38
- "ch": (unicorn.x86_const.UC_X86_REG_CH, "rcx", 1, 1),
39
- "rdx": (unicorn.x86_const.UC_X86_REG_RDX, "rdx", 8, 0),
40
- "edx": (unicorn.x86_const.UC_X86_REG_EDX, "rdx", 4, 0),
41
- "dx": (unicorn.x86_const.UC_X86_REG_DX, "rdx", 2, 0),
42
- "dl": (unicorn.x86_const.UC_X86_REG_DL, "rdx", 1, 0),
43
- "dh": (unicorn.x86_const.UC_X86_REG_DH, "rdx", 1, 1),
44
- "r8": (unicorn.x86_const.UC_X86_REG_R8, "r8", 8, 0),
45
- "r8d": (unicorn.x86_const.UC_X86_REG_R8D, "r8", 4, 0),
46
- "r8w": (unicorn.x86_const.UC_X86_REG_R8W, "r8", 2, 0),
47
- "r8b": (unicorn.x86_const.UC_X86_REG_R8B, "r8", 1, 0),
48
- "r9": (unicorn.x86_const.UC_X86_REG_R9, "r9", 8, 0),
49
- "r9d": (unicorn.x86_const.UC_X86_REG_R9D, "r9", 4, 0),
50
- "r9w": (unicorn.x86_const.UC_X86_REG_R9W, "r9", 2, 0),
51
- "r9b": (unicorn.x86_const.UC_X86_REG_R9B, "r9", 1, 0),
52
- "r10": (unicorn.x86_const.UC_X86_REG_R10, "r10", 8, 0),
53
- "r10d": (unicorn.x86_const.UC_X86_REG_R10D, "r10", 4, 0),
54
- "r10w": (unicorn.x86_const.UC_X86_REG_R10W, "r10", 2, 0),
55
- "r10b": (unicorn.x86_const.UC_X86_REG_R10B, "r10", 1, 0),
56
- "r11": (unicorn.x86_const.UC_X86_REG_R11, "r11", 8, 0),
57
- "r11d": (unicorn.x86_const.UC_X86_REG_R11D, "r11", 4, 0),
58
- "r11w": (unicorn.x86_const.UC_X86_REG_R11W, "r11", 2, 0),
59
- "r11b": (unicorn.x86_const.UC_X86_REG_R11B, "r11", 1, 0),
60
- "r12": (unicorn.x86_const.UC_X86_REG_R12, "r12", 8, 0),
61
- "r12d": (unicorn.x86_const.UC_X86_REG_R12D, "r12", 4, 0),
62
- "r12w": (unicorn.x86_const.UC_X86_REG_R12W, "r12", 2, 0),
63
- "r12b": (unicorn.x86_const.UC_X86_REG_R12B, "r12", 1, 0),
64
- "r13": (unicorn.x86_const.UC_X86_REG_R13, "r13", 8, 0),
65
- "r13d": (unicorn.x86_const.UC_X86_REG_R13D, "r13", 4, 0),
66
- "r13w": (unicorn.x86_const.UC_X86_REG_R13W, "r13", 2, 0),
67
- "r13b": (unicorn.x86_const.UC_X86_REG_R13B, "r13", 1, 0),
68
- "r14": (unicorn.x86_const.UC_X86_REG_R14, "r14", 8, 0),
69
- "r14d": (unicorn.x86_const.UC_X86_REG_R14D, "r14", 4, 0),
70
- "r14w": (unicorn.x86_const.UC_X86_REG_R14W, "r14", 2, 0),
71
- "r14b": (unicorn.x86_const.UC_X86_REG_R14B, "r14", 1, 0),
72
- "r15": (unicorn.x86_const.UC_X86_REG_R15, "r15", 8, 0),
73
- "r15d": (unicorn.x86_const.UC_X86_REG_R15D, "r15", 4, 0),
74
- "r15w": (unicorn.x86_const.UC_X86_REG_R15W, "r15", 2, 0),
75
- "r15b": (unicorn.x86_const.UC_X86_REG_R15B, "r15", 1, 0),
76
- "rdi": (unicorn.x86_const.UC_X86_REG_RDI, "rdi", 8, 0),
77
- "edi": (unicorn.x86_const.UC_X86_REG_EDI, "rdi", 4, 0),
78
- "di": (unicorn.x86_const.UC_X86_REG_DI, "rdi", 2, 0),
79
- "dil": (unicorn.x86_const.UC_X86_REG_DIL, "rdi", 1, 0),
80
- "rsi": (unicorn.x86_const.UC_X86_REG_RSI, "rsi", 8, 0),
81
- "esi": (unicorn.x86_const.UC_X86_REG_ESI, "rsi", 4, 0),
82
- "si": (unicorn.x86_const.UC_X86_REG_SI, "rsi", 2, 0),
83
- "sil": (unicorn.x86_const.UC_X86_REG_SIL, "rsi", 1, 0),
84
- "rsp": (unicorn.x86_const.UC_X86_REG_RSP, "rsp", 8, 0),
85
- "esp": (unicorn.x86_const.UC_X86_REG_ESP, "rsp", 4, 0),
86
- "sp": (unicorn.x86_const.UC_X86_REG_SP, "rsp", 2, 0),
87
- "spl": (unicorn.x86_const.UC_X86_REG_SPL, "rsp", 1, 0),
88
- "rbp": (unicorn.x86_const.UC_X86_REG_RBP, "rbp", 8, 0),
89
- "ebp": (unicorn.x86_const.UC_X86_REG_EBP, "rbp", 4, 0),
90
- "bp": (unicorn.x86_const.UC_X86_REG_BP, "rbp", 2, 0),
91
- "bpl": (unicorn.x86_const.UC_X86_REG_BPL, "rbp", 1, 0),
18
+ "rax": unicorn.x86_const.UC_X86_REG_RAX,
19
+ "eax": unicorn.x86_const.UC_X86_REG_EAX,
20
+ "ax": unicorn.x86_const.UC_X86_REG_AX,
21
+ "al": unicorn.x86_const.UC_X86_REG_AL,
22
+ "ah": unicorn.x86_const.UC_X86_REG_AH,
23
+ "rbx": unicorn.x86_const.UC_X86_REG_RBX,
24
+ "ebx": unicorn.x86_const.UC_X86_REG_EBX,
25
+ "bx": unicorn.x86_const.UC_X86_REG_BX,
26
+ "bl": unicorn.x86_const.UC_X86_REG_BL,
27
+ "bh": unicorn.x86_const.UC_X86_REG_BH,
28
+ "rcx": unicorn.x86_const.UC_X86_REG_RCX,
29
+ "ecx": unicorn.x86_const.UC_X86_REG_ECX,
30
+ "cx": unicorn.x86_const.UC_X86_REG_CX,
31
+ "cl": unicorn.x86_const.UC_X86_REG_CL,
32
+ "ch": unicorn.x86_const.UC_X86_REG_CH,
33
+ "rdx": unicorn.x86_const.UC_X86_REG_RDX,
34
+ "edx": unicorn.x86_const.UC_X86_REG_EDX,
35
+ "dx": unicorn.x86_const.UC_X86_REG_DX,
36
+ "dl": unicorn.x86_const.UC_X86_REG_DL,
37
+ "dh": unicorn.x86_const.UC_X86_REG_DH,
38
+ "r8": unicorn.x86_const.UC_X86_REG_R8,
39
+ "r8d": unicorn.x86_const.UC_X86_REG_R8D,
40
+ "r8w": unicorn.x86_const.UC_X86_REG_R8W,
41
+ "r8b": unicorn.x86_const.UC_X86_REG_R8B,
42
+ "r9": unicorn.x86_const.UC_X86_REG_R9,
43
+ "r9d": unicorn.x86_const.UC_X86_REG_R9D,
44
+ "r9w": unicorn.x86_const.UC_X86_REG_R9W,
45
+ "r9b": unicorn.x86_const.UC_X86_REG_R9B,
46
+ "r10": unicorn.x86_const.UC_X86_REG_R10,
47
+ "r10d": unicorn.x86_const.UC_X86_REG_R10D,
48
+ "r10w": unicorn.x86_const.UC_X86_REG_R10W,
49
+ "r10b": unicorn.x86_const.UC_X86_REG_R10B,
50
+ "r11": unicorn.x86_const.UC_X86_REG_R11,
51
+ "r11d": unicorn.x86_const.UC_X86_REG_R11D,
52
+ "r11w": unicorn.x86_const.UC_X86_REG_R11W,
53
+ "r11b": unicorn.x86_const.UC_X86_REG_R11B,
54
+ "r12": unicorn.x86_const.UC_X86_REG_R12,
55
+ "r12d": unicorn.x86_const.UC_X86_REG_R12D,
56
+ "r12w": unicorn.x86_const.UC_X86_REG_R12W,
57
+ "r12b": unicorn.x86_const.UC_X86_REG_R12B,
58
+ "r13": unicorn.x86_const.UC_X86_REG_R13,
59
+ "r13d": unicorn.x86_const.UC_X86_REG_R13D,
60
+ "r13w": unicorn.x86_const.UC_X86_REG_R13W,
61
+ "r13b": unicorn.x86_const.UC_X86_REG_R13B,
62
+ "r14": unicorn.x86_const.UC_X86_REG_R14,
63
+ "r14d": unicorn.x86_const.UC_X86_REG_R14D,
64
+ "r14w": unicorn.x86_const.UC_X86_REG_R14W,
65
+ "r14b": unicorn.x86_const.UC_X86_REG_R14B,
66
+ "r15": unicorn.x86_const.UC_X86_REG_R15,
67
+ "r15d": unicorn.x86_const.UC_X86_REG_R15D,
68
+ "r15w": unicorn.x86_const.UC_X86_REG_R15W,
69
+ "r15b": unicorn.x86_const.UC_X86_REG_R15B,
70
+ "rdi": unicorn.x86_const.UC_X86_REG_RDI,
71
+ "edi": unicorn.x86_const.UC_X86_REG_EDI,
72
+ "di": unicorn.x86_const.UC_X86_REG_DI,
73
+ "dil": unicorn.x86_const.UC_X86_REG_DIL,
74
+ "rsi": unicorn.x86_const.UC_X86_REG_RSI,
75
+ "esi": unicorn.x86_const.UC_X86_REG_ESI,
76
+ "si": unicorn.x86_const.UC_X86_REG_SI,
77
+ "sil": unicorn.x86_const.UC_X86_REG_SIL,
78
+ "rsp": unicorn.x86_const.UC_X86_REG_RSP,
79
+ "esp": unicorn.x86_const.UC_X86_REG_ESP,
80
+ "sp": unicorn.x86_const.UC_X86_REG_SP,
81
+ "spl": unicorn.x86_const.UC_X86_REG_SPL,
82
+ "rbp": unicorn.x86_const.UC_X86_REG_RBP,
83
+ "ebp": unicorn.x86_const.UC_X86_REG_EBP,
84
+ "bp": unicorn.x86_const.UC_X86_REG_BP,
85
+ "bpl": unicorn.x86_const.UC_X86_REG_BPL,
92
86
  # *** Instruction Pointer ***
93
- "rip": (unicorn.x86_const.UC_X86_REG_RIP, "rip", 8, 0),
94
- "eip": (unicorn.x86_const.UC_X86_REG_EIP, "rip", 4, 0),
95
- "ip": (unicorn.x86_const.UC_X86_REG_IP, "rip", 2, 0),
87
+ "rip": unicorn.x86_const.UC_X86_REG_RIP,
88
+ "eip": unicorn.x86_const.UC_X86_REG_EIP,
89
+ "ip": unicorn.x86_const.UC_X86_REG_IP,
96
90
  # *** Flags register ***
97
- "rflags": (unicorn.x86_const.UC_X86_REG_RFLAGS, "rflags", 8, 0),
98
- "eflags": (unicorn.x86_const.UC_X86_REG_EFLAGS, "rflags", 4, 0),
99
- "flags": (unicorn.x86_const.UC_X86_REG_FLAGS, "rflags", 2, 0),
91
+ "rflags": unicorn.x86_const.UC_X86_REG_RFLAGS,
92
+ "eflags": unicorn.x86_const.UC_X86_REG_EFLAGS,
93
+ "flags": unicorn.x86_const.UC_X86_REG_FLAGS,
100
94
  # *** Segment Registers ***
101
- "cs": (unicorn.x86_const.UC_X86_REG_CS, "cs", 2, 0),
102
- "ds": (unicorn.x86_const.UC_X86_REG_DS, "ds", 2, 0),
103
- "es": (unicorn.x86_const.UC_X86_REG_ES, "es", 2, 0),
104
- "fs": (unicorn.x86_const.UC_X86_REG_FS, "fs", 2, 0),
105
- "gs": (unicorn.x86_const.UC_X86_REG_GS, "gs", 2, 0),
95
+ "cs": unicorn.x86_const.UC_X86_REG_CS,
96
+ "ds": unicorn.x86_const.UC_X86_REG_DS,
97
+ "es": unicorn.x86_const.UC_X86_REG_ES,
98
+ "fs": unicorn.x86_const.UC_X86_REG_FS,
99
+ "gs": unicorn.x86_const.UC_X86_REG_GS,
100
+ "ss": unicorn.x86_const.UC_X86_REG_SS,
106
101
  # *** Control Registers ***
107
- "cr0": (unicorn.x86_const.UC_X86_REG_CR0, "cr0", 8, 0),
108
- "cr1": (unicorn.x86_const.UC_X86_REG_CR1, "cr1", 8, 0),
109
- "cr2": (unicorn.x86_const.UC_X86_REG_CR2, "cr2", 8, 0),
110
- "cr3": (unicorn.x86_const.UC_X86_REG_CR3, "cr3", 8, 0),
111
- "cr4": (unicorn.x86_const.UC_X86_REG_CR4, "cr4", 8, 0),
112
- "cr8": (unicorn.x86_const.UC_X86_REG_INVALID, "cr8", 8, 0),
102
+ "cr0": unicorn.x86_const.UC_X86_REG_CR0,
103
+ "cr1": unicorn.x86_const.UC_X86_REG_CR1,
104
+ "cr2": unicorn.x86_const.UC_X86_REG_CR2,
105
+ "cr3": unicorn.x86_const.UC_X86_REG_CR3,
106
+ "cr4": unicorn.x86_const.UC_X86_REG_CR4,
107
+ "cr8": unicorn.x86_const.UC_X86_REG_INVALID,
113
108
  # *** Debug Registers ***
114
- "dr0": (unicorn.x86_const.UC_X86_REG_DR0, "dr0", 8, 0),
115
- "dr1": (unicorn.x86_const.UC_X86_REG_DR1, "dr1", 8, 0),
116
- "dr2": (unicorn.x86_const.UC_X86_REG_DR2, "dr2", 8, 0),
117
- "dr3": (unicorn.x86_const.UC_X86_REG_DR3, "dr3", 8, 0),
118
- "dr6": (unicorn.x86_const.UC_X86_REG_DR6, "dr6", 8, 0),
119
- "dr7": (unicorn.x86_const.UC_X86_REG_DR7, "dr7", 8, 0),
120
- "dr8": (unicorn.x86_const.UC_X86_REG_INVALID, "dr8", 8, 0),
121
- "dr9": (unicorn.x86_const.UC_X86_REG_INVALID, "dr9", 8, 0),
122
- "dr10": (unicorn.x86_const.UC_X86_REG_INVALID, "dr10", 8, 0),
123
- "dr11": (unicorn.x86_const.UC_X86_REG_INVALID, "dr11", 8, 0),
124
- "dr12": (unicorn.x86_const.UC_X86_REG_INVALID, "dr12", 8, 0),
125
- "dr13": (unicorn.x86_const.UC_X86_REG_INVALID, "dr13", 8, 0),
126
- "dr14": (unicorn.x86_const.UC_X86_REG_INVALID, "dr14", 8, 0),
127
- "dr15": (unicorn.x86_const.UC_X86_REG_INVALID, "dr15", 8, 0),
109
+ "dr0": unicorn.x86_const.UC_X86_REG_DR0,
110
+ "dr1": unicorn.x86_const.UC_X86_REG_DR1,
111
+ "dr2": unicorn.x86_const.UC_X86_REG_DR2,
112
+ "dr3": unicorn.x86_const.UC_X86_REG_DR3,
113
+ "dr6": unicorn.x86_const.UC_X86_REG_DR6,
114
+ "dr7": unicorn.x86_const.UC_X86_REG_DR7,
115
+ "dr8": unicorn.x86_const.UC_X86_REG_INVALID,
116
+ "dr9": unicorn.x86_const.UC_X86_REG_INVALID,
117
+ "dr10": unicorn.x86_const.UC_X86_REG_INVALID,
118
+ "dr11": unicorn.x86_const.UC_X86_REG_INVALID,
119
+ "dr12": unicorn.x86_const.UC_X86_REG_INVALID,
120
+ "dr13": unicorn.x86_const.UC_X86_REG_INVALID,
121
+ "dr14": unicorn.x86_const.UC_X86_REG_INVALID,
122
+ "dr15": unicorn.x86_const.UC_X86_REG_INVALID,
128
123
  # *** Descriptor Table Registers ***
129
- "gdtr": (unicorn.x86_const.UC_X86_REG_GDTR, "gdtr", 10, 0),
130
- "idtr": (unicorn.x86_const.UC_X86_REG_IDTR, "idtr", 10, 0),
131
- "ldtr": (unicorn.x86_const.UC_X86_REG_LDTR, "ldtr", 10, 0),
124
+ "gdtr": unicorn.x86_const.UC_X86_REG_GDTR,
125
+ "idtr": unicorn.x86_const.UC_X86_REG_IDTR,
126
+ "ldtr": unicorn.x86_const.UC_X86_REG_LDTR,
132
127
  # *** Task Register ***
133
- "tr": (unicorn.x86_const.UC_X86_REG_TR, "tr", 2, 0),
128
+ "tr": unicorn.x86_const.UC_X86_REG_TR,
134
129
  # *** x87 registers ***
135
130
  # NOTE: x87 is supported by Unicorn, but not by SmallWorld.
136
131
  # Values are represented as tuples (exponent: int, mantissa: int).
137
132
  # If you need x87 support, open a ticket.
138
- "fpr0": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr0", 10, 0),
139
- "fpr1": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr1", 10, 0),
140
- "fpr2": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr2", 10, 0),
141
- "fpr3": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr3", 10, 0),
142
- "fpr4": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr4", 10, 0),
143
- "fpr5": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr5", 10, 0),
144
- "fpr6": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr6", 10, 0),
145
- "fpr7": (unicorn.x86_const.UC_X86_REG_INVALID, "fpr7", 10, 0),
133
+ "fpr0": unicorn.x86_const.UC_X86_REG_INVALID,
134
+ "fpr1": unicorn.x86_const.UC_X86_REG_INVALID,
135
+ "fpr2": unicorn.x86_const.UC_X86_REG_INVALID,
136
+ "fpr3": unicorn.x86_const.UC_X86_REG_INVALID,
137
+ "fpr4": unicorn.x86_const.UC_X86_REG_INVALID,
138
+ "fpr5": unicorn.x86_const.UC_X86_REG_INVALID,
139
+ "fpr6": unicorn.x86_const.UC_X86_REG_INVALID,
140
+ "fpr7": unicorn.x86_const.UC_X86_REG_INVALID,
146
141
  # x87 Control Register
147
- "fctrl": (unicorn.x86_const.UC_X86_REG_FPCW, "fctrl", 2, 0),
142
+ "fctrl": unicorn.x86_const.UC_X86_REG_FPCW,
148
143
  # x87 Status Register
149
- "fstat": (unicorn.x86_const.UC_X86_REG_FPCW, "fstat", 2, 0),
144
+ "fstat": unicorn.x86_const.UC_X86_REG_FPCW,
150
145
  # x87 Tag Register
151
- "ftag": (unicorn.x86_const.UC_X86_REG_FPTAG, "ftag", 2, 0),
146
+ "ftag": unicorn.x86_const.UC_X86_REG_FPTAG,
152
147
  # x87 Last Instruction Register
153
- "fip": (unicorn.x86_const.UC_X86_REG_FIP, "fip", 8, 0),
148
+ "fip": unicorn.x86_const.UC_X86_REG_FIP,
154
149
  # x87 Last Operand Pointer
155
- "fdp": (unicorn.x86_const.UC_X86_REG_FDP, "fdp", 8, 0),
150
+ "fdp": unicorn.x86_const.UC_X86_REG_FDP,
156
151
  # x87 Last Opcode
157
- "fop": (unicorn.x86_const.UC_X86_REG_FOP, "fop", 2, 0),
152
+ "fop": unicorn.x86_const.UC_X86_REG_FOP,
158
153
  # NOTE: Docs disagree on the format of fip and fdp.
159
154
  # One source describes them as 48-bit offset-plus-segment,
160
155
  # the other describes them as 64-bit.
@@ -163,14 +158,14 @@ class AMD64MachineDef(UnicornMachineDef):
163
158
  # *** MMX Registers ***
164
159
  # NOTE: The MMX registers are aliases for the low 8 bytes of the x87 registers.
165
160
  # The two subsystems cannot be used simultaneously.
166
- "mm0": (unicorn.x86_const.UC_X86_REG_MM0, "fpr0", 8, 0),
167
- "mm1": (unicorn.x86_const.UC_X86_REG_MM1, "fpr1", 8, 0),
168
- "mm2": (unicorn.x86_const.UC_X86_REG_MM2, "fpr2", 8, 0),
169
- "mm3": (unicorn.x86_const.UC_X86_REG_MM3, "fpr3", 8, 0),
170
- "mm4": (unicorn.x86_const.UC_X86_REG_MM4, "fpr4", 8, 0),
171
- "mm5": (unicorn.x86_const.UC_X86_REG_MM5, "fpr5", 8, 0),
172
- "mm6": (unicorn.x86_const.UC_X86_REG_MM6, "fpr6", 8, 0),
173
- "mm7": (unicorn.x86_const.UC_X86_REG_MM7, "fpr7", 8, 0),
161
+ "mm0": unicorn.x86_const.UC_X86_REG_MM0,
162
+ "mm1": unicorn.x86_const.UC_X86_REG_MM1,
163
+ "mm2": unicorn.x86_const.UC_X86_REG_MM2,
164
+ "mm3": unicorn.x86_const.UC_X86_REG_MM3,
165
+ "mm4": unicorn.x86_const.UC_X86_REG_MM4,
166
+ "mm5": unicorn.x86_const.UC_X86_REG_MM5,
167
+ "mm6": unicorn.x86_const.UC_X86_REG_MM6,
168
+ "mm7": unicorn.x86_const.UC_X86_REG_MM7,
174
169
  }
175
170
 
176
171
 
@@ -182,38 +177,38 @@ class AMD64AVX2MachineDef(AMD64MachineDef):
182
177
  self._registers.update(
183
178
  {
184
179
  # *** SSE/AVX registers ***
185
- "ymm0": (unicorn.x86_const.UC_X86_REG_YMM0, "ymm0", 32, 0),
186
- "xmm0": (unicorn.x86_const.UC_X86_REG_XMM0, "ymm0", 16, 0),
187
- "ymm1": (unicorn.x86_const.UC_X86_REG_YMM1, "ymm1", 32, 0),
188
- "xmm1": (unicorn.x86_const.UC_X86_REG_XMM1, "ymm1", 16, 0),
189
- "ymm2": (unicorn.x86_const.UC_X86_REG_YMM2, "ymm2", 32, 0),
190
- "xmm2": (unicorn.x86_const.UC_X86_REG_XMM2, "ymm2", 16, 0),
191
- "ymm3": (unicorn.x86_const.UC_X86_REG_YMM3, "ymm3", 32, 0),
192
- "xmm3": (unicorn.x86_const.UC_X86_REG_XMM3, "ymm3", 16, 0),
193
- "ymm4": (unicorn.x86_const.UC_X86_REG_YMM4, "ymm4", 32, 0),
194
- "xmm4": (unicorn.x86_const.UC_X86_REG_XMM4, "ymm4", 16, 0),
195
- "ymm5": (unicorn.x86_const.UC_X86_REG_YMM5, "ymm5", 32, 0),
196
- "xmm5": (unicorn.x86_const.UC_X86_REG_XMM5, "ymm5", 16, 0),
197
- "ymm6": (unicorn.x86_const.UC_X86_REG_YMM6, "ymm6", 32, 0),
198
- "xmm6": (unicorn.x86_const.UC_X86_REG_XMM6, "ymm6", 16, 0),
199
- "ymm7": (unicorn.x86_const.UC_X86_REG_YMM7, "ymm7", 32, 0),
200
- "xmm7": (unicorn.x86_const.UC_X86_REG_XMM7, "ymm7", 16, 0),
201
- "ymm8": (unicorn.x86_const.UC_X86_REG_YMM8, "ymm8", 32, 0),
202
- "xmm8": (unicorn.x86_const.UC_X86_REG_XMM8, "ymm8", 16, 0),
203
- "ymm9": (unicorn.x86_const.UC_X86_REG_YMM9, "ymm9", 32, 0),
204
- "xmm9": (unicorn.x86_const.UC_X86_REG_XMM9, "ymm9", 16, 0),
205
- "ymm10": (unicorn.x86_const.UC_X86_REG_YMM10, "ymm10", 32, 0),
206
- "xmm10": (unicorn.x86_const.UC_X86_REG_XMM10, "ymm10", 16, 0),
207
- "ymm11": (unicorn.x86_const.UC_X86_REG_YMM11, "ymm11", 32, 0),
208
- "xmm11": (unicorn.x86_const.UC_X86_REG_XMM11, "ymm11", 16, 0),
209
- "ymm12": (unicorn.x86_const.UC_X86_REG_YMM12, "ymm12", 32, 0),
210
- "xmm12": (unicorn.x86_const.UC_X86_REG_XMM12, "ymm12", 16, 0),
211
- "ymm13": (unicorn.x86_const.UC_X86_REG_YMM13, "ymm13", 32, 0),
212
- "xmm13": (unicorn.x86_const.UC_X86_REG_XMM13, "ymm13", 16, 0),
213
- "ymm14": (unicorn.x86_const.UC_X86_REG_YMM14, "ymm14", 32, 0),
214
- "xmm14": (unicorn.x86_const.UC_X86_REG_XMM14, "ymm14", 16, 0),
215
- "ymm15": (unicorn.x86_const.UC_X86_REG_YMM15, "ymm15", 32, 0),
216
- "xmm15": (unicorn.x86_const.UC_X86_REG_XMM15, "ymm15", 16, 0),
180
+ "ymm0": unicorn.x86_const.UC_X86_REG_YMM0,
181
+ "xmm0": unicorn.x86_const.UC_X86_REG_XMM0,
182
+ "ymm1": unicorn.x86_const.UC_X86_REG_YMM1,
183
+ "xmm1": unicorn.x86_const.UC_X86_REG_XMM1,
184
+ "ymm2": unicorn.x86_const.UC_X86_REG_YMM2,
185
+ "xmm2": unicorn.x86_const.UC_X86_REG_XMM2,
186
+ "ymm3": unicorn.x86_const.UC_X86_REG_YMM3,
187
+ "xmm3": unicorn.x86_const.UC_X86_REG_XMM3,
188
+ "ymm4": unicorn.x86_const.UC_X86_REG_YMM4,
189
+ "xmm4": unicorn.x86_const.UC_X86_REG_XMM4,
190
+ "ymm5": unicorn.x86_const.UC_X86_REG_YMM5,
191
+ "xmm5": unicorn.x86_const.UC_X86_REG_XMM5,
192
+ "ymm6": unicorn.x86_const.UC_X86_REG_YMM6,
193
+ "xmm6": unicorn.x86_const.UC_X86_REG_XMM6,
194
+ "ymm7": unicorn.x86_const.UC_X86_REG_YMM7,
195
+ "xmm7": unicorn.x86_const.UC_X86_REG_XMM7,
196
+ "ymm8": unicorn.x86_const.UC_X86_REG_YMM8,
197
+ "xmm8": unicorn.x86_const.UC_X86_REG_XMM8,
198
+ "ymm9": unicorn.x86_const.UC_X86_REG_YMM9,
199
+ "xmm9": unicorn.x86_const.UC_X86_REG_XMM9,
200
+ "ymm10": unicorn.x86_const.UC_X86_REG_YMM10,
201
+ "xmm10": unicorn.x86_const.UC_X86_REG_XMM10,
202
+ "ymm11": unicorn.x86_const.UC_X86_REG_YMM11,
203
+ "xmm11": unicorn.x86_const.UC_X86_REG_XMM11,
204
+ "ymm12": unicorn.x86_const.UC_X86_REG_YMM12,
205
+ "xmm12": unicorn.x86_const.UC_X86_REG_XMM12,
206
+ "ymm13": unicorn.x86_const.UC_X86_REG_YMM13,
207
+ "xmm13": unicorn.x86_const.UC_X86_REG_XMM13,
208
+ "ymm14": unicorn.x86_const.UC_X86_REG_YMM14,
209
+ "xmm14": unicorn.x86_const.UC_X86_REG_XMM14,
210
+ "ymm15": unicorn.x86_const.UC_X86_REG_YMM15,
211
+ "xmm15": unicorn.x86_const.UC_X86_REG_XMM15,
217
212
  }
218
213
  )
219
214
 
@@ -226,101 +221,101 @@ class AMD64AVX512MachineDef(AMD64MachineDef):
226
221
  self._registers.update(
227
222
  {
228
223
  # *** SSE/AVX registers ***
229
- "zmm0": (unicorn.x86_const.UC_X86_REG_ZMM0, "zmm0", 64, 0),
230
- "ymm0": (unicorn.x86_const.UC_X86_REG_YMM0, "zmm0", 32, 0),
231
- "xmm0": (unicorn.x86_const.UC_X86_REG_XMM0, "zmm0", 16, 0),
232
- "zmm1": (unicorn.x86_const.UC_X86_REG_ZMM1, "zmm1", 64, 0),
233
- "ymm1": (unicorn.x86_const.UC_X86_REG_YMM1, "zmm1", 32, 0),
234
- "xmm1": (unicorn.x86_const.UC_X86_REG_XMM1, "zmm1", 16, 0),
235
- "zmm2": (unicorn.x86_const.UC_X86_REG_ZMM2, "zmm2", 64, 0),
236
- "ymm2": (unicorn.x86_const.UC_X86_REG_YMM2, "zmm2", 32, 0),
237
- "xmm2": (unicorn.x86_const.UC_X86_REG_XMM2, "zmm2", 16, 0),
238
- "zmm3": (unicorn.x86_const.UC_X86_REG_ZMM3, "zmm3", 64, 0),
239
- "ymm3": (unicorn.x86_const.UC_X86_REG_YMM3, "zmm3", 32, 0),
240
- "xmm3": (unicorn.x86_const.UC_X86_REG_XMM3, "zmm3", 16, 0),
241
- "zmm4": (unicorn.x86_const.UC_X86_REG_ZMM4, "zmm4", 64, 0),
242
- "ymm4": (unicorn.x86_const.UC_X86_REG_YMM4, "zmm4", 32, 0),
243
- "xmm4": (unicorn.x86_const.UC_X86_REG_XMM4, "zmm4", 16, 0),
244
- "zmm5": (unicorn.x86_const.UC_X86_REG_ZMM5, "zmm5", 64, 0),
245
- "ymm5": (unicorn.x86_const.UC_X86_REG_YMM5, "zmm5", 32, 0),
246
- "xmm5": (unicorn.x86_const.UC_X86_REG_XMM5, "zmm5", 16, 0),
247
- "zmm6": (unicorn.x86_const.UC_X86_REG_ZMM6, "zmm6", 64, 0),
248
- "ymm6": (unicorn.x86_const.UC_X86_REG_YMM6, "zmm6", 32, 0),
249
- "xmm6": (unicorn.x86_const.UC_X86_REG_XMM6, "zmm6", 16, 0),
250
- "zmm7": (unicorn.x86_const.UC_X86_REG_ZMM7, "zmm7", 64, 0),
251
- "ymm7": (unicorn.x86_const.UC_X86_REG_YMM7, "zmm7", 32, 0),
252
- "xmm7": (unicorn.x86_const.UC_X86_REG_XMM7, "zmm7", 16, 0),
253
- "zmm8": (unicorn.x86_const.UC_X86_REG_ZMM8, "zmm8", 64, 0),
254
- "ymm8": (unicorn.x86_const.UC_X86_REG_YMM8, "zmm8", 32, 0),
255
- "xmm8": (unicorn.x86_const.UC_X86_REG_XMM8, "zmm8", 16, 0),
256
- "zmm9": (unicorn.x86_const.UC_X86_REG_ZMM9, "zmm9", 64, 0),
257
- "ymm9": (unicorn.x86_const.UC_X86_REG_YMM9, "zmm9", 32, 0),
258
- "xmm9": (unicorn.x86_const.UC_X86_REG_XMM9, "zmm9", 16, 0),
259
- "zmm10": (unicorn.x86_const.UC_X86_REG_ZMM10, "zmm10", 64, 0),
260
- "ymm10": (unicorn.x86_const.UC_X86_REG_YMM10, "zmm10", 32, 0),
261
- "xmm10": (unicorn.x86_const.UC_X86_REG_XMM10, "zmm10", 16, 0),
262
- "zmm11": (unicorn.x86_const.UC_X86_REG_ZMM11, "zmm11", 64, 0),
263
- "ymm11": (unicorn.x86_const.UC_X86_REG_YMM11, "zmm11", 32, 0),
264
- "xmm11": (unicorn.x86_const.UC_X86_REG_XMM11, "zmm11", 16, 0),
265
- "zmm12": (unicorn.x86_const.UC_X86_REG_ZMM12, "zmm12", 64, 0),
266
- "ymm12": (unicorn.x86_const.UC_X86_REG_YMM12, "zmm12", 32, 0),
267
- "xmm12": (unicorn.x86_const.UC_X86_REG_XMM12, "zmm12", 16, 0),
268
- "zmm13": (unicorn.x86_const.UC_X86_REG_ZMM13, "zmm13", 64, 0),
269
- "ymm13": (unicorn.x86_const.UC_X86_REG_YMM13, "zmm13", 32, 0),
270
- "xmm13": (unicorn.x86_const.UC_X86_REG_XMM13, "zmm13", 16, 0),
271
- "zmm14": (unicorn.x86_const.UC_X86_REG_ZMM14, "zmm14", 64, 0),
272
- "ymm14": (unicorn.x86_const.UC_X86_REG_YMM14, "zmm14", 32, 0),
273
- "xmm14": (unicorn.x86_const.UC_X86_REG_XMM14, "zmm14", 16, 0),
274
- "zmm15": (unicorn.x86_const.UC_X86_REG_ZMM15, "zmm15", 64, 0),
275
- "ymm15": (unicorn.x86_const.UC_X86_REG_YMM15, "zmm15", 32, 0),
276
- "xmm15": (unicorn.x86_const.UC_X86_REG_XMM15, "zmm15", 16, 0),
277
- "zmm16": (unicorn.x86_const.UC_X86_REG_ZMM16, "zmm16", 64, 0),
278
- "ymm16": (unicorn.x86_const.UC_X86_REG_YMM16, "zmm16", 32, 0),
279
- "xmm16": (unicorn.x86_const.UC_X86_REG_XMM16, "zmm16", 16, 0),
280
- "zmm17": (unicorn.x86_const.UC_X86_REG_ZMM17, "zmm17", 64, 0),
281
- "ymm17": (unicorn.x86_const.UC_X86_REG_YMM17, "zmm17", 32, 0),
282
- "xmm17": (unicorn.x86_const.UC_X86_REG_XMM17, "zmm17", 16, 0),
283
- "zmm18": (unicorn.x86_const.UC_X86_REG_ZMM18, "zmm18", 64, 0),
284
- "ymm18": (unicorn.x86_const.UC_X86_REG_YMM18, "zmm18", 32, 0),
285
- "xmm18": (unicorn.x86_const.UC_X86_REG_XMM18, "zmm18", 16, 0),
286
- "zmm19": (unicorn.x86_const.UC_X86_REG_ZMM19, "zmm19", 64, 0),
287
- "ymm19": (unicorn.x86_const.UC_X86_REG_YMM19, "zmm19", 32, 0),
288
- "xmm19": (unicorn.x86_const.UC_X86_REG_XMM19, "zmm19", 16, 0),
289
- "zmm20": (unicorn.x86_const.UC_X86_REG_ZMM20, "zmm20", 64, 0),
290
- "ymm20": (unicorn.x86_const.UC_X86_REG_YMM20, "zmm20", 32, 0),
291
- "xmm20": (unicorn.x86_const.UC_X86_REG_XMM20, "zmm20", 16, 0),
292
- "zmm21": (unicorn.x86_const.UC_X86_REG_ZMM21, "zmm21", 64, 0),
293
- "ymm21": (unicorn.x86_const.UC_X86_REG_YMM21, "zmm21", 32, 0),
294
- "xmm21": (unicorn.x86_const.UC_X86_REG_XMM21, "zmm21", 16, 0),
295
- "zmm22": (unicorn.x86_const.UC_X86_REG_ZMM22, "zmm22", 64, 0),
296
- "ymm22": (unicorn.x86_const.UC_X86_REG_YMM22, "zmm22", 32, 0),
297
- "xmm22": (unicorn.x86_const.UC_X86_REG_XMM22, "zmm22", 16, 0),
298
- "zmm23": (unicorn.x86_const.UC_X86_REG_ZMM23, "zmm23", 64, 0),
299
- "ymm23": (unicorn.x86_const.UC_X86_REG_YMM23, "zmm23", 32, 0),
300
- "xmm23": (unicorn.x86_const.UC_X86_REG_XMM23, "zmm23", 16, 0),
301
- "zmm24": (unicorn.x86_const.UC_X86_REG_ZMM24, "zmm24", 64, 0),
302
- "ymm24": (unicorn.x86_const.UC_X86_REG_YMM24, "zmm24", 32, 0),
303
- "xmm24": (unicorn.x86_const.UC_X86_REG_XMM24, "zmm24", 16, 0),
304
- "zmm25": (unicorn.x86_const.UC_X86_REG_ZMM25, "zmm25", 64, 0),
305
- "ymm25": (unicorn.x86_const.UC_X86_REG_YMM25, "zmm25", 32, 0),
306
- "xmm25": (unicorn.x86_const.UC_X86_REG_XMM25, "zmm25", 16, 0),
307
- "zmm26": (unicorn.x86_const.UC_X86_REG_ZMM26, "zmm26", 64, 0),
308
- "ymm26": (unicorn.x86_const.UC_X86_REG_YMM26, "zmm26", 32, 0),
309
- "xmm26": (unicorn.x86_const.UC_X86_REG_XMM26, "zmm26", 16, 0),
310
- "zmm27": (unicorn.x86_const.UC_X86_REG_ZMM27, "zmm27", 64, 0),
311
- "ymm27": (unicorn.x86_const.UC_X86_REG_YMM27, "zmm27", 32, 0),
312
- "xmm27": (unicorn.x86_const.UC_X86_REG_XMM27, "zmm27", 16, 0),
313
- "zmm28": (unicorn.x86_const.UC_X86_REG_ZMM28, "zmm28", 64, 0),
314
- "ymm28": (unicorn.x86_const.UC_X86_REG_YMM28, "zmm28", 32, 0),
315
- "xmm28": (unicorn.x86_const.UC_X86_REG_XMM28, "zmm28", 16, 0),
316
- "zmm29": (unicorn.x86_const.UC_X86_REG_ZMM29, "zmm29", 64, 0),
317
- "ymm29": (unicorn.x86_const.UC_X86_REG_YMM29, "zmm29", 32, 0),
318
- "xmm29": (unicorn.x86_const.UC_X86_REG_XMM29, "zmm29", 16, 0),
319
- "zmm30": (unicorn.x86_const.UC_X86_REG_ZMM30, "zmm30", 64, 0),
320
- "ymm30": (unicorn.x86_const.UC_X86_REG_YMM30, "zmm30", 32, 0),
321
- "xmm30": (unicorn.x86_const.UC_X86_REG_XMM30, "zmm30", 16, 0),
322
- "zmm31": (unicorn.x86_const.UC_X86_REG_ZMM31, "zmm31", 64, 0),
323
- "ymm31": (unicorn.x86_const.UC_X86_REG_YMM31, "zmm31", 32, 0),
324
- "xmm31": (unicorn.x86_const.UC_X86_REG_XMM31, "zmm31", 16, 0),
224
+ "zmm0": unicorn.x86_const.UC_X86_REG_ZMM0,
225
+ "ymm0": unicorn.x86_const.UC_X86_REG_YMM0,
226
+ "xmm0": unicorn.x86_const.UC_X86_REG_XMM0,
227
+ "zmm1": unicorn.x86_const.UC_X86_REG_ZMM1,
228
+ "ymm1": unicorn.x86_const.UC_X86_REG_YMM1,
229
+ "xmm1": unicorn.x86_const.UC_X86_REG_XMM1,
230
+ "zmm2": unicorn.x86_const.UC_X86_REG_ZMM2,
231
+ "ymm2": unicorn.x86_const.UC_X86_REG_YMM2,
232
+ "xmm2": unicorn.x86_const.UC_X86_REG_XMM2,
233
+ "zmm3": unicorn.x86_const.UC_X86_REG_ZMM3,
234
+ "ymm3": unicorn.x86_const.UC_X86_REG_YMM3,
235
+ "xmm3": unicorn.x86_const.UC_X86_REG_XMM3,
236
+ "zmm4": unicorn.x86_const.UC_X86_REG_ZMM4,
237
+ "ymm4": unicorn.x86_const.UC_X86_REG_YMM4,
238
+ "xmm4": unicorn.x86_const.UC_X86_REG_XMM4,
239
+ "zmm5": unicorn.x86_const.UC_X86_REG_ZMM5,
240
+ "ymm5": unicorn.x86_const.UC_X86_REG_YMM5,
241
+ "xmm5": unicorn.x86_const.UC_X86_REG_XMM5,
242
+ "zmm6": unicorn.x86_const.UC_X86_REG_ZMM6,
243
+ "ymm6": unicorn.x86_const.UC_X86_REG_YMM6,
244
+ "xmm6": unicorn.x86_const.UC_X86_REG_XMM6,
245
+ "zmm7": unicorn.x86_const.UC_X86_REG_ZMM7,
246
+ "ymm7": unicorn.x86_const.UC_X86_REG_YMM7,
247
+ "xmm7": unicorn.x86_const.UC_X86_REG_XMM7,
248
+ "zmm8": unicorn.x86_const.UC_X86_REG_ZMM8,
249
+ "ymm8": unicorn.x86_const.UC_X86_REG_YMM8,
250
+ "xmm8": unicorn.x86_const.UC_X86_REG_XMM8,
251
+ "zmm9": unicorn.x86_const.UC_X86_REG_ZMM9,
252
+ "ymm9": unicorn.x86_const.UC_X86_REG_YMM9,
253
+ "xmm9": unicorn.x86_const.UC_X86_REG_XMM9,
254
+ "zmm10": unicorn.x86_const.UC_X86_REG_ZMM10,
255
+ "ymm10": unicorn.x86_const.UC_X86_REG_YMM10,
256
+ "xmm10": unicorn.x86_const.UC_X86_REG_XMM10,
257
+ "zmm11": unicorn.x86_const.UC_X86_REG_ZMM11,
258
+ "ymm11": unicorn.x86_const.UC_X86_REG_YMM11,
259
+ "xmm11": unicorn.x86_const.UC_X86_REG_XMM11,
260
+ "zmm12": unicorn.x86_const.UC_X86_REG_ZMM12,
261
+ "ymm12": unicorn.x86_const.UC_X86_REG_YMM12,
262
+ "xmm12": unicorn.x86_const.UC_X86_REG_XMM12,
263
+ "zmm13": unicorn.x86_const.UC_X86_REG_ZMM13,
264
+ "ymm13": unicorn.x86_const.UC_X86_REG_YMM13,
265
+ "xmm13": unicorn.x86_const.UC_X86_REG_XMM13,
266
+ "zmm14": unicorn.x86_const.UC_X86_REG_ZMM14,
267
+ "ymm14": unicorn.x86_const.UC_X86_REG_YMM14,
268
+ "xmm14": unicorn.x86_const.UC_X86_REG_XMM14,
269
+ "zmm15": unicorn.x86_const.UC_X86_REG_ZMM15,
270
+ "ymm15": unicorn.x86_const.UC_X86_REG_YMM15,
271
+ "xmm15": unicorn.x86_const.UC_X86_REG_XMM15,
272
+ "zmm16": unicorn.x86_const.UC_X86_REG_ZMM16,
273
+ "ymm16": unicorn.x86_const.UC_X86_REG_YMM16,
274
+ "xmm16": unicorn.x86_const.UC_X86_REG_XMM16,
275
+ "zmm17": unicorn.x86_const.UC_X86_REG_ZMM17,
276
+ "ymm17": unicorn.x86_const.UC_X86_REG_YMM17,
277
+ "xmm17": unicorn.x86_const.UC_X86_REG_XMM17,
278
+ "zmm18": unicorn.x86_const.UC_X86_REG_ZMM18,
279
+ "ymm18": unicorn.x86_const.UC_X86_REG_YMM18,
280
+ "xmm18": unicorn.x86_const.UC_X86_REG_XMM18,
281
+ "zmm19": unicorn.x86_const.UC_X86_REG_ZMM19,
282
+ "ymm19": unicorn.x86_const.UC_X86_REG_YMM19,
283
+ "xmm19": unicorn.x86_const.UC_X86_REG_XMM19,
284
+ "zmm20": unicorn.x86_const.UC_X86_REG_ZMM20,
285
+ "ymm20": unicorn.x86_const.UC_X86_REG_YMM20,
286
+ "xmm20": unicorn.x86_const.UC_X86_REG_XMM20,
287
+ "zmm21": unicorn.x86_const.UC_X86_REG_ZMM21,
288
+ "ymm21": unicorn.x86_const.UC_X86_REG_YMM21,
289
+ "xmm21": unicorn.x86_const.UC_X86_REG_XMM21,
290
+ "zmm22": unicorn.x86_const.UC_X86_REG_ZMM22,
291
+ "ymm22": unicorn.x86_const.UC_X86_REG_YMM22,
292
+ "xmm22": unicorn.x86_const.UC_X86_REG_XMM22,
293
+ "zmm23": unicorn.x86_const.UC_X86_REG_ZMM23,
294
+ "ymm23": unicorn.x86_const.UC_X86_REG_YMM23,
295
+ "xmm23": unicorn.x86_const.UC_X86_REG_XMM23,
296
+ "zmm24": unicorn.x86_const.UC_X86_REG_ZMM24,
297
+ "ymm24": unicorn.x86_const.UC_X86_REG_YMM24,
298
+ "xmm24": unicorn.x86_const.UC_X86_REG_XMM24,
299
+ "zmm25": unicorn.x86_const.UC_X86_REG_ZMM25,
300
+ "ymm25": unicorn.x86_const.UC_X86_REG_YMM25,
301
+ "xmm25": unicorn.x86_const.UC_X86_REG_XMM25,
302
+ "zmm26": unicorn.x86_const.UC_X86_REG_ZMM26,
303
+ "ymm26": unicorn.x86_const.UC_X86_REG_YMM26,
304
+ "xmm26": unicorn.x86_const.UC_X86_REG_XMM26,
305
+ "zmm27": unicorn.x86_const.UC_X86_REG_ZMM27,
306
+ "ymm27": unicorn.x86_const.UC_X86_REG_YMM27,
307
+ "xmm27": unicorn.x86_const.UC_X86_REG_XMM27,
308
+ "zmm28": unicorn.x86_const.UC_X86_REG_ZMM28,
309
+ "ymm28": unicorn.x86_const.UC_X86_REG_YMM28,
310
+ "xmm28": unicorn.x86_const.UC_X86_REG_XMM28,
311
+ "zmm29": unicorn.x86_const.UC_X86_REG_ZMM29,
312
+ "ymm29": unicorn.x86_const.UC_X86_REG_YMM29,
313
+ "xmm29": unicorn.x86_const.UC_X86_REG_XMM29,
314
+ "zmm30": unicorn.x86_const.UC_X86_REG_ZMM30,
315
+ "ymm30": unicorn.x86_const.UC_X86_REG_YMM30,
316
+ "xmm30": unicorn.x86_const.UC_X86_REG_XMM30,
317
+ "zmm31": unicorn.x86_const.UC_X86_REG_ZMM31,
318
+ "ymm31": unicorn.x86_const.UC_X86_REG_YMM31,
319
+ "xmm31": unicorn.x86_const.UC_X86_REG_XMM31,
325
320
  }
326
321
  )