1 /* Capstone Disassembly Engine */ 2 /* TMS320C64x Backend by Fotis Loukos <me@fotisl.com> 2016 */ 3 4 #ifdef CAPSTONE_HAS_TMS320C64X 5 6 #include "../../utils.h" 7 #include "../../MCRegisterInfo.h" 8 #include "TMS320C64xDisassembler.h" 9 #include "TMS320C64xInstPrinter.h" 10 #include "TMS320C64xMapping.h" 11 #include "TMS320C64xModule.h" 12 TMS320C64x_global_init(cs_struct * ud)13cs_err TMS320C64x_global_init(cs_struct *ud) 14 { 15 MCRegisterInfo *mri; 16 17 mri = cs_mem_malloc(sizeof(*mri)); 18 19 TMS320C64x_init(mri); 20 ud->printer = TMS320C64x_printInst; 21 ud->printer_info = mri; 22 ud->getinsn_info = mri; 23 ud->disasm = TMS320C64x_getInstruction; 24 ud->post_printer = TMS320C64x_post_printer; 25 26 ud->reg_name = TMS320C64x_reg_name; 27 ud->insn_id = TMS320C64x_get_insn_id; 28 ud->insn_name = TMS320C64x_insn_name; 29 ud->group_name = TMS320C64x_group_name; 30 31 return CS_ERR_OK; 32 } 33 TMS320C64x_option(cs_struct * handle,cs_opt_type type,size_t value)34cs_err TMS320C64x_option(cs_struct *handle, cs_opt_type type, size_t value) 35 { 36 return CS_ERR_OK; 37 } 38 39 #endif 40