Rizin
unix-like reverse engineering framework and cli tools
mcore.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2018-2020 deroad <wargio@libero.it>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef MCORE_H
5 #define MCORE_H
6 
7 #include <stdint.h>
8 #include <rz_types.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #define ARGS_SIZE 5
15 
16 #define MCORE_CPU_DFLT 0
17 #define MCORE_CPU_510E 1
18 #define MCORE_CPU_610E 2
19 #define MCORE_CPU_620 3
20 
21 #define TYPE_NONE 0
22 #define TYPE_REG 1 // Register
23 #define TYPE_IMM 2 // Immediate
24 #define TYPE_MEM 3 // Memory
25 #define TYPE_JMP 4 // Jump
26 #define TYPE_JMPI 5 // Indirect Jump
27 #define TYPE_CTRL 6 // Control Registers
28 
29 typedef struct {
30  const ut8 *end;
31  const ut8 *pos;
33 } mcore_handle;
34 
35 typedef struct {
39 
40 typedef struct {
41  const char *name;
47 } mcore_t;
48 
49 int mcore_init(mcore_handle *handle, const ut8 *buffer, const ut32 size);
51 void mcore_free(mcore_t *instr);
52 void mcore_snprint(char *str, int size, ut64 addr, mcore_t *instr);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif
static mcore_handle handle
Definition: asm_mcore.c:8
uint16_t ut16
uint32_t ut32
voidpf void uLong size
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
int mcore_init(mcore_handle *handle, const ut8 *buffer, const ut32 size)
Definition: mcore.c:409
void mcore_snprint(char *str, int size, ut64 addr, mcore_t *instr)
Definition: mcore.c:469
mcore_t * mcore_next(mcore_handle *handle)
Definition: mcore.c:418
void mcore_free(mcore_t *instr)
Definition: mcore.c:432
#define ARGS_SIZE
Definition: mcore.h:14
int args
Definition: mipsasm.c:18
Definition: buffer.h:15
ut16 type
Definition: mcore.h:37
ut32 value
Definition: mcore.h:36
const ut8 * pos
Definition: mcore.h:31
ut16 inc
Definition: mcore.h:32
const ut8 * end
Definition: mcore.h:30
Definition: mcore.h:40
ut64 type
Definition: mcore.h:43
ut16 bytes
Definition: mcore.h:45
ut16 n_args
Definition: mcore.h:44
const char * name
Definition: mcore.h:41
ut16 size
Definition: mcore.h:46
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static int addr
Definition: z80asm.c:58