m68k.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. #ifndef CAPSTONE_M68K_H
  2. #define CAPSTONE_M68K_H
  3. /* Capstone Disassembly Engine */
  4. /* By Daniel Collin <daniel@collin.com>, 2015-2016 */
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #include "platform.h"
  9. #ifdef _MSC_VER
  10. #pragma warning(disable:4201)
  11. #endif
  12. #define M68K_OPERAND_COUNT 4
  13. /// M68K registers and special registers
  14. typedef enum m68k_reg {
  15. M68K_REG_INVALID = 0,
  16. M68K_REG_D0,
  17. M68K_REG_D1,
  18. M68K_REG_D2,
  19. M68K_REG_D3,
  20. M68K_REG_D4,
  21. M68K_REG_D5,
  22. M68K_REG_D6,
  23. M68K_REG_D7,
  24. M68K_REG_A0,
  25. M68K_REG_A1,
  26. M68K_REG_A2,
  27. M68K_REG_A3,
  28. M68K_REG_A4,
  29. M68K_REG_A5,
  30. M68K_REG_A6,
  31. M68K_REG_A7,
  32. M68K_REG_FP0,
  33. M68K_REG_FP1,
  34. M68K_REG_FP2,
  35. M68K_REG_FP3,
  36. M68K_REG_FP4,
  37. M68K_REG_FP5,
  38. M68K_REG_FP6,
  39. M68K_REG_FP7,
  40. M68K_REG_PC,
  41. M68K_REG_SR,
  42. M68K_REG_CCR,
  43. M68K_REG_SFC,
  44. M68K_REG_DFC,
  45. M68K_REG_USP,
  46. M68K_REG_VBR,
  47. M68K_REG_CACR,
  48. M68K_REG_CAAR,
  49. M68K_REG_MSP,
  50. M68K_REG_ISP,
  51. M68K_REG_TC,
  52. M68K_REG_ITT0,
  53. M68K_REG_ITT1,
  54. M68K_REG_DTT0,
  55. M68K_REG_DTT1,
  56. M68K_REG_MMUSR,
  57. M68K_REG_URP,
  58. M68K_REG_SRP,
  59. M68K_REG_FPCR,
  60. M68K_REG_FPSR,
  61. M68K_REG_FPIAR,
  62. M68K_REG_ENDING, // <-- mark the end of the list of registers
  63. } m68k_reg;
  64. /// M68K Addressing Modes
  65. typedef enum m68k_address_mode {
  66. M68K_AM_NONE = 0, ///< No address mode.
  67. M68K_AM_REG_DIRECT_DATA, ///< Register Direct - Data
  68. M68K_AM_REG_DIRECT_ADDR, ///< Register Direct - Address
  69. M68K_AM_REGI_ADDR, ///< Register Indirect - Address
  70. M68K_AM_REGI_ADDR_POST_INC, ///< Register Indirect - Address with Postincrement
  71. M68K_AM_REGI_ADDR_PRE_DEC, ///< Register Indirect - Address with Predecrement
  72. M68K_AM_REGI_ADDR_DISP, ///< Register Indirect - Address with Displacement
  73. M68K_AM_AREGI_INDEX_8_BIT_DISP, ///< Address Register Indirect With Index- 8-bit displacement
  74. M68K_AM_AREGI_INDEX_BASE_DISP, ///< Address Register Indirect With Index- Base displacement
  75. M68K_AM_MEMI_POST_INDEX, ///< Memory indirect - Postindex
  76. M68K_AM_MEMI_PRE_INDEX, ///< Memory indirect - Preindex
  77. M68K_AM_PCI_DISP, ///< Program Counter Indirect - with Displacement
  78. M68K_AM_PCI_INDEX_8_BIT_DISP, ///< Program Counter Indirect with Index - with 8-Bit Displacement
  79. M68K_AM_PCI_INDEX_BASE_DISP, ///< Program Counter Indirect with Index - with Base Displacement
  80. M68K_AM_PC_MEMI_POST_INDEX, ///< Program Counter Memory Indirect - Postindexed
  81. M68K_AM_PC_MEMI_PRE_INDEX, ///< Program Counter Memory Indirect - Preindexed
  82. M68K_AM_ABSOLUTE_DATA_SHORT, ///< Absolute Data Addressing - Short
  83. M68K_AM_ABSOLUTE_DATA_LONG, ///< Absolute Data Addressing - Long
  84. M68K_AM_IMMEDIATE, ///< Immediate value
  85. M68K_AM_BRANCH_DISPLACEMENT, ///< Address as displacement from (PC+2) used by branches
  86. } m68k_address_mode;
  87. /// Operand type for instruction's operands
  88. typedef enum m68k_op_type {
  89. M68K_OP_INVALID = 0, ///< = CS_OP_INVALID (Uninitialized).
  90. M68K_OP_REG, ///< = CS_OP_REG (Register operand).
  91. M68K_OP_IMM, ///< = CS_OP_IMM (Immediate operand).
  92. M68K_OP_MEM, ///< = CS_OP_MEM (Memory operand).
  93. M68K_OP_FP_SINGLE, ///< single precision Floating-Point operand
  94. M68K_OP_FP_DOUBLE, ///< double precision Floating-Point operand
  95. M68K_OP_REG_BITS, ///< Register bits move
  96. M68K_OP_REG_PAIR, ///< Register pair in the same op (upper 4 bits for first reg, lower for second)
  97. M68K_OP_BR_DISP, ///< Branch displacement
  98. } m68k_op_type;
  99. /// Instruction's operand referring to memory
  100. /// This is associated with M68K_OP_MEM operand type above
  101. typedef struct m68k_op_mem {
  102. m68k_reg base_reg; ///< base register (or M68K_REG_INVALID if irrelevant)
  103. m68k_reg index_reg; ///< index register (or M68K_REG_INVALID if irrelevant)
  104. m68k_reg in_base_reg; ///< indirect base register (or M68K_REG_INVALID if irrelevant)
  105. uint32_t in_disp; ///< indirect displacement
  106. uint32_t out_disp; ///< other displacement
  107. int16_t disp; ///< displacement value
  108. uint8_t scale; ///< scale for index register
  109. uint8_t bitfield; ///< set to true if the two values below should be used
  110. uint8_t width; ///< used for bf* instructions
  111. uint8_t offset; ///< used for bf* instructions
  112. uint8_t index_size; ///< 0 = w, 1 = l
  113. } m68k_op_mem;
  114. /// Operand type for instruction's operands
  115. typedef enum m68k_op_br_disp_size {
  116. M68K_OP_BR_DISP_SIZE_INVALID = 0, ///< = CS_OP_INVALID (Uninitialized).
  117. M68K_OP_BR_DISP_SIZE_BYTE = 1, ///< signed 8-bit displacement
  118. M68K_OP_BR_DISP_SIZE_WORD = 2, ///< signed 16-bit displacement
  119. M68K_OP_BR_DISP_SIZE_LONG = 4, ///< signed 32-bit displacement
  120. } m68k_op_br_disp_size;
  121. typedef struct m68k_op_br_disp {
  122. int32_t disp; ///< displacement value
  123. uint8_t disp_size; ///< Size from m68k_op_br_disp_size type above
  124. } m68k_op_br_disp;
  125. /// Instruction operand
  126. typedef struct cs_m68k_op {
  127. union {
  128. uint64_t imm; ///< immediate value for IMM operand
  129. double dimm; ///< double imm
  130. float simm; ///< float imm
  131. m68k_reg reg; ///< register value for REG operand
  132. struct { ///< register pair in one operand
  133. m68k_reg reg_0;
  134. m68k_reg reg_1;
  135. } reg_pair;
  136. };
  137. m68k_op_mem mem; ///< data when operand is targeting memory
  138. m68k_op_br_disp br_disp; ///< data when operand is a branch displacement
  139. uint32_t register_bits; ///< register bits for movem etc. (always in d0-d7, a0-a7, fp0 - fp7 order)
  140. m68k_op_type type;
  141. m68k_address_mode address_mode; ///< M68K addressing mode for this op
  142. } cs_m68k_op;
  143. /// Operation size of the CPU instructions
  144. typedef enum m68k_cpu_size {
  145. M68K_CPU_SIZE_NONE = 0, ///< unsized or unspecified
  146. M68K_CPU_SIZE_BYTE = 1, ///< 1 byte in size
  147. M68K_CPU_SIZE_WORD = 2, ///< 2 bytes in size
  148. M68K_CPU_SIZE_LONG = 4, ///< 4 bytes in size
  149. } m68k_cpu_size;
  150. /// Operation size of the FPU instructions (Notice that FPU instruction can also use CPU sizes if needed)
  151. typedef enum m68k_fpu_size {
  152. M68K_FPU_SIZE_NONE = 0, ///< unsized like fsave/frestore
  153. M68K_FPU_SIZE_SINGLE = 4, ///< 4 byte in size (single float)
  154. M68K_FPU_SIZE_DOUBLE = 8, ///< 8 byte in size (double)
  155. M68K_FPU_SIZE_EXTENDED = 12, ///< 12 byte in size (extended real format)
  156. } m68k_fpu_size;
  157. /// Type of size that is being used for the current instruction
  158. typedef enum m68k_size_type {
  159. M68K_SIZE_TYPE_INVALID = 0,
  160. M68K_SIZE_TYPE_CPU,
  161. M68K_SIZE_TYPE_FPU,
  162. } m68k_size_type;
  163. /// Operation size of the current instruction (NOT the actually size of instruction)
  164. typedef struct m68k_op_size {
  165. m68k_size_type type;
  166. union {
  167. m68k_cpu_size cpu_size;
  168. m68k_fpu_size fpu_size;
  169. };
  170. } m68k_op_size;
  171. /// The M68K instruction and it's operands
  172. typedef struct cs_m68k {
  173. // Number of operands of this instruction or 0 when instruction has no operand.
  174. cs_m68k_op operands[M68K_OPERAND_COUNT]; ///< operands for this instruction.
  175. m68k_op_size op_size; ///< size of data operand works on in bytes (.b, .w, .l, etc)
  176. uint8_t op_count; ///< number of operands for the instruction
  177. } cs_m68k;
  178. /// M68K instruction
  179. typedef enum m68k_insn {
  180. M68K_INS_INVALID = 0,
  181. M68K_INS_ABCD,
  182. M68K_INS_ADD,
  183. M68K_INS_ADDA,
  184. M68K_INS_ADDI,
  185. M68K_INS_ADDQ,
  186. M68K_INS_ADDX,
  187. M68K_INS_AND,
  188. M68K_INS_ANDI,
  189. M68K_INS_ASL,
  190. M68K_INS_ASR,
  191. M68K_INS_BHS,
  192. M68K_INS_BLO,
  193. M68K_INS_BHI,
  194. M68K_INS_BLS,
  195. M68K_INS_BCC,
  196. M68K_INS_BCS,
  197. M68K_INS_BNE,
  198. M68K_INS_BEQ,
  199. M68K_INS_BVC,
  200. M68K_INS_BVS,
  201. M68K_INS_BPL,
  202. M68K_INS_BMI,
  203. M68K_INS_BGE,
  204. M68K_INS_BLT,
  205. M68K_INS_BGT,
  206. M68K_INS_BLE,
  207. M68K_INS_BRA,
  208. M68K_INS_BSR,
  209. M68K_INS_BCHG,
  210. M68K_INS_BCLR,
  211. M68K_INS_BSET,
  212. M68K_INS_BTST,
  213. M68K_INS_BFCHG,
  214. M68K_INS_BFCLR,
  215. M68K_INS_BFEXTS,
  216. M68K_INS_BFEXTU,
  217. M68K_INS_BFFFO,
  218. M68K_INS_BFINS,
  219. M68K_INS_BFSET,
  220. M68K_INS_BFTST,
  221. M68K_INS_BKPT,
  222. M68K_INS_CALLM,
  223. M68K_INS_CAS,
  224. M68K_INS_CAS2,
  225. M68K_INS_CHK,
  226. M68K_INS_CHK2,
  227. M68K_INS_CLR,
  228. M68K_INS_CMP,
  229. M68K_INS_CMPA,
  230. M68K_INS_CMPI,
  231. M68K_INS_CMPM,
  232. M68K_INS_CMP2,
  233. M68K_INS_CINVL,
  234. M68K_INS_CINVP,
  235. M68K_INS_CINVA,
  236. M68K_INS_CPUSHL,
  237. M68K_INS_CPUSHP,
  238. M68K_INS_CPUSHA,
  239. M68K_INS_DBT,
  240. M68K_INS_DBF,
  241. M68K_INS_DBHI,
  242. M68K_INS_DBLS,
  243. M68K_INS_DBCC,
  244. M68K_INS_DBCS,
  245. M68K_INS_DBNE,
  246. M68K_INS_DBEQ,
  247. M68K_INS_DBVC,
  248. M68K_INS_DBVS,
  249. M68K_INS_DBPL,
  250. M68K_INS_DBMI,
  251. M68K_INS_DBGE,
  252. M68K_INS_DBLT,
  253. M68K_INS_DBGT,
  254. M68K_INS_DBLE,
  255. M68K_INS_DBRA,
  256. M68K_INS_DIVS,
  257. M68K_INS_DIVSL,
  258. M68K_INS_DIVU,
  259. M68K_INS_DIVUL,
  260. M68K_INS_EOR,
  261. M68K_INS_EORI,
  262. M68K_INS_EXG,
  263. M68K_INS_EXT,
  264. M68K_INS_EXTB,
  265. M68K_INS_FABS,
  266. M68K_INS_FSABS,
  267. M68K_INS_FDABS,
  268. M68K_INS_FACOS,
  269. M68K_INS_FADD,
  270. M68K_INS_FSADD,
  271. M68K_INS_FDADD,
  272. M68K_INS_FASIN,
  273. M68K_INS_FATAN,
  274. M68K_INS_FATANH,
  275. M68K_INS_FBF,
  276. M68K_INS_FBEQ,
  277. M68K_INS_FBOGT,
  278. M68K_INS_FBOGE,
  279. M68K_INS_FBOLT,
  280. M68K_INS_FBOLE,
  281. M68K_INS_FBOGL,
  282. M68K_INS_FBOR,
  283. M68K_INS_FBUN,
  284. M68K_INS_FBUEQ,
  285. M68K_INS_FBUGT,
  286. M68K_INS_FBUGE,
  287. M68K_INS_FBULT,
  288. M68K_INS_FBULE,
  289. M68K_INS_FBNE,
  290. M68K_INS_FBT,
  291. M68K_INS_FBSF,
  292. M68K_INS_FBSEQ,
  293. M68K_INS_FBGT,
  294. M68K_INS_FBGE,
  295. M68K_INS_FBLT,
  296. M68K_INS_FBLE,
  297. M68K_INS_FBGL,
  298. M68K_INS_FBGLE,
  299. M68K_INS_FBNGLE,
  300. M68K_INS_FBNGL,
  301. M68K_INS_FBNLE,
  302. M68K_INS_FBNLT,
  303. M68K_INS_FBNGE,
  304. M68K_INS_FBNGT,
  305. M68K_INS_FBSNE,
  306. M68K_INS_FBST,
  307. M68K_INS_FCMP,
  308. M68K_INS_FCOS,
  309. M68K_INS_FCOSH,
  310. M68K_INS_FDBF,
  311. M68K_INS_FDBEQ,
  312. M68K_INS_FDBOGT,
  313. M68K_INS_FDBOGE,
  314. M68K_INS_FDBOLT,
  315. M68K_INS_FDBOLE,
  316. M68K_INS_FDBOGL,
  317. M68K_INS_FDBOR,
  318. M68K_INS_FDBUN,
  319. M68K_INS_FDBUEQ,
  320. M68K_INS_FDBUGT,
  321. M68K_INS_FDBUGE,
  322. M68K_INS_FDBULT,
  323. M68K_INS_FDBULE,
  324. M68K_INS_FDBNE,
  325. M68K_INS_FDBT,
  326. M68K_INS_FDBSF,
  327. M68K_INS_FDBSEQ,
  328. M68K_INS_FDBGT,
  329. M68K_INS_FDBGE,
  330. M68K_INS_FDBLT,
  331. M68K_INS_FDBLE,
  332. M68K_INS_FDBGL,
  333. M68K_INS_FDBGLE,
  334. M68K_INS_FDBNGLE,
  335. M68K_INS_FDBNGL,
  336. M68K_INS_FDBNLE,
  337. M68K_INS_FDBNLT,
  338. M68K_INS_FDBNGE,
  339. M68K_INS_FDBNGT,
  340. M68K_INS_FDBSNE,
  341. M68K_INS_FDBST,
  342. M68K_INS_FDIV,
  343. M68K_INS_FSDIV,
  344. M68K_INS_FDDIV,
  345. M68K_INS_FETOX,
  346. M68K_INS_FETOXM1,
  347. M68K_INS_FGETEXP,
  348. M68K_INS_FGETMAN,
  349. M68K_INS_FINT,
  350. M68K_INS_FINTRZ,
  351. M68K_INS_FLOG10,
  352. M68K_INS_FLOG2,
  353. M68K_INS_FLOGN,
  354. M68K_INS_FLOGNP1,
  355. M68K_INS_FMOD,
  356. M68K_INS_FMOVE,
  357. M68K_INS_FSMOVE,
  358. M68K_INS_FDMOVE,
  359. M68K_INS_FMOVECR,
  360. M68K_INS_FMOVEM,
  361. M68K_INS_FMUL,
  362. M68K_INS_FSMUL,
  363. M68K_INS_FDMUL,
  364. M68K_INS_FNEG,
  365. M68K_INS_FSNEG,
  366. M68K_INS_FDNEG,
  367. M68K_INS_FNOP,
  368. M68K_INS_FREM,
  369. M68K_INS_FRESTORE,
  370. M68K_INS_FSAVE,
  371. M68K_INS_FSCALE,
  372. M68K_INS_FSGLDIV,
  373. M68K_INS_FSGLMUL,
  374. M68K_INS_FSIN,
  375. M68K_INS_FSINCOS,
  376. M68K_INS_FSINH,
  377. M68K_INS_FSQRT,
  378. M68K_INS_FSSQRT,
  379. M68K_INS_FDSQRT,
  380. M68K_INS_FSF,
  381. M68K_INS_FSBEQ,
  382. M68K_INS_FSOGT,
  383. M68K_INS_FSOGE,
  384. M68K_INS_FSOLT,
  385. M68K_INS_FSOLE,
  386. M68K_INS_FSOGL,
  387. M68K_INS_FSOR,
  388. M68K_INS_FSUN,
  389. M68K_INS_FSUEQ,
  390. M68K_INS_FSUGT,
  391. M68K_INS_FSUGE,
  392. M68K_INS_FSULT,
  393. M68K_INS_FSULE,
  394. M68K_INS_FSNE,
  395. M68K_INS_FST,
  396. M68K_INS_FSSF,
  397. M68K_INS_FSSEQ,
  398. M68K_INS_FSGT,
  399. M68K_INS_FSGE,
  400. M68K_INS_FSLT,
  401. M68K_INS_FSLE,
  402. M68K_INS_FSGL,
  403. M68K_INS_FSGLE,
  404. M68K_INS_FSNGLE,
  405. M68K_INS_FSNGL,
  406. M68K_INS_FSNLE,
  407. M68K_INS_FSNLT,
  408. M68K_INS_FSNGE,
  409. M68K_INS_FSNGT,
  410. M68K_INS_FSSNE,
  411. M68K_INS_FSST,
  412. M68K_INS_FSUB,
  413. M68K_INS_FSSUB,
  414. M68K_INS_FDSUB,
  415. M68K_INS_FTAN,
  416. M68K_INS_FTANH,
  417. M68K_INS_FTENTOX,
  418. M68K_INS_FTRAPF,
  419. M68K_INS_FTRAPEQ,
  420. M68K_INS_FTRAPOGT,
  421. M68K_INS_FTRAPOGE,
  422. M68K_INS_FTRAPOLT,
  423. M68K_INS_FTRAPOLE,
  424. M68K_INS_FTRAPOGL,
  425. M68K_INS_FTRAPOR,
  426. M68K_INS_FTRAPUN,
  427. M68K_INS_FTRAPUEQ,
  428. M68K_INS_FTRAPUGT,
  429. M68K_INS_FTRAPUGE,
  430. M68K_INS_FTRAPULT,
  431. M68K_INS_FTRAPULE,
  432. M68K_INS_FTRAPNE,
  433. M68K_INS_FTRAPT,
  434. M68K_INS_FTRAPSF,
  435. M68K_INS_FTRAPSEQ,
  436. M68K_INS_FTRAPGT,
  437. M68K_INS_FTRAPGE,
  438. M68K_INS_FTRAPLT,
  439. M68K_INS_FTRAPLE,
  440. M68K_INS_FTRAPGL,
  441. M68K_INS_FTRAPGLE,
  442. M68K_INS_FTRAPNGLE,
  443. M68K_INS_FTRAPNGL,
  444. M68K_INS_FTRAPNLE,
  445. M68K_INS_FTRAPNLT,
  446. M68K_INS_FTRAPNGE,
  447. M68K_INS_FTRAPNGT,
  448. M68K_INS_FTRAPSNE,
  449. M68K_INS_FTRAPST,
  450. M68K_INS_FTST,
  451. M68K_INS_FTWOTOX,
  452. M68K_INS_HALT,
  453. M68K_INS_ILLEGAL,
  454. M68K_INS_JMP,
  455. M68K_INS_JSR,
  456. M68K_INS_LEA,
  457. M68K_INS_LINK,
  458. M68K_INS_LPSTOP,
  459. M68K_INS_LSL,
  460. M68K_INS_LSR,
  461. M68K_INS_MOVE,
  462. M68K_INS_MOVEA,
  463. M68K_INS_MOVEC,
  464. M68K_INS_MOVEM,
  465. M68K_INS_MOVEP,
  466. M68K_INS_MOVEQ,
  467. M68K_INS_MOVES,
  468. M68K_INS_MOVE16,
  469. M68K_INS_MULS,
  470. M68K_INS_MULU,
  471. M68K_INS_NBCD,
  472. M68K_INS_NEG,
  473. M68K_INS_NEGX,
  474. M68K_INS_NOP,
  475. M68K_INS_NOT,
  476. M68K_INS_OR,
  477. M68K_INS_ORI,
  478. M68K_INS_PACK,
  479. M68K_INS_PEA,
  480. M68K_INS_PFLUSH,
  481. M68K_INS_PFLUSHA,
  482. M68K_INS_PFLUSHAN,
  483. M68K_INS_PFLUSHN,
  484. M68K_INS_PLOADR,
  485. M68K_INS_PLOADW,
  486. M68K_INS_PLPAR,
  487. M68K_INS_PLPAW,
  488. M68K_INS_PMOVE,
  489. M68K_INS_PMOVEFD,
  490. M68K_INS_PTESTR,
  491. M68K_INS_PTESTW,
  492. M68K_INS_PULSE,
  493. M68K_INS_REMS,
  494. M68K_INS_REMU,
  495. M68K_INS_RESET,
  496. M68K_INS_ROL,
  497. M68K_INS_ROR,
  498. M68K_INS_ROXL,
  499. M68K_INS_ROXR,
  500. M68K_INS_RTD,
  501. M68K_INS_RTE,
  502. M68K_INS_RTM,
  503. M68K_INS_RTR,
  504. M68K_INS_RTS,
  505. M68K_INS_SBCD,
  506. M68K_INS_ST,
  507. M68K_INS_SF,
  508. M68K_INS_SHI,
  509. M68K_INS_SLS,
  510. M68K_INS_SCC,
  511. M68K_INS_SHS,
  512. M68K_INS_SCS,
  513. M68K_INS_SLO,
  514. M68K_INS_SNE,
  515. M68K_INS_SEQ,
  516. M68K_INS_SVC,
  517. M68K_INS_SVS,
  518. M68K_INS_SPL,
  519. M68K_INS_SMI,
  520. M68K_INS_SGE,
  521. M68K_INS_SLT,
  522. M68K_INS_SGT,
  523. M68K_INS_SLE,
  524. M68K_INS_STOP,
  525. M68K_INS_SUB,
  526. M68K_INS_SUBA,
  527. M68K_INS_SUBI,
  528. M68K_INS_SUBQ,
  529. M68K_INS_SUBX,
  530. M68K_INS_SWAP,
  531. M68K_INS_TAS,
  532. M68K_INS_TRAP,
  533. M68K_INS_TRAPV,
  534. M68K_INS_TRAPT,
  535. M68K_INS_TRAPF,
  536. M68K_INS_TRAPHI,
  537. M68K_INS_TRAPLS,
  538. M68K_INS_TRAPCC,
  539. M68K_INS_TRAPHS,
  540. M68K_INS_TRAPCS,
  541. M68K_INS_TRAPLO,
  542. M68K_INS_TRAPNE,
  543. M68K_INS_TRAPEQ,
  544. M68K_INS_TRAPVC,
  545. M68K_INS_TRAPVS,
  546. M68K_INS_TRAPPL,
  547. M68K_INS_TRAPMI,
  548. M68K_INS_TRAPGE,
  549. M68K_INS_TRAPLT,
  550. M68K_INS_TRAPGT,
  551. M68K_INS_TRAPLE,
  552. M68K_INS_TST,
  553. M68K_INS_UNLK,
  554. M68K_INS_UNPK,
  555. M68K_INS_ENDING, // <-- mark the end of the list of instructions
  556. } m68k_insn;
  557. /// Group of M68K instructions
  558. typedef enum m68k_group_type {
  559. M68K_GRP_INVALID = 0, ///< CS_GRUP_INVALID
  560. M68K_GRP_JUMP, ///< = CS_GRP_JUMP
  561. M68K_GRP_RET = 3, ///< = CS_GRP_RET
  562. M68K_GRP_IRET = 5, ///< = CS_GRP_IRET
  563. M68K_GRP_BRANCH_RELATIVE = 7, ///< = CS_GRP_BRANCH_RELATIVE
  564. M68K_GRP_ENDING,// <-- mark the end of the list of groups
  565. } m68k_group_type;
  566. #ifdef __cplusplus
  567. }
  568. #endif
  569. #endif