Debian Codegraph @

mednafen/hw_cpu/v810/v810_oploop.inc

raw symbols SCIP
1 /* V810 Emulator
2 *
3 * Copyright (C) 2006 David Tucker
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20
21 // Macro test taken from http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gcc.dg/20020919-1.c?view=markup&pathrev=142696
22 //#if defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) || defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
23 // register v810_timestamp_t timestamp_rl asm("15") = v810_timestamp;
24 //#elif defined(__x86_64__)
25 // register v810_timestamp_t timestamp_rl asm("r11") = v810_timestamp;
26 //#else
27 register v810_timestamp_tcxx . . $ v810_timestamp_t# timestamp_rl = v810_timestampcxx . . $ V810#v810_timestamp.;
28 //#endif
29
30 uint32cxx . . $ uint32# opcode;
31 uint32cxx . . $ uint32# tmp2;
32 int val = 0;
33
34
35 #define ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(__n) { timestamp += __n; }
36
37 #define CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!(); { if(Halted && timestamp < next_event_ts) { timestamp = next_event_ts; } }
38
39 while(Runningcxx . . $ V810#Running.)
40 {
41 #ifdef RB_DEBUGMODE
42 uint32 old_PC = RB_GETPC();
43 #endif
44 uint32cxx . . $ uint32# tmpop;
45
46 assertcxx . . $ `<external>/4398592474888995393/assert.h:102:11`!(timestamp_rl <= next_event_ts);
47
48 if(!IPendingCachecxx . . $ V810#IPendingCache.)
49 {
50 if(Haltedcxx . . $ V810#Halted.)
51 {
52 timestamp_rl = next_event_tscxx . . $ V810#next_event_ts.;
53 }
54 else if(in_bstrcxx . . $ V810#in_bstr.)
55 {
56 tmpop = in_bstr_tocxx . . $ V810#in_bstr_to.;
57 opcode = tmpop >> 9;
58 goto op_BSTR;
59 }
60 }
61
62 while(timestamp_rl < next_event_tscxx . . $ V810#next_event_ts.)
63 {
64 #ifdef RB_DEBUGMODE
65 old_PC = RB_GETPC();
66 #endif
67
68 P_REGcxx . . $ V810#P_REG.[0] = 0; //Zero the Zero Reg!!!
69
70 RB_CPUHOOKcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:674:10`!(RB_GETPC());
71
72 {
73 //printf("%08x\n", RB_GETPC());
74 {
75 v810_timestamp_tcxx . . $ v810_timestamp_t# timestamp = timestamp_rl;
76
77 tmpop = RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(0, 0);
78
79 timestamp_rl = timestamp;
80 }
81
82 opcode = (tmpop >> 9) | IPendingCachecxx . . $ V810#IPendingCache.;
83
84 //printf("%02x\n", opcode >> 1);
85
86 #ifdef _MSC_VER
87 #include "v810_op_table_msvc.inc"
88 #else
89 static const void *const op_goto_table[256] =
90 {
91 #include "v810_op_table.inc"cxx . . $ `<file>/mednafen/hw_cpu/v810/v810_op_table.inc`/
92 };
93
94 goto *op_goto_table[opcode];
95 #endif
96
97 // Bit string subopcodes
98 #define DO_AM_BSTRcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:98:17`!() \
99 const uint32 arg1 = (tmpop >> 5) & 0x1F; \
100 const uint32 arg2 = (tmpop & 0x1F); \
101 RB_INCPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:596:9`!();
102
103
104 #define DO_AM_FPPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:104:17`!() \
105 const uint32 arg1 = (tmpop >> 5) & 0x1F; \
106 const uint32 arg2 = (tmpop & 0x1F); \
107 const uint32 arg3 = ((RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(2) >> 10)&0x3F); \
108 RB_INCPCBY4cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:597:9`!();
109
110
111 #define DO_AM_UDEFcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:111:17`!() \
112 RB_INCPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:596:9`!();
113
114 #define DO_AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:114:17`!() \
115 const uint32 arg1 = tmpop & 0x1F; \
116 const uint32 arg2 = (tmpop >> 5) & 0x1F; \
117 RB_INCPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:596:9`!();
118
119 #define DO_AM_IIcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:119:10`!() DO_AM_Icxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:114:17`!();
120
121
122 #define DO_AM_IVcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:122:17`!() \
123 const uint32 arg1 = ((tmpop & 0x000003FF) << 16) | RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(2); \
124
125
126 #define DO_AM_Vcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:126:17`!() \
127 const uint32 arg3 = (tmpop >> 5) & 0x1F; \
128 const uint32 arg2 = tmpop & 0x1F; \
129 const uint32 arg1 = RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(2); \
130 RB_INCPCBY4cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:597:9`!();
131
132
133 #define DO_AM_VIacxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:133:17`!() \
134 const uint32 arg1 = RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(2); \
135 const uint32 arg2 = tmpop & 0x1F; \
136 const uint32 arg3 = (tmpop >> 5) & 0x1F; \
137 RB_INCPCBY4cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:597:9`!(); \
138
139
140 #define DO_AM_VIbcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:140:17`!() \
141 const uint32 arg1 = (tmpop >> 5) & 0x1F; \
142 const uint32 arg2 = RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(2); \
143 const uint32 arg3 = (tmpop & 0x1F); \
144 RB_INCPCBY4cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:597:9`!(); \
145
146 #define DO_AM_IXcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:146:17`!() \
147 const uint32 arg1 = (tmpop & 0x1); \
148 RB_INCPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:596:9`!(); \
149
150 #define DO_AM_IIIcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:150:17`!() \
151 const uint32 arg1 = tmpop & 0x1FE;
152
153 #include "v810_do_am.h"cxx . . $ `<file>/mednafen/hw_cpu/v810/v810_do_am.h`/
154
155 #define BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(meowtmpop) { op_##meowtmpop: v810_timestamp_t timestamp = timestamp_rl; DO_##meowtmpop ##_AM();
156 #define END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!() timestamp_rl = timestamp; goto OpFinished; }
157 #define END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!() timestamp_rl = timestamp; goto OpFinishedSkipLO; }
158
159 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(MOV);
160 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
161 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg1]);
162 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
163
164
165 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ADD);
166 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
167 uint32cxx . . $ uint32# temp = P_REGcxx . . $ V810#P_REG.[arg2] + P_REGcxx . . $ V810#P_REG.[arg1];
168
169 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg2]^(~P_REGcxx . . $ V810#P_REG.[arg1]))&(P_REGcxx . . $ V810#P_REG.[arg2]^temp))&0x80000000);
170 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, temp < P_REGcxx . . $ V810#P_REG.[arg2]);
171
172 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, temp);
173 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
174 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
175
176
177 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SUB);
178 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
179 uint32cxx . . $ uint32# temp = P_REGcxx . . $ V810#P_REG.[arg2] - P_REGcxx . . $ V810#P_REG.[arg1];
180
181 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg2]^P_REGcxx . . $ V810#P_REG.[arg1])&(P_REGcxx . . $ V810#P_REG.[arg2]^temp))&0x80000000);
182 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, temp > P_REGcxx . . $ V810#P_REG.[arg2]);
183
184 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, temp);
185 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
186 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
187
188
189 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(CMP);
190 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
191 uint32cxx . . $ uint32# temp = P_REGcxx . . $ V810#P_REG.[arg2] - P_REGcxx . . $ V810#P_REG.[arg1];
192
193 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(temp);
194 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg2]^P_REGcxx . . $ V810#P_REG.[arg1])&(P_REGcxx . . $ V810#P_REG.[arg2]^temp))&0x80000000);
195 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, temp > P_REGcxx . . $ V810#P_REG.[arg2]);
196 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
197
198
199 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SHL);
200 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
201 val = P_REGcxx . . $ V810#P_REG.[arg1] & 0x1F;
202
203 // set CY before we destroy the regisrer info....
204 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, (val != 0) && ((P_REGcxx . . $ V810#P_REG.[arg2] >> (32 - val))&0x01) );
205 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
206 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg2] << val);
207 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
208 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
209
210 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SHR);
211 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
212 val = P_REGcxx . . $ V810#P_REG.[arg1] & 0x1F;
213 // set CY before we destroy the regisrer info....
214 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, (val) && ((P_REGcxx . . $ V810#P_REG.[arg2] >> (val-1))&0x01));
215 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
216 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg2] >> val);
217 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
218 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
219
220 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(JMP);
221
222 (void)arg2; // arg2 is unused.
223
224 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
225 RB_SETPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:573:9`!((P_REG[arg1] & 0xFFFFFFFE));
226 if(RB_AccurateMode)
227 {
228 BRANCH_ALIGN_CHECKcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:285:9`!(PC);
229 }
230 RB_ADDBTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:673:10`!(old_PC, RB_GETPC(), 0);
231 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
232
233 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SAR);
234 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
235 val = P_REGcxx . . $ V810#P_REG.[arg1] & 0x1F;
236
237 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, (val) && ((P_REGcxx . . $ V810#P_REG.[arg2]>>(val-1))&0x01) );
238 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
239
240 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, (uint32) ((int32)P_REG[arg2] >> val));
241
242 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
243 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
244
245 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(OR);
246 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
247 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg1] | P_REG[arg2]);
248 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
249 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
250 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
251
252 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(AND);
253 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
254 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg1] & P_REG[arg2]);
255 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
256 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
257 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
258
259 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(XOR);
260 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
261 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg1] ^ P_REG[arg2]);
262 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
263 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
264 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
265
266 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(NOT);
267 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
268 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, ~P_REG[arg1]);
269 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
270 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
271 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
272
273 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(MOV_I);
274 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
275 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2,sign_5cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:16:9`!(arg1));
276 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
277
278 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ADD_I);
279 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
280 uint32cxx . . $ uint32# temp = P_REGcxx . . $ V810#P_REG.[arg2] + sign_5cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:16:9`!(arg1);
281
282 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg2]^(~sign_5cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:16:9`!(arg1)))&(P_REGcxx . . $ V810#P_REG.[arg2]^temp))&0x80000000);
283 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, (uint32cxx . . $ uint32#)temp < P_REGcxx . . $ V810#P_REG.[arg2]);
284
285 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, (uint32)temp);
286 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
287 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
288
289
290 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SETF);
291 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
292
293 P_REGcxx . . $ V810#P_REG.[arg2] = 0;
294
295 switch (arg1 & 0x0F)
296 {
297 case COND_Vcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:81:9`!:
298 if (TESTCOND_Vcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:98:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
299 break;
300 case COND_Ccxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:82:9`!:
301 if (TESTCOND_Ccxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:101:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
302 break;
303 case COND_Zcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:83:9`!:
304 if (TESTCOND_Zcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:104:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
305 break;
306 case COND_NHcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:84:9`!:
307 if (TESTCOND_NHcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:106:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
308 break;
309 case COND_Scxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:85:9`!:
310 if (TESTCOND_Scxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:108:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
311 break;
312 case COND_Tcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:86:9`!:
313 P_REGcxx . . $ V810#P_REG.[arg2] = 1;
314 break;
315 case COND_LTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:87:9`!:
316 if (TESTCOND_LTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:110:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
317 break;
318 case COND_LEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:88:9`!:
319 if (TESTCOND_LEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:111:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
320 break;
321 case COND_NVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:89:9`!:
322 if (TESTCOND_NVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:112:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
323 break;
324 case COND_NCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:90:9`!:
325 if (TESTCOND_NCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:115:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
326 break;
327 case COND_NZcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:91:9`!:
328 if (TESTCOND_NZcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:118:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
329 break;
330 case COND_Hcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:92:9`!:
331 if (TESTCOND_Hcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:120:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
332 break;
333 case COND_NScxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:93:9`!:
334 if (TESTCOND_NScxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:122:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
335 break;
336 case COND_Fcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:94:9`!:
337 //always false! do nothing more
338 break;
339 case COND_GEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:95:9`!:
340 if (TESTCOND_GEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:124:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
341 break;
342 case COND_GTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:96:9`!:
343 if (TESTCOND_GTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:125:9`!) P_REGcxx . . $ V810#P_REG.[arg2] = 1;
344 break;
345 }
346 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
347
348 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(CMP_I);
349 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
350 uint32cxx . . $ uint32# temp = P_REGcxx . . $ V810#P_REG.[arg2] - sign_5cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:16:9`!(arg1);
351
352 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(temp);
353 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg2]^(sign_5cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:16:9`!(arg1)))&(P_REGcxx . . $ V810#P_REG.[arg2]^temp))&0x80000000);
354 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, temp > P_REGcxx . . $ V810#P_REG.[arg2]);
355 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
356
357 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SHR_I);
358 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
359 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, arg1 && ((P_REGcxx . . $ V810#P_REG.[arg2] >> (arg1-1))&0x01) );
360 // set CY before we destroy the regisrer info....
361 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg2] >> arg1);
362 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
363 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
364 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
365
366 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SHL_I);
367 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
368 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, arg1 && ((P_REGcxx . . $ V810#P_REG.[arg2] >> (32 - arg1))&0x01) );
369 // set CY before we destroy the regisrer info....
370
371 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, P_REG[arg2] << arg1);
372 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
373 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
374 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
375
376 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(SAR_I);
377 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
378 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, arg1 && ((P_REGcxx . . $ V810#P_REG.[arg2]>>(arg1-1))&0x01) );
379
380 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, (uint32) ((int32)P_REG[arg2] >> arg1));
381
382 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
383 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
384 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
385
386 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(LDSR); // Loads a Sys Reg with the value in specified PR
387 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1); // ?
388
389 SetSREGcxx . . $ V810#SetSREG(89f8e5bd0b04bfaa).(timestamp, arg1 & 0x1F, P_REGcxx . . $ V810#P_REG.[arg2 & 0x1F]);
390 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
391
392 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(STSR); // Loads a PR with the value in specified Sys Reg
393 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1); // ?
394 P_REGcxx . . $ V810#P_REG.[arg2 & 0x1F] = GetSREGcxx . . $ V810#GetSREG(2141b656ce2cc063).(arg1 & 0x1F);
395 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
396
397 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(EI);
398 (void)arg1; // arg1 is unused.
399 (void)arg2; // arg2 is unused.
400
401 if(VBModecxx . . $ V810#VBMode.)
402 {
403 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
404 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] = S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] &~ PSW_IDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:65:9`!;
405 RecalcIPendingCachecxx . . $ V810#RecalcIPendingCache(49f6e7a06ebc5aa8).();
406 }
407 else
408 {
409 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
410 RB_DECPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:599:9`!();
411 Exceptioncxx . . $ V810#Exception(272d193675e92631).(INVALID_OP_HANDLER_ADDRcxx . . $ INVALID_OP_HANDLER_ADDR., ECODE_INVALID_OPcxx . . $ ECODE_INVALID_OP.);
412 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
413 }
414 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
415
416 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(DI);
417 (void)arg1; // arg1 is unused.
418 (void)arg2; // arg2 is unused.
419
420 if(VBModecxx . . $ V810#VBMode.)
421 {
422 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
423 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] |= PSW_IDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:65:9`!;
424 IPendingCachecxx . . $ V810#IPendingCache. = 0;
425 }
426 else
427 {
428 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
429 RB_DECPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:599:9`!();
430 Exceptioncxx . . $ V810#Exception(272d193675e92631).(INVALID_OP_HANDLER_ADDRcxx . . $ INVALID_OP_HANDLER_ADDR., ECODE_INVALID_OPcxx . . $ ECODE_INVALID_OP.);
431 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
432 }
433 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
434
435
436 #define COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(cond) \
437 if(cond) \
438 { \
439 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3); \
440 RB_PCRELCHANGEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:585:9`!(sign_9cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:14:9`!(arg1) & 0xFFFFFFFE); \
441 if(RB_AccurateMode) \
442 { \
443 BRANCH_ALIGN_CHECKcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:285:9`!(PC); \
444 } \
445 RB_ADDBTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:673:10`!(old_PC, RB_GETPC(), 0); \
446 } \
447 else \
448 { \
449 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1); \
450 RB_INCPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:596:9`!(); \
451 }
452
453 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BV);
454 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_Vcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:98:9`!);
455 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
456
457
458 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BL);
459 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_Lcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:100:9`!);
460 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
461
462 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BE);
463 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_Ecxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:103:9`!);
464 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
465
466 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BNH);
467 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_NHcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:106:9`!);
468 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
469
470 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BN);
471 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_Ncxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:107:9`!);
472 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
473
474 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BR);
475 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(true);
476 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
477
478 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BLT);
479 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_LTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:110:9`!);
480 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
481
482 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BLE);
483 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_LEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:111:9`!);
484 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
485
486 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BNV);
487 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_NVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:112:9`!);
488 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
489
490 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BNL);
491 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_NLcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:114:9`!);
492 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
493
494 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BNE);
495 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_NEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:117:9`!);
496 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
497
498 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BH);
499 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_Hcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:120:9`!);
500 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
501
502 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BP);
503 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_Pcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:121:9`!);
504 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
505
506 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BGE);
507 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_GEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:124:9`!);
508 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
509
510 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BGT);
511 COND_BRANCHcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:436:10`!(TESTCOND_GTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:125:9`!);
512 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
513
514 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(JR);
515 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
516 RB_PCRELCHANGEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:585:9`!(sign_26cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:10:9`!(arg1) & 0xFFFFFFFE);
517 if(RB_AccurateMode)
518 {
519 BRANCH_ALIGN_CHECKcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:285:9`!(PC);
520 }
521 RB_ADDBTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:673:10`!(old_PC, RB_GETPC(), 0);
522 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
523
524 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(JAL);
525 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
526 P_REGcxx . . $ V810#P_REG.[31] = RB_GETPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:661:9`!() + 4;
527 RB_PCRELCHANGEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:585:9`!(sign_26cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:10:9`!(arg1) & 0xFFFFFFFE);
528 if(RB_AccurateMode)
529 {
530 BRANCH_ALIGN_CHECKcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:285:9`!(PC);
531 }
532 RB_ADDBTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:673:10`!(old_PC, RB_GETPC(), 0);
533 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
534
535 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(MOVEA);
536 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
537 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, P_REG[arg2] + sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1));
538 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
539
540 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ADDI);
541 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
542 uint32cxx . . $ uint32# temp = P_REGcxx . . $ V810#P_REG.[arg2] + sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1);
543
544 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg2]^(~sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)))&(P_REGcxx . . $ V810#P_REG.[arg2]^temp))&0x80000000);
545 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, (uint32cxx . . $ uint32#)temp < P_REGcxx . . $ V810#P_REG.[arg2]);
546
547 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, (uint32)temp);
548 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg3]);
549 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
550
551 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ORI);
552 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
553 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, arg1 | P_REG[arg2]);
554 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
555 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg3]);
556 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
557
558 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ANDI);
559 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
560 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, (arg1 & P_REG[arg2]));
561 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
562 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg3]);
563 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
564
565 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(XORI);
566 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
567 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, arg1 ^ P_REG[arg2]);
568 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
569 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg3]);
570 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
571
572 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(MOVHI);
573 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
574 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, (arg1 << 16) + P_REG[arg2]);
575 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
576
577 // LD.B
578 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(LD_B);
579 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
580 tmp2 = (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)+P_REGcxx . . $ V810#P_REG.[arg2])&0xFFFFFFFF;
581
582 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, sign_8cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:15:9`!(MemRead8(timestamp, tmp2)));
583
584 //should be 3 clocks when executed alone, 2 when precedes another LD, or 1
585 //when precedes an instruction with many clocks (I'm guessing FP, MUL, DIV, etc)
586 if(lastopcxx . . $ V810#lastop. >= 0)
587 {
588 if(lastopcxx . . $ V810#lastop. == LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!)
589 {
590 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
591 }
592 else
593 {
594 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(2);
595 }
596 }
597 lastopcxx . . $ V810#lastop. = LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!;
598 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
599
600 // LD.H
601 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(LD_H);
602 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
603 tmp2 = (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)+P_REGcxx . . $ V810#P_REG.[arg2]) & 0xFFFFFFFE;
604 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(MemRead16(timestamp, tmp2)));
605
606 if(lastopcxx . . $ V810#lastop. >= 0)
607 {
608 if(lastopcxx . . $ V810#lastop. == LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!)
609 {
610 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
611 }
612 else
613 {
614 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(2);
615 }
616 }
617 lastopcxx . . $ V810#lastop. = LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!;
618 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
619
620
621 // LD.W
622 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(LD_W);
623 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
624
625 tmp2 = (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)+P_REGcxx . . $ V810#P_REG.[arg2]) & 0xFFFFFFFC;
626
627 if(MemReadBus32cxx . . $ V810#MemReadBus32.[tmp2 >> 24])
628 {
629 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, MemRead32(timestamp, tmp2));
630
631 if(lastopcxx . . $ V810#lastop. >= 0)
632 {
633 if(lastopcxx . . $ V810#lastop. == LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!)
634 {
635 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
636 }
637 else
638 {
639 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(2);
640 }
641 }
642 }
643 else
644 {
645 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, MemRead16(timestamp, tmp2) | (MemRead16(timestamp, tmp2 | 2) << 16));
646
647 if(lastopcxx . . $ V810#lastop. >= 0)
648 {
649 if(lastopcxx . . $ V810#lastop. == LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!)
650 {
651 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
652 }
653 else
654 {
655 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(4);
656 }
657 }
658 }
659 lastopcxx . . $ V810#lastop. = LASTOP_LDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:270:10`!;
660 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
661
662 // ST.B
663 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ST_B);
664 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
665 MemWrite8cxx . . $ V810#MemWrite8.(timestamp, sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3], P_REGcxx . . $ V810#P_REG.[arg1] & 0xFF);
666
667 if(lastopcxx . . $ V810#lastop. == LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!)
668 {
669 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
670 }
671 lastopcxx . . $ V810#lastop. = LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!;
672 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
673
674 // ST.H
675 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ST_H);
676 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
677
678 MemWrite16cxx . . $ V810#MemWrite16.(timestamp, (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3])&0xFFFFFFFE, P_REGcxx . . $ V810#P_REG.[arg1] & 0xFFFF);
679
680 if(lastopcxx . . $ V810#lastop. == LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!)
681 {
682 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
683 }
684 lastopcxx . . $ V810#lastop. = LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!;
685 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
686
687 // ST.W
688 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(ST_W);
689 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
690 tmp2 = (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3]) & 0xFFFFFFFC;
691
692 if(MemWriteBus32cxx . . $ V810#MemWriteBus32.[tmp2 >> 24])
693 {
694 MemWrite32cxx . . $ V810#MemWrite32.(timestamp, tmp2, P_REGcxx . . $ V810#P_REG.[arg1]);
695
696 if(lastopcxx . . $ V810#lastop. == LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!)
697 {
698 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
699 }
700 }
701 else
702 {
703 MemWrite16cxx . . $ V810#MemWrite16.(timestamp, tmp2, P_REGcxx . . $ V810#P_REG.[arg1] & 0xFFFF);
704 MemWrite16cxx . . $ V810#MemWrite16.(timestamp, tmp2 | 2, P_REGcxx . . $ V810#P_REG.[arg1] >> 16);
705
706 if(lastopcxx . . $ V810#lastop. == LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!)
707 {
708 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
709 }
710 }
711 lastopcxx . . $ V810#lastop. = LASTOP_STcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:271:10`!;
712 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
713
714 // IN.B
715 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(IN_B);
716 {
717 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
718 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, IORead8(timestamp, sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)+P_REG[arg2]));
719 }
720 lastopcxx . . $ V810#lastop. = LASTOP_INcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:272:10`!;
721 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
722
723
724 // IN.H
725 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(IN_H);
726 {
727 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
728 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, IORead16(timestamp, (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)+P_REG[arg2]) & 0xFFFFFFFE));
729 }
730 lastopcxx . . $ V810#lastop. = LASTOP_INcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:272:10`!;
731 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
732
733
734 // IN.W
735 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(IN_W);
736 if(IORead32cxx . . $ V810#IORead32.)
737 {
738 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
739 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, IORead32(timestamp, (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1)+P_REG[arg2]) & 0xFFFFFFFC));
740 }
741 else
742 {
743 uint32cxx . . $ uint32# eff_addr = (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1) + P_REGcxx . . $ V810#P_REG.[arg2]) & 0xFFFFFFFC;
744
745 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(5);
746 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg3, IORead16(timestamp, eff_addr) | ((IORead16(timestamp, eff_addr | 2) << 16)));
747 }
748 lastopcxx . . $ V810#lastop. = LASTOP_INcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:272:10`!;
749 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
750
751
752 // OUT.B
753 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(OUT_B);
754 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
755 IOWrite8cxx . . $ V810#IOWrite8.(timestamp, sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3],P_REGcxx . . $ V810#P_REG.[arg1]&0xFF);
756
757 if(lastopcxx . . $ V810#lastop. == LASTOP_OUTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:273:10`!)
758 {
759 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
760 }
761 lastopcxx . . $ V810#lastop. = LASTOP_OUTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:273:10`!;
762 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
763
764
765 // OUT.H
766 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(OUT_H);
767 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
768 IOWrite16cxx . . $ V810#IOWrite16.(timestamp, (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3])&0xFFFFFFFE,P_REGcxx . . $ V810#P_REG.[arg1]&0xFFFF);
769
770 if(lastopcxx . . $ V810#lastop. == LASTOP_OUTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:273:10`!)
771 {
772 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
773 }
774 lastopcxx . . $ V810#lastop. = LASTOP_OUTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:273:10`!;
775 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
776
777
778 // OUT.W
779 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(OUT_W);
780 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
781
782 if(IOWrite32cxx . . $ V810#IOWrite32.)
783 IOWrite32cxx . . $ V810#IOWrite32.(timestamp, (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3])&0xFFFFFFFC,P_REGcxx . . $ V810#P_REG.[arg1]);
784 else
785 {
786 uint32cxx . . $ uint32# eff_addr = (sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg2)+P_REGcxx . . $ V810#P_REG.[arg3])&0xFFFFFFFC;
787 IOWrite16cxx . . $ V810#IOWrite16.(timestamp, eff_addr, P_REGcxx . . $ V810#P_REG.[arg1] & 0xFFFF);
788 IOWrite16cxx . . $ V810#IOWrite16.(timestamp, eff_addr | 2, P_REGcxx . . $ V810#P_REG.[arg1] >> 16);
789 }
790
791 if(lastopcxx . . $ V810#lastop. == LASTOP_OUTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:273:10`!)
792 {
793 if(IOWrite32cxx . . $ V810#IOWrite32.)
794 {
795 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
796 }
797 else
798 {
799 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(3);
800 }
801 }
802 lastopcxx . . $ V810#lastop. = LASTOP_OUTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:273:10`!;
803 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
804
805 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(NOP);
806 (void)arg1; // arg1 is unused.
807
808 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
809 RB_INCPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:596:9`!();
810 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
811
812 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(RETI);
813 (void)arg1; // arg1 is unused.
814
815 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(10);
816
817 //Return from Trap/Interupt
818 if(S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] & PSW_NPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:60:9`!) { // Read the FE Reg
819 RB_SETPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:573:9`!(S_REG[FEPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:43:9`!] & 0xFFFFFFFE);
820 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] = S_REGcxx . . $ V810#S_REG.[FEPSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:44:9`!];
821 } else { //Read the EI Reg Interupt
822 RB_SETPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:573:9`!(S_REG[EIPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:40:9`!] & 0xFFFFFFFE);
823 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] = S_REGcxx . . $ V810#S_REG.[EIPSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:41:9`!];
824 }
825 RecalcIPendingCachecxx . . $ V810#RecalcIPendingCache(49f6e7a06ebc5aa8).();
826
827 RB_ADDBTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:673:10`!(old_PC, RB_GETPC(), 0);
828 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
829
830 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(MUL);
831 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(13);
832
833 uint64cxx . . $ uint64# temp = (int64cxx . . $ int64#)(int32cxx . . $ int32#)P_REGcxx . . $ V810#P_REG.[arg1] * (int32cxx . . $ int32#)P_REGcxx . . $ V810#P_REG.[arg2];
834
835 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(30, (uint32)(temp >> 32));
836 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, temp);
837 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
838 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, temp != (uint64cxx . . $ uint64#)(int64cxx . . $ int64#)(int32cxx . . $ int32#)(uint32cxx . . $ uint32#)temp);
839 lastopcxx . . $ V810#lastop. = -1;
840 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
841
842 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(MULU);
843 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(13);
844 uint64cxx . . $ uint64# temp = (uint64cxx . . $ uint64#)P_REGcxx . . $ V810#P_REG.[arg1] * (uint64cxx . . $ uint64#)P_REGcxx . . $ V810#P_REG.[arg2];
845
846 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(30, (uint32)(temp >> 32));
847 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, (uint32)temp);
848
849 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
850 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, temp != (uint32cxx . . $ uint32#)temp);
851 lastopcxx . . $ V810#lastop. = -1;
852 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
853
854 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(DIVU);
855 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(36);
856 if(P_REGcxx . . $ V810#P_REG.[arg1] == 0) // Divide by zero!
857 {
858 RB_DECPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:599:9`!();
859 Exceptioncxx . . $ V810#Exception(272d193675e92631).(ZERO_DIV_HANDLER_ADDRcxx . . $ ZERO_DIV_HANDLER_ADDR., ECODE_ZERO_DIVcxx . . $ ECODE_ZERO_DIV.);
860 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
861 }
862 else
863 {
864 // Careful here, since arg2 can be == 30
865 uint32cxx . . $ uint32# quotient = (uint32cxx . . $ uint32#)P_REGcxx . . $ V810#P_REG.[arg2] / (uint32cxx . . $ uint32#)P_REGcxx . . $ V810#P_REG.[arg1];
866 uint32cxx . . $ uint32# remainder = (uint32cxx . . $ uint32#)P_REGcxx . . $ V810#P_REG.[arg2] % (uint32cxx . . $ uint32#)P_REGcxx . . $ V810#P_REG.[arg1];
867
868 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(30, remainder);
869 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, quotient);
870
871 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
872 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(quotient);
873 }
874 lastopcxx . . $ V810#lastop. = -1;
875 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
876
877 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(DIV);
878 //if(P_REG[arg1] & P_REG[arg2] & 0x80000000)
879 //{
880 // printf("Div: %08x %08x\n", P_REG[arg1], P_REG[arg2]);
881 //}
882
883 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(38);
884 if((uint32cxx . . $ uint32#)P_REGcxx . . $ V810#P_REG.[arg1] == 0) // Divide by zero!
885 {
886 RB_DECPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:599:9`!();
887 Exceptioncxx . . $ V810#Exception(272d193675e92631).(ZERO_DIV_HANDLER_ADDRcxx . . $ ZERO_DIV_HANDLER_ADDR., ECODE_ZERO_DIVcxx . . $ ECODE_ZERO_DIV.);
888 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
889 }
890 else
891 {
892 if((P_REGcxx . . $ V810#P_REG.[arg2]==0x80000000)&&(P_REGcxx . . $ V810#P_REG.[arg1]==0xFFFFFFFF))
893 {
894 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, true);
895 P_REGcxx . . $ V810#P_REG.[30]=0;
896 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, 0x80000000);
897 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(P_REGcxx . . $ V810#P_REG.[arg2]);
898 }
899 else
900 {
901 // Careful here, since arg2 can be == 30
902 uint32cxx . . $ uint32# quotient = (int32cxx . . $ int32#)P_REGcxx . . $ V810#P_REG.[arg2] / (int32cxx . . $ int32#)P_REGcxx . . $ V810#P_REG.[arg1];
903 uint32cxx . . $ uint32# remainder = (int32cxx . . $ int32#)P_REGcxx . . $ V810#P_REG.[arg2] % (int32cxx . . $ int32#)P_REGcxx . . $ V810#P_REG.[arg1];
904
905 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(30, remainder);
906 SetPREGcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:497:9`!(arg2, quotient);
907
908 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, false);
909 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(quotient);
910 }
911 }
912 lastopcxx . . $ V810#lastop. = -1;
913 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
914
915 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(FPP);
916 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
917 fpu_subopcxx . . $ V810#fpu_subop(987d23217e21f876).(timestamp, arg3, arg1, arg2);
918 lastopcxx . . $ V810#lastop. = -1;
919 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
920 END_OP_SKIPLOcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:157:11`!();
921
922 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(BSTR);
923 if(!in_bstrcxx . . $ V810#in_bstr.)
924 {
925 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
926 }
927
928 if(bstr_subopcxx . . $ V810#bstr_subop(b52c1fabab6edf50).(timestamp, arg2, arg1))
929 {
930 RB_DECPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:599:9`!();
931 in_bstrcxx . . $ V810#in_bstr. = true;
932 in_bstr_tocxx . . $ V810#in_bstr_to. = tmpop;
933 }
934 else
935 {
936 in_bstrcxx . . $ V810#in_bstr. = false;
937 have_src_cachecxx . . $ V810#have_src_cache. = have_dst_cachecxx . . $ V810#have_dst_cache. = false;
938 }
939 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
940
941 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(HALT);
942 (void)arg1; // arg1 is unused.
943
944 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
945 Haltedcxx . . $ V810#Halted. = HALT_HALTcxx . . $ V810#HALT_HALT.;
946 //printf("Untested opcode: HALT\n");
947 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
948
949 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(TRAP);
950 (void)arg2; // arg2 is unused.
951
952 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(15);
953
954 Exceptioncxx . . $ V810#Exception(272d193675e92631).(TRAP_HANDLER_BASEcxx . . $ TRAP_HANDLER_BASE. + (arg1 & 0x10), ECODE_TRAP_BASEcxx . . $ ECODE_TRAP_BASE. + (arg1 & 0x1F));
955 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
956 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
957
958 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(CAXI);
959 //printf("Untested opcode: caxi\n");
960
961 // Lock bus(N/A)
962
963 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(26);
964
965 {
966 uint32cxx . . $ uint32# addr, tmp, compare_temp;
967 uint32cxx . . $ uint32# to_write;
968
969 addr = sign_16cxx . . $ `mednafen/hw_cpu/v810/v810_opt.h:11:9`!(arg1) + P_REGcxx . . $ V810#P_REG.[arg2];
970 addr &= ~3;
971
972 if(MemReadBus32cxx . . $ V810#MemReadBus32.[addr >> 24])
973 tmp = MemRead32cxx . . $ V810#MemRead32.(timestamp, addr);
974 else
975 tmp = MemRead16cxx . . $ V810#MemRead16.(timestamp, addr) | (MemRead16cxx . . $ V810#MemRead16.(timestamp, addr | 2) << 16);
976
977 compare_temp = P_REGcxx . . $ V810#P_REG.[arg3] - tmp;
978
979 SetSZcxx . . $ V810#SetSZ(cb2f890c2fdad230).(compare_temp);
980 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_OVcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:76:9`!, ((P_REGcxx . . $ V810#P_REG.[arg3]^tmp)&(P_REGcxx . . $ V810#P_REG.[arg3]^compare_temp))&0x80000000);
981 SetFlagcxx . . $ V810#SetFlag(ee2069353d7cc01f).(PSW_CYcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:75:9`!, compare_temp > P_REGcxx . . $ V810#P_REG.[arg3]);
982
983 if(!compare_temp) // If they're equal...
984 to_write = P_REGcxx . . $ V810#P_REG.[30];
985 else
986 to_write = tmp;
987
988 if(MemWriteBus32cxx . . $ V810#MemWriteBus32.[addr >> 24])
989 MemWrite32cxx . . $ V810#MemWrite32.(timestamp, addr, to_write);
990 else
991 {
992 MemWrite16cxx . . $ V810#MemWrite16.(timestamp, addr, to_write & 0xFFFF);
993 MemWrite16cxx . . $ V810#MemWrite16.(timestamp, addr | 2, to_write >> 16);
994 }
995 P_REGcxx . . $ V810#P_REG.[arg3] = tmp;
996 }
997
998 // Unlock bus(N/A)
999
1000 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
1001
1002
1003
1004 op_INT_HANDLER:
1005 {
1006 int iNum = ilevelcxx . . $ V810#ilevel.;
1007
1008 S_REGcxx . . $ V810#S_REG.[EIPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:40:9`!] = GetPCcxx . . $ V810#GetPC(db52760e79bf9054).();
1009 S_REGcxx . . $ V810#S_REG.[EIPSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:41:9`!] = S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!];
1010
1011 SetPCcxx . . $ V810#SetPC(cb2f890c2fdad230).(0xFFFFFE00 | (iNum << 4));
1012
1013 RB_ADDBTcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:673:10`!(old_PC, RB_GETPC(), 0xFE00 | (iNum << 4));
1014
1015 S_REGcxx . . $ V810#S_REG.[ECRcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:46:9`!] = 0xFE00 | (iNum << 4);
1016
1017 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] |= PSW_EPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:61:9`!;
1018 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] |= PSW_IDcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:65:9`!;
1019 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] &= ~PSW_AEcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:63:9`!;
1020
1021 // Now, set need to set the interrupt enable level to he level that is being processed + 1,
1022 // saturating at 15.
1023 iNum++;
1024
1025 if(iNum > 0x0F)
1026 iNum = 0x0F;
1027
1028 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] &= ~PSW_IAcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:54:9`!;
1029 S_REGcxx . . $ V810#S_REG.[PSWcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.h:47:9`!] |= iNum << 16;
1030
1031 // Accepting an interrupt takes us out of normal HALT status, of course!
1032 Haltedcxx . . $ V810#Halted. = HALT_NONEcxx . . $ V810#HALT_NONE.;
1033
1034 // Invalidate our bitstring state(forces the instruction to be re-read, and the r/w buffers reloaded).
1035 in_bstrcxx . . $ V810#in_bstr. = false;
1036 have_src_cachecxx . . $ V810#have_src_cache. = false;
1037 have_dst_cachecxx . . $ V810#have_dst_cache. = false;
1038
1039 IPendingCachecxx . . $ V810#IPendingCache. = 0;
1040
1041 goto OpFinished;
1042 }
1043
1044
1045 BEGIN_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:155:11`!(INVALID);
1046 RB_DECPCBY2cxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:599:9`!();
1047 if(!RB_AccurateMode)
1048 {
1049 RB_SETPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:573:9`!(RB_GETPCcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:661:9`!());
1050 if((uint32cxx . . $ uint32#)(RB_RDOPcxx . . $ `mednafen/hw_cpu/v810/v810_cpu.cpp:666:9`!(0, 0) >> 9) != opcode)
1051 {
1052 //printf("Trampoline: %08x %02x\n", RB_GETPC(), opcode >> 1);
1053 }
1054 else
1055 {
1056 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
1057 Exceptioncxx . . $ V810#Exception(272d193675e92631).(INVALID_OP_HANDLER_ADDRcxx . . $ INVALID_OP_HANDLER_ADDR., ECODE_INVALID_OPcxx . . $ ECODE_INVALID_OP.);
1058 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
1059 }
1060 }
1061 else
1062 {
1063 ADDCLOCKcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:35:13`!(1);
1064 Exceptioncxx . . $ V810#Exception(272d193675e92631).(INVALID_OP_HANDLER_ADDRcxx . . $ INVALID_OP_HANDLER_ADDR., ECODE_INVALID_OPcxx . . $ ECODE_INVALID_OP.);
1065 CHECK_HALTEDcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:37:13`!();
1066 }
1067 END_OPcxx . . $ `mednafen/hw_cpu/v810/v810_oploop.inc:156:11`!();
1068
1069 }
1070
1071 OpFinished: ;
1072 lastopcxx . . $ V810#lastop. = opcode;
1073 OpFinishedSkipLO: ;
1074 } // end while(timestamp_rl < next_event_ts)
1075 next_event_tscxx . . $ V810#next_event_ts. = event_handler(timestamp_rl);
1076 //printf("Next: %d, Cur: %d\n", next_event_ts, timestamp);
1077 }
1078
1079 v810_timestampcxx . . $ V810#v810_timestamp. = timestamp_rl;