arm64.h 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165
  1. #ifndef CAPSTONE_ARM64_H
  2. #define CAPSTONE_ARM64_H
  3. /* Capstone Disassembly Engine */
  4. /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2015 */
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #include "platform.h"
  9. #ifdef _MSC_VER
  10. #pragma warning(disable:4201)
  11. #endif
  12. /// ARM64 shift type
  13. typedef enum arm64_shifter {
  14. ARM64_SFT_INVALID = 0,
  15. ARM64_SFT_LSL = 1,
  16. ARM64_SFT_MSL = 2,
  17. ARM64_SFT_LSR = 3,
  18. ARM64_SFT_ASR = 4,
  19. ARM64_SFT_ROR = 5,
  20. } arm64_shifter;
  21. /// ARM64 extender type
  22. typedef enum arm64_extender {
  23. ARM64_EXT_INVALID = 0,
  24. ARM64_EXT_UXTB = 1,
  25. ARM64_EXT_UXTH = 2,
  26. ARM64_EXT_UXTW = 3,
  27. ARM64_EXT_UXTX = 4,
  28. ARM64_EXT_SXTB = 5,
  29. ARM64_EXT_SXTH = 6,
  30. ARM64_EXT_SXTW = 7,
  31. ARM64_EXT_SXTX = 8,
  32. } arm64_extender;
  33. /// ARM64 condition code
  34. typedef enum arm64_cc {
  35. ARM64_CC_INVALID = 0,
  36. ARM64_CC_EQ = 1, ///< Equal
  37. ARM64_CC_NE = 2, ///< Not equal: Not equal, or unordered
  38. ARM64_CC_HS = 3, ///< Unsigned higher or same: >, ==, or unordered
  39. ARM64_CC_LO = 4, ///< Unsigned lower or same: Less than
  40. ARM64_CC_MI = 5, ///< Minus, negative: Less than
  41. ARM64_CC_PL = 6, ///< Plus, positive or zero: >, ==, or unordered
  42. ARM64_CC_VS = 7, ///< Overflow: Unordered
  43. ARM64_CC_VC = 8, ///< No overflow: Ordered
  44. ARM64_CC_HI = 9, ///< Unsigned higher: Greater than, or unordered
  45. ARM64_CC_LS = 10, ///< Unsigned lower or same: Less than or equal
  46. ARM64_CC_GE = 11, ///< Greater than or equal: Greater than or equal
  47. ARM64_CC_LT = 12, ///< Less than: Less than, or unordered
  48. ARM64_CC_GT = 13, ///< Signed greater than: Greater than
  49. ARM64_CC_LE = 14, ///< Signed less than or equal: <, ==, or unordered
  50. ARM64_CC_AL = 15, ///< Always (unconditional): Always (unconditional)
  51. ARM64_CC_NV = 16, ///< Always (unconditional): Always (unconditional)
  52. //< Note the NV exists purely to disassemble 0b1111. Execution
  53. //< is "always".
  54. } arm64_cc;
  55. /// System registers
  56. typedef enum arm64_sysreg {
  57. // System registers for MRS
  58. ARM64_SYSREG_INVALID = 0,
  59. ARM64_SYSREG_MDCCSR_EL0 = 0x9808, // 10 011 0000 0001 000
  60. ARM64_SYSREG_DBGDTRRX_EL0 = 0x9828, // 10 011 0000 0101 000
  61. ARM64_SYSREG_MDRAR_EL1 = 0x8080, // 10 000 0001 0000 000
  62. ARM64_SYSREG_OSLSR_EL1 = 0x808c, // 10 000 0001 0001 100
  63. ARM64_SYSREG_DBGAUTHSTATUS_EL1 = 0x83f6, // 10 000 0111 1110 110
  64. ARM64_SYSREG_PMCEID0_EL0 = 0xdce6, // 11 011 1001 1100 110
  65. ARM64_SYSREG_PMCEID1_EL0 = 0xdce7, // 11 011 1001 1100 111
  66. ARM64_SYSREG_MIDR_EL1 = 0xc000, // 11 000 0000 0000 000
  67. ARM64_SYSREG_CCSIDR_EL1 = 0xc800, // 11 001 0000 0000 000
  68. ARM64_SYSREG_CLIDR_EL1 = 0xc801, // 11 001 0000 0000 001
  69. ARM64_SYSREG_CTR_EL0 = 0xd801, // 11 011 0000 0000 001
  70. ARM64_SYSREG_MPIDR_EL1 = 0xc005, // 11 000 0000 0000 101
  71. ARM64_SYSREG_REVIDR_EL1 = 0xc006, // 11 000 0000 0000 110
  72. ARM64_SYSREG_AIDR_EL1 = 0xc807, // 11 001 0000 0000 111
  73. ARM64_SYSREG_DCZID_EL0 = 0xd807, // 11 011 0000 0000 111
  74. ARM64_SYSREG_ID_PFR0_EL1 = 0xc008, // 11 000 0000 0001 000
  75. ARM64_SYSREG_ID_PFR1_EL1 = 0xc009, // 11 000 0000 0001 001
  76. ARM64_SYSREG_ID_DFR0_EL1 = 0xc00a, // 11 000 0000 0001 010
  77. ARM64_SYSREG_ID_AFR0_EL1 = 0xc00b, // 11 000 0000 0001 011
  78. ARM64_SYSREG_ID_MMFR0_EL1 = 0xc00c, // 11 000 0000 0001 100
  79. ARM64_SYSREG_ID_MMFR1_EL1 = 0xc00d, // 11 000 0000 0001 101
  80. ARM64_SYSREG_ID_MMFR2_EL1 = 0xc00e, // 11 000 0000 0001 110
  81. ARM64_SYSREG_ID_MMFR3_EL1 = 0xc00f, // 11 000 0000 0001 111
  82. ARM64_SYSREG_ID_ISAR0_EL1 = 0xc010, // 11 000 0000 0010 000
  83. ARM64_SYSREG_ID_ISAR1_EL1 = 0xc011, // 11 000 0000 0010 001
  84. ARM64_SYSREG_ID_ISAR2_EL1 = 0xc012, // 11 000 0000 0010 010
  85. ARM64_SYSREG_ID_ISAR3_EL1 = 0xc013, // 11 000 0000 0010 011
  86. ARM64_SYSREG_ID_ISAR4_EL1 = 0xc014, // 11 000 0000 0010 100
  87. ARM64_SYSREG_ID_ISAR5_EL1 = 0xc015, // 11 000 0000 0010 101
  88. ARM64_SYSREG_ID_A64PFR0_EL1 = 0xc020, // 11 000 0000 0100 000
  89. ARM64_SYSREG_ID_A64PFR1_EL1 = 0xc021, // 11 000 0000 0100 001
  90. ARM64_SYSREG_ID_A64DFR0_EL1 = 0xc028, // 11 000 0000 0101 000
  91. ARM64_SYSREG_ID_A64DFR1_EL1 = 0xc029, // 11 000 0000 0101 001
  92. ARM64_SYSREG_ID_A64AFR0_EL1 = 0xc02c, // 11 000 0000 0101 100
  93. ARM64_SYSREG_ID_A64AFR1_EL1 = 0xc02d, // 11 000 0000 0101 101
  94. ARM64_SYSREG_ID_A64ISAR0_EL1 = 0xc030, // 11 000 0000 0110 000
  95. ARM64_SYSREG_ID_A64ISAR1_EL1 = 0xc031, // 11 000 0000 0110 001
  96. ARM64_SYSREG_ID_A64MMFR0_EL1 = 0xc038, // 11 000 0000 0111 000
  97. ARM64_SYSREG_ID_A64MMFR1_EL1 = 0xc039, // 11 000 0000 0111 001
  98. ARM64_SYSREG_MVFR0_EL1 = 0xc018, // 11 000 0000 0011 000
  99. ARM64_SYSREG_MVFR1_EL1 = 0xc019, // 11 000 0000 0011 001
  100. ARM64_SYSREG_MVFR2_EL1 = 0xc01a, // 11 000 0000 0011 010
  101. ARM64_SYSREG_RVBAR_EL1 = 0xc601, // 11 000 1100 0000 001
  102. ARM64_SYSREG_RVBAR_EL2 = 0xe601, // 11 100 1100 0000 001
  103. ARM64_SYSREG_RVBAR_EL3 = 0xf601, // 11 110 1100 0000 001
  104. ARM64_SYSREG_ISR_EL1 = 0xc608, // 11 000 1100 0001 000
  105. ARM64_SYSREG_CNTPCT_EL0 = 0xdf01, // 11 011 1110 0000 001
  106. ARM64_SYSREG_CNTVCT_EL0 = 0xdf02, // 11 011 1110 0000 010
  107. // Trace registers
  108. ARM64_SYSREG_TRCSTATR = 0x8818, // 10 001 0000 0011 000
  109. ARM64_SYSREG_TRCIDR8 = 0x8806, // 10 001 0000 0000 110
  110. ARM64_SYSREG_TRCIDR9 = 0x880e, // 10 001 0000 0001 110
  111. ARM64_SYSREG_TRCIDR10 = 0x8816, // 10 001 0000 0010 110
  112. ARM64_SYSREG_TRCIDR11 = 0x881e, // 10 001 0000 0011 110
  113. ARM64_SYSREG_TRCIDR12 = 0x8826, // 10 001 0000 0100 110
  114. ARM64_SYSREG_TRCIDR13 = 0x882e, // 10 001 0000 0101 110
  115. ARM64_SYSREG_TRCIDR0 = 0x8847, // 10 001 0000 1000 111
  116. ARM64_SYSREG_TRCIDR1 = 0x884f, // 10 001 0000 1001 111
  117. ARM64_SYSREG_TRCIDR2 = 0x8857, // 10 001 0000 1010 111
  118. ARM64_SYSREG_TRCIDR3 = 0x885f, // 10 001 0000 1011 111
  119. ARM64_SYSREG_TRCIDR4 = 0x8867, // 10 001 0000 1100 111
  120. ARM64_SYSREG_TRCIDR5 = 0x886f, // 10 001 0000 1101 111
  121. ARM64_SYSREG_TRCIDR6 = 0x8877, // 10 001 0000 1110 111
  122. ARM64_SYSREG_TRCIDR7 = 0x887f, // 10 001 0000 1111 111
  123. ARM64_SYSREG_TRCOSLSR = 0x888c, // 10 001 0001 0001 100
  124. ARM64_SYSREG_TRCPDSR = 0x88ac, // 10 001 0001 0101 100
  125. ARM64_SYSREG_TRCDEVAFF0 = 0x8bd6, // 10 001 0111 1010 110
  126. ARM64_SYSREG_TRCDEVAFF1 = 0x8bde, // 10 001 0111 1011 110
  127. ARM64_SYSREG_TRCLSR = 0x8bee, // 10 001 0111 1101 110
  128. ARM64_SYSREG_TRCAUTHSTATUS = 0x8bf6, // 10 001 0111 1110 110
  129. ARM64_SYSREG_TRCDEVARCH = 0x8bfe, // 10 001 0111 1111 110
  130. ARM64_SYSREG_TRCDEVID = 0x8b97, // 10 001 0111 0010 111
  131. ARM64_SYSREG_TRCDEVTYPE = 0x8b9f, // 10 001 0111 0011 111
  132. ARM64_SYSREG_TRCPIDR4 = 0x8ba7, // 10 001 0111 0100 111
  133. ARM64_SYSREG_TRCPIDR5 = 0x8baf, // 10 001 0111 0101 111
  134. ARM64_SYSREG_TRCPIDR6 = 0x8bb7, // 10 001 0111 0110 111
  135. ARM64_SYSREG_TRCPIDR7 = 0x8bbf, // 10 001 0111 0111 111
  136. ARM64_SYSREG_TRCPIDR0 = 0x8bc7, // 10 001 0111 1000 111
  137. ARM64_SYSREG_TRCPIDR1 = 0x8bcf, // 10 001 0111 1001 111
  138. ARM64_SYSREG_TRCPIDR2 = 0x8bd7, // 10 001 0111 1010 111
  139. ARM64_SYSREG_TRCPIDR3 = 0x8bdf, // 10 001 0111 1011 111
  140. ARM64_SYSREG_TRCCIDR0 = 0x8be7, // 10 001 0111 1100 111
  141. ARM64_SYSREG_TRCCIDR1 = 0x8bef, // 10 001 0111 1101 111
  142. ARM64_SYSREG_TRCCIDR2 = 0x8bf7, // 10 001 0111 1110 111
  143. ARM64_SYSREG_TRCCIDR3 = 0x8bff, // 10 001 0111 1111 111
  144. // GICv3 registers
  145. ARM64_SYSREG_ICC_IAR1_EL1 = 0xc660, // 11 000 1100 1100 000
  146. ARM64_SYSREG_ICC_IAR0_EL1 = 0xc640, // 11 000 1100 1000 000
  147. ARM64_SYSREG_ICC_HPPIR1_EL1 = 0xc662, // 11 000 1100 1100 010
  148. ARM64_SYSREG_ICC_HPPIR0_EL1 = 0xc642, // 11 000 1100 1000 010
  149. ARM64_SYSREG_ICC_RPR_EL1 = 0xc65b, // 11 000 1100 1011 011
  150. ARM64_SYSREG_ICH_VTR_EL2 = 0xe659, // 11 100 1100 1011 001
  151. ARM64_SYSREG_ICH_EISR_EL2 = 0xe65b, // 11 100 1100 1011 011
  152. ARM64_SYSREG_ICH_ELSR_EL2 = 0xe65d, // 11 100 1100 1011 101
  153. } arm64_sysreg;
  154. typedef enum arm64_msr_reg {
  155. // System registers for MSR
  156. ARM64_SYSREG_DBGDTRTX_EL0 = 0x9828, // 10 011 0000 0101 000
  157. ARM64_SYSREG_OSLAR_EL1 = 0x8084, // 10 000 0001 0000 100
  158. ARM64_SYSREG_PMSWINC_EL0 = 0xdce4, // 11 011 1001 1100 100
  159. // Trace Registers
  160. ARM64_SYSREG_TRCOSLAR = 0x8884, // 10 001 0001 0000 100
  161. ARM64_SYSREG_TRCLAR = 0x8be6, // 10 001 0111 1100 110
  162. // GICv3 registers
  163. ARM64_SYSREG_ICC_EOIR1_EL1 = 0xc661, // 11 000 1100 1100 001
  164. ARM64_SYSREG_ICC_EOIR0_EL1 = 0xc641, // 11 000 1100 1000 001
  165. ARM64_SYSREG_ICC_DIR_EL1 = 0xc659, // 11 000 1100 1011 001
  166. ARM64_SYSREG_ICC_SGI1R_EL1 = 0xc65d, // 11 000 1100 1011 101
  167. ARM64_SYSREG_ICC_ASGI1R_EL1 = 0xc65e, // 11 000 1100 1011 110
  168. ARM64_SYSREG_ICC_SGI0R_EL1 = 0xc65f, // 11 000 1100 1011 111
  169. } arm64_msr_reg;
  170. /// System PState Field (MSR instruction)
  171. typedef enum arm64_pstate {
  172. ARM64_PSTATE_INVALID = 0,
  173. ARM64_PSTATE_SPSEL = 0x05,
  174. ARM64_PSTATE_DAIFSET = 0x1e,
  175. ARM64_PSTATE_DAIFCLR = 0x1f
  176. } arm64_pstate;
  177. /// Vector arrangement specifier (for FloatingPoint/Advanced SIMD insn)
  178. typedef enum arm64_vas {
  179. ARM64_VAS_INVALID = 0,
  180. ARM64_VAS_8B,
  181. ARM64_VAS_16B,
  182. ARM64_VAS_4H,
  183. ARM64_VAS_8H,
  184. ARM64_VAS_2S,
  185. ARM64_VAS_4S,
  186. ARM64_VAS_1D,
  187. ARM64_VAS_2D,
  188. ARM64_VAS_1Q,
  189. } arm64_vas;
  190. /// Vector element size specifier
  191. typedef enum arm64_vess {
  192. ARM64_VESS_INVALID = 0,
  193. ARM64_VESS_B,
  194. ARM64_VESS_H,
  195. ARM64_VESS_S,
  196. ARM64_VESS_D,
  197. } arm64_vess;
  198. /// Memory barrier operands
  199. typedef enum arm64_barrier_op {
  200. ARM64_BARRIER_INVALID = 0,
  201. ARM64_BARRIER_OSHLD = 0x1,
  202. ARM64_BARRIER_OSHST = 0x2,
  203. ARM64_BARRIER_OSH = 0x3,
  204. ARM64_BARRIER_NSHLD = 0x5,
  205. ARM64_BARRIER_NSHST = 0x6,
  206. ARM64_BARRIER_NSH = 0x7,
  207. ARM64_BARRIER_ISHLD = 0x9,
  208. ARM64_BARRIER_ISHST = 0xa,
  209. ARM64_BARRIER_ISH = 0xb,
  210. ARM64_BARRIER_LD = 0xd,
  211. ARM64_BARRIER_ST = 0xe,
  212. ARM64_BARRIER_SY = 0xf
  213. } arm64_barrier_op;
  214. /// Operand type for instruction's operands
  215. typedef enum arm64_op_type {
  216. ARM64_OP_INVALID = 0, ///< = CS_OP_INVALID (Uninitialized).
  217. ARM64_OP_REG, ///< = CS_OP_REG (Register operand).
  218. ARM64_OP_IMM, ///< = CS_OP_IMM (Immediate operand).
  219. ARM64_OP_MEM, ///< = CS_OP_MEM (Memory operand).
  220. ARM64_OP_FP, ///< = CS_OP_FP (Floating-Point operand).
  221. ARM64_OP_CIMM = 64, ///< C-Immediate
  222. ARM64_OP_REG_MRS, ///< MRS register operand.
  223. ARM64_OP_REG_MSR, ///< MSR register operand.
  224. ARM64_OP_PSTATE, ///< PState operand.
  225. ARM64_OP_SYS, ///< SYS operand for IC/DC/AT/TLBI instructions.
  226. ARM64_OP_PREFETCH, ///< Prefetch operand (PRFM).
  227. ARM64_OP_BARRIER, ///< Memory barrier operand (ISB/DMB/DSB instructions).
  228. } arm64_op_type;
  229. /// TLBI operations
  230. typedef enum arm64_tlbi_op {
  231. ARM64_TLBI_INVALID = 0,
  232. ARM64_TLBI_VMALLE1IS,
  233. ARM64_TLBI_VAE1IS,
  234. ARM64_TLBI_ASIDE1IS,
  235. ARM64_TLBI_VAAE1IS,
  236. ARM64_TLBI_VALE1IS,
  237. ARM64_TLBI_VAALE1IS,
  238. ARM64_TLBI_ALLE2IS,
  239. ARM64_TLBI_VAE2IS,
  240. ARM64_TLBI_ALLE1IS,
  241. ARM64_TLBI_VALE2IS,
  242. ARM64_TLBI_VMALLS12E1IS,
  243. ARM64_TLBI_ALLE3IS,
  244. ARM64_TLBI_VAE3IS,
  245. ARM64_TLBI_VALE3IS,
  246. ARM64_TLBI_IPAS2E1IS,
  247. ARM64_TLBI_IPAS2LE1IS,
  248. ARM64_TLBI_IPAS2E1,
  249. ARM64_TLBI_IPAS2LE1,
  250. ARM64_TLBI_VMALLE1,
  251. ARM64_TLBI_VAE1,
  252. ARM64_TLBI_ASIDE1,
  253. ARM64_TLBI_VAAE1,
  254. ARM64_TLBI_VALE1,
  255. ARM64_TLBI_VAALE1,
  256. ARM64_TLBI_ALLE2,
  257. ARM64_TLBI_VAE2,
  258. ARM64_TLBI_ALLE1,
  259. ARM64_TLBI_VALE2,
  260. ARM64_TLBI_VMALLS12E1,
  261. ARM64_TLBI_ALLE3,
  262. ARM64_TLBI_VAE3,
  263. ARM64_TLBI_VALE3,
  264. } arm64_tlbi_op;
  265. /// AT operations
  266. typedef enum arm64_at_op {
  267. ARM64_AT_S1E1R,
  268. ARM64_AT_S1E1W,
  269. ARM64_AT_S1E0R,
  270. ARM64_AT_S1E0W,
  271. ARM64_AT_S1E2R,
  272. ARM64_AT_S1E2W,
  273. ARM64_AT_S12E1R,
  274. ARM64_AT_S12E1W,
  275. ARM64_AT_S12E0R,
  276. ARM64_AT_S12E0W,
  277. ARM64_AT_S1E3R,
  278. ARM64_AT_S1E3W,
  279. } arm64_at_op;
  280. /// DC operations
  281. typedef enum arm64_dc_op {
  282. ARM64_DC_INVALID = 0,
  283. ARM64_DC_ZVA,
  284. ARM64_DC_IVAC,
  285. ARM64_DC_ISW,
  286. ARM64_DC_CVAC,
  287. ARM64_DC_CSW,
  288. ARM64_DC_CVAU,
  289. ARM64_DC_CIVAC,
  290. ARM64_DC_CISW,
  291. } arm64_dc_op;
  292. /// IC operations
  293. typedef enum arm64_ic_op {
  294. ARM64_IC_INVALID = 0,
  295. ARM64_IC_IALLUIS,
  296. ARM64_IC_IALLU,
  297. ARM64_IC_IVAU,
  298. } arm64_ic_op;
  299. /// Prefetch operations (PRFM)
  300. typedef enum arm64_prefetch_op {
  301. ARM64_PRFM_INVALID = 0,
  302. ARM64_PRFM_PLDL1KEEP = 0x00 + 1,
  303. ARM64_PRFM_PLDL1STRM = 0x01 + 1,
  304. ARM64_PRFM_PLDL2KEEP = 0x02 + 1,
  305. ARM64_PRFM_PLDL2STRM = 0x03 + 1,
  306. ARM64_PRFM_PLDL3KEEP = 0x04 + 1,
  307. ARM64_PRFM_PLDL3STRM = 0x05 + 1,
  308. ARM64_PRFM_PLIL1KEEP = 0x08 + 1,
  309. ARM64_PRFM_PLIL1STRM = 0x09 + 1,
  310. ARM64_PRFM_PLIL2KEEP = 0x0a + 1,
  311. ARM64_PRFM_PLIL2STRM = 0x0b + 1,
  312. ARM64_PRFM_PLIL3KEEP = 0x0c + 1,
  313. ARM64_PRFM_PLIL3STRM = 0x0d + 1,
  314. ARM64_PRFM_PSTL1KEEP = 0x10 + 1,
  315. ARM64_PRFM_PSTL1STRM = 0x11 + 1,
  316. ARM64_PRFM_PSTL2KEEP = 0x12 + 1,
  317. ARM64_PRFM_PSTL2STRM = 0x13 + 1,
  318. ARM64_PRFM_PSTL3KEEP = 0x14 + 1,
  319. ARM64_PRFM_PSTL3STRM = 0x15 + 1,
  320. } arm64_prefetch_op;
  321. /// ARM64 registers
  322. typedef enum arm64_reg {
  323. ARM64_REG_INVALID = 0,
  324. ARM64_REG_X29,
  325. ARM64_REG_X30,
  326. ARM64_REG_NZCV,
  327. ARM64_REG_SP,
  328. ARM64_REG_WSP,
  329. ARM64_REG_WZR,
  330. ARM64_REG_XZR,
  331. ARM64_REG_B0,
  332. ARM64_REG_B1,
  333. ARM64_REG_B2,
  334. ARM64_REG_B3,
  335. ARM64_REG_B4,
  336. ARM64_REG_B5,
  337. ARM64_REG_B6,
  338. ARM64_REG_B7,
  339. ARM64_REG_B8,
  340. ARM64_REG_B9,
  341. ARM64_REG_B10,
  342. ARM64_REG_B11,
  343. ARM64_REG_B12,
  344. ARM64_REG_B13,
  345. ARM64_REG_B14,
  346. ARM64_REG_B15,
  347. ARM64_REG_B16,
  348. ARM64_REG_B17,
  349. ARM64_REG_B18,
  350. ARM64_REG_B19,
  351. ARM64_REG_B20,
  352. ARM64_REG_B21,
  353. ARM64_REG_B22,
  354. ARM64_REG_B23,
  355. ARM64_REG_B24,
  356. ARM64_REG_B25,
  357. ARM64_REG_B26,
  358. ARM64_REG_B27,
  359. ARM64_REG_B28,
  360. ARM64_REG_B29,
  361. ARM64_REG_B30,
  362. ARM64_REG_B31,
  363. ARM64_REG_D0,
  364. ARM64_REG_D1,
  365. ARM64_REG_D2,
  366. ARM64_REG_D3,
  367. ARM64_REG_D4,
  368. ARM64_REG_D5,
  369. ARM64_REG_D6,
  370. ARM64_REG_D7,
  371. ARM64_REG_D8,
  372. ARM64_REG_D9,
  373. ARM64_REG_D10,
  374. ARM64_REG_D11,
  375. ARM64_REG_D12,
  376. ARM64_REG_D13,
  377. ARM64_REG_D14,
  378. ARM64_REG_D15,
  379. ARM64_REG_D16,
  380. ARM64_REG_D17,
  381. ARM64_REG_D18,
  382. ARM64_REG_D19,
  383. ARM64_REG_D20,
  384. ARM64_REG_D21,
  385. ARM64_REG_D22,
  386. ARM64_REG_D23,
  387. ARM64_REG_D24,
  388. ARM64_REG_D25,
  389. ARM64_REG_D26,
  390. ARM64_REG_D27,
  391. ARM64_REG_D28,
  392. ARM64_REG_D29,
  393. ARM64_REG_D30,
  394. ARM64_REG_D31,
  395. ARM64_REG_H0,
  396. ARM64_REG_H1,
  397. ARM64_REG_H2,
  398. ARM64_REG_H3,
  399. ARM64_REG_H4,
  400. ARM64_REG_H5,
  401. ARM64_REG_H6,
  402. ARM64_REG_H7,
  403. ARM64_REG_H8,
  404. ARM64_REG_H9,
  405. ARM64_REG_H10,
  406. ARM64_REG_H11,
  407. ARM64_REG_H12,
  408. ARM64_REG_H13,
  409. ARM64_REG_H14,
  410. ARM64_REG_H15,
  411. ARM64_REG_H16,
  412. ARM64_REG_H17,
  413. ARM64_REG_H18,
  414. ARM64_REG_H19,
  415. ARM64_REG_H20,
  416. ARM64_REG_H21,
  417. ARM64_REG_H22,
  418. ARM64_REG_H23,
  419. ARM64_REG_H24,
  420. ARM64_REG_H25,
  421. ARM64_REG_H26,
  422. ARM64_REG_H27,
  423. ARM64_REG_H28,
  424. ARM64_REG_H29,
  425. ARM64_REG_H30,
  426. ARM64_REG_H31,
  427. ARM64_REG_Q0,
  428. ARM64_REG_Q1,
  429. ARM64_REG_Q2,
  430. ARM64_REG_Q3,
  431. ARM64_REG_Q4,
  432. ARM64_REG_Q5,
  433. ARM64_REG_Q6,
  434. ARM64_REG_Q7,
  435. ARM64_REG_Q8,
  436. ARM64_REG_Q9,
  437. ARM64_REG_Q10,
  438. ARM64_REG_Q11,
  439. ARM64_REG_Q12,
  440. ARM64_REG_Q13,
  441. ARM64_REG_Q14,
  442. ARM64_REG_Q15,
  443. ARM64_REG_Q16,
  444. ARM64_REG_Q17,
  445. ARM64_REG_Q18,
  446. ARM64_REG_Q19,
  447. ARM64_REG_Q20,
  448. ARM64_REG_Q21,
  449. ARM64_REG_Q22,
  450. ARM64_REG_Q23,
  451. ARM64_REG_Q24,
  452. ARM64_REG_Q25,
  453. ARM64_REG_Q26,
  454. ARM64_REG_Q27,
  455. ARM64_REG_Q28,
  456. ARM64_REG_Q29,
  457. ARM64_REG_Q30,
  458. ARM64_REG_Q31,
  459. ARM64_REG_S0,
  460. ARM64_REG_S1,
  461. ARM64_REG_S2,
  462. ARM64_REG_S3,
  463. ARM64_REG_S4,
  464. ARM64_REG_S5,
  465. ARM64_REG_S6,
  466. ARM64_REG_S7,
  467. ARM64_REG_S8,
  468. ARM64_REG_S9,
  469. ARM64_REG_S10,
  470. ARM64_REG_S11,
  471. ARM64_REG_S12,
  472. ARM64_REG_S13,
  473. ARM64_REG_S14,
  474. ARM64_REG_S15,
  475. ARM64_REG_S16,
  476. ARM64_REG_S17,
  477. ARM64_REG_S18,
  478. ARM64_REG_S19,
  479. ARM64_REG_S20,
  480. ARM64_REG_S21,
  481. ARM64_REG_S22,
  482. ARM64_REG_S23,
  483. ARM64_REG_S24,
  484. ARM64_REG_S25,
  485. ARM64_REG_S26,
  486. ARM64_REG_S27,
  487. ARM64_REG_S28,
  488. ARM64_REG_S29,
  489. ARM64_REG_S30,
  490. ARM64_REG_S31,
  491. ARM64_REG_W0,
  492. ARM64_REG_W1,
  493. ARM64_REG_W2,
  494. ARM64_REG_W3,
  495. ARM64_REG_W4,
  496. ARM64_REG_W5,
  497. ARM64_REG_W6,
  498. ARM64_REG_W7,
  499. ARM64_REG_W8,
  500. ARM64_REG_W9,
  501. ARM64_REG_W10,
  502. ARM64_REG_W11,
  503. ARM64_REG_W12,
  504. ARM64_REG_W13,
  505. ARM64_REG_W14,
  506. ARM64_REG_W15,
  507. ARM64_REG_W16,
  508. ARM64_REG_W17,
  509. ARM64_REG_W18,
  510. ARM64_REG_W19,
  511. ARM64_REG_W20,
  512. ARM64_REG_W21,
  513. ARM64_REG_W22,
  514. ARM64_REG_W23,
  515. ARM64_REG_W24,
  516. ARM64_REG_W25,
  517. ARM64_REG_W26,
  518. ARM64_REG_W27,
  519. ARM64_REG_W28,
  520. ARM64_REG_W29,
  521. ARM64_REG_W30,
  522. ARM64_REG_X0,
  523. ARM64_REG_X1,
  524. ARM64_REG_X2,
  525. ARM64_REG_X3,
  526. ARM64_REG_X4,
  527. ARM64_REG_X5,
  528. ARM64_REG_X6,
  529. ARM64_REG_X7,
  530. ARM64_REG_X8,
  531. ARM64_REG_X9,
  532. ARM64_REG_X10,
  533. ARM64_REG_X11,
  534. ARM64_REG_X12,
  535. ARM64_REG_X13,
  536. ARM64_REG_X14,
  537. ARM64_REG_X15,
  538. ARM64_REG_X16,
  539. ARM64_REG_X17,
  540. ARM64_REG_X18,
  541. ARM64_REG_X19,
  542. ARM64_REG_X20,
  543. ARM64_REG_X21,
  544. ARM64_REG_X22,
  545. ARM64_REG_X23,
  546. ARM64_REG_X24,
  547. ARM64_REG_X25,
  548. ARM64_REG_X26,
  549. ARM64_REG_X27,
  550. ARM64_REG_X28,
  551. ARM64_REG_V0,
  552. ARM64_REG_V1,
  553. ARM64_REG_V2,
  554. ARM64_REG_V3,
  555. ARM64_REG_V4,
  556. ARM64_REG_V5,
  557. ARM64_REG_V6,
  558. ARM64_REG_V7,
  559. ARM64_REG_V8,
  560. ARM64_REG_V9,
  561. ARM64_REG_V10,
  562. ARM64_REG_V11,
  563. ARM64_REG_V12,
  564. ARM64_REG_V13,
  565. ARM64_REG_V14,
  566. ARM64_REG_V15,
  567. ARM64_REG_V16,
  568. ARM64_REG_V17,
  569. ARM64_REG_V18,
  570. ARM64_REG_V19,
  571. ARM64_REG_V20,
  572. ARM64_REG_V21,
  573. ARM64_REG_V22,
  574. ARM64_REG_V23,
  575. ARM64_REG_V24,
  576. ARM64_REG_V25,
  577. ARM64_REG_V26,
  578. ARM64_REG_V27,
  579. ARM64_REG_V28,
  580. ARM64_REG_V29,
  581. ARM64_REG_V30,
  582. ARM64_REG_V31,
  583. ARM64_REG_ENDING, // <-- mark the end of the list of registers
  584. // alias registers
  585. ARM64_REG_IP0 = ARM64_REG_X16,
  586. ARM64_REG_IP1 = ARM64_REG_X17,
  587. ARM64_REG_FP = ARM64_REG_X29,
  588. ARM64_REG_LR = ARM64_REG_X30,
  589. } arm64_reg;
  590. /// Instruction's operand referring to memory
  591. /// This is associated with ARM64_OP_MEM operand type above
  592. typedef struct arm64_op_mem {
  593. arm64_reg base; ///< base register
  594. arm64_reg index; ///< index register
  595. int32_t disp; ///< displacement/offset value
  596. } arm64_op_mem;
  597. /// Instruction operand
  598. typedef struct cs_arm64_op {
  599. int vector_index; ///< Vector Index for some vector operands (or -1 if irrelevant)
  600. arm64_vas vas; ///< Vector Arrangement Specifier
  601. arm64_vess vess; ///< Vector Element Size Specifier
  602. struct {
  603. arm64_shifter type; ///< shifter type of this operand
  604. unsigned int value; ///< shifter value of this operand
  605. } shift;
  606. arm64_extender ext; ///< extender type of this operand
  607. arm64_op_type type; ///< operand type
  608. union {
  609. arm64_reg reg; ///< register value for REG operand
  610. int64_t imm; ///< immediate value, or index for C-IMM or IMM operand
  611. double fp; ///< floating point value for FP operand
  612. arm64_op_mem mem; ///< base/index/scale/disp value for MEM operand
  613. arm64_pstate pstate; ///< PState field of MSR instruction.
  614. unsigned int sys; ///< IC/DC/AT/TLBI operation (see arm64_ic_op, arm64_dc_op, arm64_at_op, arm64_tlbi_op)
  615. arm64_prefetch_op prefetch; ///< PRFM operation.
  616. arm64_barrier_op barrier; ///< Memory barrier operation (ISB/DMB/DSB instructions).
  617. };
  618. /// How is this operand accessed? (READ, WRITE or READ|WRITE)
  619. /// This field is combined of cs_ac_type.
  620. /// NOTE: this field is irrelevant if engine is compiled in DIET mode.
  621. uint8_t access;
  622. } cs_arm64_op;
  623. /// Instruction structure
  624. typedef struct cs_arm64 {
  625. arm64_cc cc; ///< conditional code for this insn
  626. bool update_flags; ///< does this insn update flags?
  627. bool writeback; ///< does this insn request writeback? 'True' means 'yes'
  628. /// Number of operands of this instruction,
  629. /// or 0 when instruction has no operand.
  630. uint8_t op_count;
  631. cs_arm64_op operands[8]; ///< operands for this instruction.
  632. } cs_arm64;
  633. /// ARM64 instruction
  634. typedef enum arm64_insn {
  635. ARM64_INS_INVALID = 0,
  636. ARM64_INS_ABS,
  637. ARM64_INS_ADC,
  638. ARM64_INS_ADDHN,
  639. ARM64_INS_ADDHN2,
  640. ARM64_INS_ADDP,
  641. ARM64_INS_ADD,
  642. ARM64_INS_ADDV,
  643. ARM64_INS_ADR,
  644. ARM64_INS_ADRP,
  645. ARM64_INS_AESD,
  646. ARM64_INS_AESE,
  647. ARM64_INS_AESIMC,
  648. ARM64_INS_AESMC,
  649. ARM64_INS_AND,
  650. ARM64_INS_ASR,
  651. ARM64_INS_B,
  652. ARM64_INS_BFM,
  653. ARM64_INS_BIC,
  654. ARM64_INS_BIF,
  655. ARM64_INS_BIT,
  656. ARM64_INS_BL,
  657. ARM64_INS_BLR,
  658. ARM64_INS_BR,
  659. ARM64_INS_BRK,
  660. ARM64_INS_BSL,
  661. ARM64_INS_CBNZ,
  662. ARM64_INS_CBZ,
  663. ARM64_INS_CCMN,
  664. ARM64_INS_CCMP,
  665. ARM64_INS_CLREX,
  666. ARM64_INS_CLS,
  667. ARM64_INS_CLZ,
  668. ARM64_INS_CMEQ,
  669. ARM64_INS_CMGE,
  670. ARM64_INS_CMGT,
  671. ARM64_INS_CMHI,
  672. ARM64_INS_CMHS,
  673. ARM64_INS_CMLE,
  674. ARM64_INS_CMLT,
  675. ARM64_INS_CMTST,
  676. ARM64_INS_CNT,
  677. ARM64_INS_MOV,
  678. ARM64_INS_CRC32B,
  679. ARM64_INS_CRC32CB,
  680. ARM64_INS_CRC32CH,
  681. ARM64_INS_CRC32CW,
  682. ARM64_INS_CRC32CX,
  683. ARM64_INS_CRC32H,
  684. ARM64_INS_CRC32W,
  685. ARM64_INS_CRC32X,
  686. ARM64_INS_CSEL,
  687. ARM64_INS_CSINC,
  688. ARM64_INS_CSINV,
  689. ARM64_INS_CSNEG,
  690. ARM64_INS_DCPS1,
  691. ARM64_INS_DCPS2,
  692. ARM64_INS_DCPS3,
  693. ARM64_INS_DMB,
  694. ARM64_INS_DRPS,
  695. ARM64_INS_DSB,
  696. ARM64_INS_DUP,
  697. ARM64_INS_EON,
  698. ARM64_INS_EOR,
  699. ARM64_INS_ERET,
  700. ARM64_INS_EXTR,
  701. ARM64_INS_EXT,
  702. ARM64_INS_FABD,
  703. ARM64_INS_FABS,
  704. ARM64_INS_FACGE,
  705. ARM64_INS_FACGT,
  706. ARM64_INS_FADD,
  707. ARM64_INS_FADDP,
  708. ARM64_INS_FCCMP,
  709. ARM64_INS_FCCMPE,
  710. ARM64_INS_FCMEQ,
  711. ARM64_INS_FCMGE,
  712. ARM64_INS_FCMGT,
  713. ARM64_INS_FCMLE,
  714. ARM64_INS_FCMLT,
  715. ARM64_INS_FCMP,
  716. ARM64_INS_FCMPE,
  717. ARM64_INS_FCSEL,
  718. ARM64_INS_FCVTAS,
  719. ARM64_INS_FCVTAU,
  720. ARM64_INS_FCVT,
  721. ARM64_INS_FCVTL,
  722. ARM64_INS_FCVTL2,
  723. ARM64_INS_FCVTMS,
  724. ARM64_INS_FCVTMU,
  725. ARM64_INS_FCVTNS,
  726. ARM64_INS_FCVTNU,
  727. ARM64_INS_FCVTN,
  728. ARM64_INS_FCVTN2,
  729. ARM64_INS_FCVTPS,
  730. ARM64_INS_FCVTPU,
  731. ARM64_INS_FCVTXN,
  732. ARM64_INS_FCVTXN2,
  733. ARM64_INS_FCVTZS,
  734. ARM64_INS_FCVTZU,
  735. ARM64_INS_FDIV,
  736. ARM64_INS_FMADD,
  737. ARM64_INS_FMAX,
  738. ARM64_INS_FMAXNM,
  739. ARM64_INS_FMAXNMP,
  740. ARM64_INS_FMAXNMV,
  741. ARM64_INS_FMAXP,
  742. ARM64_INS_FMAXV,
  743. ARM64_INS_FMIN,
  744. ARM64_INS_FMINNM,
  745. ARM64_INS_FMINNMP,
  746. ARM64_INS_FMINNMV,
  747. ARM64_INS_FMINP,
  748. ARM64_INS_FMINV,
  749. ARM64_INS_FMLA,
  750. ARM64_INS_FMLS,
  751. ARM64_INS_FMOV,
  752. ARM64_INS_FMSUB,
  753. ARM64_INS_FMUL,
  754. ARM64_INS_FMULX,
  755. ARM64_INS_FNEG,
  756. ARM64_INS_FNMADD,
  757. ARM64_INS_FNMSUB,
  758. ARM64_INS_FNMUL,
  759. ARM64_INS_FRECPE,
  760. ARM64_INS_FRECPS,
  761. ARM64_INS_FRECPX,
  762. ARM64_INS_FRINTA,
  763. ARM64_INS_FRINTI,
  764. ARM64_INS_FRINTM,
  765. ARM64_INS_FRINTN,
  766. ARM64_INS_FRINTP,
  767. ARM64_INS_FRINTX,
  768. ARM64_INS_FRINTZ,
  769. ARM64_INS_FRSQRTE,
  770. ARM64_INS_FRSQRTS,
  771. ARM64_INS_FSQRT,
  772. ARM64_INS_FSUB,
  773. ARM64_INS_HINT,
  774. ARM64_INS_HLT,
  775. ARM64_INS_HVC,
  776. ARM64_INS_INS,
  777. ARM64_INS_ISB,
  778. ARM64_INS_LD1,
  779. ARM64_INS_LD1R,
  780. ARM64_INS_LD2R,
  781. ARM64_INS_LD2,
  782. ARM64_INS_LD3R,
  783. ARM64_INS_LD3,
  784. ARM64_INS_LD4,
  785. ARM64_INS_LD4R,
  786. ARM64_INS_LDARB,
  787. ARM64_INS_LDARH,
  788. ARM64_INS_LDAR,
  789. ARM64_INS_LDAXP,
  790. ARM64_INS_LDAXRB,
  791. ARM64_INS_LDAXRH,
  792. ARM64_INS_LDAXR,
  793. ARM64_INS_LDNP,
  794. ARM64_INS_LDP,
  795. ARM64_INS_LDPSW,
  796. ARM64_INS_LDRB,
  797. ARM64_INS_LDR,
  798. ARM64_INS_LDRH,
  799. ARM64_INS_LDRSB,
  800. ARM64_INS_LDRSH,
  801. ARM64_INS_LDRSW,
  802. ARM64_INS_LDTRB,
  803. ARM64_INS_LDTRH,
  804. ARM64_INS_LDTRSB,
  805. ARM64_INS_LDTRSH,
  806. ARM64_INS_LDTRSW,
  807. ARM64_INS_LDTR,
  808. ARM64_INS_LDURB,
  809. ARM64_INS_LDUR,
  810. ARM64_INS_LDURH,
  811. ARM64_INS_LDURSB,
  812. ARM64_INS_LDURSH,
  813. ARM64_INS_LDURSW,
  814. ARM64_INS_LDXP,
  815. ARM64_INS_LDXRB,
  816. ARM64_INS_LDXRH,
  817. ARM64_INS_LDXR,
  818. ARM64_INS_LSL,
  819. ARM64_INS_LSR,
  820. ARM64_INS_MADD,
  821. ARM64_INS_MLA,
  822. ARM64_INS_MLS,
  823. ARM64_INS_MOVI,
  824. ARM64_INS_MOVK,
  825. ARM64_INS_MOVN,
  826. ARM64_INS_MOVZ,
  827. ARM64_INS_MRS,
  828. ARM64_INS_MSR,
  829. ARM64_INS_MSUB,
  830. ARM64_INS_MUL,
  831. ARM64_INS_MVNI,
  832. ARM64_INS_NEG,
  833. ARM64_INS_NOT,
  834. ARM64_INS_ORN,
  835. ARM64_INS_ORR,
  836. ARM64_INS_PMULL2,
  837. ARM64_INS_PMULL,
  838. ARM64_INS_PMUL,
  839. ARM64_INS_PRFM,
  840. ARM64_INS_PRFUM,
  841. ARM64_INS_RADDHN,
  842. ARM64_INS_RADDHN2,
  843. ARM64_INS_RBIT,
  844. ARM64_INS_RET,
  845. ARM64_INS_REV16,
  846. ARM64_INS_REV32,
  847. ARM64_INS_REV64,
  848. ARM64_INS_REV,
  849. ARM64_INS_ROR,
  850. ARM64_INS_RSHRN2,
  851. ARM64_INS_RSHRN,
  852. ARM64_INS_RSUBHN,
  853. ARM64_INS_RSUBHN2,
  854. ARM64_INS_SABAL2,
  855. ARM64_INS_SABAL,
  856. ARM64_INS_SABA,
  857. ARM64_INS_SABDL2,
  858. ARM64_INS_SABDL,
  859. ARM64_INS_SABD,
  860. ARM64_INS_SADALP,
  861. ARM64_INS_SADDLP,
  862. ARM64_INS_SADDLV,
  863. ARM64_INS_SADDL2,
  864. ARM64_INS_SADDL,
  865. ARM64_INS_SADDW2,
  866. ARM64_INS_SADDW,
  867. ARM64_INS_SBC,
  868. ARM64_INS_SBFM,
  869. ARM64_INS_SCVTF,
  870. ARM64_INS_SDIV,
  871. ARM64_INS_SHA1C,
  872. ARM64_INS_SHA1H,
  873. ARM64_INS_SHA1M,
  874. ARM64_INS_SHA1P,
  875. ARM64_INS_SHA1SU0,
  876. ARM64_INS_SHA1SU1,
  877. ARM64_INS_SHA256H2,
  878. ARM64_INS_SHA256H,
  879. ARM64_INS_SHA256SU0,
  880. ARM64_INS_SHA256SU1,
  881. ARM64_INS_SHADD,
  882. ARM64_INS_SHLL2,
  883. ARM64_INS_SHLL,
  884. ARM64_INS_SHL,
  885. ARM64_INS_SHRN2,
  886. ARM64_INS_SHRN,
  887. ARM64_INS_SHSUB,
  888. ARM64_INS_SLI,
  889. ARM64_INS_SMADDL,
  890. ARM64_INS_SMAXP,
  891. ARM64_INS_SMAXV,
  892. ARM64_INS_SMAX,
  893. ARM64_INS_SMC,
  894. ARM64_INS_SMINP,
  895. ARM64_INS_SMINV,
  896. ARM64_INS_SMIN,
  897. ARM64_INS_SMLAL2,
  898. ARM64_INS_SMLAL,
  899. ARM64_INS_SMLSL2,
  900. ARM64_INS_SMLSL,
  901. ARM64_INS_SMOV,
  902. ARM64_INS_SMSUBL,
  903. ARM64_INS_SMULH,
  904. ARM64_INS_SMULL2,
  905. ARM64_INS_SMULL,
  906. ARM64_INS_SQABS,
  907. ARM64_INS_SQADD,
  908. ARM64_INS_SQDMLAL,
  909. ARM64_INS_SQDMLAL2,
  910. ARM64_INS_SQDMLSL,
  911. ARM64_INS_SQDMLSL2,
  912. ARM64_INS_SQDMULH,
  913. ARM64_INS_SQDMULL,
  914. ARM64_INS_SQDMULL2,
  915. ARM64_INS_SQNEG,
  916. ARM64_INS_SQRDMULH,
  917. ARM64_INS_SQRSHL,
  918. ARM64_INS_SQRSHRN,
  919. ARM64_INS_SQRSHRN2,
  920. ARM64_INS_SQRSHRUN,
  921. ARM64_INS_SQRSHRUN2,
  922. ARM64_INS_SQSHLU,
  923. ARM64_INS_SQSHL,
  924. ARM64_INS_SQSHRN,
  925. ARM64_INS_SQSHRN2,
  926. ARM64_INS_SQSHRUN,
  927. ARM64_INS_SQSHRUN2,
  928. ARM64_INS_SQSUB,
  929. ARM64_INS_SQXTN2,
  930. ARM64_INS_SQXTN,
  931. ARM64_INS_SQXTUN2,
  932. ARM64_INS_SQXTUN,
  933. ARM64_INS_SRHADD,
  934. ARM64_INS_SRI,
  935. ARM64_INS_SRSHL,
  936. ARM64_INS_SRSHR,
  937. ARM64_INS_SRSRA,
  938. ARM64_INS_SSHLL2,
  939. ARM64_INS_SSHLL,
  940. ARM64_INS_SSHL,
  941. ARM64_INS_SSHR,
  942. ARM64_INS_SSRA,
  943. ARM64_INS_SSUBL2,
  944. ARM64_INS_SSUBL,
  945. ARM64_INS_SSUBW2,
  946. ARM64_INS_SSUBW,
  947. ARM64_INS_ST1,
  948. ARM64_INS_ST2,
  949. ARM64_INS_ST3,
  950. ARM64_INS_ST4,
  951. ARM64_INS_STLRB,
  952. ARM64_INS_STLRH,
  953. ARM64_INS_STLR,
  954. ARM64_INS_STLXP,
  955. ARM64_INS_STLXRB,
  956. ARM64_INS_STLXRH,
  957. ARM64_INS_STLXR,
  958. ARM64_INS_STNP,
  959. ARM64_INS_STP,
  960. ARM64_INS_STRB,
  961. ARM64_INS_STR,
  962. ARM64_INS_STRH,
  963. ARM64_INS_STTRB,
  964. ARM64_INS_STTRH,
  965. ARM64_INS_STTR,
  966. ARM64_INS_STURB,
  967. ARM64_INS_STUR,
  968. ARM64_INS_STURH,
  969. ARM64_INS_STXP,
  970. ARM64_INS_STXRB,
  971. ARM64_INS_STXRH,
  972. ARM64_INS_STXR,
  973. ARM64_INS_SUBHN,
  974. ARM64_INS_SUBHN2,
  975. ARM64_INS_SUB,
  976. ARM64_INS_SUQADD,
  977. ARM64_INS_SVC,
  978. ARM64_INS_SYSL,
  979. ARM64_INS_SYS,
  980. ARM64_INS_TBL,
  981. ARM64_INS_TBNZ,
  982. ARM64_INS_TBX,
  983. ARM64_INS_TBZ,
  984. ARM64_INS_TRN1,
  985. ARM64_INS_TRN2,
  986. ARM64_INS_UABAL2,
  987. ARM64_INS_UABAL,
  988. ARM64_INS_UABA,
  989. ARM64_INS_UABDL2,
  990. ARM64_INS_UABDL,
  991. ARM64_INS_UABD,
  992. ARM64_INS_UADALP,
  993. ARM64_INS_UADDLP,
  994. ARM64_INS_UADDLV,
  995. ARM64_INS_UADDL2,
  996. ARM64_INS_UADDL,
  997. ARM64_INS_UADDW2,
  998. ARM64_INS_UADDW,
  999. ARM64_INS_UBFM,
  1000. ARM64_INS_UCVTF,
  1001. ARM64_INS_UDIV,
  1002. ARM64_INS_UHADD,
  1003. ARM64_INS_UHSUB,
  1004. ARM64_INS_UMADDL,
  1005. ARM64_INS_UMAXP,
  1006. ARM64_INS_UMAXV,
  1007. ARM64_INS_UMAX,
  1008. ARM64_INS_UMINP,
  1009. ARM64_INS_UMINV,
  1010. ARM64_INS_UMIN,
  1011. ARM64_INS_UMLAL2,
  1012. ARM64_INS_UMLAL,
  1013. ARM64_INS_UMLSL2,
  1014. ARM64_INS_UMLSL,
  1015. ARM64_INS_UMOV,
  1016. ARM64_INS_UMSUBL,
  1017. ARM64_INS_UMULH,
  1018. ARM64_INS_UMULL2,
  1019. ARM64_INS_UMULL,
  1020. ARM64_INS_UQADD,
  1021. ARM64_INS_UQRSHL,
  1022. ARM64_INS_UQRSHRN,
  1023. ARM64_INS_UQRSHRN2,
  1024. ARM64_INS_UQSHL,
  1025. ARM64_INS_UQSHRN,
  1026. ARM64_INS_UQSHRN2,
  1027. ARM64_INS_UQSUB,
  1028. ARM64_INS_UQXTN2,
  1029. ARM64_INS_UQXTN,
  1030. ARM64_INS_URECPE,
  1031. ARM64_INS_URHADD,
  1032. ARM64_INS_URSHL,
  1033. ARM64_INS_URSHR,
  1034. ARM64_INS_URSQRTE,
  1035. ARM64_INS_URSRA,
  1036. ARM64_INS_USHLL2,
  1037. ARM64_INS_USHLL,
  1038. ARM64_INS_USHL,
  1039. ARM64_INS_USHR,
  1040. ARM64_INS_USQADD,
  1041. ARM64_INS_USRA,
  1042. ARM64_INS_USUBL2,
  1043. ARM64_INS_USUBL,
  1044. ARM64_INS_USUBW2,
  1045. ARM64_INS_USUBW,
  1046. ARM64_INS_UZP1,
  1047. ARM64_INS_UZP2,
  1048. ARM64_INS_XTN2,
  1049. ARM64_INS_XTN,
  1050. ARM64_INS_ZIP1,
  1051. ARM64_INS_ZIP2,
  1052. // alias insn
  1053. ARM64_INS_MNEG,
  1054. ARM64_INS_UMNEGL,
  1055. ARM64_INS_SMNEGL,
  1056. ARM64_INS_NOP,
  1057. ARM64_INS_YIELD,
  1058. ARM64_INS_WFE,
  1059. ARM64_INS_WFI,
  1060. ARM64_INS_SEV,
  1061. ARM64_INS_SEVL,
  1062. ARM64_INS_NGC,
  1063. ARM64_INS_SBFIZ,
  1064. ARM64_INS_UBFIZ,
  1065. ARM64_INS_SBFX,
  1066. ARM64_INS_UBFX,
  1067. ARM64_INS_BFI,
  1068. ARM64_INS_BFXIL,
  1069. ARM64_INS_CMN,
  1070. ARM64_INS_MVN,
  1071. ARM64_INS_TST,
  1072. ARM64_INS_CSET,
  1073. ARM64_INS_CINC,
  1074. ARM64_INS_CSETM,
  1075. ARM64_INS_CINV,
  1076. ARM64_INS_CNEG,
  1077. ARM64_INS_SXTB,
  1078. ARM64_INS_SXTH,
  1079. ARM64_INS_SXTW,
  1080. ARM64_INS_CMP,
  1081. ARM64_INS_UXTB,
  1082. ARM64_INS_UXTH,
  1083. ARM64_INS_UXTW,
  1084. ARM64_INS_IC,
  1085. ARM64_INS_DC,
  1086. ARM64_INS_AT,
  1087. ARM64_INS_TLBI,
  1088. ARM64_INS_NEGS,
  1089. ARM64_INS_NGCS,
  1090. ARM64_INS_ENDING, // <-- mark the end of the list of insn
  1091. } arm64_insn;
  1092. /// Group of ARM64 instructions
  1093. typedef enum arm64_insn_group {
  1094. ARM64_GRP_INVALID = 0, ///< = CS_GRP_INVALID
  1095. // Generic groups
  1096. // all jump instructions (conditional+direct+indirect jumps)
  1097. ARM64_GRP_JUMP, ///< = CS_GRP_JUMP
  1098. ARM64_GRP_CALL,
  1099. ARM64_GRP_RET,
  1100. ARM64_GRP_INT,
  1101. ARM64_GRP_PRIVILEGE = 6, ///< = CS_GRP_PRIVILEGE
  1102. ARM64_GRP_BRANCH_RELATIVE, ///< = CS_GRP_BRANCH_RELATIVE
  1103. // Architecture-specific groups
  1104. ARM64_GRP_CRYPTO = 128,
  1105. ARM64_GRP_FPARMV8,
  1106. ARM64_GRP_NEON,
  1107. ARM64_GRP_CRC,
  1108. ARM64_GRP_ENDING, // <-- mark the end of the list of groups
  1109. } arm64_insn_group;
  1110. #ifdef __cplusplus
  1111. }
  1112. #endif
  1113. #endif