Rizin
unix-like reverse engineering framework and cli tools
msp430_disas.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2014 Fedor Sakharov <fedor.sakharov@gmail.com>
2
// SPDX-FileCopyrightText: 2015 Mauro Matteo Cascella <mauromatteo.cascella@gmail.com>
3
// SPDX-FileCopyrightText: 2016 Mitchell Johnson <ehntoo@gmail.com>
4
// SPDX-FileCopyrightText: 2018 Neven Sajko <nsajko@gmail.com>
5
// SPDX-License-Identifier: LGPL-3.0-only
6
7
#ifndef MSP430_DISAS_H
8
#define MSP430_DISAS_H
9
10
enum
msp430_oneop_opcodes
{
11
MSP430_RRC
,
12
MSP430_SWPB
,
13
MSP430_RRA
,
14
MSP430_SXT
,
15
MSP430_PUSH
,
16
MSP430_CALL
,
17
MSP430_RETI
,
18
MSP430_UNUSED
,
19
};
20
21
enum
msp430_jumps
{
22
MSP430_JNE
,
23
MSP430_JEQ
,
24
MSP430_JNC
,
25
MSP430_JC
,
26
MSP430_JN
,
27
MSP430_JGE
,
28
MSP430_JL
,
29
MSP430_JMP
,
30
};
31
32
enum
msp430_twoop_opcodes
{
33
MSP430_JMP_OPC
= 0x1,
34
MSP430_MOV
= 0x4,
35
MSP430_ADD
,
36
MSP430_ADDC
,
37
MSP430_SUBC
,
38
MSP430_SUB
,
39
MSP430_CMP
,
40
MSP430_DADD
,
41
MSP430_BIT
,
42
MSP430_BIC
,
43
MSP430_BIS
,
44
MSP430_XOR
,
45
MSP430_AND
,
46
};
47
48
enum
msp430_addr_modes
{
49
MSP430_DIRECT
,
50
MSP430_INDEXED
,
51
MSP430_INDIRECT
,
52
MSP430_INDIRECT_INC
,
53
};
54
55
enum
msp430_cmd_type
{
56
MSP430_ONEOP
,
57
MSP430_TWOOP
,
58
MSP430_JUMP
,
59
MSP430_INV
,
60
};
61
62
enum
msp430_registers
{
63
MSP430_PC
,
64
MSP430_SP
,
65
MSP430_SR
,
66
MSP430_R3
,
67
MSP430_R4
,
68
MSP430_R5
,
69
MSP430_R6
,
70
MSP430_R7
,
71
MSP430_R8
,
72
MSP430_R9
,
73
MSP430_R10
,
74
MSP430_R11
,
75
MSP430_R12
,
76
MSP430_R13
,
77
MSP430_R14
,
78
MSP430_R15
,
79
};
80
81
struct
msp430_cmd
{
82
ut8
type
;
83
ut8
opcode
;
84
st16
jmp_addr
;
85
ut16
call_addr
;
86
ut8
jmp_cond
;
87
88
// Null-delimited string representation of an assembly operation mnemonic.
89
// Length of array: 'i', 'n', 'v', 'a', 'l', 'i', 'd', '\0'
90
// (This is longer than any real assembly mnemonic.)
91
char
instr
[7 + 1];
92
93
// Null-delimited string representation of assembly operands.
94
// Length of array: 2 * ('0', 'x', 4-digit hexadecimal numeral, '(', 'r', 2-digit
95
// decimal numeral, ')'), ',', ' ', '\0'
96
char
operands
[2 * (2 + 4 + 2 + 3) + 2 + 1];
97
};
98
99
int
msp430_decode_command
(
const
ut8
*instr,
int
len
,
struct
msp430_cmd
*
cmd
);
100
#endif
/* MSP430_DISAS_H */
len
size_t len
Definition:
6502dis.c:15
cmd
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
Definition:
sflib.h:79
ut16
uint16_t ut16
Definition:
demangler_util.h:30
ut8
uint8_t ut8
Definition:
lh5801.h:11
msp430_cmd_type
msp430_cmd_type
Definition:
msp430_disas.h:55
MSP430_JUMP
@ MSP430_JUMP
Definition:
msp430_disas.h:58
MSP430_INV
@ MSP430_INV
Definition:
msp430_disas.h:59
MSP430_TWOOP
@ MSP430_TWOOP
Definition:
msp430_disas.h:57
MSP430_ONEOP
@ MSP430_ONEOP
Definition:
msp430_disas.h:56
msp430_twoop_opcodes
msp430_twoop_opcodes
Definition:
msp430_disas.h:32
MSP430_SUBC
@ MSP430_SUBC
Definition:
msp430_disas.h:37
MSP430_MOV
@ MSP430_MOV
Definition:
msp430_disas.h:34
MSP430_CMP
@ MSP430_CMP
Definition:
msp430_disas.h:39
MSP430_BIC
@ MSP430_BIC
Definition:
msp430_disas.h:42
MSP430_XOR
@ MSP430_XOR
Definition:
msp430_disas.h:44
MSP430_SUB
@ MSP430_SUB
Definition:
msp430_disas.h:38
MSP430_DADD
@ MSP430_DADD
Definition:
msp430_disas.h:40
MSP430_BIS
@ MSP430_BIS
Definition:
msp430_disas.h:43
MSP430_ADD
@ MSP430_ADD
Definition:
msp430_disas.h:35
MSP430_BIT
@ MSP430_BIT
Definition:
msp430_disas.h:41
MSP430_AND
@ MSP430_AND
Definition:
msp430_disas.h:45
MSP430_JMP_OPC
@ MSP430_JMP_OPC
Definition:
msp430_disas.h:33
MSP430_ADDC
@ MSP430_ADDC
Definition:
msp430_disas.h:36
msp430_oneop_opcodes
msp430_oneop_opcodes
Definition:
msp430_disas.h:10
MSP430_RRA
@ MSP430_RRA
Definition:
msp430_disas.h:13
MSP430_SXT
@ MSP430_SXT
Definition:
msp430_disas.h:14
MSP430_RRC
@ MSP430_RRC
Definition:
msp430_disas.h:11
MSP430_PUSH
@ MSP430_PUSH
Definition:
msp430_disas.h:15
MSP430_UNUSED
@ MSP430_UNUSED
Definition:
msp430_disas.h:18
MSP430_CALL
@ MSP430_CALL
Definition:
msp430_disas.h:16
MSP430_RETI
@ MSP430_RETI
Definition:
msp430_disas.h:17
MSP430_SWPB
@ MSP430_SWPB
Definition:
msp430_disas.h:12
msp430_jumps
msp430_jumps
Definition:
msp430_disas.h:21
MSP430_JMP
@ MSP430_JMP
Definition:
msp430_disas.h:29
MSP430_JL
@ MSP430_JL
Definition:
msp430_disas.h:28
MSP430_JEQ
@ MSP430_JEQ
Definition:
msp430_disas.h:23
MSP430_JGE
@ MSP430_JGE
Definition:
msp430_disas.h:27
MSP430_JN
@ MSP430_JN
Definition:
msp430_disas.h:26
MSP430_JNE
@ MSP430_JNE
Definition:
msp430_disas.h:22
MSP430_JC
@ MSP430_JC
Definition:
msp430_disas.h:25
MSP430_JNC
@ MSP430_JNC
Definition:
msp430_disas.h:24
msp430_addr_modes
msp430_addr_modes
Definition:
msp430_disas.h:48
MSP430_INDIRECT
@ MSP430_INDIRECT
Definition:
msp430_disas.h:51
MSP430_INDIRECT_INC
@ MSP430_INDIRECT_INC
Definition:
msp430_disas.h:52
MSP430_INDEXED
@ MSP430_INDEXED
Definition:
msp430_disas.h:50
MSP430_DIRECT
@ MSP430_DIRECT
Definition:
msp430_disas.h:49
msp430_registers
msp430_registers
Definition:
msp430_disas.h:62
MSP430_SR
@ MSP430_SR
Definition:
msp430_disas.h:65
MSP430_R7
@ MSP430_R7
Definition:
msp430_disas.h:70
MSP430_R13
@ MSP430_R13
Definition:
msp430_disas.h:76
MSP430_R8
@ MSP430_R8
Definition:
msp430_disas.h:71
MSP430_R5
@ MSP430_R5
Definition:
msp430_disas.h:68
MSP430_R11
@ MSP430_R11
Definition:
msp430_disas.h:74
MSP430_SP
@ MSP430_SP
Definition:
msp430_disas.h:64
MSP430_R14
@ MSP430_R14
Definition:
msp430_disas.h:77
MSP430_R10
@ MSP430_R10
Definition:
msp430_disas.h:73
MSP430_R9
@ MSP430_R9
Definition:
msp430_disas.h:72
MSP430_R6
@ MSP430_R6
Definition:
msp430_disas.h:69
MSP430_R12
@ MSP430_R12
Definition:
msp430_disas.h:75
MSP430_PC
@ MSP430_PC
Definition:
msp430_disas.h:63
MSP430_R3
@ MSP430_R3
Definition:
msp430_disas.h:66
MSP430_R15
@ MSP430_R15
Definition:
msp430_disas.h:78
MSP430_R4
@ MSP430_R4
Definition:
msp430_disas.h:67
msp430_decode_command
int msp430_decode_command(const ut8 *instr, int len, struct msp430_cmd *cmd)
Definition:
msp430_disas.c:441
st16
#define st16
Definition:
rz_types_base.h:14
msp430_cmd
Definition:
msp430_disas.h:81
msp430_cmd::opcode
ut8 opcode
Definition:
msp430_disas.h:83
msp430_cmd::jmp_cond
ut8 jmp_cond
Definition:
msp430_disas.h:86
msp430_cmd::call_addr
ut16 call_addr
Definition:
msp430_disas.h:85
msp430_cmd::instr
char instr[7+1]
Definition:
msp430_disas.h:91
msp430_cmd::jmp_addr
st16 jmp_addr
Definition:
msp430_disas.h:84
msp430_cmd::type
ut8 type
Definition:
msp430_disas.h:82
operands
Definition:
analysis_or1k.c:9
librz
asm
arch
msp430
msp430_disas.h
Generated by
1.9.1