Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
bloaty
third_party
capstone
arch
Mips
MipsModule.c
Go to the documentation of this file.
1
/* Capstone Disassembly Engine */
2
/* By Dang Hoang Vu <danghvu@gmail.com> 2013 */
3
4
#ifdef CAPSTONE_HAS_MIPS
5
6
#include "../../utils.h"
7
#include "../../MCRegisterInfo.h"
8
#include "
MipsDisassembler.h
"
9
#include "
MipsInstPrinter.h
"
10
#include "
MipsMapping.h
"
11
#include "
MipsModule.h
"
12
13
// Returns mode value with implied bits set
14
static
cs_mode
updated_mode(
cs_mode
mode
)
15
{
16
if
(
mode
&
CS_MODE_MIPS32R6
) {
17
mode
|=
CS_MODE_32
;
18
}
19
20
return
mode
;
21
}
22
23
cs_err
Mips_global_init
(
cs_struct
*ud)
24
{
25
MCRegisterInfo
*mri;
26
mri =
cs_mem_malloc
(
sizeof
(*mri));
27
28
Mips_init
(mri);
29
ud->
printer
=
Mips_printInst
;
30
ud->
printer_info
= mri;
31
ud->
getinsn_info
= mri;
32
ud->
reg_name
=
Mips_reg_name
;
33
ud->
insn_id
=
Mips_get_insn_id
;
34
ud->
insn_name
=
Mips_insn_name
;
35
ud->
group_name
=
Mips_group_name
;
36
37
ud->
disasm
=
Mips_getInstruction
;
38
39
return
CS_ERR_OK
;
40
}
41
42
cs_err
Mips_option
(
cs_struct
*
handle
,
cs_opt_type
type
,
size_t
value
)
43
{
44
if
(
type
==
CS_OPT_MODE
) {
45
handle
->mode = updated_mode(
value
);
46
return
CS_ERR_OK
;
47
}
48
49
return
CS_ERR_OPTION
;
50
}
51
52
#endif
cs_mem_malloc
cs_malloc_t cs_mem_malloc
Definition:
cs.c:368
cs_opt_type
cs_opt_type
Runtime option for the disassembled engine.
Definition:
capstone.h:169
CS_MODE_32
@ CS_MODE_32
32-bit mode (X86)
Definition:
capstone.h:107
cs_struct::disasm
Disasm_t disasm
Definition:
cs_priv.h:56
Mips_group_name
const char * Mips_group_name(csh handle, unsigned int id)
mode
const char int mode
Definition:
bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
Mips_printInst
void Mips_printInst(MCInst *MI, SStream *O, void *info)
Mips_global_init
cs_err Mips_global_init(cs_struct *ud)
Mips_option
cs_err Mips_option(cs_struct *handle, cs_opt_type type, size_t value)
cs_struct
Definition:
cs_priv.h:51
cs_mode
cs_mode
Mode type.
Definition:
capstone.h:103
cs_struct::printer_info
void * printer_info
Definition:
cs_priv.h:55
capstone.CS_ERR_OK
CS_ERR_OK
Definition:
third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:237
MipsMapping.h
cs_struct::insn_name
GetName_t insn_name
Definition:
cs_priv.h:59
Mips_reg_name
const char * Mips_reg_name(csh handle, unsigned int reg)
Mips_get_insn_id
void Mips_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
MipsDisassembler.h
cs_struct::getinsn_info
void * getinsn_info
Definition:
cs_priv.h:57
cs_struct::printer
Printer_t printer
Definition:
cs_priv.h:54
MipsInstPrinter.h
CS_MODE_MIPS32R6
@ CS_MODE_MIPS32R6
Mips32r6 ISA.
Definition:
capstone.h:114
Mips_getInstruction
bool Mips_getInstruction(csh handle, const uint8_t *code, size_t code_len, MCInst *instr, uint16_t *size, uint64_t address, void *info)
value
const char * value
Definition:
hpack_parser_table.cc:165
MipsModule.h
Mips_insn_name
const char * Mips_insn_name(csh handle, unsigned int id)
cs_struct::insn_id
GetID_t insn_id
Definition:
cs_priv.h:61
cs_struct::group_name
GetName_t group_name
Definition:
cs_priv.h:60
cs_struct::reg_name
GetName_t reg_name
Definition:
cs_priv.h:58
handle
static csh handle
Definition:
test_arm_regression.c:16
CS_OPT_MODE
@ CS_OPT_MODE
Change engine's mode at run-time.
Definition:
capstone.h:173
capstone.CS_ERR_OPTION
CS_ERR_OPTION
Definition:
third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:243
MCRegisterInfo
Definition:
MCRegisterInfo.h:78
asyncio_get_stats.type
type
Definition:
asyncio_get_stats.py:37
Mips_init
void Mips_init(MCRegisterInfo *MRI)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:40