1
2 /*
3 FULLY TRUSTED
4 */
5
opTB(int reg)6 static UINT32 opTB(int reg) /* TRUSTED */
7 {
8 if (v60.reg[reg] == 0)
9 {
10 PC += (INT16)OpRead16(PC + 2);
11 return 0;
12 }
13
14 return 4;
15 }
16
opDBGT(int reg)17 static UINT32 opDBGT(int reg) /* TRUSTED */
18 {
19 v60.reg[reg]--;
20
21 NORMALIZEFLAGS();
22 if ((v60.reg[reg] != 0) && !((_S ^ _OV) | _Z))
23 {
24 PC += (INT16)OpRead16(PC + 2);
25 return 0;
26 }
27
28 return 4;
29 }
30
opDBLE(int reg)31 static UINT32 opDBLE(int reg) /* TRUSTED */
32 {
33 v60.reg[reg]--;
34
35 NORMALIZEFLAGS();
36 if ((v60.reg[reg] != 0) && ((_S ^ _OV) | _Z))
37 {
38 PC += (INT16)OpRead16(PC + 2);
39 return 0;
40 }
41
42 return 4;
43 }
44
45
opDBGE(int reg)46 static UINT32 opDBGE(int reg) /* TRUSTED */
47 {
48 v60.reg[reg]--;
49
50 NORMALIZEFLAGS();
51 if ((v60.reg[reg] != 0) && !(_S ^ _OV))
52 {
53 PC += (INT16)OpRead16(PC + 2);
54 return 0;
55 }
56
57 return 4;
58 }
59
opDBLT(int reg)60 static UINT32 opDBLT(int reg) /* TRUSTED */
61 {
62 v60.reg[reg]--;
63
64 NORMALIZEFLAGS();
65 if ((v60.reg[reg] != 0) && (_S ^ _OV))
66 {
67 PC += (INT16)OpRead16(PC + 2);
68 return 0;
69 }
70
71 return 4;
72 }
73
opDBH(int reg)74 static UINT32 opDBH(int reg) /* TRUSTED */
75 {
76 v60.reg[reg]--;
77
78 if ((v60.reg[reg] != 0) && !(_CY | _Z))
79 {
80 PC += (INT16)OpRead16(PC + 2);
81 return 0;
82 }
83
84 return 4;
85 }
86
opDBNH(int reg)87 static UINT32 opDBNH(int reg) /* TRUSTED */
88 {
89 v60.reg[reg]--;
90
91 if ((v60.reg[reg] != 0) && (_CY | _Z))
92 {
93 PC += (INT16)OpRead16(PC + 2);
94 return 0;
95 }
96
97 return 4;
98 }
99
100
opDBL(int reg)101 static UINT32 opDBL(int reg) /* TRUSTED */
102 {
103 v60.reg[reg]--;
104
105 if ((v60.reg[reg] != 0) && (_CY))
106 {
107 PC += (INT16)OpRead16(PC + 2);
108 return 0;
109 }
110
111 return 4;
112 }
113
opDBNL(int reg)114 static UINT32 opDBNL(int reg) /* TRUSTED */
115 {
116 v60.reg[reg]--;
117
118 if ((v60.reg[reg] != 0) && !(_CY))
119 {
120 PC += (INT16)OpRead16(PC + 2);
121 return 0;
122 }
123
124 return 4;
125 }
126
opDBE(int reg)127 static UINT32 opDBE(int reg) /* TRUSTED */
128 {
129 v60.reg[reg]--;
130
131 if ((v60.reg[reg] != 0) && (_Z))
132 {
133 PC += (INT16)OpRead16(PC + 2);
134 return 0;
135 }
136
137 return 4;
138 }
139
opDBNE(int reg)140 static UINT32 opDBNE(int reg) /* TRUSTED */
141 {
142 v60.reg[reg]--;
143
144 if ((v60.reg[reg] != 0) && !(_Z))
145 {
146 PC += (INT16)OpRead16(PC + 2);
147 return 0;
148 }
149
150 return 4;
151 }
152
opDBV(int reg)153 static UINT32 opDBV(int reg) /* TRUSTED */
154 {
155 v60.reg[reg]--;
156
157 if ((v60.reg[reg] != 0) && (_OV))
158 {
159 PC += (INT16)OpRead16(PC + 2);
160 return 0;
161 }
162
163 return 4;
164 }
165
opDBNV(int reg)166 static UINT32 opDBNV(int reg) /* TRUSTED */
167 {
168 v60.reg[reg]--;
169
170 if ((v60.reg[reg] != 0) && !(_OV))
171 {
172 PC += (INT16)OpRead16(PC + 2);
173 return 0;
174 }
175
176 return 4;
177 }
178
opDBN(int reg)179 static UINT32 opDBN(int reg) /* TRUSTED */
180 {
181 v60.reg[reg]--;
182
183 if ((v60.reg[reg] != 0) && (_S))
184 {
185 PC += (INT16)OpRead16(PC + 2);
186 return 0;
187 }
188
189 return 4;
190 }
191
opDBP(int reg)192 static UINT32 opDBP(int reg) /* TRUSTED */
193 {
194 v60.reg[reg]--;
195
196 if ((v60.reg[reg] != 0) && !(_S))
197 {
198 PC += (INT16)OpRead16(PC + 2);
199 return 0;
200 }
201
202 return 4;
203 }
204
opDBR(int reg)205 static UINT32 opDBR(int reg) /* TRUSTED */
206 {
207 v60.reg[reg]--;
208
209 if (v60.reg[reg] != 0)
210 {
211 PC += (INT16)OpRead16(PC + 2);
212 return 0;
213 }
214
215 return 4;
216 }
217
218 static UINT32 (*const OpC6Table[8])(int reg) = /* TRUSTED */
219 {
220 opDBV,
221 opDBL,
222 opDBE,
223 opDBNH,
224 opDBN,
225 opDBR,
226 opDBLT,
227 opDBLE
228 };
229
230 static UINT32 (*const OpC7Table[8])(int reg) = /* TRUSTED */
231 {
232 opDBNV,
233 opDBNL,
234 opDBNE,
235 opDBH,
236 opDBP,
237 opTB,
238 opDBGE,
239 opDBGT
240 };
241
242
opC6(void)243 static UINT32 opC6(void) /* TRUSTED */
244 {
245 UINT8 appb=OpRead8(PC + 1);
246 return OpC6Table[appb>>5](appb&0x1f);
247 }
248
opC7(void)249 static UINT32 opC7(void) /* TRUSTED */
250 {
251 UINT8 appb=OpRead8(PC + 1);
252 return OpC7Table[appb>>5](appb&0x1f);
253 }
254
255