asmjit 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/asmjit.gemspec +1 -1
  4. data/ext/asmjit/asmjit/.editorconfig +10 -0
  5. data/ext/asmjit/asmjit/.github/FUNDING.yml +1 -0
  6. data/ext/asmjit/asmjit/.github/workflows/build-config.json +47 -0
  7. data/ext/asmjit/asmjit/.github/workflows/build.yml +156 -0
  8. data/ext/asmjit/asmjit/.gitignore +6 -0
  9. data/ext/asmjit/asmjit/CMakeLists.txt +611 -0
  10. data/ext/asmjit/asmjit/LICENSE.md +17 -0
  11. data/ext/asmjit/asmjit/README.md +69 -0
  12. data/ext/asmjit/asmjit/src/asmjit/a64.h +62 -0
  13. data/ext/asmjit/asmjit/src/asmjit/arm/a64archtraits_p.h +81 -0
  14. data/ext/asmjit/asmjit/src/asmjit/arm/a64assembler.cpp +5115 -0
  15. data/ext/asmjit/asmjit/src/asmjit/arm/a64assembler.h +72 -0
  16. data/ext/asmjit/asmjit/src/asmjit/arm/a64builder.cpp +51 -0
  17. data/ext/asmjit/asmjit/src/asmjit/arm/a64builder.h +57 -0
  18. data/ext/asmjit/asmjit/src/asmjit/arm/a64compiler.cpp +60 -0
  19. data/ext/asmjit/asmjit/src/asmjit/arm/a64compiler.h +247 -0
  20. data/ext/asmjit/asmjit/src/asmjit/arm/a64emithelper.cpp +464 -0
  21. data/ext/asmjit/asmjit/src/asmjit/arm/a64emithelper_p.h +50 -0
  22. data/ext/asmjit/asmjit/src/asmjit/arm/a64emitter.h +1228 -0
  23. data/ext/asmjit/asmjit/src/asmjit/arm/a64formatter.cpp +298 -0
  24. data/ext/asmjit/asmjit/src/asmjit/arm/a64formatter_p.h +59 -0
  25. data/ext/asmjit/asmjit/src/asmjit/arm/a64func.cpp +189 -0
  26. data/ext/asmjit/asmjit/src/asmjit/arm/a64func_p.h +33 -0
  27. data/ext/asmjit/asmjit/src/asmjit/arm/a64globals.h +1894 -0
  28. data/ext/asmjit/asmjit/src/asmjit/arm/a64instapi.cpp +278 -0
  29. data/ext/asmjit/asmjit/src/asmjit/arm/a64instapi_p.h +41 -0
  30. data/ext/asmjit/asmjit/src/asmjit/arm/a64instdb.cpp +1957 -0
  31. data/ext/asmjit/asmjit/src/asmjit/arm/a64instdb.h +74 -0
  32. data/ext/asmjit/asmjit/src/asmjit/arm/a64instdb_p.h +876 -0
  33. data/ext/asmjit/asmjit/src/asmjit/arm/a64operand.cpp +85 -0
  34. data/ext/asmjit/asmjit/src/asmjit/arm/a64operand.h +312 -0
  35. data/ext/asmjit/asmjit/src/asmjit/arm/a64rapass.cpp +852 -0
  36. data/ext/asmjit/asmjit/src/asmjit/arm/a64rapass_p.h +105 -0
  37. data/ext/asmjit/asmjit/src/asmjit/arm/a64utils.h +179 -0
  38. data/ext/asmjit/asmjit/src/asmjit/arm/armformatter.cpp +143 -0
  39. data/ext/asmjit/asmjit/src/asmjit/arm/armformatter_p.h +44 -0
  40. data/ext/asmjit/asmjit/src/asmjit/arm/armglobals.h +21 -0
  41. data/ext/asmjit/asmjit/src/asmjit/arm/armoperand.h +621 -0
  42. data/ext/asmjit/asmjit/src/asmjit/arm.h +62 -0
  43. data/ext/asmjit/asmjit/src/asmjit/asmjit-scope-begin.h +17 -0
  44. data/ext/asmjit/asmjit/src/asmjit/asmjit-scope-end.h +9 -0
  45. data/ext/asmjit/asmjit/src/asmjit/asmjit.h +33 -0
  46. data/ext/asmjit/asmjit/src/asmjit/core/api-build_p.h +55 -0
  47. data/ext/asmjit/asmjit/src/asmjit/core/api-config.h +613 -0
  48. data/ext/asmjit/asmjit/src/asmjit/core/archcommons.h +229 -0
  49. data/ext/asmjit/asmjit/src/asmjit/core/archtraits.cpp +160 -0
  50. data/ext/asmjit/asmjit/src/asmjit/core/archtraits.h +290 -0
  51. data/ext/asmjit/asmjit/src/asmjit/core/assembler.cpp +406 -0
  52. data/ext/asmjit/asmjit/src/asmjit/core/assembler.h +129 -0
  53. data/ext/asmjit/asmjit/src/asmjit/core/builder.cpp +889 -0
  54. data/ext/asmjit/asmjit/src/asmjit/core/builder.h +1391 -0
  55. data/ext/asmjit/asmjit/src/asmjit/core/codebuffer.h +113 -0
  56. data/ext/asmjit/asmjit/src/asmjit/core/codeholder.cpp +1149 -0
  57. data/ext/asmjit/asmjit/src/asmjit/core/codeholder.h +1035 -0
  58. data/ext/asmjit/asmjit/src/asmjit/core/codewriter.cpp +175 -0
  59. data/ext/asmjit/asmjit/src/asmjit/core/codewriter_p.h +179 -0
  60. data/ext/asmjit/asmjit/src/asmjit/core/compiler.cpp +582 -0
  61. data/ext/asmjit/asmjit/src/asmjit/core/compiler.h +737 -0
  62. data/ext/asmjit/asmjit/src/asmjit/core/compilerdefs.h +173 -0
  63. data/ext/asmjit/asmjit/src/asmjit/core/constpool.cpp +363 -0
  64. data/ext/asmjit/asmjit/src/asmjit/core/constpool.h +250 -0
  65. data/ext/asmjit/asmjit/src/asmjit/core/cpuinfo.cpp +1162 -0
  66. data/ext/asmjit/asmjit/src/asmjit/core/cpuinfo.h +813 -0
  67. data/ext/asmjit/asmjit/src/asmjit/core/emithelper.cpp +323 -0
  68. data/ext/asmjit/asmjit/src/asmjit/core/emithelper_p.h +58 -0
  69. data/ext/asmjit/asmjit/src/asmjit/core/emitter.cpp +333 -0
  70. data/ext/asmjit/asmjit/src/asmjit/core/emitter.h +741 -0
  71. data/ext/asmjit/asmjit/src/asmjit/core/emitterutils.cpp +129 -0
  72. data/ext/asmjit/asmjit/src/asmjit/core/emitterutils_p.h +89 -0
  73. data/ext/asmjit/asmjit/src/asmjit/core/environment.cpp +46 -0
  74. data/ext/asmjit/asmjit/src/asmjit/core/environment.h +508 -0
  75. data/ext/asmjit/asmjit/src/asmjit/core/errorhandler.cpp +14 -0
  76. data/ext/asmjit/asmjit/src/asmjit/core/errorhandler.h +228 -0
  77. data/ext/asmjit/asmjit/src/asmjit/core/formatter.cpp +584 -0
  78. data/ext/asmjit/asmjit/src/asmjit/core/formatter.h +247 -0
  79. data/ext/asmjit/asmjit/src/asmjit/core/formatter_p.h +34 -0
  80. data/ext/asmjit/asmjit/src/asmjit/core/func.cpp +286 -0
  81. data/ext/asmjit/asmjit/src/asmjit/core/func.h +1445 -0
  82. data/ext/asmjit/asmjit/src/asmjit/core/funcargscontext.cpp +293 -0
  83. data/ext/asmjit/asmjit/src/asmjit/core/funcargscontext_p.h +199 -0
  84. data/ext/asmjit/asmjit/src/asmjit/core/globals.cpp +133 -0
  85. data/ext/asmjit/asmjit/src/asmjit/core/globals.h +393 -0
  86. data/ext/asmjit/asmjit/src/asmjit/core/inst.cpp +113 -0
  87. data/ext/asmjit/asmjit/src/asmjit/core/inst.h +772 -0
  88. data/ext/asmjit/asmjit/src/asmjit/core/jitallocator.cpp +1242 -0
  89. data/ext/asmjit/asmjit/src/asmjit/core/jitallocator.h +261 -0
  90. data/ext/asmjit/asmjit/src/asmjit/core/jitruntime.cpp +80 -0
  91. data/ext/asmjit/asmjit/src/asmjit/core/jitruntime.h +89 -0
  92. data/ext/asmjit/asmjit/src/asmjit/core/logger.cpp +69 -0
  93. data/ext/asmjit/asmjit/src/asmjit/core/logger.h +198 -0
  94. data/ext/asmjit/asmjit/src/asmjit/core/misc_p.h +33 -0
  95. data/ext/asmjit/asmjit/src/asmjit/core/operand.cpp +132 -0
  96. data/ext/asmjit/asmjit/src/asmjit/core/operand.h +1611 -0
  97. data/ext/asmjit/asmjit/src/asmjit/core/osutils.cpp +84 -0
  98. data/ext/asmjit/asmjit/src/asmjit/core/osutils.h +61 -0
  99. data/ext/asmjit/asmjit/src/asmjit/core/osutils_p.h +68 -0
  100. data/ext/asmjit/asmjit/src/asmjit/core/raassignment_p.h +418 -0
  101. data/ext/asmjit/asmjit/src/asmjit/core/rabuilders_p.h +612 -0
  102. data/ext/asmjit/asmjit/src/asmjit/core/radefs_p.h +1204 -0
  103. data/ext/asmjit/asmjit/src/asmjit/core/ralocal.cpp +1166 -0
  104. data/ext/asmjit/asmjit/src/asmjit/core/ralocal_p.h +254 -0
  105. data/ext/asmjit/asmjit/src/asmjit/core/rapass.cpp +1969 -0
  106. data/ext/asmjit/asmjit/src/asmjit/core/rapass_p.h +1183 -0
  107. data/ext/asmjit/asmjit/src/asmjit/core/rastack.cpp +184 -0
  108. data/ext/asmjit/asmjit/src/asmjit/core/rastack_p.h +171 -0
  109. data/ext/asmjit/asmjit/src/asmjit/core/string.cpp +559 -0
  110. data/ext/asmjit/asmjit/src/asmjit/core/string.h +372 -0
  111. data/ext/asmjit/asmjit/src/asmjit/core/support.cpp +494 -0
  112. data/ext/asmjit/asmjit/src/asmjit/core/support.h +1773 -0
  113. data/ext/asmjit/asmjit/src/asmjit/core/target.cpp +14 -0
  114. data/ext/asmjit/asmjit/src/asmjit/core/target.h +53 -0
  115. data/ext/asmjit/asmjit/src/asmjit/core/type.cpp +74 -0
  116. data/ext/asmjit/asmjit/src/asmjit/core/type.h +419 -0
  117. data/ext/asmjit/asmjit/src/asmjit/core/virtmem.cpp +722 -0
  118. data/ext/asmjit/asmjit/src/asmjit/core/virtmem.h +242 -0
  119. data/ext/asmjit/asmjit/src/asmjit/core/zone.cpp +353 -0
  120. data/ext/asmjit/asmjit/src/asmjit/core/zone.h +615 -0
  121. data/ext/asmjit/asmjit/src/asmjit/core/zonehash.cpp +309 -0
  122. data/ext/asmjit/asmjit/src/asmjit/core/zonehash.h +186 -0
  123. data/ext/asmjit/asmjit/src/asmjit/core/zonelist.cpp +163 -0
  124. data/ext/asmjit/asmjit/src/asmjit/core/zonelist.h +209 -0
  125. data/ext/asmjit/asmjit/src/asmjit/core/zonestack.cpp +176 -0
  126. data/ext/asmjit/asmjit/src/asmjit/core/zonestack.h +239 -0
  127. data/ext/asmjit/asmjit/src/asmjit/core/zonestring.h +120 -0
  128. data/ext/asmjit/asmjit/src/asmjit/core/zonetree.cpp +99 -0
  129. data/ext/asmjit/asmjit/src/asmjit/core/zonetree.h +380 -0
  130. data/ext/asmjit/asmjit/src/asmjit/core/zonevector.cpp +356 -0
  131. data/ext/asmjit/asmjit/src/asmjit/core/zonevector.h +690 -0
  132. data/ext/asmjit/asmjit/src/asmjit/core.h +1861 -0
  133. data/ext/asmjit/asmjit/src/asmjit/x86/x86archtraits_p.h +148 -0
  134. data/ext/asmjit/asmjit/src/asmjit/x86/x86assembler.cpp +5110 -0
  135. data/ext/asmjit/asmjit/src/asmjit/x86/x86assembler.h +685 -0
  136. data/ext/asmjit/asmjit/src/asmjit/x86/x86builder.cpp +52 -0
  137. data/ext/asmjit/asmjit/src/asmjit/x86/x86builder.h +351 -0
  138. data/ext/asmjit/asmjit/src/asmjit/x86/x86compiler.cpp +61 -0
  139. data/ext/asmjit/asmjit/src/asmjit/x86/x86compiler.h +721 -0
  140. data/ext/asmjit/asmjit/src/asmjit/x86/x86emithelper.cpp +619 -0
  141. data/ext/asmjit/asmjit/src/asmjit/x86/x86emithelper_p.h +60 -0
  142. data/ext/asmjit/asmjit/src/asmjit/x86/x86emitter.h +4315 -0
  143. data/ext/asmjit/asmjit/src/asmjit/x86/x86formatter.cpp +944 -0
  144. data/ext/asmjit/asmjit/src/asmjit/x86/x86formatter_p.h +58 -0
  145. data/ext/asmjit/asmjit/src/asmjit/x86/x86func.cpp +503 -0
  146. data/ext/asmjit/asmjit/src/asmjit/x86/x86func_p.h +33 -0
  147. data/ext/asmjit/asmjit/src/asmjit/x86/x86globals.h +2169 -0
  148. data/ext/asmjit/asmjit/src/asmjit/x86/x86instapi.cpp +1732 -0
  149. data/ext/asmjit/asmjit/src/asmjit/x86/x86instapi_p.h +41 -0
  150. data/ext/asmjit/asmjit/src/asmjit/x86/x86instdb.cpp +4427 -0
  151. data/ext/asmjit/asmjit/src/asmjit/x86/x86instdb.h +563 -0
  152. data/ext/asmjit/asmjit/src/asmjit/x86/x86instdb_p.h +311 -0
  153. data/ext/asmjit/asmjit/src/asmjit/x86/x86opcode_p.h +436 -0
  154. data/ext/asmjit/asmjit/src/asmjit/x86/x86operand.cpp +231 -0
  155. data/ext/asmjit/asmjit/src/asmjit/x86/x86operand.h +1085 -0
  156. data/ext/asmjit/asmjit/src/asmjit/x86/x86rapass.cpp +1509 -0
  157. data/ext/asmjit/asmjit/src/asmjit/x86/x86rapass_p.h +94 -0
  158. data/ext/asmjit/asmjit/src/asmjit/x86.h +93 -0
  159. data/ext/asmjit/asmjit/src/asmjit.natvis +245 -0
  160. data/ext/asmjit/asmjit/test/asmjit_test_assembler.cpp +84 -0
  161. data/ext/asmjit/asmjit/test/asmjit_test_assembler.h +85 -0
  162. data/ext/asmjit/asmjit/test/asmjit_test_assembler_a64.cpp +4006 -0
  163. data/ext/asmjit/asmjit/test/asmjit_test_assembler_x64.cpp +17833 -0
  164. data/ext/asmjit/asmjit/test/asmjit_test_assembler_x86.cpp +8300 -0
  165. data/ext/asmjit/asmjit/test/asmjit_test_compiler.cpp +253 -0
  166. data/ext/asmjit/asmjit/test/asmjit_test_compiler.h +73 -0
  167. data/ext/asmjit/asmjit/test/asmjit_test_compiler_a64.cpp +690 -0
  168. data/ext/asmjit/asmjit/test/asmjit_test_compiler_x86.cpp +4317 -0
  169. data/ext/asmjit/asmjit/test/asmjit_test_emitters.cpp +197 -0
  170. data/ext/asmjit/asmjit/test/asmjit_test_instinfo.cpp +181 -0
  171. data/ext/asmjit/asmjit/test/asmjit_test_misc.h +257 -0
  172. data/ext/asmjit/asmjit/test/asmjit_test_perf.cpp +62 -0
  173. data/ext/asmjit/asmjit/test/asmjit_test_perf.h +61 -0
  174. data/ext/asmjit/asmjit/test/asmjit_test_perf_a64.cpp +699 -0
  175. data/ext/asmjit/asmjit/test/asmjit_test_perf_x86.cpp +5032 -0
  176. data/ext/asmjit/asmjit/test/asmjit_test_unit.cpp +172 -0
  177. data/ext/asmjit/asmjit/test/asmjit_test_x86_sections.cpp +172 -0
  178. data/ext/asmjit/asmjit/test/asmjitutils.h +38 -0
  179. data/ext/asmjit/asmjit/test/broken.cpp +312 -0
  180. data/ext/asmjit/asmjit/test/broken.h +148 -0
  181. data/ext/asmjit/asmjit/test/cmdline.h +61 -0
  182. data/ext/asmjit/asmjit/test/performancetimer.h +41 -0
  183. data/ext/asmjit/asmjit/tools/configure-makefiles.sh +13 -0
  184. data/ext/asmjit/asmjit/tools/configure-ninja.sh +13 -0
  185. data/ext/asmjit/asmjit/tools/configure-sanitizers.sh +13 -0
  186. data/ext/asmjit/asmjit/tools/configure-vs2019-x64.bat +2 -0
  187. data/ext/asmjit/asmjit/tools/configure-vs2019-x86.bat +2 -0
  188. data/ext/asmjit/asmjit/tools/configure-vs2022-x64.bat +2 -0
  189. data/ext/asmjit/asmjit/tools/configure-vs2022-x86.bat +2 -0
  190. data/ext/asmjit/asmjit/tools/configure-xcode.sh +8 -0
  191. data/ext/asmjit/asmjit/tools/enumgen.js +417 -0
  192. data/ext/asmjit/asmjit/tools/enumgen.sh +3 -0
  193. data/ext/asmjit/asmjit/tools/tablegen-arm.js +365 -0
  194. data/ext/asmjit/asmjit/tools/tablegen-arm.sh +3 -0
  195. data/ext/asmjit/asmjit/tools/tablegen-x86.js +2638 -0
  196. data/ext/asmjit/asmjit/tools/tablegen-x86.sh +3 -0
  197. data/ext/asmjit/asmjit/tools/tablegen.js +947 -0
  198. data/ext/asmjit/asmjit/tools/tablegen.sh +4 -0
  199. data/ext/asmjit/asmjit.cc +18 -0
  200. data/lib/asmjit/version.rb +1 -1
  201. metadata +197 -2
@@ -0,0 +1,311 @@
1
+ // This file is part of AsmJit project <https://asmjit.com>
2
+ //
3
+ // See asmjit.h or LICENSE.md for license and copyright information
4
+ // SPDX-License-Identifier: Zlib
5
+
6
+ #ifndef ASMJIT_X86_X86INSTDB_P_H_INCLUDED
7
+ #define ASMJIT_X86_X86INSTDB_P_H_INCLUDED
8
+
9
+ #include "../x86/x86instdb.h"
10
+
11
+ ASMJIT_BEGIN_SUB_NAMESPACE(x86)
12
+
13
+ //! \cond INTERNAL
14
+ //! \addtogroup asmjit_x86
15
+ //! \{
16
+
17
+ namespace InstDB {
18
+
19
+ //! Instruction encoding (X86).
20
+ //!
21
+ //! This is a specific identifier that is used by AsmJit to describe the way each instruction is encoded. Some
22
+ //! encodings are special only for a single instruction as X86 instruction set contains a lot of legacy encodings,
23
+ //! and some encodings describe a group of instructions that share some commons, like MMX, SSE, AVX, AVX512
24
+ //! instructions, etc...
25
+ enum EncodingId : uint32_t {
26
+ kEncodingNone = 0, //!< Never used.
27
+ kEncodingX86Op, //!< X86 [OP].
28
+ kEncodingX86Op_Mod11RM, //!< X86 [OP] (opcode with ModRM byte where MOD must be 11b).
29
+ kEncodingX86Op_Mod11RM_I8, //!< X86 [OP] (opcode with ModRM byte + 8-bit immediate).
30
+ kEncodingX86Op_xAddr, //!< X86 [OP] (implicit address in the first register operand).
31
+ kEncodingX86Op_xAX, //!< X86 [OP] (implicit or explicit '?AX' form).
32
+ kEncodingX86Op_xDX_xAX, //!< X86 [OP] (implicit or explicit '?DX, ?AX' form).
33
+ kEncodingX86Op_MemZAX, //!< X86 [OP] (implicit or explicit '[EAX|RAX]' form).
34
+ kEncodingX86I_xAX, //!< X86 [I] (implicit or explicit '?AX' form).
35
+ kEncodingX86M, //!< X86 [M] (handles 2|4|8-bytes size).
36
+ kEncodingX86M_NoMemSize, //!< X86 [M] (handles 2|4|8-bytes size, but doesn't consider memory size).
37
+ kEncodingX86M_NoSize, //!< X86 [M] (doesn't handle any size).
38
+ kEncodingX86M_GPB, //!< X86 [M] (handles single-byte size).
39
+ kEncodingX86M_GPB_MulDiv, //!< X86 [M] (like GPB, handles implicit|explicit MUL|DIV|IDIV).
40
+ kEncodingX86M_Only, //!< X86 [M] (restricted to memory operand of any size).
41
+ kEncodingX86M_Only_EDX_EAX, //!< X86 [M] (memory operand only, followed by implicit <edx> and <eax>).
42
+ kEncodingX86M_Nop, //!< X86 [M] (special case of NOP instruction).
43
+ kEncodingX86R_Native, //!< X86 [R] (register must be either 32-bit or 64-bit depending on arch).
44
+ kEncodingX86R_FromM, //!< X86 [R] - which specifies memory address.
45
+ kEncodingX86R32_EDX_EAX, //!< X86 [R32] followed by implicit EDX and EAX.
46
+ kEncodingX86Rm, //!< X86 [RM] (doesn't handle single-byte size).
47
+ kEncodingX86Rm_Raw66H, //!< X86 [RM] (used by LZCNT, POPCNT, and TZCNT).
48
+ kEncodingX86Rm_NoSize, //!< X86 [RM] (doesn't add REX.W prefix if 64-bit reg is used).
49
+ kEncodingX86Mr, //!< X86 [MR] (doesn't handle single-byte size).
50
+ kEncodingX86Mr_NoSize, //!< X86 [MR] (doesn't handle any size).
51
+ kEncodingX86Arith, //!< X86 adc, add, and, cmp, or, sbb, sub, xor.
52
+ kEncodingX86Bswap, //!< X86 bswap.
53
+ kEncodingX86Bt, //!< X86 bt, btc, btr, bts.
54
+ kEncodingX86Call, //!< X86 call.
55
+ kEncodingX86Cmpxchg, //!< X86 [MR] cmpxchg.
56
+ kEncodingX86Cmpxchg8b_16b, //!< X86 [MR] cmpxchg8b, cmpxchg16b.
57
+ kEncodingX86Crc, //!< X86 crc32.
58
+ kEncodingX86Enter, //!< X86 enter.
59
+ kEncodingX86Imul, //!< X86 imul.
60
+ kEncodingX86In, //!< X86 in.
61
+ kEncodingX86Ins, //!< X86 ins[b|q|d].
62
+ kEncodingX86IncDec, //!< X86 inc, dec.
63
+ kEncodingX86Int, //!< X86 int (interrupt).
64
+ kEncodingX86Jcc, //!< X86 jcc.
65
+ kEncodingX86JecxzLoop, //!< X86 jcxz, jecxz, jrcxz, loop, loope, loopne.
66
+ kEncodingX86Jmp, //!< X86 jmp.
67
+ kEncodingX86JmpRel, //!< X86 xbegin.
68
+ kEncodingX86LcallLjmp, //!< X86 lcall/ljmp.
69
+ kEncodingX86Lea, //!< X86 lea.
70
+ kEncodingX86Mov, //!< X86 mov (all possible cases).
71
+ kEncodingX86Movabs, //!< X86 movabs.
72
+ kEncodingX86MovsxMovzx, //!< X86 movsx, movzx.
73
+ kEncodingX86MovntiMovdiri, //!< X86 movnti/movdiri.
74
+ kEncodingX86EnqcmdMovdir64b, //!< X86 enqcmd/enqcmds/movdir64b.
75
+ kEncodingX86Out, //!< X86 out.
76
+ kEncodingX86Outs, //!< X86 out[b|w|d].
77
+ kEncodingX86Push, //!< X86 push.
78
+ kEncodingX86Pop, //!< X86 pop.
79
+ kEncodingX86Ret, //!< X86 ret.
80
+ kEncodingX86Rot, //!< X86 rcl, rcr, rol, ror, sal, sar, shl, shr.
81
+ kEncodingX86Set, //!< X86 setcc.
82
+ kEncodingX86ShldShrd, //!< X86 shld, shrd.
83
+ kEncodingX86StrRm, //!< X86 lods.
84
+ kEncodingX86StrMr, //!< X86 scas, stos.
85
+ kEncodingX86StrMm, //!< X86 cmps, movs.
86
+ kEncodingX86Test, //!< X86 test.
87
+ kEncodingX86Xadd, //!< X86 xadd.
88
+ kEncodingX86Xchg, //!< X86 xchg.
89
+ kEncodingX86Fence, //!< X86 lfence, mfence, sfence.
90
+ kEncodingX86Bndmov, //!< X86 [RM|MR] (used by BNDMOV).
91
+ kEncodingFpuOp, //!< FPU [OP].
92
+ kEncodingFpuArith, //!< FPU fadd, fdiv, fdivr, fmul, fsub, fsubr.
93
+ kEncodingFpuCom, //!< FPU fcom, fcomp.
94
+ kEncodingFpuFldFst, //!< FPU fld, fst, fstp.
95
+ kEncodingFpuM, //!< FPU fiadd, ficom, ficomp, fidiv, fidivr, fild, fimul, fist, fistp, fisttp, fisub, fisubr.
96
+ kEncodingFpuR, //!< FPU fcmov, fcomi, fcomip, ffree, fucom, fucomi, fucomip, fucomp, fxch.
97
+ kEncodingFpuRDef, //!< FPU faddp, fdivp, fdivrp, fmulp, fsubp, fsubrp.
98
+ kEncodingFpuStsw, //!< FPU fnstsw, Fstsw.
99
+ kEncodingExtRm, //!< EXT [RM].
100
+ kEncodingExtRm_XMM0, //!< EXT [RM<XMM0>].
101
+ kEncodingExtRm_ZDI, //!< EXT [RM<ZDI>].
102
+ kEncodingExtRm_P, //!< EXT [RM] (propagates 66H if the instruction uses XMM register).
103
+ kEncodingExtRm_Wx, //!< EXT [RM] (propagates REX.W if GPQ is used or the second operand is GPQ/QWORD_PTR).
104
+ kEncodingExtRm_Wx_GpqOnly, //!< EXT [RM] (propagates REX.W if the first operand is GPQ register).
105
+ kEncodingExtRmRi, //!< EXT [RM|RI].
106
+ kEncodingExtRmRi_P, //!< EXT [RM|RI] (propagates 66H if the instruction uses XMM register).
107
+ kEncodingExtRmi, //!< EXT [RMI].
108
+ kEncodingExtRmi_P, //!< EXT [RMI] (propagates 66H if the instruction uses XMM register).
109
+ kEncodingExtPextrw, //!< EXT pextrw.
110
+ kEncodingExtExtract, //!< EXT pextrb, pextrd, pextrq, extractps.
111
+ kEncodingExtMov, //!< EXT mov?? - #1:[MM|XMM, MM|XMM|Mem] #2:[MM|XMM|Mem, MM|XMM].
112
+ kEncodingExtMovbe, //!< EXT movbe.
113
+ kEncodingExtMovd, //!< EXT movd.
114
+ kEncodingExtMovq, //!< EXT movq.
115
+ kEncodingExtExtrq, //!< EXT extrq (SSE4A).
116
+ kEncodingExtInsertq, //!< EXT insrq (SSE4A).
117
+ kEncodingExt3dNow, //!< EXT [RMI] (3DNOW specific).
118
+ kEncodingVexOp, //!< VEX [OP].
119
+ kEncodingVexOpMod, //!< VEX [OP] with MODR/M.
120
+ kEncodingVexKmov, //!< VEX [RM|MR] (used by kmov[b|w|d|q]).
121
+ kEncodingVexR_Wx, //!< VEX|EVEX [R] (propagatex VEX.W if GPQ used).
122
+ kEncodingVexM, //!< VEX|EVEX [M].
123
+ kEncodingVexM_VM, //!< VEX|EVEX [M] (propagates VEX|EVEX.L, VSIB support).
124
+ kEncodingVexMr_Lx, //!< VEX|EVEX [MR] (propagates VEX|EVEX.L if YMM used).
125
+ kEncodingVexMr_VM, //!< VEX|EVEX [MR] (VSIB support).
126
+ kEncodingVexMri, //!< VEX|EVEX [MRI].
127
+ kEncodingVexMri_Lx, //!< VEX|EVEX [MRI] (propagates VEX|EVEX.L if YMM used).
128
+ kEncodingVexMri_Vpextrw, //!< VEX|EVEX [MRI] (special case required by VPEXTRW instruction).
129
+ kEncodingVexRm, //!< VEX|EVEX [RM].
130
+ kEncodingVexRm_ZDI, //!< VEX|EVEX [RM<ZDI>].
131
+ kEncodingVexRm_Wx, //!< VEX|EVEX [RM] (propagates VEX|EVEX.W if GPQ used).
132
+ kEncodingVexRm_Lx, //!< VEX|EVEX [RM] (propagates VEX|EVEX.L if YMM used).
133
+ kEncodingVexRm_Lx_Narrow, //!< VEX|EVEX [RM] (the destination vector size is narrowed).
134
+ kEncodingVexRm_Lx_Bcst, //!< VEX|EVEX [RM] (can handle broadcast r32/r64).
135
+ kEncodingVexRm_VM, //!< VEX|EVEX [RM] (propagates VEX|EVEX.L, VSIB support).
136
+ kEncodingVexRm_T1_4X, //!< EVEX [RM] (used by NN instructions that use RM-T1_4X encoding).
137
+ kEncodingVexRmi, //!< VEX|EVEX [RMI].
138
+ kEncodingVexRmi_Wx, //!< VEX|EVEX [RMI] (propagates VEX|EVEX.W if GPQ used).
139
+ kEncodingVexRmi_Lx, //!< VEX|EVEX [RMI] (propagates VEX|EVEX.L if YMM used).
140
+ kEncodingVexRvm, //!< VEX|EVEX [RVM].
141
+ kEncodingVexRvm_Wx, //!< VEX|EVEX [RVM] (propagates VEX|EVEX.W if GPQ used).
142
+ kEncodingVexRvm_ZDX_Wx, //!< VEX|EVEX [RVM<ZDX>] (propagates VEX|EVEX.W if GPQ used).
143
+ kEncodingVexRvm_Lx, //!< VEX|EVEX [RVM] (propagates VEX|EVEX.L if YMM used).
144
+ kEncodingVexRvm_Lx_KEvex, //!< VEX|EVEX [RVM] (forces EVEX prefix if K register is used on destination).
145
+ kEncodingVexRvm_Lx_2xK, //!< VEX|EVEX [RVM] (vp2intersectd/vp2intersectq).
146
+ kEncodingVexRvmr, //!< VEX|EVEX [RVMR].
147
+ kEncodingVexRvmr_Lx, //!< VEX|EVEX [RVMR] (propagates VEX|EVEX.L if YMM used).
148
+ kEncodingVexRvmi, //!< VEX|EVEX [RVMI].
149
+ kEncodingVexRvmi_KEvex, //!< VEX|EVEX [RVMI] (forces EVEX prefix if K register is used on destination).
150
+ kEncodingVexRvmi_Lx, //!< VEX|EVEX [RVMI] (propagates VEX|EVEX.L if YMM used).
151
+ kEncodingVexRvmi_Lx_KEvex, //!< VEX|EVEX [RVMI] (forces EVEX prefix if K register is used on destination).
152
+ kEncodingVexRmv, //!< VEX|EVEX [RMV].
153
+ kEncodingVexRmv_Wx, //!< VEX|EVEX [RMV] (propagates VEX|EVEX.W if GPQ used).
154
+ kEncodingVexRmv_VM, //!< VEX|EVEX [RMV] (propagates VEX|EVEX.L, VSIB support).
155
+ kEncodingVexRmvRm_VM, //!< VEX|EVEX [RMV|RM] (propagates VEX|EVEX.L, VSIB support).
156
+ kEncodingVexRmvi, //!< VEX|EVEX [RMVI].
157
+ kEncodingVexRmMr, //!< VEX|EVEX [RM|MR].
158
+ kEncodingVexRmMr_Lx, //!< VEX|EVEX [RM|MR] (propagates VEX|EVEX.L if YMM used).
159
+ kEncodingVexRvmRmv, //!< VEX|EVEX [RVM|RMV].
160
+ kEncodingVexRvmRmi, //!< VEX|EVEX [RVM|RMI].
161
+ kEncodingVexRvmRmi_Lx, //!< VEX|EVEX [RVM|RMI] (propagates VEX|EVEX.L if YMM used).
162
+ kEncodingVexRvmRmvRmi, //!< VEX|EVEX [RVM|RMV|RMI].
163
+ kEncodingVexRvmMr, //!< VEX|EVEX [RVM|MR].
164
+ kEncodingVexRvmMvr, //!< VEX|EVEX [RVM|MVR].
165
+ kEncodingVexRvmMvr_Lx, //!< VEX|EVEX [RVM|MVR] (propagates VEX|EVEX.L if YMM used).
166
+ kEncodingVexRvmVmi, //!< VEX|EVEX [RVM|VMI].
167
+ kEncodingVexRvmVmi_Lx, //!< VEX|EVEX [RVM|VMI] (propagates VEX|EVEX.L if YMM used).
168
+ kEncodingVexRvmVmi_Lx_MEvex, //!< VEX|EVEX [RVM|VMI] (propagates EVEX if the second operand is memory).
169
+ kEncodingVexVm, //!< VEX|EVEX [VM].
170
+ kEncodingVexVm_Wx, //!< VEX|EVEX [VM] (propagates VEX|EVEX.W if GPQ used).
171
+ kEncodingVexVmi, //!< VEX|EVEX [VMI].
172
+ kEncodingVexVmi_Lx, //!< VEX|EVEX [VMI] (propagates VEX|EVEX.L if YMM used).
173
+ kEncodingVexVmi4_Wx, //!< VEX|EVEX [VMI] (propagates VEX|EVEX.W if GPQ used, DWORD Immediate).
174
+ kEncodingVexVmi_Lx_MEvex, //!< VEX|EVEX [VMI] (force EVEX prefix when the second operand is memory)
175
+ kEncodingVexRvrmRvmr, //!< VEX|EVEX [RVRM|RVMR].
176
+ kEncodingVexRvrmRvmr_Lx, //!< VEX|EVEX [RVRM|RVMR] (propagates VEX|EVEX.L if YMM used).
177
+ kEncodingVexRvrmiRvmri_Lx, //!< VEX|EVEX [RVRMI|RVMRI] (propagates VEX|EVEX.L if YMM used).
178
+ kEncodingVexMovdMovq, //!< VEX|EVEX vmovd, vmovq.
179
+ kEncodingVexMovssMovsd, //!< VEX|EVEX vmovss, vmovsd.
180
+ kEncodingFma4, //!< FMA4 [R, R, R/M, R/M].
181
+ kEncodingFma4_Lx, //!< FMA4 [R, R, R/M, R/M] (propagates AVX.L if YMM used).
182
+ kEncodingAmxCfg, //!< AMX ldtilecfg/sttilecfg.
183
+ kEncodingAmxR, //!< AMX [R] - tilezero.
184
+ kEncodingAmxRm, //!< AMX tileloadd/tileloaddt1.
185
+ kEncodingAmxMr, //!< AMX tilestored.
186
+ kEncodingAmxRmv, //!< AMX instructions that use TMM registers.
187
+ kEncodingCount //!< Count of instruction encodings.
188
+ };
189
+
190
+ //! Additional information table, provides CPU extensions required to execute an instruction and RW flags.
191
+ struct AdditionalInfo {
192
+ //! Index to `_instFlagsTable`.
193
+ uint8_t _instFlagsIndex;
194
+ //! Index to `_rwFlagsTable`.
195
+ uint8_t _rwFlagsIndex;
196
+ //! Features vector.
197
+ uint8_t _features[6];
198
+
199
+ inline const uint8_t* featuresBegin() const noexcept { return _features; }
200
+ inline const uint8_t* featuresEnd() const noexcept { return _features + ASMJIT_ARRAY_SIZE(_features); }
201
+ };
202
+
203
+ // ${NameLimits:Begin}
204
+ // ------------------- Automatically generated, do not edit -------------------
205
+ enum : uint32_t { kMaxNameSize = 17 };
206
+ // ----------------------------------------------------------------------------
207
+ // ${NameLimits:End}
208
+
209
+ struct InstNameIndex {
210
+ uint16_t start;
211
+ uint16_t end;
212
+ };
213
+
214
+ struct RWInfo {
215
+ enum Category : uint8_t {
216
+ kCategoryGeneric,
217
+ kCategoryMov,
218
+ kCategoryMovabs,
219
+ kCategoryImul,
220
+ kCategoryMovh64,
221
+ kCategoryPunpcklxx,
222
+ kCategoryVmaskmov,
223
+ kCategoryVmovddup,
224
+ kCategoryVmovmskpd,
225
+ kCategoryVmovmskps,
226
+ kCategoryVmov1_2,
227
+ kCategoryVmov1_4,
228
+ kCategoryVmov1_8,
229
+ kCategoryVmov2_1,
230
+ kCategoryVmov4_1,
231
+ kCategoryVmov8_1
232
+ };
233
+
234
+ uint8_t category;
235
+ uint8_t rmInfo;
236
+ uint8_t opInfoIndex[6];
237
+ };
238
+
239
+ struct RWInfoOp {
240
+ uint64_t rByteMask;
241
+ uint64_t wByteMask;
242
+ uint8_t physId;
243
+ uint8_t consecutiveLeadCount;
244
+ uint8_t reserved[2];
245
+ OpRWFlags flags;
246
+ };
247
+
248
+ //! R/M information.
249
+ //!
250
+ //! This data is used to replace register operand by a memory operand reliably.
251
+ struct RWInfoRm {
252
+ enum Category : uint8_t {
253
+ kCategoryNone = 0,
254
+ kCategoryFixed,
255
+ kCategoryConsistent,
256
+ kCategoryHalf,
257
+ kCategoryQuarter,
258
+ kCategoryEighth
259
+ };
260
+
261
+ enum Flags : uint8_t {
262
+ kFlagAmbiguous = 0x01,
263
+ //! Special semantics for PEXTRW - memory operand can only be used with SSE4.1 instruction and it's forbidden in MMX.
264
+ kFlagPextrw = 0x02,
265
+ //! Special semantics for MOVSS and MOVSD - doesn't zero extend the destination if the operation is a reg to reg move.
266
+ kFlagMovssMovsd = 0x04,
267
+ //! Special semantics for AVX shift instructions that do not provide reg/mem in AVX/AVX2 mode (AVX-512 is required).
268
+ kFlagFeatureIfRMI = 0x08
269
+ };
270
+
271
+ uint8_t category;
272
+ uint8_t rmOpsMask;
273
+ uint8_t fixedSize;
274
+ uint8_t flags;
275
+ uint8_t rmFeature;
276
+ };
277
+
278
+ struct RWFlagsInfoTable {
279
+ //! CPU/FPU flags read.
280
+ uint32_t readFlags;
281
+ //! CPU/FPU flags written or undefined.
282
+ uint32_t writeFlags;
283
+ };
284
+
285
+ extern const uint8_t rwInfoIndexA[Inst::_kIdCount];
286
+ extern const uint8_t rwInfoIndexB[Inst::_kIdCount];
287
+ extern const RWInfo rwInfoA[];
288
+ extern const RWInfo rwInfoB[];
289
+ extern const RWInfoOp rwInfoOp[];
290
+ extern const RWInfoRm rwInfoRm[];
291
+ extern const RWFlagsInfoTable _rwFlagsInfoTable[];
292
+ extern const InstRWFlags _instFlagsTable[];
293
+
294
+ extern const uint32_t _mainOpcodeTable[];
295
+ extern const uint32_t _altOpcodeTable[];
296
+
297
+ #ifndef ASMJIT_NO_TEXT
298
+ extern const char _nameData[];
299
+ extern const InstNameIndex instNameIndex[26];
300
+ #endif // !ASMJIT_NO_TEXT
301
+
302
+ extern const AdditionalInfo _additionalInfoTable[];
303
+
304
+ } // {InstDB}
305
+
306
+ //! \}
307
+ //! \endcond
308
+
309
+ ASMJIT_END_SUB_NAMESPACE
310
+
311
+ #endif // ASMJIT_X86_X86INSTDB_P_H_INCLUDED