Debian Codegraph @

mednafen/hw_cpu/v810/v810_opt.h

raw symbols SCIP
1 ///////////////////////////////////////////////////////////////cxx . . $ `<file>/mednafen/hw_cpu/v810/v810_opt.h`/
2 // File: v810_opt.h
3 //
4 // Description: Defines used in v810_dis.cpp
5 //
6
7 #ifndef V810_OPT_H_
8 #define V810_OPT_H_cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:8:9`!
9
10 #define sign_26cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:10:9`!(num) ((uint32)sign_x_to_s32cxx . . $ `mednafen/math_ops.h:35:9`!(26, num))
11 #define sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(num) ((uint32)(int16)(num))
12 #define sign_14cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:12:9`!(num) ((uint32)sign_x_to_s32(14, num))
13 #define sign_12cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:13:9`!(num) ((uint32)sign_x_to_s32(12, num))
14 #define sign_9cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:14:9`!(num) ((uint32)sign_x_to_s32cxx . . $ `mednafen/math_ops.h:35:9`!(9, num))
15 #define sign_8cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:15:9`!(_value) ((uint32)(int8)(_value))
16 #define sign_5cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:16:9`!(num) ((uint32)sign_x_to_s32cxx . . $ `mednafen/math_ops.h:35:9`!(5, num))
17
18 ///////////////////////////////////////////////////////////////////
19 // Define Modes
20 #define AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`! 0x01
21 #define AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`! 0x02
22 #define AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`! 0x03
23 #define AM_IVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:23:9`! 0x04
24 #define AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`! 0x05
25 #define AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`! 0x06 // Mode6 form1
26 #define AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`! 0x0A // Mode6 form2
27 #define AM_VIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:27:9`! 0x07
28 #define AM_VIIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:28:9`! 0x08
29 #define AM_IXcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:29:9`! 0x09
30 #define AM_BSTRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:30:9`! 0x0B // Bit String Instructions
31 #define AM_FPPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:31:9`! 0x0C // Floating Point Instructions
32 #define AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`! 0x0D // Unknown/Undefined Instructions
33
34 ///////////////////////////////////////////////////////////////////
35 // Table of Instructions Address Modes
36
37 static const int addr_modecxx . . $ addr_mode.[80] = {
38 AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!,
39 AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!, AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:20:9`!,
40 AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!,
41 AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IXcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:29:9`!, AM_IXcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:29:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:21:9`!, AM_BSTRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:30:9`!,
42 AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!,
43 AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`!, AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`!, AM_IVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:23:9`!, AM_IVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:23:9`!, AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`!, AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`!, AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`!, AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:24:9`!,
44 AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`!, AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`!, AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:32:9`!, AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`!,
45 AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:25:9`!, AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`!, AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`!, AM_FPPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:31:9`!, AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:26:9`!,
46 AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!,
47 AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!, AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:22:9`!
48 };
49 // All instructions greater than 0x50 are undefined (this should not be posible of cource)
50
51
52 ///////////////////////////////////////////////////////////////////
53 // Opcodes for V810 Instruction set
54 #define MOVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:54:17`! 0x00
55 #define ADDcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:55:17`! 0x01
56 #define SUBcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:56:17`! 0x02
57 #define CMPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:57:17`! 0x03
58 #define SHLcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:58:17`! 0x04
59 #define SHRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:59:17`! 0x05
60 #define JMPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:60:17`! 0x06
61 #define SARcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:61:17`! 0x07
62 #define MULcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:62:17`! 0x08
63 #define DIVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:63:17`! 0x09
64 #define MULUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:64:17`! 0x0A
65 #define DIVUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:65:17`! 0x0B
66 #define ORcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:66:17`! 0x0C
67 #define ANDcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:67:17`! 0x0D
68 #define XORcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:68:17`! 0x0E
69 #define NOTcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:69:17`! 0x0F
70 #define MOV_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:70:17`! 0x10
71 #define ADD_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:71:17`! 0x11
72 #define SETFcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:72:17`! 0x12
73 #define CMP_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:73:17`! 0x13
74 #define SHL_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:74:17`! 0x14
75 #define SHR_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:75:17`! 0x15
76 #define EIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:76:17`! 0x16
77 #define SAR_Icxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:77:17`! 0x17
78 #define TRAPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:78:17`! 0x18
79 #define RETIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:79:17`! 0x19
80 #define HALTcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:80:17`! 0x1A
81 //0x1B
82 #define LDSRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:82:17`! 0x1C
83 #define STSRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:83:17`! 0x1D
84 #define DIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:84:17`! 0x1E
85 #define BSTRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:85:17`! 0x1F //Special Bit String Inst
86 //0x20 - 0x27 // Lost to Branch Instructions
87 #define MOVEAcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:87:17`! 0x28
88 #define ADDIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:88:17`! 0x29
89 #define JRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:89:17`! 0x2A
90 #define JALcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:90:17`! 0x2B
91 #define ORIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:91:17`! 0x2C
92 #define ANDIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:92:17`! 0x2D
93 #define XORIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:93:17`! 0x2E
94 #define MOVHIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:94:17`! 0x2F
95 #define LD_Bcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:95:17`! 0x30
96 #define LD_Hcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:96:17`! 0x31
97 //0x32
98 #define LD_Wcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:98:17`! 0x33
99 #define ST_Bcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:99:17`! 0x34
100 #define ST_Hcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:100:17`! 0x35
101 //0x36
102 #define ST_Wcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:102:17`! 0x37
103 #define IN_Bcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:103:17`! 0x38
104 #define IN_Hcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:104:17`! 0x39
105 #define CAXIcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:105:17`! 0x3A
106 #define IN_Wcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:106:17`! 0x3B
107 #define OUT_Bcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:107:17`! 0x3C
108 #define OUT_Hcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:108:17`! 0x3D
109 #define FPPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:109:17`! 0x3E //Special Float Inst
110 #define OUT_Wcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:110:17`! 0x3F
111
112
113 // Branch Instructions ( Extended opcode only for Branch command)
114 // Common instrcutions commented out
115
116 #define BVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:116:17`! 0x40
117 #define BLcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:117:17`! 0x41
118 #define BEcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:118:17`! 0x42
119 #define BNHcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:119:17`! 0x43
120 #define BNcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:120:17`! 0x44
121 #define BRcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:121:17`! 0x45
122 #define BLTcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:122:17`! 0x46
123 #define BLEcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:123:17`! 0x47
124 #define BNVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:124:17`! 0x48
125 #define BNLcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:125:17`! 0x49
126 #define BNEcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:126:17`! 0x4A
127 #define BHcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:127:17`! 0x4B
128 #define BPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:128:17`! 0x4C
129 #define NOPcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:129:17`! 0x4D
130 #define BGEcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:130:17`! 0x4E
131 #define BGTcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:131:17`! 0x4F
132
133 //#define BC 0x41
134 //#define BZ 0x42
135 //#define BNC 0x49
136 //#define BNZ 0x4A
137
138 // Bit String Subopcodes
139 #define SCH0BSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:139:17`! 0x00
140 #define SCH0BSDcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:140:17`! 0x01
141 #define SCH1BSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:141:17`! 0x02
142 #define SCH1BSDcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:142:17`! 0x03
143
144 #define ORBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:144:17`! 0x08
145 #define ANDBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:145:17`! 0x09
146 #define XORBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:146:17`! 0x0A
147 #define MOVBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:147:17`! 0x0B
148 #define ORNBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:148:17`! 0x0C
149 #define ANDNBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:149:17`! 0x0D
150 #define XORNBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:150:17`! 0x0E
151 #define NOTBSUcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:151:17`! 0x0F
152
153
154 // Floating Point Subopcodes
155 #define CMPF_Scxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:155:17`! 0x00
156
157 #define CVT_WScxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:157:17`! 0x02
158 #define CVT_SWcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:158:17`! 0x03
159 #define ADDF_Scxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:159:17`! 0x04
160 #define SUBF_Scxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:160:17`! 0x05
161 #define MULF_Scxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:161:17`! 0x06
162 #define DIVF_Scxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:162:17`! 0x07
163 #define XBcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:163:17`! 0x08
164 #define XHcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:164:17`! 0x09
165 #define REVcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:165:17`! 0x0A
166 #define TRNC_SWcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:166:17`! 0x0B
167 #define MPYHWcxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:167:17`! 0x0C
168
169 #endif //DEFINE_H
170