• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Capstone Disassembly Engine */
2 /* M68K Backend by Daniel Collin <daniel@collin.com> 2015 */
3 
4 #ifdef CAPSTONE_HAS_M68K
5 
6 #include "../../utils.h"
7 #include "../../MCRegisterInfo.h"
8 #include "M68KDisassembler.h"
9 #include "M68KInstPrinter.h"
10 #include "M68KModule.h"
11 
M68K_global_init(cs_struct * ud)12 cs_err M68K_global_init(cs_struct *ud)
13 {
14 	m68k_info *info;
15 
16 	info = cs_mem_malloc(sizeof(m68k_info));
17 	if (!info) {
18 		return CS_ERR_MEM;
19 	}
20 
21 	ud->printer = M68K_printInst;
22 	ud->printer_info = info;
23 	ud->getinsn_info = NULL;
24 	ud->disasm = M68K_getInstruction;
25 	ud->skipdata_size = 2;
26 	ud->post_printer = NULL;
27 
28 	ud->reg_name = M68K_reg_name;
29 	ud->insn_id = M68K_get_insn_id;
30 	ud->insn_name = M68K_insn_name;
31 	ud->group_name = M68K_group_name;
32 
33 	return CS_ERR_OK;
34 }
35 
M68K_option(cs_struct * handle,cs_opt_type type,size_t value)36 cs_err M68K_option(cs_struct *handle, cs_opt_type type, size_t value)
37 {
38 	return CS_ERR_OK;
39 }
40 
41 #endif
42 
43