Rizin
unix-like reverse engineering framework and cli tools
propeller_disas.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2014 Fedor Sakharov <fedor.sakharov@gmail.com>
2
// SPDX-License-Identifier: LGPL-3.0-only
3
4
#ifndef PROPELLER_DISAS_H
5
#define PROPELLER_DISAS_H
6
7
#define PROP_INSTR_MAXLEN 32
8
9
enum
propeller_opcodes
{
10
PROP_ABS
= 0x2A,
11
PROP_ABSNEG
= 0x2B,
12
PROP_ADD
= 0x20,
13
PROP_ADDABS
= 0x22,
14
PROP_ADDS
= 0x34,
15
PROP_ADDSX
= 0x36,
16
PROP_ADDX
= 0x32,
17
PROP_AND
= 0x18,
18
PROP_ANDN
= 0x19,
19
PROP_CALL
= 0x17,
20
PROP_CMP
= 0x21,
21
PROP_CMPS
= 0x30,
22
PROP_CMPSUB
= 0x38,
23
PROP_CMPSX
= 0x31,
24
PROP_CMPX
= 0x33,
25
PROP_DJNZ
= 0x39,
26
PROP_HUBOP
= 0x03,
27
PROP_JMP
= 0x17,
28
PROP_JMPRET
= 0x17,
29
PROP_MAX
= 0x13,
30
PROP_MAXS
= 0x11,
31
PROP_MIN
= 0x12,
32
PROP_MINS
= 0x10,
33
PROP_MOV
= 0x28,
34
PROP_MOVD
= 0x15,
35
PROP_MOVI
= 0x16,
36
PROP_MOVS
= 0x14,
37
PROP_MUXC
= 0x1c,
38
PROP_MUXNC
= 0x1d,
39
PROP_MUXNZ
= 0x1f,
40
PROP_MUXZ
= 0x1e,
41
PROP_NEG
= 0x29,
42
PROP_NEGC
= 0x2c,
43
PROP_NEGNC
= 0x2d,
44
PROP_NEGNZ
= 0x2f,
45
PROP_NEGZ
= 0x2e,
46
PROP_NOP
= 0x00,
47
PROP_OR
= 0x1a,
48
PROP_RCL
= 0x0d,
49
PROP_RCR
= 0x0c,
50
PROP_RDBYTE
= 0x00,
51
PROP_RDLONG
= 0x02,
52
PROP_RDWORD
= 0x01,
53
PROP_RET
= 0x17,
54
PROP_REV
= 0x0f,
55
PROP_ROL
= 0x09,
56
PROP_ROR
= 0x08,
57
PROP_SAR
= 0x0e,
58
PROP_SHL
= 0x0b,
59
PROP_SHR
= 0x0a,
60
PROP_SUB
= 0x21,
61
PROP_SUBABS
= 0x23,
62
PROP_SUBS
= 0x35,
63
PROP_SUBSX
= 0x37,
64
PROP_SUBX
= 0x33,
65
PROP_SUMC
= 0x24,
66
PROP_SUMNC
= 0x25,
67
PROP_SUMNZ
= 0x27,
68
PROP_SUMZ
= 0x26,
69
PROP_TEST
= 0x18,
70
PROP_TESTN
= 0x19,
71
PROP_TJNZ
= 0x3a,
72
PROP_TJZ
= 0x3b,
73
PROP_WAITCNT
= 0x3e,
74
PROP_WAITPEQ
= 0x3c,
75
PROP_WAITPNE
= 0x3d,
76
PROP_WAITVID
= 0x3f,
77
PROP_WRBYTE
= 0x00,
78
PROP_WRLONG
= 0x02,
79
PROP_WRWORD
= 0x01,
80
PROP_XOR
= 0x1b,
81
};
82
83
enum
propeller_ext_opcodes
{
84
PROP_CLKSET
= 0x18,
85
PROP_COGID
= 0x19,
86
PROP_COGINIT
= 0x1a,
87
PROP_COGSTOP
= 0x1b,
88
PROP_LOCKCLR
= 0x1f,
89
PROP_LOCKNEW
= 0x1c,
90
PROP_LOCKRET
= 0x1d,
91
PROP_LOCKSET
= 0x1e,
92
};
93
94
enum
propeller_conditions
{
95
PROP_IF_ALWAYS
= 0xf,
96
PROP_IF_NEVER
= 0x0,
97
PROP_IF_E
= 0xa,
98
PROP_IF_NE
= 0x5,
99
PROP_IF_A
= 0x1,
100
PROP_IF_B
= 0xc,
101
PROP_IF_AE
= 0x3,
102
PROP_IF_BE
= 0xe,
103
PROP_IF_C_EQ_Z
= 0x9,
104
PROP_IF_C_NE_Z
= 0x6,
105
PROP_IF_C_AND_Z
= 0x8,
106
PROP_IF_C_AND_NZ
= 0x4,
107
PROP_IF_NC_AND_Z
= 0x2,
108
PROP_IF_NZ_OR_NC
= 0x7,
109
PROP_IF_NZ_OR_C
= 0xd,
110
PROP_IF_Z_OR_NC
= 0xb,
111
};
112
113
struct
propeller_cmd
{
114
unsigned
type
;
115
ut16
src
;
116
ut16
dst
;
117
ut16
opcode
;
118
ut8
immed
;
119
char
prefix
[16];
120
char
instr
[
PROP_INSTR_MAXLEN
];
121
char
operands
[
PROP_INSTR_MAXLEN
];
122
};
123
124
int
propeller_decode_command
(
const
ut8
*instr,
struct
propeller_cmd
*
cmd
);
125
#endif
/* PROPELLER_DISAS_H */
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
propeller_opcodes
propeller_opcodes
Definition:
propeller_disas.h:9
PROP_WAITPEQ
@ PROP_WAITPEQ
Definition:
propeller_disas.h:74
PROP_MOVS
@ PROP_MOVS
Definition:
propeller_disas.h:36
PROP_MOVD
@ PROP_MOVD
Definition:
propeller_disas.h:34
PROP_SUMNZ
@ PROP_SUMNZ
Definition:
propeller_disas.h:67
PROP_MIN
@ PROP_MIN
Definition:
propeller_disas.h:31
PROP_CALL
@ PROP_CALL
Definition:
propeller_disas.h:19
PROP_RDWORD
@ PROP_RDWORD
Definition:
propeller_disas.h:52
PROP_CMPSUB
@ PROP_CMPSUB
Definition:
propeller_disas.h:22
PROP_ANDN
@ PROP_ANDN
Definition:
propeller_disas.h:18
PROP_RCR
@ PROP_RCR
Definition:
propeller_disas.h:49
PROP_ADDX
@ PROP_ADDX
Definition:
propeller_disas.h:16
PROP_SUMNC
@ PROP_SUMNC
Definition:
propeller_disas.h:66
PROP_REV
@ PROP_REV
Definition:
propeller_disas.h:54
PROP_SUBX
@ PROP_SUBX
Definition:
propeller_disas.h:64
PROP_WRWORD
@ PROP_WRWORD
Definition:
propeller_disas.h:79
PROP_XOR
@ PROP_XOR
Definition:
propeller_disas.h:80
PROP_NEG
@ PROP_NEG
Definition:
propeller_disas.h:41
PROP_MOVI
@ PROP_MOVI
Definition:
propeller_disas.h:35
PROP_NEGZ
@ PROP_NEGZ
Definition:
propeller_disas.h:45
PROP_CMPX
@ PROP_CMPX
Definition:
propeller_disas.h:24
PROP_SHL
@ PROP_SHL
Definition:
propeller_disas.h:58
PROP_RDBYTE
@ PROP_RDBYTE
Definition:
propeller_disas.h:50
PROP_ADDSX
@ PROP_ADDSX
Definition:
propeller_disas.h:15
PROP_ABSNEG
@ PROP_ABSNEG
Definition:
propeller_disas.h:11
PROP_TJZ
@ PROP_TJZ
Definition:
propeller_disas.h:72
PROP_TJNZ
@ PROP_TJNZ
Definition:
propeller_disas.h:71
PROP_SHR
@ PROP_SHR
Definition:
propeller_disas.h:59
PROP_RCL
@ PROP_RCL
Definition:
propeller_disas.h:48
PROP_NEGC
@ PROP_NEGC
Definition:
propeller_disas.h:42
PROP_NEGNC
@ PROP_NEGNC
Definition:
propeller_disas.h:43
PROP_MUXC
@ PROP_MUXC
Definition:
propeller_disas.h:37
PROP_NEGNZ
@ PROP_NEGNZ
Definition:
propeller_disas.h:44
PROP_SUBABS
@ PROP_SUBABS
Definition:
propeller_disas.h:61
PROP_SAR
@ PROP_SAR
Definition:
propeller_disas.h:57
PROP_CMP
@ PROP_CMP
Definition:
propeller_disas.h:20
PROP_MUXZ
@ PROP_MUXZ
Definition:
propeller_disas.h:40
PROP_ROR
@ PROP_ROR
Definition:
propeller_disas.h:56
PROP_JMPRET
@ PROP_JMPRET
Definition:
propeller_disas.h:28
PROP_TEST
@ PROP_TEST
Definition:
propeller_disas.h:69
PROP_MAXS
@ PROP_MAXS
Definition:
propeller_disas.h:30
PROP_AND
@ PROP_AND
Definition:
propeller_disas.h:17
PROP_MINS
@ PROP_MINS
Definition:
propeller_disas.h:32
PROP_WAITPNE
@ PROP_WAITPNE
Definition:
propeller_disas.h:75
PROP_RDLONG
@ PROP_RDLONG
Definition:
propeller_disas.h:51
PROP_ADDABS
@ PROP_ADDABS
Definition:
propeller_disas.h:13
PROP_ADDS
@ PROP_ADDS
Definition:
propeller_disas.h:14
PROP_MOV
@ PROP_MOV
Definition:
propeller_disas.h:33
PROP_WAITCNT
@ PROP_WAITCNT
Definition:
propeller_disas.h:73
PROP_NOP
@ PROP_NOP
Definition:
propeller_disas.h:46
PROP_MUXNZ
@ PROP_MUXNZ
Definition:
propeller_disas.h:39
PROP_WRBYTE
@ PROP_WRBYTE
Definition:
propeller_disas.h:77
PROP_MUXNC
@ PROP_MUXNC
Definition:
propeller_disas.h:38
PROP_SUMZ
@ PROP_SUMZ
Definition:
propeller_disas.h:68
PROP_WRLONG
@ PROP_WRLONG
Definition:
propeller_disas.h:78
PROP_WAITVID
@ PROP_WAITVID
Definition:
propeller_disas.h:76
PROP_HUBOP
@ PROP_HUBOP
Definition:
propeller_disas.h:26
PROP_TESTN
@ PROP_TESTN
Definition:
propeller_disas.h:70
PROP_ADD
@ PROP_ADD
Definition:
propeller_disas.h:12
PROP_SUMC
@ PROP_SUMC
Definition:
propeller_disas.h:65
PROP_SUBS
@ PROP_SUBS
Definition:
propeller_disas.h:62
PROP_ROL
@ PROP_ROL
Definition:
propeller_disas.h:55
PROP_OR
@ PROP_OR
Definition:
propeller_disas.h:47
PROP_MAX
@ PROP_MAX
Definition:
propeller_disas.h:29
PROP_JMP
@ PROP_JMP
Definition:
propeller_disas.h:27
PROP_DJNZ
@ PROP_DJNZ
Definition:
propeller_disas.h:25
PROP_CMPS
@ PROP_CMPS
Definition:
propeller_disas.h:21
PROP_SUB
@ PROP_SUB
Definition:
propeller_disas.h:60
PROP_SUBSX
@ PROP_SUBSX
Definition:
propeller_disas.h:63
PROP_RET
@ PROP_RET
Definition:
propeller_disas.h:53
PROP_CMPSX
@ PROP_CMPSX
Definition:
propeller_disas.h:23
PROP_ABS
@ PROP_ABS
Definition:
propeller_disas.h:10
propeller_conditions
propeller_conditions
Definition:
propeller_disas.h:94
PROP_IF_BE
@ PROP_IF_BE
Definition:
propeller_disas.h:102
PROP_IF_B
@ PROP_IF_B
Definition:
propeller_disas.h:100
PROP_IF_C_NE_Z
@ PROP_IF_C_NE_Z
Definition:
propeller_disas.h:104
PROP_IF_NZ_OR_C
@ PROP_IF_NZ_OR_C
Definition:
propeller_disas.h:109
PROP_IF_ALWAYS
@ PROP_IF_ALWAYS
Definition:
propeller_disas.h:95
PROP_IF_E
@ PROP_IF_E
Definition:
propeller_disas.h:97
PROP_IF_AE
@ PROP_IF_AE
Definition:
propeller_disas.h:101
PROP_IF_C_AND_Z
@ PROP_IF_C_AND_Z
Definition:
propeller_disas.h:105
PROP_IF_C_AND_NZ
@ PROP_IF_C_AND_NZ
Definition:
propeller_disas.h:106
PROP_IF_Z_OR_NC
@ PROP_IF_Z_OR_NC
Definition:
propeller_disas.h:110
PROP_IF_NC_AND_Z
@ PROP_IF_NC_AND_Z
Definition:
propeller_disas.h:107
PROP_IF_C_EQ_Z
@ PROP_IF_C_EQ_Z
Definition:
propeller_disas.h:103
PROP_IF_NEVER
@ PROP_IF_NEVER
Definition:
propeller_disas.h:96
PROP_IF_NE
@ PROP_IF_NE
Definition:
propeller_disas.h:98
PROP_IF_NZ_OR_NC
@ PROP_IF_NZ_OR_NC
Definition:
propeller_disas.h:108
PROP_IF_A
@ PROP_IF_A
Definition:
propeller_disas.h:99
PROP_INSTR_MAXLEN
#define PROP_INSTR_MAXLEN
Definition:
propeller_disas.h:7
propeller_decode_command
int propeller_decode_command(const ut8 *instr, struct propeller_cmd *cmd)
Definition:
propeller_disas.c:205
propeller_ext_opcodes
propeller_ext_opcodes
Definition:
propeller_disas.h:83
PROP_LOCKNEW
@ PROP_LOCKNEW
Definition:
propeller_disas.h:89
PROP_CLKSET
@ PROP_CLKSET
Definition:
propeller_disas.h:84
PROP_COGSTOP
@ PROP_COGSTOP
Definition:
propeller_disas.h:87
PROP_LOCKRET
@ PROP_LOCKRET
Definition:
propeller_disas.h:90
PROP_LOCKSET
@ PROP_LOCKSET
Definition:
propeller_disas.h:91
PROP_COGINIT
@ PROP_COGINIT
Definition:
propeller_disas.h:86
PROP_LOCKCLR
@ PROP_LOCKCLR
Definition:
propeller_disas.h:88
PROP_COGID
@ PROP_COGID
Definition:
propeller_disas.h:85
operands
Definition:
analysis_or1k.c:9
propeller_cmd
Definition:
propeller_disas.h:113
propeller_cmd::prefix
char prefix[16]
Definition:
propeller_disas.h:119
propeller_cmd::dst
ut16 dst
Definition:
propeller_disas.h:116
propeller_cmd::type
unsigned type
Definition:
propeller_disas.h:114
propeller_cmd::src
ut16 src
Definition:
propeller_disas.h:115
propeller_cmd::instr
char instr[PROP_INSTR_MAXLEN]
Definition:
propeller_disas.h:120
propeller_cmd::opcode
ut16 opcode
Definition:
propeller_disas.h:117
propeller_cmd::immed
ut8 immed
Definition:
propeller_disas.h:118
librz
asm
arch
propeller
propeller_disas.h
Generated by
1.9.1