diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /capstone/arch/M68K/M68KModule.c | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'capstone/arch/M68K/M68KModule.c')
-rw-r--r-- | capstone/arch/M68K/M68KModule.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/capstone/arch/M68K/M68KModule.c b/capstone/arch/M68K/M68KModule.c new file mode 100644 index 000000000..03e73f7b9 --- /dev/null +++ b/capstone/arch/M68K/M68KModule.c @@ -0,0 +1,42 @@ +/* Capstone Disassembly Engine */ +/* M68K Backend by Daniel Collin <daniel@collin.com> 2015 */ + +#ifdef CAPSTONE_HAS_M68K + +#include "../../utils.h" +#include "../../MCRegisterInfo.h" +#include "M68KDisassembler.h" +#include "M68KInstPrinter.h" +#include "M68KModule.h" + +cs_err M68K_global_init(cs_struct *ud) +{ + m68k_info *info; + + info = cs_mem_malloc(sizeof(m68k_info)); + if (!info) { + return CS_ERR_MEM; + } + + ud->printer = M68K_printInst; + ud->printer_info = info; + ud->getinsn_info = NULL; + ud->disasm = M68K_getInstruction; + ud->skipdata_size = 2; + ud->post_printer = NULL; + + ud->reg_name = M68K_reg_name; + ud->insn_id = M68K_get_insn_id; + ud->insn_name = M68K_insn_name; + ud->group_name = M68K_group_name; + + return CS_ERR_OK; +} + +cs_err M68K_option(cs_struct *handle, cs_opt_type type, size_t value) +{ + return CS_ERR_OK; +} + +#endif + |