Rizin
unix-like reverse engineering framework and cli tools
M68KModule.c
Go to the documentation of this file.
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 
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;
25  ud->skipdata_size = 2;
26  ud->post_printer = NULL;
27 
28  ud->reg_name = M68K_reg_name;
32 
33  return CS_ERR_OK;
34 }
35 
37 {
38  return CS_ERR_OK;
39 }
40 
41 #endif
42 
bool M68K_getInstruction(csh ud, const uint8_t *code, size_t code_len, MCInst *instr, uint16_t *size, uint64_t address, void *inst_info)
const char * M68K_reg_name(csh handle, unsigned int reg)
const char * M68K_group_name(csh handle, unsigned int id)
const char * M68K_insn_name(csh handle, unsigned int id)
void M68K_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
void M68K_printInst(MCInst *MI, SStream *O, void *PrinterInfo)
cs_err M68K_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_err M68K_global_init(cs_struct *ud)
static mcore_handle handle
Definition: asm_mcore.c:8
RzBinInfo * info(RzBinFile *bf)
Definition: bin_ne.c:86
cs_opt_type
Runtime option for the disassembled engine.
Definition: capstone.h:168
static int value
Definition: cmd_api.c:93
#define NULL
Definition: cris-opc.c:27
cs_malloc_t cs_mem_malloc
Definition: cs.c:348
int type
Definition: mipsasm.c:17
int CS_ERR_MEM
Definition: __init__.py:236
int CS_ERR_OK
Definition: __init__.py:235
GetName_t insn_name
Definition: cs_priv.h:62
GetName_t reg_name
Definition: cs_priv.h:61
void * printer_info
Definition: cs_priv.h:58
Printer_t printer
Definition: cs_priv.h:57
GetID_t insn_id
Definition: cs_priv.h:64
GetName_t group_name
Definition: cs_priv.h:63
Disasm_t disasm
Definition: cs_priv.h:59
void * getinsn_info
Definition: cs_priv.h:60
PostPrinter_t post_printer
Definition: cs_priv.h:65
uint8_t skipdata_size
Definition: cs_priv.h:74