root / target-ppc / op.c @ 86cc1ce0
History | View | Annotate | Download (45.1 kB)
1 | 79aceca5 | bellard | /*
|
---|---|---|---|
2 | 3fc6c082 | bellard | * PowerPC emulation micro-operations for qemu.
|
3 | 79aceca5 | bellard | *
|
4 | 76a66253 | j_mayer | * Copyright (c) 2003-2007 Jocelyn Mayer
|
5 | 79aceca5 | bellard | *
|
6 | 79aceca5 | bellard | * This library is free software; you can redistribute it and/or
|
7 | 79aceca5 | bellard | * modify it under the terms of the GNU Lesser General Public
|
8 | 79aceca5 | bellard | * License as published by the Free Software Foundation; either
|
9 | 79aceca5 | bellard | * version 2 of the License, or (at your option) any later version.
|
10 | 79aceca5 | bellard | *
|
11 | 79aceca5 | bellard | * This library is distributed in the hope that it will be useful,
|
12 | 79aceca5 | bellard | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 79aceca5 | bellard | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 79aceca5 | bellard | * Lesser General Public License for more details.
|
15 | 79aceca5 | bellard | *
|
16 | 79aceca5 | bellard | * You should have received a copy of the GNU Lesser General Public
|
17 | 79aceca5 | bellard | * License along with this library; if not, write to the Free Software
|
18 | 79aceca5 | bellard | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19 | 79aceca5 | bellard | */
|
20 | 79aceca5 | bellard | |
21 | a541f297 | bellard | //#define DEBUG_OP
|
22 | a541f297 | bellard | |
23 | 79aceca5 | bellard | #include "config.h" |
24 | 79aceca5 | bellard | #include "exec.h" |
25 | 76a66253 | j_mayer | #include "op_helper.h" |
26 | 79aceca5 | bellard | |
27 | 76a66253 | j_mayer | /* XXX: this is to be suppressed */
|
28 | 79aceca5 | bellard | #define regs (env)
|
29 | 79aceca5 | bellard | |
30 | 28b6751f | bellard | #define FT0 (env->ft0)
|
31 | fb0eaffc | bellard | #define FT1 (env->ft1)
|
32 | fb0eaffc | bellard | #define FT2 (env->ft2)
|
33 | fb0eaffc | bellard | |
34 | 76a66253 | j_mayer | /* XXX: this is to be suppressed... */
|
35 | 76a66253 | j_mayer | #define PPC_OP(name) void OPPROTO glue(op_, name)(void) |
36 | 79aceca5 | bellard | |
37 | 28b6751f | bellard | #define REG 0 |
38 | 28b6751f | bellard | #include "op_template.h" |
39 | 28b6751f | bellard | |
40 | 28b6751f | bellard | #define REG 1 |
41 | 28b6751f | bellard | #include "op_template.h" |
42 | 28b6751f | bellard | |
43 | 28b6751f | bellard | #define REG 2 |
44 | 28b6751f | bellard | #include "op_template.h" |
45 | 28b6751f | bellard | |
46 | 28b6751f | bellard | #define REG 3 |
47 | 28b6751f | bellard | #include "op_template.h" |
48 | 28b6751f | bellard | |
49 | 28b6751f | bellard | #define REG 4 |
50 | 28b6751f | bellard | #include "op_template.h" |
51 | 28b6751f | bellard | |
52 | 28b6751f | bellard | #define REG 5 |
53 | 28b6751f | bellard | #include "op_template.h" |
54 | 28b6751f | bellard | |
55 | 28b6751f | bellard | #define REG 6 |
56 | 28b6751f | bellard | #include "op_template.h" |
57 | 28b6751f | bellard | |
58 | 28b6751f | bellard | #define REG 7 |
59 | 28b6751f | bellard | #include "op_template.h" |
60 | 28b6751f | bellard | |
61 | 28b6751f | bellard | #define REG 8 |
62 | 28b6751f | bellard | #include "op_template.h" |
63 | 28b6751f | bellard | |
64 | 28b6751f | bellard | #define REG 9 |
65 | 28b6751f | bellard | #include "op_template.h" |
66 | 28b6751f | bellard | |
67 | 28b6751f | bellard | #define REG 10 |
68 | 28b6751f | bellard | #include "op_template.h" |
69 | 28b6751f | bellard | |
70 | 28b6751f | bellard | #define REG 11 |
71 | 28b6751f | bellard | #include "op_template.h" |
72 | 28b6751f | bellard | |
73 | 28b6751f | bellard | #define REG 12 |
74 | 28b6751f | bellard | #include "op_template.h" |
75 | 28b6751f | bellard | |
76 | 28b6751f | bellard | #define REG 13 |
77 | 28b6751f | bellard | #include "op_template.h" |
78 | 28b6751f | bellard | |
79 | 28b6751f | bellard | #define REG 14 |
80 | 28b6751f | bellard | #include "op_template.h" |
81 | 28b6751f | bellard | |
82 | 28b6751f | bellard | #define REG 15 |
83 | 28b6751f | bellard | #include "op_template.h" |
84 | 28b6751f | bellard | |
85 | 28b6751f | bellard | #define REG 16 |
86 | 28b6751f | bellard | #include "op_template.h" |
87 | 28b6751f | bellard | |
88 | 28b6751f | bellard | #define REG 17 |
89 | 28b6751f | bellard | #include "op_template.h" |
90 | 28b6751f | bellard | |
91 | 28b6751f | bellard | #define REG 18 |
92 | 28b6751f | bellard | #include "op_template.h" |
93 | 28b6751f | bellard | |
94 | 28b6751f | bellard | #define REG 19 |
95 | 28b6751f | bellard | #include "op_template.h" |
96 | 28b6751f | bellard | |
97 | 28b6751f | bellard | #define REG 20 |
98 | 28b6751f | bellard | #include "op_template.h" |
99 | 28b6751f | bellard | |
100 | 28b6751f | bellard | #define REG 21 |
101 | 28b6751f | bellard | #include "op_template.h" |
102 | 28b6751f | bellard | |
103 | 28b6751f | bellard | #define REG 22 |
104 | 28b6751f | bellard | #include "op_template.h" |
105 | 28b6751f | bellard | |
106 | 28b6751f | bellard | #define REG 23 |
107 | 28b6751f | bellard | #include "op_template.h" |
108 | 28b6751f | bellard | |
109 | 28b6751f | bellard | #define REG 24 |
110 | 28b6751f | bellard | #include "op_template.h" |
111 | 28b6751f | bellard | |
112 | 28b6751f | bellard | #define REG 25 |
113 | 28b6751f | bellard | #include "op_template.h" |
114 | 28b6751f | bellard | |
115 | 28b6751f | bellard | #define REG 26 |
116 | 28b6751f | bellard | #include "op_template.h" |
117 | 28b6751f | bellard | |
118 | 28b6751f | bellard | #define REG 27 |
119 | 28b6751f | bellard | #include "op_template.h" |
120 | 28b6751f | bellard | |
121 | 28b6751f | bellard | #define REG 28 |
122 | 28b6751f | bellard | #include "op_template.h" |
123 | 28b6751f | bellard | |
124 | 28b6751f | bellard | #define REG 29 |
125 | 28b6751f | bellard | #include "op_template.h" |
126 | 28b6751f | bellard | |
127 | 28b6751f | bellard | #define REG 30 |
128 | 28b6751f | bellard | #include "op_template.h" |
129 | 28b6751f | bellard | |
130 | 28b6751f | bellard | #define REG 31 |
131 | 28b6751f | bellard | #include "op_template.h" |
132 | 28b6751f | bellard | |
133 | 3fc6c082 | bellard | /* PowerPC state maintenance operations */
|
134 | 79aceca5 | bellard | /* set_Rc0 */
|
135 | 79aceca5 | bellard | PPC_OP(set_Rc0) |
136 | 79aceca5 | bellard | { |
137 | 76a66253 | j_mayer | env->crf[0] = T0 | xer_ov;
|
138 | 79aceca5 | bellard | RETURN(); |
139 | 79aceca5 | bellard | } |
140 | 79aceca5 | bellard | |
141 | fb0eaffc | bellard | /* Set Rc1 (for floating point arithmetic) */
|
142 | fb0eaffc | bellard | PPC_OP(set_Rc1) |
143 | fb0eaffc | bellard | { |
144 | fb0eaffc | bellard | env->crf[1] = regs->fpscr[7]; |
145 | fb0eaffc | bellard | RETURN(); |
146 | fb0eaffc | bellard | } |
147 | fb0eaffc | bellard | |
148 | 9a64fbe4 | bellard | /* Constants load */
|
149 | 76a66253 | j_mayer | void OPPROTO op_reset_T0 (void) |
150 | 76a66253 | j_mayer | { |
151 | 76a66253 | j_mayer | T0 = 0;
|
152 | 76a66253 | j_mayer | RETURN(); |
153 | 76a66253 | j_mayer | } |
154 | 76a66253 | j_mayer | |
155 | 79aceca5 | bellard | PPC_OP(set_T0) |
156 | 79aceca5 | bellard | { |
157 | d9bce9d9 | j_mayer | T0 = (uint32_t)PARAM1; |
158 | 79aceca5 | bellard | RETURN(); |
159 | 79aceca5 | bellard | } |
160 | 79aceca5 | bellard | |
161 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
162 | d9bce9d9 | j_mayer | void OPPROTO op_set_T0_64 (void) |
163 | d9bce9d9 | j_mayer | { |
164 | d9bce9d9 | j_mayer | T0 = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
|
165 | d9bce9d9 | j_mayer | RETURN(); |
166 | d9bce9d9 | j_mayer | } |
167 | d9bce9d9 | j_mayer | #endif
|
168 | d9bce9d9 | j_mayer | |
169 | 79aceca5 | bellard | PPC_OP(set_T1) |
170 | 79aceca5 | bellard | { |
171 | d9bce9d9 | j_mayer | T1 = (uint32_t)PARAM1; |
172 | d9bce9d9 | j_mayer | RETURN(); |
173 | d9bce9d9 | j_mayer | } |
174 | d9bce9d9 | j_mayer | |
175 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
176 | d9bce9d9 | j_mayer | void OPPROTO op_set_T1_64 (void) |
177 | d9bce9d9 | j_mayer | { |
178 | d9bce9d9 | j_mayer | T1 = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
|
179 | 79aceca5 | bellard | RETURN(); |
180 | 79aceca5 | bellard | } |
181 | d9bce9d9 | j_mayer | #endif
|
182 | 79aceca5 | bellard | |
183 | 76a66253 | j_mayer | #if 0 // unused
|
184 | 79aceca5 | bellard | PPC_OP(set_T2)
|
185 | 79aceca5 | bellard | {
|
186 | 79aceca5 | bellard | T2 = PARAM(1);
|
187 | 79aceca5 | bellard | RETURN();
|
188 | 79aceca5 | bellard | }
|
189 | 76a66253 | j_mayer | #endif
|
190 | 79aceca5 | bellard | |
191 | 76a66253 | j_mayer | void OPPROTO op_move_T1_T0 (void) |
192 | 79aceca5 | bellard | { |
193 | 76a66253 | j_mayer | T1 = T0; |
194 | 76a66253 | j_mayer | RETURN(); |
195 | 9a64fbe4 | bellard | } |
196 | 9a64fbe4 | bellard | |
197 | d9bce9d9 | j_mayer | void OPPROTO op_move_T2_T0 (void) |
198 | d9bce9d9 | j_mayer | { |
199 | d9bce9d9 | j_mayer | T2 = T0; |
200 | d9bce9d9 | j_mayer | RETURN(); |
201 | d9bce9d9 | j_mayer | } |
202 | d9bce9d9 | j_mayer | |
203 | 76a66253 | j_mayer | /* Generate exceptions */
|
204 | 76a66253 | j_mayer | PPC_OP(raise_exception_err) |
205 | 9a64fbe4 | bellard | { |
206 | 76a66253 | j_mayer | do_raise_exception_err(PARAM(1), PARAM(2)); |
207 | 9a64fbe4 | bellard | } |
208 | 9a64fbe4 | bellard | |
209 | 9fddaa0c | bellard | PPC_OP(update_nip) |
210 | 9a64fbe4 | bellard | { |
211 | d9bce9d9 | j_mayer | env->nip = (uint32_t)PARAM1; |
212 | 76a66253 | j_mayer | RETURN(); |
213 | 9a64fbe4 | bellard | } |
214 | 9a64fbe4 | bellard | |
215 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
216 | d9bce9d9 | j_mayer | void OPPROTO op_update_nip_64 (void) |
217 | d9bce9d9 | j_mayer | { |
218 | d9bce9d9 | j_mayer | env->nip = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
|
219 | d9bce9d9 | j_mayer | RETURN(); |
220 | d9bce9d9 | j_mayer | } |
221 | d9bce9d9 | j_mayer | #endif
|
222 | d9bce9d9 | j_mayer | |
223 | ea4e754f | bellard | PPC_OP(debug) |
224 | ea4e754f | bellard | { |
225 | ea4e754f | bellard | do_raise_exception(EXCP_DEBUG); |
226 | ea4e754f | bellard | } |
227 | ea4e754f | bellard | |
228 | 76a66253 | j_mayer | PPC_OP(exit_tb) |
229 | 9a64fbe4 | bellard | { |
230 | 76a66253 | j_mayer | EXIT_TB(); |
231 | 9a64fbe4 | bellard | } |
232 | 9a64fbe4 | bellard | |
233 | 76a66253 | j_mayer | /* Load/store special registers */
|
234 | 76a66253 | j_mayer | PPC_OP(load_cr) |
235 | 9a64fbe4 | bellard | { |
236 | 76a66253 | j_mayer | do_load_cr(); |
237 | 79aceca5 | bellard | RETURN(); |
238 | 79aceca5 | bellard | } |
239 | 79aceca5 | bellard | |
240 | 76a66253 | j_mayer | PPC_OP(store_cr) |
241 | 79aceca5 | bellard | { |
242 | 76a66253 | j_mayer | do_store_cr(PARAM(1));
|
243 | 79aceca5 | bellard | RETURN(); |
244 | 79aceca5 | bellard | } |
245 | 79aceca5 | bellard | |
246 | 76a66253 | j_mayer | void OPPROTO op_load_cro (void) |
247 | 79aceca5 | bellard | { |
248 | 76a66253 | j_mayer | T0 = env->crf[PARAM1]; |
249 | 79aceca5 | bellard | RETURN(); |
250 | 79aceca5 | bellard | } |
251 | 79aceca5 | bellard | |
252 | 76a66253 | j_mayer | void OPPROTO op_store_cro (void) |
253 | 79aceca5 | bellard | { |
254 | 76a66253 | j_mayer | env->crf[PARAM1] = T0; |
255 | 79aceca5 | bellard | RETURN(); |
256 | 79aceca5 | bellard | } |
257 | 79aceca5 | bellard | |
258 | 79aceca5 | bellard | PPC_OP(load_xer_cr) |
259 | 79aceca5 | bellard | { |
260 | 79aceca5 | bellard | T0 = (xer_so << 3) | (xer_ov << 2) | (xer_ca << 1); |
261 | 79aceca5 | bellard | RETURN(); |
262 | 79aceca5 | bellard | } |
263 | 79aceca5 | bellard | |
264 | e864cabd | j_mayer | PPC_OP(clear_xer_ov) |
265 | 79aceca5 | bellard | { |
266 | 79aceca5 | bellard | xer_so = 0;
|
267 | 79aceca5 | bellard | xer_ov = 0;
|
268 | e864cabd | j_mayer | RETURN(); |
269 | e864cabd | j_mayer | } |
270 | e864cabd | j_mayer | |
271 | e864cabd | j_mayer | PPC_OP(clear_xer_ca) |
272 | e864cabd | j_mayer | { |
273 | 79aceca5 | bellard | xer_ca = 0;
|
274 | 79aceca5 | bellard | RETURN(); |
275 | 79aceca5 | bellard | } |
276 | 79aceca5 | bellard | |
277 | 79aceca5 | bellard | PPC_OP(load_xer_bc) |
278 | 79aceca5 | bellard | { |
279 | 9a64fbe4 | bellard | T1 = xer_bc; |
280 | 79aceca5 | bellard | RETURN(); |
281 | 79aceca5 | bellard | } |
282 | 79aceca5 | bellard | |
283 | 76a66253 | j_mayer | void OPPROTO op_store_xer_bc (void) |
284 | 76a66253 | j_mayer | { |
285 | 76a66253 | j_mayer | xer_bc = T0; |
286 | 76a66253 | j_mayer | RETURN(); |
287 | 76a66253 | j_mayer | } |
288 | 76a66253 | j_mayer | |
289 | 79aceca5 | bellard | PPC_OP(load_xer) |
290 | 79aceca5 | bellard | { |
291 | 76a66253 | j_mayer | do_load_xer(); |
292 | 79aceca5 | bellard | RETURN(); |
293 | 79aceca5 | bellard | } |
294 | 79aceca5 | bellard | |
295 | 79aceca5 | bellard | PPC_OP(store_xer) |
296 | 79aceca5 | bellard | { |
297 | 76a66253 | j_mayer | do_store_xer(); |
298 | 76a66253 | j_mayer | RETURN(); |
299 | 76a66253 | j_mayer | } |
300 | 76a66253 | j_mayer | |
301 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
302 | 76a66253 | j_mayer | /* Segment registers load and store */
|
303 | 76a66253 | j_mayer | PPC_OP(load_sr) |
304 | 76a66253 | j_mayer | { |
305 | 76a66253 | j_mayer | T0 = regs->sr[T1]; |
306 | 76a66253 | j_mayer | RETURN(); |
307 | 76a66253 | j_mayer | } |
308 | 76a66253 | j_mayer | |
309 | 76a66253 | j_mayer | PPC_OP(store_sr) |
310 | 76a66253 | j_mayer | { |
311 | 76a66253 | j_mayer | do_store_sr(env, T1, T0); |
312 | 76a66253 | j_mayer | RETURN(); |
313 | 76a66253 | j_mayer | } |
314 | 76a66253 | j_mayer | |
315 | 76a66253 | j_mayer | PPC_OP(load_sdr1) |
316 | 76a66253 | j_mayer | { |
317 | 76a66253 | j_mayer | T0 = regs->sdr1; |
318 | 76a66253 | j_mayer | RETURN(); |
319 | 76a66253 | j_mayer | } |
320 | 76a66253 | j_mayer | |
321 | 76a66253 | j_mayer | PPC_OP(store_sdr1) |
322 | 76a66253 | j_mayer | { |
323 | 76a66253 | j_mayer | do_store_sdr1(env, T0); |
324 | 79aceca5 | bellard | RETURN(); |
325 | 79aceca5 | bellard | } |
326 | 79aceca5 | bellard | |
327 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
328 | d9bce9d9 | j_mayer | void OPPROTO op_load_asr (void) |
329 | d9bce9d9 | j_mayer | { |
330 | d9bce9d9 | j_mayer | T0 = env->asr; |
331 | d9bce9d9 | j_mayer | RETURN(); |
332 | d9bce9d9 | j_mayer | } |
333 | d9bce9d9 | j_mayer | |
334 | d9bce9d9 | j_mayer | void OPPROTO op_store_asr (void) |
335 | d9bce9d9 | j_mayer | { |
336 | d9bce9d9 | j_mayer | ppc_store_asr(env, T0); |
337 | d9bce9d9 | j_mayer | RETURN(); |
338 | d9bce9d9 | j_mayer | } |
339 | d9bce9d9 | j_mayer | #endif
|
340 | d9bce9d9 | j_mayer | |
341 | 79aceca5 | bellard | PPC_OP(load_msr) |
342 | 79aceca5 | bellard | { |
343 | 3fc6c082 | bellard | T0 = do_load_msr(env); |
344 | 79aceca5 | bellard | RETURN(); |
345 | 79aceca5 | bellard | } |
346 | 79aceca5 | bellard | |
347 | 79aceca5 | bellard | PPC_OP(store_msr) |
348 | 79aceca5 | bellard | { |
349 | 3fc6c082 | bellard | do_store_msr(env, T0); |
350 | 9a64fbe4 | bellard | RETURN(); |
351 | 9a64fbe4 | bellard | } |
352 | d9bce9d9 | j_mayer | |
353 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
354 | d9bce9d9 | j_mayer | void OPPROTO op_store_msr_32 (void) |
355 | d9bce9d9 | j_mayer | { |
356 | d9bce9d9 | j_mayer | ppc_store_msr_32(env, T0); |
357 | d9bce9d9 | j_mayer | RETURN(); |
358 | d9bce9d9 | j_mayer | } |
359 | d9bce9d9 | j_mayer | #endif
|
360 | 76a66253 | j_mayer | #endif
|
361 | 9a64fbe4 | bellard | |
362 | 9a64fbe4 | bellard | /* SPR */
|
363 | 9a64fbe4 | bellard | PPC_OP(load_spr) |
364 | 9a64fbe4 | bellard | { |
365 | 9a64fbe4 | bellard | T0 = regs->spr[PARAM(1)];
|
366 | 9a64fbe4 | bellard | RETURN(); |
367 | 9a64fbe4 | bellard | } |
368 | 9a64fbe4 | bellard | |
369 | 9a64fbe4 | bellard | PPC_OP(store_spr) |
370 | 9a64fbe4 | bellard | { |
371 | 9a64fbe4 | bellard | regs->spr[PARAM(1)] = T0;
|
372 | 79aceca5 | bellard | RETURN(); |
373 | 79aceca5 | bellard | } |
374 | 79aceca5 | bellard | |
375 | 79aceca5 | bellard | PPC_OP(load_lr) |
376 | 79aceca5 | bellard | { |
377 | 9a64fbe4 | bellard | T0 = regs->lr; |
378 | 9a64fbe4 | bellard | RETURN(); |
379 | 9a64fbe4 | bellard | } |
380 | 9a64fbe4 | bellard | |
381 | 9a64fbe4 | bellard | PPC_OP(store_lr) |
382 | 9a64fbe4 | bellard | { |
383 | 9a64fbe4 | bellard | regs->lr = T0; |
384 | 9a64fbe4 | bellard | RETURN(); |
385 | 9a64fbe4 | bellard | } |
386 | 9a64fbe4 | bellard | |
387 | 9a64fbe4 | bellard | PPC_OP(load_ctr) |
388 | 9a64fbe4 | bellard | { |
389 | 9a64fbe4 | bellard | T0 = regs->ctr; |
390 | 9a64fbe4 | bellard | RETURN(); |
391 | 9a64fbe4 | bellard | } |
392 | 9a64fbe4 | bellard | |
393 | 9a64fbe4 | bellard | PPC_OP(store_ctr) |
394 | 9a64fbe4 | bellard | { |
395 | 9a64fbe4 | bellard | regs->ctr = T0; |
396 | 9a64fbe4 | bellard | RETURN(); |
397 | 9a64fbe4 | bellard | } |
398 | 9a64fbe4 | bellard | |
399 | 9fddaa0c | bellard | PPC_OP(load_tbl) |
400 | 9a64fbe4 | bellard | { |
401 | 9fddaa0c | bellard | T0 = cpu_ppc_load_tbl(regs); |
402 | 9a64fbe4 | bellard | RETURN(); |
403 | 9a64fbe4 | bellard | } |
404 | 9a64fbe4 | bellard | |
405 | 9fddaa0c | bellard | PPC_OP(load_tbu) |
406 | 9a64fbe4 | bellard | { |
407 | 9fddaa0c | bellard | T0 = cpu_ppc_load_tbu(regs); |
408 | 9a64fbe4 | bellard | RETURN(); |
409 | 9a64fbe4 | bellard | } |
410 | 9a64fbe4 | bellard | |
411 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
412 | 9fddaa0c | bellard | PPC_OP(store_tbl) |
413 | 9a64fbe4 | bellard | { |
414 | 9fddaa0c | bellard | cpu_ppc_store_tbl(regs, T0); |
415 | 79aceca5 | bellard | RETURN(); |
416 | 79aceca5 | bellard | } |
417 | 79aceca5 | bellard | |
418 | 9fddaa0c | bellard | PPC_OP(store_tbu) |
419 | 9a64fbe4 | bellard | { |
420 | 9fddaa0c | bellard | cpu_ppc_store_tbu(regs, T0); |
421 | 9a64fbe4 | bellard | RETURN(); |
422 | 9a64fbe4 | bellard | } |
423 | 9a64fbe4 | bellard | |
424 | 9fddaa0c | bellard | PPC_OP(load_decr) |
425 | 9a64fbe4 | bellard | { |
426 | 9fddaa0c | bellard | T0 = cpu_ppc_load_decr(regs); |
427 | 76a66253 | j_mayer | RETURN(); |
428 | 76a66253 | j_mayer | } |
429 | 9fddaa0c | bellard | |
430 | 9fddaa0c | bellard | PPC_OP(store_decr) |
431 | 9fddaa0c | bellard | { |
432 | 9fddaa0c | bellard | cpu_ppc_store_decr(regs, T0); |
433 | 9a64fbe4 | bellard | RETURN(); |
434 | 9a64fbe4 | bellard | } |
435 | 9a64fbe4 | bellard | |
436 | 9a64fbe4 | bellard | PPC_OP(load_ibat) |
437 | 9a64fbe4 | bellard | { |
438 | 9a64fbe4 | bellard | T0 = regs->IBAT[PARAM(1)][PARAM(2)]; |
439 | 76a66253 | j_mayer | RETURN(); |
440 | 9a64fbe4 | bellard | } |
441 | 9a64fbe4 | bellard | |
442 | 76a66253 | j_mayer | void OPPROTO op_store_ibatu (void) |
443 | 9a64fbe4 | bellard | { |
444 | 3fc6c082 | bellard | do_store_ibatu(env, PARAM1, T0); |
445 | 3fc6c082 | bellard | RETURN(); |
446 | 3fc6c082 | bellard | } |
447 | 3fc6c082 | bellard | |
448 | 76a66253 | j_mayer | void OPPROTO op_store_ibatl (void) |
449 | 3fc6c082 | bellard | { |
450 | 3fc6c082 | bellard | #if 1 |
451 | 3fc6c082 | bellard | env->IBAT[1][PARAM1] = T0;
|
452 | 3fc6c082 | bellard | #else
|
453 | 3fc6c082 | bellard | do_store_ibatl(env, PARAM1, T0); |
454 | 3fc6c082 | bellard | #endif
|
455 | 3fc6c082 | bellard | RETURN(); |
456 | 9a64fbe4 | bellard | } |
457 | 9a64fbe4 | bellard | |
458 | 9a64fbe4 | bellard | PPC_OP(load_dbat) |
459 | 9a64fbe4 | bellard | { |
460 | 9a64fbe4 | bellard | T0 = regs->DBAT[PARAM(1)][PARAM(2)]; |
461 | 76a66253 | j_mayer | RETURN(); |
462 | 9a64fbe4 | bellard | } |
463 | 9a64fbe4 | bellard | |
464 | 76a66253 | j_mayer | void OPPROTO op_store_dbatu (void) |
465 | 3fc6c082 | bellard | { |
466 | 3fc6c082 | bellard | do_store_dbatu(env, PARAM1, T0); |
467 | 3fc6c082 | bellard | RETURN(); |
468 | 3fc6c082 | bellard | } |
469 | 3fc6c082 | bellard | |
470 | 76a66253 | j_mayer | void OPPROTO op_store_dbatl (void) |
471 | 9a64fbe4 | bellard | { |
472 | 3fc6c082 | bellard | #if 1 |
473 | 3fc6c082 | bellard | env->DBAT[1][PARAM1] = T0;
|
474 | 3fc6c082 | bellard | #else
|
475 | 3fc6c082 | bellard | do_store_dbatl(env, PARAM1, T0); |
476 | 3fc6c082 | bellard | #endif
|
477 | 3fc6c082 | bellard | RETURN(); |
478 | 9a64fbe4 | bellard | } |
479 | 76a66253 | j_mayer | #endif /* !defined(CONFIG_USER_ONLY) */ |
480 | 9a64fbe4 | bellard | |
481 | fb0eaffc | bellard | /* FPSCR */
|
482 | fb0eaffc | bellard | PPC_OP(load_fpscr) |
483 | fb0eaffc | bellard | { |
484 | 76a66253 | j_mayer | do_load_fpscr(); |
485 | fb0eaffc | bellard | RETURN(); |
486 | fb0eaffc | bellard | } |
487 | fb0eaffc | bellard | |
488 | fb0eaffc | bellard | PPC_OP(store_fpscr) |
489 | fb0eaffc | bellard | { |
490 | 76a66253 | j_mayer | do_store_fpscr(PARAM1); |
491 | fb0eaffc | bellard | RETURN(); |
492 | fb0eaffc | bellard | } |
493 | fb0eaffc | bellard | |
494 | fb0eaffc | bellard | PPC_OP(reset_scrfx) |
495 | fb0eaffc | bellard | { |
496 | fb0eaffc | bellard | regs->fpscr[7] &= ~0x8; |
497 | fb0eaffc | bellard | RETURN(); |
498 | fb0eaffc | bellard | } |
499 | fb0eaffc | bellard | |
500 | 79aceca5 | bellard | /* crf operations */
|
501 | 79aceca5 | bellard | PPC_OP(getbit_T0) |
502 | 79aceca5 | bellard | { |
503 | 79aceca5 | bellard | T0 = (T0 >> PARAM(1)) & 1; |
504 | 79aceca5 | bellard | RETURN(); |
505 | 79aceca5 | bellard | } |
506 | 79aceca5 | bellard | |
507 | 79aceca5 | bellard | PPC_OP(getbit_T1) |
508 | 79aceca5 | bellard | { |
509 | 79aceca5 | bellard | T1 = (T1 >> PARAM(1)) & 1; |
510 | 79aceca5 | bellard | RETURN(); |
511 | 79aceca5 | bellard | } |
512 | 79aceca5 | bellard | |
513 | 79aceca5 | bellard | PPC_OP(setcrfbit) |
514 | 79aceca5 | bellard | { |
515 | d9bce9d9 | j_mayer | T1 = (T1 & PARAM(1)) | (T0 << PARAM(2)); |
516 | 79aceca5 | bellard | RETURN(); |
517 | 79aceca5 | bellard | } |
518 | 79aceca5 | bellard | |
519 | 79aceca5 | bellard | /* Branch */
|
520 | 9a64fbe4 | bellard | #define EIP regs->nip
|
521 | 9a64fbe4 | bellard | |
522 | e98a6e40 | bellard | PPC_OP(setlr) |
523 | e98a6e40 | bellard | { |
524 | d9bce9d9 | j_mayer | regs->lr = (uint32_t)PARAM1; |
525 | 76a66253 | j_mayer | RETURN(); |
526 | e98a6e40 | bellard | } |
527 | e98a6e40 | bellard | |
528 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
529 | d9bce9d9 | j_mayer | void OPPROTO op_setlr_64 (void) |
530 | d9bce9d9 | j_mayer | { |
531 | d9bce9d9 | j_mayer | regs->lr = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
|
532 | d9bce9d9 | j_mayer | RETURN(); |
533 | d9bce9d9 | j_mayer | } |
534 | d9bce9d9 | j_mayer | #endif
|
535 | d9bce9d9 | j_mayer | |
536 | c53be334 | bellard | PPC_OP(goto_tb0) |
537 | e98a6e40 | bellard | { |
538 | c53be334 | bellard | GOTO_TB(op_goto_tb0, PARAM1, 0);
|
539 | c53be334 | bellard | } |
540 | c53be334 | bellard | |
541 | c53be334 | bellard | PPC_OP(goto_tb1) |
542 | c53be334 | bellard | { |
543 | c53be334 | bellard | GOTO_TB(op_goto_tb1, PARAM1, 1);
|
544 | e98a6e40 | bellard | } |
545 | e98a6e40 | bellard | |
546 | d9bce9d9 | j_mayer | void OPPROTO op_b_T1 (void) |
547 | e98a6e40 | bellard | { |
548 | d9bce9d9 | j_mayer | regs->nip = (uint32_t)(T1 & ~3);
|
549 | 76a66253 | j_mayer | RETURN(); |
550 | e98a6e40 | bellard | } |
551 | e98a6e40 | bellard | |
552 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
553 | d9bce9d9 | j_mayer | void OPPROTO op_b_T1_64 (void) |
554 | d9bce9d9 | j_mayer | { |
555 | d9bce9d9 | j_mayer | regs->nip = (uint64_t)(T1 & ~3);
|
556 | d9bce9d9 | j_mayer | RETURN(); |
557 | d9bce9d9 | j_mayer | } |
558 | d9bce9d9 | j_mayer | #endif
|
559 | d9bce9d9 | j_mayer | |
560 | c53be334 | bellard | PPC_OP(jz_T0) |
561 | e98a6e40 | bellard | { |
562 | c53be334 | bellard | if (!T0)
|
563 | c53be334 | bellard | GOTO_LABEL_PARAM(1);
|
564 | e98a6e40 | bellard | RETURN(); |
565 | e98a6e40 | bellard | } |
566 | e98a6e40 | bellard | |
567 | d9bce9d9 | j_mayer | void OPPROTO op_btest_T1 (void) |
568 | e98a6e40 | bellard | { |
569 | e98a6e40 | bellard | if (T0) {
|
570 | d9bce9d9 | j_mayer | regs->nip = (uint32_t)(T1 & ~3);
|
571 | e98a6e40 | bellard | } else {
|
572 | d9bce9d9 | j_mayer | regs->nip = (uint32_t)PARAM1; |
573 | e98a6e40 | bellard | } |
574 | e98a6e40 | bellard | RETURN(); |
575 | e98a6e40 | bellard | } |
576 | e98a6e40 | bellard | |
577 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
578 | d9bce9d9 | j_mayer | void OPPROTO op_btest_T1_64 (void) |
579 | d9bce9d9 | j_mayer | { |
580 | d9bce9d9 | j_mayer | if (T0) {
|
581 | d9bce9d9 | j_mayer | regs->nip = (uint64_t)(T1 & ~3);
|
582 | d9bce9d9 | j_mayer | } else {
|
583 | d9bce9d9 | j_mayer | regs->nip = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
|
584 | d9bce9d9 | j_mayer | } |
585 | d9bce9d9 | j_mayer | RETURN(); |
586 | d9bce9d9 | j_mayer | } |
587 | d9bce9d9 | j_mayer | #endif
|
588 | d9bce9d9 | j_mayer | |
589 | e98a6e40 | bellard | PPC_OP(movl_T1_ctr) |
590 | e98a6e40 | bellard | { |
591 | e98a6e40 | bellard | T1 = regs->ctr; |
592 | 76a66253 | j_mayer | RETURN(); |
593 | e98a6e40 | bellard | } |
594 | e98a6e40 | bellard | |
595 | e98a6e40 | bellard | PPC_OP(movl_T1_lr) |
596 | e98a6e40 | bellard | { |
597 | e98a6e40 | bellard | T1 = regs->lr; |
598 | 76a66253 | j_mayer | RETURN(); |
599 | e98a6e40 | bellard | } |
600 | e98a6e40 | bellard | |
601 | e98a6e40 | bellard | /* tests with result in T0 */
|
602 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctr (void) |
603 | d9bce9d9 | j_mayer | { |
604 | d9bce9d9 | j_mayer | T0 = (uint32_t)regs->ctr; |
605 | d9bce9d9 | j_mayer | RETURN(); |
606 | d9bce9d9 | j_mayer | } |
607 | e98a6e40 | bellard | |
608 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
609 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctr_64 (void) |
610 | e98a6e40 | bellard | { |
611 | d9bce9d9 | j_mayer | T0 = (uint64_t)regs->ctr; |
612 | d9bce9d9 | j_mayer | RETURN(); |
613 | d9bce9d9 | j_mayer | } |
614 | d9bce9d9 | j_mayer | #endif
|
615 | d9bce9d9 | j_mayer | |
616 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctr_true (void) |
617 | d9bce9d9 | j_mayer | { |
618 | d9bce9d9 | j_mayer | T0 = ((uint32_t)regs->ctr != 0 && (T0 & PARAM1) != 0); |
619 | 76a66253 | j_mayer | RETURN(); |
620 | e98a6e40 | bellard | } |
621 | e98a6e40 | bellard | |
622 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
623 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctr_true_64 (void) |
624 | e98a6e40 | bellard | { |
625 | d9bce9d9 | j_mayer | T0 = ((uint64_t)regs->ctr != 0 && (T0 & PARAM1) != 0); |
626 | 76a66253 | j_mayer | RETURN(); |
627 | e98a6e40 | bellard | } |
628 | d9bce9d9 | j_mayer | #endif
|
629 | e98a6e40 | bellard | |
630 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctr_false (void) |
631 | e98a6e40 | bellard | { |
632 | d9bce9d9 | j_mayer | T0 = ((uint32_t)regs->ctr != 0 && (T0 & PARAM1) == 0); |
633 | 76a66253 | j_mayer | RETURN(); |
634 | e98a6e40 | bellard | } |
635 | e98a6e40 | bellard | |
636 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
637 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctr_false_64 (void) |
638 | e98a6e40 | bellard | { |
639 | d9bce9d9 | j_mayer | T0 = ((uint64_t)regs->ctr != 0 && (T0 & PARAM1) == 0); |
640 | 76a66253 | j_mayer | RETURN(); |
641 | e98a6e40 | bellard | } |
642 | d9bce9d9 | j_mayer | #endif
|
643 | d9bce9d9 | j_mayer | |
644 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctrz (void) |
645 | d9bce9d9 | j_mayer | { |
646 | d9bce9d9 | j_mayer | T0 = ((uint32_t)regs->ctr == 0);
|
647 | d9bce9d9 | j_mayer | RETURN(); |
648 | d9bce9d9 | j_mayer | } |
649 | d9bce9d9 | j_mayer | |
650 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
651 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctrz_64 (void) |
652 | d9bce9d9 | j_mayer | { |
653 | d9bce9d9 | j_mayer | T0 = ((uint64_t)regs->ctr == 0);
|
654 | d9bce9d9 | j_mayer | RETURN(); |
655 | d9bce9d9 | j_mayer | } |
656 | d9bce9d9 | j_mayer | #endif
|
657 | d9bce9d9 | j_mayer | |
658 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctrz_true (void) |
659 | d9bce9d9 | j_mayer | { |
660 | d9bce9d9 | j_mayer | T0 = ((uint32_t)regs->ctr == 0 && (T0 & PARAM1) != 0); |
661 | d9bce9d9 | j_mayer | RETURN(); |
662 | d9bce9d9 | j_mayer | } |
663 | d9bce9d9 | j_mayer | |
664 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
665 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctrz_true_64 (void) |
666 | d9bce9d9 | j_mayer | { |
667 | d9bce9d9 | j_mayer | T0 = ((uint64_t)regs->ctr == 0 && (T0 & PARAM1) != 0); |
668 | d9bce9d9 | j_mayer | RETURN(); |
669 | d9bce9d9 | j_mayer | } |
670 | d9bce9d9 | j_mayer | #endif
|
671 | e98a6e40 | bellard | |
672 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctrz_false (void) |
673 | e98a6e40 | bellard | { |
674 | d9bce9d9 | j_mayer | T0 = ((uint32_t)regs->ctr == 0 && (T0 & PARAM1) == 0); |
675 | 76a66253 | j_mayer | RETURN(); |
676 | e98a6e40 | bellard | } |
677 | e98a6e40 | bellard | |
678 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
679 | d9bce9d9 | j_mayer | void OPPROTO op_test_ctrz_false_64 (void) |
680 | e98a6e40 | bellard | { |
681 | d9bce9d9 | j_mayer | T0 = ((uint64_t)regs->ctr == 0 && (T0 & PARAM1) == 0); |
682 | 76a66253 | j_mayer | RETURN(); |
683 | e98a6e40 | bellard | } |
684 | d9bce9d9 | j_mayer | #endif
|
685 | e98a6e40 | bellard | |
686 | e98a6e40 | bellard | PPC_OP(test_true) |
687 | e98a6e40 | bellard | { |
688 | b88e4a9a | bellard | T0 = (T0 & PARAM(1));
|
689 | 76a66253 | j_mayer | RETURN(); |
690 | e98a6e40 | bellard | } |
691 | e98a6e40 | bellard | |
692 | e98a6e40 | bellard | PPC_OP(test_false) |
693 | e98a6e40 | bellard | { |
694 | e98a6e40 | bellard | T0 = ((T0 & PARAM(1)) == 0); |
695 | 76a66253 | j_mayer | RETURN(); |
696 | e98a6e40 | bellard | } |
697 | 79aceca5 | bellard | |
698 | 79aceca5 | bellard | /* CTR maintenance */
|
699 | 79aceca5 | bellard | PPC_OP(dec_ctr) |
700 | 79aceca5 | bellard | { |
701 | 9a64fbe4 | bellard | regs->ctr--; |
702 | 79aceca5 | bellard | RETURN(); |
703 | 79aceca5 | bellard | } |
704 | 79aceca5 | bellard | |
705 | 79aceca5 | bellard | /*** Integer arithmetic ***/
|
706 | 79aceca5 | bellard | /* add */
|
707 | 79aceca5 | bellard | PPC_OP(add) |
708 | 79aceca5 | bellard | { |
709 | 79aceca5 | bellard | T0 += T1; |
710 | 79aceca5 | bellard | RETURN(); |
711 | 79aceca5 | bellard | } |
712 | 79aceca5 | bellard | |
713 | d9bce9d9 | j_mayer | void OPPROTO op_check_addo (void) |
714 | 79aceca5 | bellard | { |
715 | d9bce9d9 | j_mayer | if (likely(!(((uint32_t)T2 ^ (uint32_t)T1 ^ UINT32_MAX) &
|
716 | d9bce9d9 | j_mayer | ((uint32_t)T2 ^ (uint32_t)T0) & (1UL << 31)))) { |
717 | d9bce9d9 | j_mayer | xer_ov = 0;
|
718 | d9bce9d9 | j_mayer | } else {
|
719 | d9bce9d9 | j_mayer | xer_so = 1;
|
720 | d9bce9d9 | j_mayer | xer_ov = 1;
|
721 | d9bce9d9 | j_mayer | } |
722 | e864cabd | j_mayer | RETURN(); |
723 | 79aceca5 | bellard | } |
724 | 79aceca5 | bellard | |
725 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
726 | d9bce9d9 | j_mayer | void OPPROTO op_check_addo_64 (void) |
727 | 79aceca5 | bellard | { |
728 | d9bce9d9 | j_mayer | if (likely(!(((uint64_t)T2 ^ (uint64_t)T1 ^ UINT64_MAX) &
|
729 | 1698b741 | j_mayer | ((uint64_t)T2 ^ (uint64_t)T0) & (1ULL << 63)))) { |
730 | d9bce9d9 | j_mayer | xer_ov = 0;
|
731 | 79aceca5 | bellard | } else {
|
732 | d9bce9d9 | j_mayer | xer_so = 1;
|
733 | d9bce9d9 | j_mayer | xer_ov = 1;
|
734 | d9bce9d9 | j_mayer | } |
735 | e864cabd | j_mayer | RETURN(); |
736 | d9bce9d9 | j_mayer | } |
737 | d9bce9d9 | j_mayer | #endif
|
738 | d9bce9d9 | j_mayer | |
739 | d9bce9d9 | j_mayer | /* add carrying */
|
740 | d9bce9d9 | j_mayer | void OPPROTO op_check_addc (void) |
741 | d9bce9d9 | j_mayer | { |
742 | d9bce9d9 | j_mayer | if (likely((uint32_t)T0 >= (uint32_t)T2)) {
|
743 | 79aceca5 | bellard | xer_ca = 0;
|
744 | d9bce9d9 | j_mayer | } else {
|
745 | d9bce9d9 | j_mayer | xer_ca = 1;
|
746 | 79aceca5 | bellard | } |
747 | 79aceca5 | bellard | RETURN(); |
748 | 79aceca5 | bellard | } |
749 | 79aceca5 | bellard | |
750 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
751 | d9bce9d9 | j_mayer | void OPPROTO op_check_addc_64 (void) |
752 | 79aceca5 | bellard | { |
753 | d9bce9d9 | j_mayer | if (likely((uint64_t)T0 >= (uint64_t)T2)) {
|
754 | d9bce9d9 | j_mayer | xer_ca = 0;
|
755 | d9bce9d9 | j_mayer | } else {
|
756 | d9bce9d9 | j_mayer | xer_ca = 1;
|
757 | d9bce9d9 | j_mayer | } |
758 | 79aceca5 | bellard | RETURN(); |
759 | 79aceca5 | bellard | } |
760 | d9bce9d9 | j_mayer | #endif
|
761 | 79aceca5 | bellard | |
762 | 79aceca5 | bellard | /* add extended */
|
763 | 76a66253 | j_mayer | void OPPROTO op_adde (void) |
764 | 79aceca5 | bellard | { |
765 | fdabc366 | bellard | do_adde(); |
766 | 76a66253 | j_mayer | RETURN(); |
767 | 79aceca5 | bellard | } |
768 | 79aceca5 | bellard | |
769 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
770 | d9bce9d9 | j_mayer | void OPPROTO op_adde_64 (void) |
771 | 79aceca5 | bellard | { |
772 | d9bce9d9 | j_mayer | do_adde_64(); |
773 | 79aceca5 | bellard | RETURN(); |
774 | 79aceca5 | bellard | } |
775 | d9bce9d9 | j_mayer | #endif
|
776 | 79aceca5 | bellard | |
777 | 79aceca5 | bellard | /* add immediate */
|
778 | 79aceca5 | bellard | PPC_OP(addi) |
779 | 79aceca5 | bellard | { |
780 | 79aceca5 | bellard | T0 += PARAM(1);
|
781 | 79aceca5 | bellard | RETURN(); |
782 | 79aceca5 | bellard | } |
783 | 79aceca5 | bellard | |
784 | d9bce9d9 | j_mayer | /* add to minus one extended */
|
785 | d9bce9d9 | j_mayer | void OPPROTO op_add_me (void) |
786 | 79aceca5 | bellard | { |
787 | d9bce9d9 | j_mayer | T0 += xer_ca + (-1);
|
788 | d9bce9d9 | j_mayer | if (likely((uint32_t)T1 != 0)) |
789 | 79aceca5 | bellard | xer_ca = 1;
|
790 | 79aceca5 | bellard | RETURN(); |
791 | 79aceca5 | bellard | } |
792 | 79aceca5 | bellard | |
793 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
794 | d9bce9d9 | j_mayer | void OPPROTO op_add_me_64 (void) |
795 | 79aceca5 | bellard | { |
796 | 79aceca5 | bellard | T0 += xer_ca + (-1);
|
797 | d9bce9d9 | j_mayer | if (likely((uint64_t)T1 != 0)) |
798 | 79aceca5 | bellard | xer_ca = 1;
|
799 | 79aceca5 | bellard | RETURN(); |
800 | 79aceca5 | bellard | } |
801 | d9bce9d9 | j_mayer | #endif
|
802 | 79aceca5 | bellard | |
803 | 76a66253 | j_mayer | void OPPROTO op_addmeo (void) |
804 | 79aceca5 | bellard | { |
805 | fdabc366 | bellard | do_addmeo(); |
806 | 79aceca5 | bellard | RETURN(); |
807 | 79aceca5 | bellard | } |
808 | 79aceca5 | bellard | |
809 | d9bce9d9 | j_mayer | void OPPROTO op_addmeo_64 (void) |
810 | d9bce9d9 | j_mayer | { |
811 | d9bce9d9 | j_mayer | do_addmeo(); |
812 | d9bce9d9 | j_mayer | RETURN(); |
813 | d9bce9d9 | j_mayer | } |
814 | d9bce9d9 | j_mayer | |
815 | 79aceca5 | bellard | /* add to zero extended */
|
816 | d9bce9d9 | j_mayer | void OPPROTO op_add_ze (void) |
817 | 79aceca5 | bellard | { |
818 | 79aceca5 | bellard | T0 += xer_ca; |
819 | 79aceca5 | bellard | RETURN(); |
820 | 79aceca5 | bellard | } |
821 | 79aceca5 | bellard | |
822 | d9bce9d9 | j_mayer | /* divide word */
|
823 | d9bce9d9 | j_mayer | void OPPROTO op_divw (void) |
824 | 79aceca5 | bellard | { |
825 | d9bce9d9 | j_mayer | if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) || |
826 | d9bce9d9 | j_mayer | (int32_t)T1 == 0)) {
|
827 | d9bce9d9 | j_mayer | T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31)); |
828 | d9bce9d9 | j_mayer | } else {
|
829 | d9bce9d9 | j_mayer | T0 = (int32_t)T0 / (int32_t)T1; |
830 | d9bce9d9 | j_mayer | } |
831 | 79aceca5 | bellard | RETURN(); |
832 | 79aceca5 | bellard | } |
833 | 79aceca5 | bellard | |
834 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
835 | d9bce9d9 | j_mayer | void OPPROTO op_divd (void) |
836 | 79aceca5 | bellard | { |
837 | d9bce9d9 | j_mayer | if (unlikely(((int64_t)T0 == INT64_MIN && (int64_t)T1 == -1) || |
838 | d9bce9d9 | j_mayer | (int64_t)T1 == 0)) {
|
839 | d9bce9d9 | j_mayer | T0 = (int64_t)((-1ULL) * ((uint64_t)T0 >> 63)); |
840 | 79aceca5 | bellard | } else {
|
841 | d9bce9d9 | j_mayer | T0 = (int64_t)T0 / (int64_t)T1; |
842 | 79aceca5 | bellard | } |
843 | 79aceca5 | bellard | RETURN(); |
844 | 79aceca5 | bellard | } |
845 | d9bce9d9 | j_mayer | #endif
|
846 | 79aceca5 | bellard | |
847 | 76a66253 | j_mayer | void OPPROTO op_divwo (void) |
848 | 79aceca5 | bellard | { |
849 | fdabc366 | bellard | do_divwo(); |
850 | 79aceca5 | bellard | RETURN(); |
851 | 79aceca5 | bellard | } |
852 | 79aceca5 | bellard | |
853 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
854 | d9bce9d9 | j_mayer | void OPPROTO op_divdo (void) |
855 | d9bce9d9 | j_mayer | { |
856 | d9bce9d9 | j_mayer | do_divdo(); |
857 | d9bce9d9 | j_mayer | RETURN(); |
858 | d9bce9d9 | j_mayer | } |
859 | d9bce9d9 | j_mayer | #endif
|
860 | d9bce9d9 | j_mayer | |
861 | 79aceca5 | bellard | /* divide word unsigned */
|
862 | d9bce9d9 | j_mayer | void OPPROTO op_divwu (void) |
863 | d9bce9d9 | j_mayer | { |
864 | d9bce9d9 | j_mayer | if (unlikely(T1 == 0)) { |
865 | d9bce9d9 | j_mayer | T0 = 0;
|
866 | d9bce9d9 | j_mayer | } else {
|
867 | d9bce9d9 | j_mayer | T0 = (uint32_t)T0 / (uint32_t)T1; |
868 | d9bce9d9 | j_mayer | } |
869 | d9bce9d9 | j_mayer | RETURN(); |
870 | d9bce9d9 | j_mayer | } |
871 | d9bce9d9 | j_mayer | |
872 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
873 | d9bce9d9 | j_mayer | void OPPROTO op_divdu (void) |
874 | 79aceca5 | bellard | { |
875 | d9bce9d9 | j_mayer | if (unlikely(T1 == 0)) { |
876 | 79aceca5 | bellard | T0 = 0;
|
877 | 79aceca5 | bellard | } else {
|
878 | 79aceca5 | bellard | T0 /= T1; |
879 | 79aceca5 | bellard | } |
880 | 79aceca5 | bellard | RETURN(); |
881 | 79aceca5 | bellard | } |
882 | d9bce9d9 | j_mayer | #endif
|
883 | 79aceca5 | bellard | |
884 | 76a66253 | j_mayer | void OPPROTO op_divwuo (void) |
885 | 79aceca5 | bellard | { |
886 | fdabc366 | bellard | do_divwuo(); |
887 | 79aceca5 | bellard | RETURN(); |
888 | 79aceca5 | bellard | } |
889 | 79aceca5 | bellard | |
890 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
891 | d9bce9d9 | j_mayer | void OPPROTO op_divduo (void) |
892 | d9bce9d9 | j_mayer | { |
893 | d9bce9d9 | j_mayer | do_divduo(); |
894 | d9bce9d9 | j_mayer | RETURN(); |
895 | d9bce9d9 | j_mayer | } |
896 | d9bce9d9 | j_mayer | #endif
|
897 | d9bce9d9 | j_mayer | |
898 | 79aceca5 | bellard | /* multiply high word */
|
899 | d9bce9d9 | j_mayer | void OPPROTO op_mulhw (void) |
900 | 79aceca5 | bellard | { |
901 | d9bce9d9 | j_mayer | T0 = ((int64_t)((int32_t)T0) * (int64_t)((int32_t)T1)) >> 32;
|
902 | 79aceca5 | bellard | RETURN(); |
903 | 79aceca5 | bellard | } |
904 | 79aceca5 | bellard | |
905 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
906 | d9bce9d9 | j_mayer | void OPPROTO op_mulhd (void) |
907 | d9bce9d9 | j_mayer | { |
908 | d9bce9d9 | j_mayer | uint64_t tl, th; |
909 | d9bce9d9 | j_mayer | |
910 | d9bce9d9 | j_mayer | do_imul64(&tl, &th); |
911 | d9bce9d9 | j_mayer | T0 = th; |
912 | d9bce9d9 | j_mayer | RETURN(); |
913 | d9bce9d9 | j_mayer | } |
914 | d9bce9d9 | j_mayer | #endif
|
915 | d9bce9d9 | j_mayer | |
916 | 79aceca5 | bellard | /* multiply high word unsigned */
|
917 | d9bce9d9 | j_mayer | void OPPROTO op_mulhwu (void) |
918 | 79aceca5 | bellard | { |
919 | d9bce9d9 | j_mayer | T0 = ((uint64_t)(uint32_t)T0 * (uint64_t)(uint32_t)T1) >> 32;
|
920 | 79aceca5 | bellard | RETURN(); |
921 | 79aceca5 | bellard | } |
922 | 79aceca5 | bellard | |
923 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
924 | d9bce9d9 | j_mayer | void OPPROTO op_mulhdu (void) |
925 | d9bce9d9 | j_mayer | { |
926 | d9bce9d9 | j_mayer | uint64_t tl, th; |
927 | d9bce9d9 | j_mayer | |
928 | d9bce9d9 | j_mayer | do_mul64(&tl, &th); |
929 | d9bce9d9 | j_mayer | T0 = th; |
930 | d9bce9d9 | j_mayer | RETURN(); |
931 | d9bce9d9 | j_mayer | } |
932 | d9bce9d9 | j_mayer | #endif
|
933 | d9bce9d9 | j_mayer | |
934 | 79aceca5 | bellard | /* multiply low immediate */
|
935 | 79aceca5 | bellard | PPC_OP(mulli) |
936 | 79aceca5 | bellard | { |
937 | d9bce9d9 | j_mayer | T0 = ((int32_t)T0 * (int32_t)PARAM1); |
938 | 79aceca5 | bellard | RETURN(); |
939 | 79aceca5 | bellard | } |
940 | 79aceca5 | bellard | |
941 | 79aceca5 | bellard | /* multiply low word */
|
942 | 79aceca5 | bellard | PPC_OP(mullw) |
943 | 79aceca5 | bellard | { |
944 | d9bce9d9 | j_mayer | T0 = (int32_t)(T0 * T1); |
945 | d9bce9d9 | j_mayer | RETURN(); |
946 | d9bce9d9 | j_mayer | } |
947 | d9bce9d9 | j_mayer | |
948 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
949 | d9bce9d9 | j_mayer | void OPPROTO op_mulld (void) |
950 | d9bce9d9 | j_mayer | { |
951 | 79aceca5 | bellard | T0 *= T1; |
952 | 79aceca5 | bellard | RETURN(); |
953 | 79aceca5 | bellard | } |
954 | d9bce9d9 | j_mayer | #endif
|
955 | 79aceca5 | bellard | |
956 | 76a66253 | j_mayer | void OPPROTO op_mullwo (void) |
957 | 79aceca5 | bellard | { |
958 | fdabc366 | bellard | do_mullwo(); |
959 | 79aceca5 | bellard | RETURN(); |
960 | 79aceca5 | bellard | } |
961 | 79aceca5 | bellard | |
962 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
963 | d9bce9d9 | j_mayer | void OPPROTO op_mulldo (void) |
964 | d9bce9d9 | j_mayer | { |
965 | d9bce9d9 | j_mayer | do_mulldo(); |
966 | d9bce9d9 | j_mayer | RETURN(); |
967 | d9bce9d9 | j_mayer | } |
968 | d9bce9d9 | j_mayer | #endif
|
969 | d9bce9d9 | j_mayer | |
970 | 79aceca5 | bellard | /* negate */
|
971 | d9bce9d9 | j_mayer | void OPPROTO op_neg (void) |
972 | 79aceca5 | bellard | { |
973 | d9bce9d9 | j_mayer | if (likely(T0 != INT32_MIN)) {
|
974 | d9bce9d9 | j_mayer | T0 = -(int32_t)T0; |
975 | 79aceca5 | bellard | } |
976 | 79aceca5 | bellard | RETURN(); |
977 | 79aceca5 | bellard | } |
978 | 79aceca5 | bellard | |
979 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
980 | d9bce9d9 | j_mayer | void OPPROTO op_neg_64 (void) |
981 | d9bce9d9 | j_mayer | { |
982 | d9bce9d9 | j_mayer | if (likely(T0 != INT64_MIN)) {
|
983 | d9bce9d9 | j_mayer | T0 = -(int64_t)T0; |
984 | d9bce9d9 | j_mayer | } |
985 | d9bce9d9 | j_mayer | RETURN(); |
986 | d9bce9d9 | j_mayer | } |
987 | d9bce9d9 | j_mayer | #endif
|
988 | d9bce9d9 | j_mayer | |
989 | 76a66253 | j_mayer | void OPPROTO op_nego (void) |
990 | 79aceca5 | bellard | { |
991 | fdabc366 | bellard | do_nego(); |
992 | 79aceca5 | bellard | RETURN(); |
993 | 79aceca5 | bellard | } |
994 | 79aceca5 | bellard | |
995 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
996 | d9bce9d9 | j_mayer | void OPPROTO op_nego_64 (void) |
997 | d9bce9d9 | j_mayer | { |
998 | d9bce9d9 | j_mayer | do_nego_64(); |
999 | d9bce9d9 | j_mayer | RETURN(); |
1000 | d9bce9d9 | j_mayer | } |
1001 | d9bce9d9 | j_mayer | #endif
|
1002 | d9bce9d9 | j_mayer | |
1003 | 79aceca5 | bellard | /* substract from */
|
1004 | 79aceca5 | bellard | PPC_OP(subf) |
1005 | 79aceca5 | bellard | { |
1006 | 79aceca5 | bellard | T0 = T1 - T0; |
1007 | 79aceca5 | bellard | RETURN(); |
1008 | 79aceca5 | bellard | } |
1009 | 79aceca5 | bellard | |
1010 | d9bce9d9 | j_mayer | void OPPROTO op_check_subfo (void) |
1011 | d9bce9d9 | j_mayer | { |
1012 | d9bce9d9 | j_mayer | if (likely(!(((uint32_t)(~T2) ^ (uint32_t)T1 ^ UINT32_MAX) &
|
1013 | d9bce9d9 | j_mayer | ((uint32_t)(~T2) ^ (uint32_t)T0) & (1UL << 31)))) { |
1014 | d9bce9d9 | j_mayer | xer_ov = 0;
|
1015 | d9bce9d9 | j_mayer | } else {
|
1016 | d9bce9d9 | j_mayer | xer_so = 1;
|
1017 | d9bce9d9 | j_mayer | xer_ov = 1;
|
1018 | d9bce9d9 | j_mayer | } |
1019 | d9bce9d9 | j_mayer | RETURN(); |
1020 | d9bce9d9 | j_mayer | } |
1021 | d9bce9d9 | j_mayer | |
1022 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1023 | d9bce9d9 | j_mayer | void OPPROTO op_check_subfo_64 (void) |
1024 | 79aceca5 | bellard | { |
1025 | d9bce9d9 | j_mayer | if (likely(!(((uint64_t)(~T2) ^ (uint64_t)T1 ^ UINT64_MAX) &
|
1026 | d9bce9d9 | j_mayer | ((uint64_t)(~T2) ^ (uint64_t)T0) & (1ULL << 63)))) { |
1027 | d9bce9d9 | j_mayer | xer_ov = 0;
|
1028 | d9bce9d9 | j_mayer | } else {
|
1029 | d9bce9d9 | j_mayer | xer_so = 1;
|
1030 | d9bce9d9 | j_mayer | xer_ov = 1;
|
1031 | d9bce9d9 | j_mayer | } |
1032 | 79aceca5 | bellard | RETURN(); |
1033 | 79aceca5 | bellard | } |
1034 | d9bce9d9 | j_mayer | #endif
|
1035 | 79aceca5 | bellard | |
1036 | 79aceca5 | bellard | /* substract from carrying */
|
1037 | d9bce9d9 | j_mayer | void OPPROTO op_check_subfc (void) |
1038 | 79aceca5 | bellard | { |
1039 | d9bce9d9 | j_mayer | if (likely((uint32_t)T0 > (uint32_t)T1)) {
|
1040 | 79aceca5 | bellard | xer_ca = 0;
|
1041 | d9bce9d9 | j_mayer | } else {
|
1042 | d9bce9d9 | j_mayer | xer_ca = 1;
|
1043 | 79aceca5 | bellard | } |
1044 | 79aceca5 | bellard | RETURN(); |
1045 | 79aceca5 | bellard | } |
1046 | 79aceca5 | bellard | |
1047 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1048 | d9bce9d9 | j_mayer | void OPPROTO op_check_subfc_64 (void) |
1049 | 79aceca5 | bellard | { |
1050 | d9bce9d9 | j_mayer | if (likely((uint64_t)T0 > (uint64_t)T1)) {
|
1051 | d9bce9d9 | j_mayer | xer_ca = 0;
|
1052 | d9bce9d9 | j_mayer | } else {
|
1053 | d9bce9d9 | j_mayer | xer_ca = 1;
|
1054 | d9bce9d9 | j_mayer | } |
1055 | 79aceca5 | bellard | RETURN(); |
1056 | 79aceca5 | bellard | } |
1057 | d9bce9d9 | j_mayer | #endif
|
1058 | 79aceca5 | bellard | |
1059 | 79aceca5 | bellard | /* substract from extended */
|
1060 | 76a66253 | j_mayer | void OPPROTO op_subfe (void) |
1061 | 79aceca5 | bellard | { |
1062 | fdabc366 | bellard | do_subfe(); |
1063 | 79aceca5 | bellard | RETURN(); |
1064 | 79aceca5 | bellard | } |
1065 | 79aceca5 | bellard | |
1066 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1067 | d9bce9d9 | j_mayer | void OPPROTO op_subfe_64 (void) |
1068 | 79aceca5 | bellard | { |
1069 | d9bce9d9 | j_mayer | do_subfe_64(); |
1070 | 79aceca5 | bellard | RETURN(); |
1071 | 79aceca5 | bellard | } |
1072 | d9bce9d9 | j_mayer | #endif
|
1073 | 79aceca5 | bellard | |
1074 | 79aceca5 | bellard | /* substract from immediate carrying */
|
1075 | d9bce9d9 | j_mayer | void OPPROTO op_subfic (void) |
1076 | 79aceca5 | bellard | { |
1077 | d9bce9d9 | j_mayer | T0 = PARAM1 + ~T0 + 1;
|
1078 | d9bce9d9 | j_mayer | if ((uint32_t)T0 <= (uint32_t)PARAM1) {
|
1079 | 79aceca5 | bellard | xer_ca = 1;
|
1080 | 79aceca5 | bellard | } else {
|
1081 | 79aceca5 | bellard | xer_ca = 0;
|
1082 | 79aceca5 | bellard | } |
1083 | 79aceca5 | bellard | RETURN(); |
1084 | 79aceca5 | bellard | } |
1085 | 79aceca5 | bellard | |
1086 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1087 | d9bce9d9 | j_mayer | void OPPROTO op_subfic_64 (void) |
1088 | d9bce9d9 | j_mayer | { |
1089 | d9bce9d9 | j_mayer | T0 = PARAM1 + ~T0 + 1;
|
1090 | d9bce9d9 | j_mayer | if ((uint64_t)T0 <= (uint64_t)PARAM1) {
|
1091 | d9bce9d9 | j_mayer | xer_ca = 1;
|
1092 | d9bce9d9 | j_mayer | } else {
|
1093 | d9bce9d9 | j_mayer | xer_ca = 0;
|
1094 | d9bce9d9 | j_mayer | } |
1095 | d9bce9d9 | j_mayer | RETURN(); |
1096 | d9bce9d9 | j_mayer | } |
1097 | d9bce9d9 | j_mayer | #endif
|
1098 | d9bce9d9 | j_mayer | |
1099 | 79aceca5 | bellard | /* substract from minus one extended */
|
1100 | d9bce9d9 | j_mayer | void OPPROTO op_subfme (void) |
1101 | 79aceca5 | bellard | { |
1102 | 79aceca5 | bellard | T0 = ~T0 + xer_ca - 1;
|
1103 | d9bce9d9 | j_mayer | if (likely((uint32_t)T0 != (uint32_t)-1)) |
1104 | d9bce9d9 | j_mayer | xer_ca = 1;
|
1105 | d9bce9d9 | j_mayer | RETURN(); |
1106 | d9bce9d9 | j_mayer | } |
1107 | 79aceca5 | bellard | |
1108 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1109 | d9bce9d9 | j_mayer | void OPPROTO op_subfme_64 (void) |
1110 | d9bce9d9 | j_mayer | { |
1111 | d9bce9d9 | j_mayer | T0 = ~T0 + xer_ca - 1;
|
1112 | d9bce9d9 | j_mayer | if (likely((uint64_t)T0 != (uint64_t)-1)) |
1113 | 79aceca5 | bellard | xer_ca = 1;
|
1114 | 79aceca5 | bellard | RETURN(); |
1115 | 79aceca5 | bellard | } |
1116 | d9bce9d9 | j_mayer | #endif
|
1117 | 79aceca5 | bellard | |
1118 | 76a66253 | j_mayer | void OPPROTO op_subfmeo (void) |
1119 | 79aceca5 | bellard | { |
1120 | fdabc366 | bellard | do_subfmeo(); |
1121 | 79aceca5 | bellard | RETURN(); |
1122 | 79aceca5 | bellard | } |
1123 | 79aceca5 | bellard | |
1124 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1125 | d9bce9d9 | j_mayer | void OPPROTO op_subfmeo_64 (void) |
1126 | d9bce9d9 | j_mayer | { |
1127 | d9bce9d9 | j_mayer | do_subfmeo_64(); |
1128 | d9bce9d9 | j_mayer | RETURN(); |
1129 | d9bce9d9 | j_mayer | } |
1130 | d9bce9d9 | j_mayer | #endif
|
1131 | d9bce9d9 | j_mayer | |
1132 | 79aceca5 | bellard | /* substract from zero extended */
|
1133 | d9bce9d9 | j_mayer | void OPPROTO op_subfze (void) |
1134 | 79aceca5 | bellard | { |
1135 | 79aceca5 | bellard | T1 = ~T0; |
1136 | 79aceca5 | bellard | T0 = T1 + xer_ca; |
1137 | d9bce9d9 | j_mayer | if ((uint32_t)T0 < (uint32_t)T1) {
|
1138 | 79aceca5 | bellard | xer_ca = 1;
|
1139 | 79aceca5 | bellard | } else {
|
1140 | 79aceca5 | bellard | xer_ca = 0;
|
1141 | 79aceca5 | bellard | } |
1142 | 79aceca5 | bellard | RETURN(); |
1143 | 79aceca5 | bellard | } |
1144 | 79aceca5 | bellard | |
1145 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1146 | d9bce9d9 | j_mayer | void OPPROTO op_subfze_64 (void) |
1147 | d9bce9d9 | j_mayer | { |
1148 | d9bce9d9 | j_mayer | T1 = ~T0; |
1149 | d9bce9d9 | j_mayer | T0 = T1 + xer_ca; |
1150 | d9bce9d9 | j_mayer | if ((uint64_t)T0 < (uint64_t)T1) {
|
1151 | d9bce9d9 | j_mayer | xer_ca = 1;
|
1152 | d9bce9d9 | j_mayer | } else {
|
1153 | d9bce9d9 | j_mayer | xer_ca = 0;
|
1154 | d9bce9d9 | j_mayer | } |
1155 | d9bce9d9 | j_mayer | RETURN(); |
1156 | d9bce9d9 | j_mayer | } |
1157 | d9bce9d9 | j_mayer | #endif
|
1158 | d9bce9d9 | j_mayer | |
1159 | 76a66253 | j_mayer | void OPPROTO op_subfzeo (void) |
1160 | 79aceca5 | bellard | { |
1161 | fdabc366 | bellard | do_subfzeo(); |
1162 | 79aceca5 | bellard | RETURN(); |
1163 | 79aceca5 | bellard | } |
1164 | 79aceca5 | bellard | |
1165 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1166 | d9bce9d9 | j_mayer | void OPPROTO op_subfzeo_64 (void) |
1167 | d9bce9d9 | j_mayer | { |
1168 | d9bce9d9 | j_mayer | do_subfzeo_64(); |
1169 | d9bce9d9 | j_mayer | RETURN(); |
1170 | d9bce9d9 | j_mayer | } |
1171 | d9bce9d9 | j_mayer | #endif
|
1172 | d9bce9d9 | j_mayer | |
1173 | 79aceca5 | bellard | /*** Integer comparison ***/
|
1174 | 79aceca5 | bellard | /* compare */
|
1175 | d9bce9d9 | j_mayer | void OPPROTO op_cmp (void) |
1176 | d9bce9d9 | j_mayer | { |
1177 | d9bce9d9 | j_mayer | if ((int32_t)T0 < (int32_t)T1) {
|
1178 | d9bce9d9 | j_mayer | T0 = 0x08;
|
1179 | d9bce9d9 | j_mayer | } else if ((int32_t)T0 > (int32_t)T1) { |
1180 | d9bce9d9 | j_mayer | T0 = 0x04;
|
1181 | d9bce9d9 | j_mayer | } else {
|
1182 | d9bce9d9 | j_mayer | T0 = 0x02;
|
1183 | d9bce9d9 | j_mayer | } |
1184 | d9bce9d9 | j_mayer | RETURN(); |
1185 | d9bce9d9 | j_mayer | } |
1186 | d9bce9d9 | j_mayer | |
1187 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1188 | d9bce9d9 | j_mayer | void OPPROTO op_cmp_64 (void) |
1189 | 79aceca5 | bellard | { |
1190 | d9bce9d9 | j_mayer | if ((int64_t)T0 < (int64_t)T1) {
|
1191 | 79aceca5 | bellard | T0 = 0x08;
|
1192 | d9bce9d9 | j_mayer | } else if ((int64_t)T0 > (int64_t)T1) { |
1193 | 79aceca5 | bellard | T0 = 0x04;
|
1194 | 79aceca5 | bellard | } else {
|
1195 | 79aceca5 | bellard | T0 = 0x02;
|
1196 | 79aceca5 | bellard | } |
1197 | 79aceca5 | bellard | RETURN(); |
1198 | 79aceca5 | bellard | } |
1199 | d9bce9d9 | j_mayer | #endif
|
1200 | 79aceca5 | bellard | |
1201 | 79aceca5 | bellard | /* compare immediate */
|
1202 | d9bce9d9 | j_mayer | void OPPROTO op_cmpi (void) |
1203 | 79aceca5 | bellard | { |
1204 | d9bce9d9 | j_mayer | if ((int32_t)T0 < (int32_t)PARAM1) {
|
1205 | 79aceca5 | bellard | T0 = 0x08;
|
1206 | d9bce9d9 | j_mayer | } else if ((int32_t)T0 > (int32_t)PARAM1) { |
1207 | 79aceca5 | bellard | T0 = 0x04;
|
1208 | 79aceca5 | bellard | } else {
|
1209 | 79aceca5 | bellard | T0 = 0x02;
|
1210 | 79aceca5 | bellard | } |
1211 | 79aceca5 | bellard | RETURN(); |
1212 | 79aceca5 | bellard | } |
1213 | 79aceca5 | bellard | |
1214 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1215 | d9bce9d9 | j_mayer | void OPPROTO op_cmpi_64 (void) |
1216 | d9bce9d9 | j_mayer | { |
1217 | d9bce9d9 | j_mayer | if ((int64_t)T0 < (int64_t)((int32_t)PARAM1)) {
|
1218 | d9bce9d9 | j_mayer | T0 = 0x08;
|
1219 | d9bce9d9 | j_mayer | } else if ((int64_t)T0 > (int64_t)((int32_t)PARAM1)) { |
1220 | d9bce9d9 | j_mayer | T0 = 0x04;
|
1221 | d9bce9d9 | j_mayer | } else {
|
1222 | d9bce9d9 | j_mayer | T0 = 0x02;
|
1223 | d9bce9d9 | j_mayer | } |
1224 | d9bce9d9 | j_mayer | RETURN(); |
1225 | d9bce9d9 | j_mayer | } |
1226 | d9bce9d9 | j_mayer | #endif
|
1227 | d9bce9d9 | j_mayer | |
1228 | 79aceca5 | bellard | /* compare logical */
|
1229 | d9bce9d9 | j_mayer | void OPPROTO op_cmpl (void) |
1230 | 79aceca5 | bellard | { |
1231 | d9bce9d9 | j_mayer | if ((uint32_t)T0 < (uint32_t)T1) {
|
1232 | 79aceca5 | bellard | T0 = 0x08;
|
1233 | d9bce9d9 | j_mayer | } else if ((uint32_t)T0 > (uint32_t)T1) { |
1234 | 79aceca5 | bellard | T0 = 0x04;
|
1235 | 79aceca5 | bellard | } else {
|
1236 | 79aceca5 | bellard | T0 = 0x02;
|
1237 | 79aceca5 | bellard | } |
1238 | 79aceca5 | bellard | RETURN(); |
1239 | 79aceca5 | bellard | } |
1240 | 79aceca5 | bellard | |
1241 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1242 | d9bce9d9 | j_mayer | void OPPROTO op_cmpl_64 (void) |
1243 | d9bce9d9 | j_mayer | { |
1244 | d9bce9d9 | j_mayer | if ((uint64_t)T0 < (uint64_t)T1) {
|
1245 | d9bce9d9 | j_mayer | T0 = 0x08;
|
1246 | d9bce9d9 | j_mayer | } else if ((uint64_t)T0 > (uint64_t)T1) { |
1247 | d9bce9d9 | j_mayer | T0 = 0x04;
|
1248 | d9bce9d9 | j_mayer | } else {
|
1249 | d9bce9d9 | j_mayer | T0 = 0x02;
|
1250 | d9bce9d9 | j_mayer | } |
1251 | d9bce9d9 | j_mayer | RETURN(); |
1252 | d9bce9d9 | j_mayer | } |
1253 | d9bce9d9 | j_mayer | #endif
|
1254 | d9bce9d9 | j_mayer | |
1255 | 79aceca5 | bellard | /* compare logical immediate */
|
1256 | d9bce9d9 | j_mayer | void OPPROTO op_cmpli (void) |
1257 | d9bce9d9 | j_mayer | { |
1258 | d9bce9d9 | j_mayer | if ((uint32_t)T0 < (uint32_t)PARAM1) {
|
1259 | d9bce9d9 | j_mayer | T0 = 0x08;
|
1260 | d9bce9d9 | j_mayer | } else if ((uint32_t)T0 > (uint32_t)PARAM1) { |
1261 | d9bce9d9 | j_mayer | T0 = 0x04;
|
1262 | d9bce9d9 | j_mayer | } else {
|
1263 | d9bce9d9 | j_mayer | T0 = 0x02;
|
1264 | d9bce9d9 | j_mayer | } |
1265 | d9bce9d9 | j_mayer | RETURN(); |
1266 | d9bce9d9 | j_mayer | } |
1267 | d9bce9d9 | j_mayer | |
1268 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1269 | d9bce9d9 | j_mayer | void OPPROTO op_cmpli_64 (void) |
1270 | 79aceca5 | bellard | { |
1271 | d9bce9d9 | j_mayer | if ((uint64_t)T0 < (uint64_t)PARAM1) {
|
1272 | 79aceca5 | bellard | T0 = 0x08;
|
1273 | d9bce9d9 | j_mayer | } else if ((uint64_t)T0 > (uint64_t)PARAM1) { |
1274 | 79aceca5 | bellard | T0 = 0x04;
|
1275 | 79aceca5 | bellard | } else {
|
1276 | 79aceca5 | bellard | T0 = 0x02;
|
1277 | 79aceca5 | bellard | } |
1278 | 79aceca5 | bellard | RETURN(); |
1279 | 79aceca5 | bellard | } |
1280 | d9bce9d9 | j_mayer | #endif
|
1281 | d9bce9d9 | j_mayer | |
1282 | d9bce9d9 | j_mayer | void OPPROTO op_isel (void) |
1283 | d9bce9d9 | j_mayer | { |
1284 | d9bce9d9 | j_mayer | if (T0)
|
1285 | d9bce9d9 | j_mayer | T0 = T1; |
1286 | d9bce9d9 | j_mayer | else
|
1287 | d9bce9d9 | j_mayer | T0 = T2; |
1288 | d9bce9d9 | j_mayer | RETURN(); |
1289 | d9bce9d9 | j_mayer | } |
1290 | d9bce9d9 | j_mayer | |
1291 | d9bce9d9 | j_mayer | void OPPROTO op_popcntb (void) |
1292 | d9bce9d9 | j_mayer | { |
1293 | d9bce9d9 | j_mayer | do_popcntb(); |
1294 | d9bce9d9 | j_mayer | RETURN(); |
1295 | d9bce9d9 | j_mayer | } |
1296 | d9bce9d9 | j_mayer | |
1297 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1298 | d9bce9d9 | j_mayer | void OPPROTO op_popcntb_64 (void) |
1299 | d9bce9d9 | j_mayer | { |
1300 | d9bce9d9 | j_mayer | do_popcntb_64(); |
1301 | d9bce9d9 | j_mayer | RETURN(); |
1302 | d9bce9d9 | j_mayer | } |
1303 | d9bce9d9 | j_mayer | #endif
|
1304 | 79aceca5 | bellard | |
1305 | 79aceca5 | bellard | /*** Integer logical ***/
|
1306 | 79aceca5 | bellard | /* and */
|
1307 | 79aceca5 | bellard | PPC_OP(and) |
1308 | 79aceca5 | bellard | { |
1309 | 79aceca5 | bellard | T0 &= T1; |
1310 | 79aceca5 | bellard | RETURN(); |
1311 | 79aceca5 | bellard | } |
1312 | 79aceca5 | bellard | |
1313 | 79aceca5 | bellard | /* andc */
|
1314 | 79aceca5 | bellard | PPC_OP(andc) |
1315 | 79aceca5 | bellard | { |
1316 | 79aceca5 | bellard | T0 &= ~T1; |
1317 | 79aceca5 | bellard | RETURN(); |
1318 | 79aceca5 | bellard | } |
1319 | 79aceca5 | bellard | |
1320 | 79aceca5 | bellard | /* andi. */
|
1321 | 76a66253 | j_mayer | void OPPROTO op_andi_T0 (void) |
1322 | 79aceca5 | bellard | { |
1323 | 79aceca5 | bellard | T0 &= PARAM(1);
|
1324 | 79aceca5 | bellard | RETURN(); |
1325 | 79aceca5 | bellard | } |
1326 | 79aceca5 | bellard | |
1327 | 76a66253 | j_mayer | void OPPROTO op_andi_T1 (void) |
1328 | 76a66253 | j_mayer | { |
1329 | 76a66253 | j_mayer | T1 &= PARAM1; |
1330 | 76a66253 | j_mayer | RETURN(); |
1331 | 76a66253 | j_mayer | } |
1332 | 76a66253 | j_mayer | |
1333 | 79aceca5 | bellard | /* count leading zero */
|
1334 | 76a66253 | j_mayer | void OPPROTO op_cntlzw (void) |
1335 | 79aceca5 | bellard | { |
1336 | 0487d6a8 | j_mayer | T0 = _do_cntlzw(T0); |
1337 | 79aceca5 | bellard | RETURN(); |
1338 | 79aceca5 | bellard | } |
1339 | 79aceca5 | bellard | |
1340 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1341 | d9bce9d9 | j_mayer | void OPPROTO op_cntlzd (void) |
1342 | d9bce9d9 | j_mayer | { |
1343 | 0487d6a8 | j_mayer | T0 = _do_cntlzd(T0); |
1344 | d9bce9d9 | j_mayer | RETURN(); |
1345 | d9bce9d9 | j_mayer | } |
1346 | d9bce9d9 | j_mayer | #endif
|
1347 | d9bce9d9 | j_mayer | |
1348 | 79aceca5 | bellard | /* eqv */
|
1349 | 79aceca5 | bellard | PPC_OP(eqv) |
1350 | 79aceca5 | bellard | { |
1351 | 79aceca5 | bellard | T0 = ~(T0 ^ T1); |
1352 | 79aceca5 | bellard | RETURN(); |
1353 | 79aceca5 | bellard | } |
1354 | 79aceca5 | bellard | |
1355 | 79aceca5 | bellard | /* extend sign byte */
|
1356 | d9bce9d9 | j_mayer | void OPPROTO op_extsb (void) |
1357 | 79aceca5 | bellard | { |
1358 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
1359 | d9bce9d9 | j_mayer | T0 = (int64_t)((int8_t)T0); |
1360 | d9bce9d9 | j_mayer | #else
|
1361 | d9bce9d9 | j_mayer | T0 = (int32_t)((int8_t)T0); |
1362 | d9bce9d9 | j_mayer | #endif
|
1363 | 79aceca5 | bellard | RETURN(); |
1364 | 79aceca5 | bellard | } |
1365 | 79aceca5 | bellard | |
1366 | 79aceca5 | bellard | /* extend sign half word */
|
1367 | d9bce9d9 | j_mayer | void OPPROTO op_extsh (void) |
1368 | 79aceca5 | bellard | { |
1369 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
1370 | d9bce9d9 | j_mayer | T0 = (int64_t)((int16_t)T0); |
1371 | d9bce9d9 | j_mayer | #else
|
1372 | d9bce9d9 | j_mayer | T0 = (int32_t)((int16_t)T0); |
1373 | d9bce9d9 | j_mayer | #endif
|
1374 | 79aceca5 | bellard | RETURN(); |
1375 | 79aceca5 | bellard | } |
1376 | 79aceca5 | bellard | |
1377 | d9bce9d9 | j_mayer | #if defined (TARGET_PPC64)
|
1378 | d9bce9d9 | j_mayer | void OPPROTO op_extsw (void) |
1379 | d9bce9d9 | j_mayer | { |
1380 | d9bce9d9 | j_mayer | T0 = (int64_t)((int32_t)T0); |
1381 | d9bce9d9 | j_mayer | RETURN(); |
1382 | d9bce9d9 | j_mayer | } |
1383 | d9bce9d9 | j_mayer | #endif
|
1384 | d9bce9d9 | j_mayer | |
1385 | 79aceca5 | bellard | /* nand */
|
1386 | 79aceca5 | bellard | PPC_OP(nand) |
1387 | 79aceca5 | bellard | { |
1388 | 79aceca5 | bellard | T0 = ~(T0 & T1); |
1389 | 79aceca5 | bellard | RETURN(); |
1390 | 79aceca5 | bellard | } |
1391 | 79aceca5 | bellard | |
1392 | 79aceca5 | bellard | /* nor */
|
1393 | 79aceca5 | bellard | PPC_OP(nor) |
1394 | 79aceca5 | bellard | { |
1395 | 79aceca5 | bellard | T0 = ~(T0 | T1); |
1396 | 79aceca5 | bellard | RETURN(); |
1397 | 79aceca5 | bellard | } |
1398 | 79aceca5 | bellard | |
1399 | 79aceca5 | bellard | /* or */
|
1400 | 79aceca5 | bellard | PPC_OP(or) |
1401 | 79aceca5 | bellard | { |
1402 | 79aceca5 | bellard | T0 |= T1; |
1403 | 79aceca5 | bellard | RETURN(); |
1404 | 79aceca5 | bellard | } |
1405 | 79aceca5 | bellard | |
1406 | 79aceca5 | bellard | /* orc */
|
1407 | 79aceca5 | bellard | PPC_OP(orc) |
1408 | 79aceca5 | bellard | { |
1409 | 79aceca5 | bellard | T0 |= ~T1; |
1410 | 79aceca5 | bellard | RETURN(); |
1411 | 79aceca5 | bellard | } |
1412 | 79aceca5 | bellard | |
1413 | 79aceca5 | bellard | /* ori */
|
1414 | 79aceca5 | bellard | PPC_OP(ori) |
1415 | 79aceca5 | bellard | { |
1416 | 79aceca5 | bellard | T0 |= PARAM(1);
|
1417 | 79aceca5 | bellard | RETURN(); |
1418 | 79aceca5 | bellard | } |
1419 | 79aceca5 | bellard | |
1420 | 79aceca5 | bellard | /* xor */
|
1421 | 79aceca5 | bellard | PPC_OP(xor) |
1422 | 79aceca5 | bellard | { |
1423 | 79aceca5 | bellard | T0 ^= T1; |
1424 | 79aceca5 | bellard | RETURN(); |
1425 | 79aceca5 | bellard | } |
1426 | 79aceca5 | bellard | |
1427 | 79aceca5 | bellard | /* xori */
|
1428 | 79aceca5 | bellard | PPC_OP(xori) |
1429 | 79aceca5 | bellard | { |
1430 | 79aceca5 | bellard | T0 ^= PARAM(1);
|
1431 | 79aceca5 | bellard | RETURN(); |
1432 | 79aceca5 | bellard | } |
1433 | 79aceca5 | bellard | |
1434 | 79aceca5 | bellard | /*** Integer rotate ***/
|
1435 | 76a66253 | j_mayer | void OPPROTO op_rotl32_T0_T1 (void) |
1436 | 79aceca5 | bellard | { |
1437 | 76a66253 | j_mayer | T0 = rotl32(T0, T1 & 0x1F);
|
1438 | 79aceca5 | bellard | RETURN(); |
1439 | 79aceca5 | bellard | } |
1440 | 79aceca5 | bellard | |
1441 | 76a66253 | j_mayer | void OPPROTO op_rotli32_T0 (void) |
1442 | 79aceca5 | bellard | { |
1443 | 76a66253 | j_mayer | T0 = rotl32(T0, PARAM1); |
1444 | 79aceca5 | bellard | RETURN(); |
1445 | 79aceca5 | bellard | } |
1446 | 79aceca5 | bellard | |
1447 | 51789c41 | j_mayer | #if defined(TARGET_PPC64)
|
1448 | 51789c41 | j_mayer | void OPPROTO op_rotl64_T0_T1 (void) |
1449 | 51789c41 | j_mayer | { |
1450 | 51789c41 | j_mayer | T0 = rotl64(T0, T1 & 0x3F);
|
1451 | 51789c41 | j_mayer | RETURN(); |
1452 | 51789c41 | j_mayer | } |
1453 | 51789c41 | j_mayer | |
1454 | 51789c41 | j_mayer | void OPPROTO op_rotli64_T0 (void) |
1455 | 51789c41 | j_mayer | { |
1456 | 51789c41 | j_mayer | T0 = rotl64(T0, PARAM1); |
1457 | 51789c41 | j_mayer | RETURN(); |
1458 | 51789c41 | j_mayer | } |
1459 | 51789c41 | j_mayer | #endif
|
1460 | 51789c41 | j_mayer | |
1461 | 79aceca5 | bellard | /*** Integer shift ***/
|
1462 | 79aceca5 | bellard | /* shift left word */
|
1463 | d9bce9d9 | j_mayer | void OPPROTO op_slw (void) |
1464 | 79aceca5 | bellard | { |
1465 | 79aceca5 | bellard | if (T1 & 0x20) { |
1466 | 79aceca5 | bellard | T0 = 0;
|
1467 | 79aceca5 | bellard | } else {
|
1468 | d9bce9d9 | j_mayer | T0 = (uint32_t)(T0 << T1); |
1469 | d9bce9d9 | j_mayer | } |
1470 | d9bce9d9 | j_mayer | RETURN(); |
1471 | d9bce9d9 | j_mayer | } |
1472 | d9bce9d9 | j_mayer | |
1473 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1474 | d9bce9d9 | j_mayer | void OPPROTO op_sld (void) |
1475 | d9bce9d9 | j_mayer | { |
1476 | d9bce9d9 | j_mayer | if (T1 & 0x40) { |
1477 | d9bce9d9 | j_mayer | T0 = 0;
|
1478 | d9bce9d9 | j_mayer | } else {
|
1479 | 79aceca5 | bellard | T0 = T0 << T1; |
1480 | 79aceca5 | bellard | } |
1481 | 79aceca5 | bellard | RETURN(); |
1482 | 79aceca5 | bellard | } |
1483 | d9bce9d9 | j_mayer | #endif
|
1484 | 79aceca5 | bellard | |
1485 | 79aceca5 | bellard | /* shift right algebraic word */
|
1486 | 76a66253 | j_mayer | void OPPROTO op_sraw (void) |
1487 | 79aceca5 | bellard | { |
1488 | 9a64fbe4 | bellard | do_sraw(); |
1489 | 79aceca5 | bellard | RETURN(); |
1490 | 79aceca5 | bellard | } |
1491 | 79aceca5 | bellard | |
1492 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1493 | d9bce9d9 | j_mayer | void OPPROTO op_srad (void) |
1494 | d9bce9d9 | j_mayer | { |
1495 | d9bce9d9 | j_mayer | do_srad(); |
1496 | d9bce9d9 | j_mayer | RETURN(); |
1497 | d9bce9d9 | j_mayer | } |
1498 | d9bce9d9 | j_mayer | #endif
|
1499 | d9bce9d9 | j_mayer | |
1500 | 79aceca5 | bellard | /* shift right algebraic word immediate */
|
1501 | d9bce9d9 | j_mayer | void OPPROTO op_srawi (void) |
1502 | 79aceca5 | bellard | { |
1503 | d9bce9d9 | j_mayer | uint32_t mask = (uint32_t)PARAM2; |
1504 | d9bce9d9 | j_mayer | |
1505 | d9bce9d9 | j_mayer | T0 = (int32_t)T0 >> PARAM1; |
1506 | d9bce9d9 | j_mayer | if ((int32_t)T1 < 0 && (T1 & mask) != 0) { |
1507 | 79aceca5 | bellard | xer_ca = 1;
|
1508 | 79aceca5 | bellard | } else {
|
1509 | 79aceca5 | bellard | xer_ca = 0;
|
1510 | 79aceca5 | bellard | } |
1511 | 79aceca5 | bellard | RETURN(); |
1512 | 79aceca5 | bellard | } |
1513 | 79aceca5 | bellard | |
1514 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1515 | d9bce9d9 | j_mayer | void OPPROTO op_sradi (void) |
1516 | d9bce9d9 | j_mayer | { |
1517 | d9bce9d9 | j_mayer | uint64_t mask = ((uint64_t)PARAM2 << 32) | (uint64_t)PARAM3;
|
1518 | d9bce9d9 | j_mayer | |
1519 | d9bce9d9 | j_mayer | T0 = (int64_t)T0 >> PARAM1; |
1520 | d9bce9d9 | j_mayer | if ((int64_t)T1 < 0 && ((uint64_t)T1 & mask) != 0) { |
1521 | d9bce9d9 | j_mayer | xer_ca = 1;
|
1522 | d9bce9d9 | j_mayer | } else {
|
1523 | d9bce9d9 | j_mayer | xer_ca = 0;
|
1524 | d9bce9d9 | j_mayer | } |
1525 | d9bce9d9 | j_mayer | RETURN(); |
1526 | d9bce9d9 | j_mayer | } |
1527 | d9bce9d9 | j_mayer | #endif
|
1528 | d9bce9d9 | j_mayer | |
1529 | 79aceca5 | bellard | /* shift right word */
|
1530 | d9bce9d9 | j_mayer | void OPPROTO op_srw (void) |
1531 | 79aceca5 | bellard | { |
1532 | 79aceca5 | bellard | if (T1 & 0x20) { |
1533 | 79aceca5 | bellard | T0 = 0;
|
1534 | 79aceca5 | bellard | } else {
|
1535 | d9bce9d9 | j_mayer | T0 = (uint32_t)T0 >> T1; |
1536 | d9bce9d9 | j_mayer | } |
1537 | d9bce9d9 | j_mayer | RETURN(); |
1538 | d9bce9d9 | j_mayer | } |
1539 | d9bce9d9 | j_mayer | |
1540 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1541 | d9bce9d9 | j_mayer | void OPPROTO op_srd (void) |
1542 | d9bce9d9 | j_mayer | { |
1543 | d9bce9d9 | j_mayer | if (T1 & 0x40) { |
1544 | d9bce9d9 | j_mayer | T0 = 0;
|
1545 | d9bce9d9 | j_mayer | } else {
|
1546 | d9bce9d9 | j_mayer | T0 = (uint64_t)T0 >> T1; |
1547 | 79aceca5 | bellard | } |
1548 | 79aceca5 | bellard | RETURN(); |
1549 | 79aceca5 | bellard | } |
1550 | d9bce9d9 | j_mayer | #endif
|
1551 | 79aceca5 | bellard | |
1552 | 76a66253 | j_mayer | void OPPROTO op_sl_T0_T1 (void) |
1553 | 76a66253 | j_mayer | { |
1554 | 76a66253 | j_mayer | T0 = T0 << T1; |
1555 | 76a66253 | j_mayer | RETURN(); |
1556 | 76a66253 | j_mayer | } |
1557 | 76a66253 | j_mayer | |
1558 | 76a66253 | j_mayer | void OPPROTO op_sli_T0 (void) |
1559 | 76a66253 | j_mayer | { |
1560 | 76a66253 | j_mayer | T0 = T0 << PARAM1; |
1561 | 76a66253 | j_mayer | RETURN(); |
1562 | 76a66253 | j_mayer | } |
1563 | 76a66253 | j_mayer | |
1564 | 76a66253 | j_mayer | void OPPROTO op_srl_T0_T1 (void) |
1565 | 76a66253 | j_mayer | { |
1566 | d9bce9d9 | j_mayer | T0 = (uint32_t)T0 >> T1; |
1567 | d9bce9d9 | j_mayer | RETURN(); |
1568 | d9bce9d9 | j_mayer | } |
1569 | d9bce9d9 | j_mayer | |
1570 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1571 | d9bce9d9 | j_mayer | void OPPROTO op_srl_T0_T1_64 (void) |
1572 | d9bce9d9 | j_mayer | { |
1573 | d9bce9d9 | j_mayer | T0 = (uint32_t)T0 >> T1; |
1574 | 76a66253 | j_mayer | RETURN(); |
1575 | 76a66253 | j_mayer | } |
1576 | d9bce9d9 | j_mayer | #endif
|
1577 | 76a66253 | j_mayer | |
1578 | 76a66253 | j_mayer | void OPPROTO op_srli_T0 (void) |
1579 | 76a66253 | j_mayer | { |
1580 | d9bce9d9 | j_mayer | T0 = (uint32_t)T0 >> PARAM1; |
1581 | 76a66253 | j_mayer | RETURN(); |
1582 | 76a66253 | j_mayer | } |
1583 | 76a66253 | j_mayer | |
1584 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1585 | d9bce9d9 | j_mayer | void OPPROTO op_srli_T0_64 (void) |
1586 | d9bce9d9 | j_mayer | { |
1587 | d9bce9d9 | j_mayer | T0 = (uint64_t)T0 >> PARAM1; |
1588 | d9bce9d9 | j_mayer | RETURN(); |
1589 | d9bce9d9 | j_mayer | } |
1590 | d9bce9d9 | j_mayer | #endif
|
1591 | d9bce9d9 | j_mayer | |
1592 | 76a66253 | j_mayer | void OPPROTO op_srli_T1 (void) |
1593 | 76a66253 | j_mayer | { |
1594 | d9bce9d9 | j_mayer | T1 = (uint32_t)T1 >> PARAM1; |
1595 | 76a66253 | j_mayer | RETURN(); |
1596 | 76a66253 | j_mayer | } |
1597 | 76a66253 | j_mayer | |
1598 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1599 | d9bce9d9 | j_mayer | void OPPROTO op_srli_T1_64 (void) |
1600 | d9bce9d9 | j_mayer | { |
1601 | d9bce9d9 | j_mayer | T1 = (uint64_t)T1 >> PARAM1; |
1602 | d9bce9d9 | j_mayer | RETURN(); |
1603 | d9bce9d9 | j_mayer | } |
1604 | d9bce9d9 | j_mayer | #endif
|
1605 | d9bce9d9 | j_mayer | |
1606 | 79aceca5 | bellard | /*** Floating-Point arithmetic ***/
|
1607 | 9a64fbe4 | bellard | /* fadd - fadd. */
|
1608 | 9a64fbe4 | bellard | PPC_OP(fadd) |
1609 | 79aceca5 | bellard | { |
1610 | 76a66253 | j_mayer | FT0 = float64_add(FT0, FT1, &env->fp_status); |
1611 | 79aceca5 | bellard | RETURN(); |
1612 | 79aceca5 | bellard | } |
1613 | 79aceca5 | bellard | |
1614 | 9a64fbe4 | bellard | /* fsub - fsub. */
|
1615 | 9a64fbe4 | bellard | PPC_OP(fsub) |
1616 | 79aceca5 | bellard | { |
1617 | 76a66253 | j_mayer | FT0 = float64_sub(FT0, FT1, &env->fp_status); |
1618 | 79aceca5 | bellard | RETURN(); |
1619 | 79aceca5 | bellard | } |
1620 | 79aceca5 | bellard | |
1621 | 9a64fbe4 | bellard | /* fmul - fmul. */
|
1622 | 9a64fbe4 | bellard | PPC_OP(fmul) |
1623 | 79aceca5 | bellard | { |
1624 | 76a66253 | j_mayer | FT0 = float64_mul(FT0, FT1, &env->fp_status); |
1625 | 79aceca5 | bellard | RETURN(); |
1626 | 79aceca5 | bellard | } |
1627 | 79aceca5 | bellard | |
1628 | 9a64fbe4 | bellard | /* fdiv - fdiv. */
|
1629 | 9a64fbe4 | bellard | PPC_OP(fdiv) |
1630 | 79aceca5 | bellard | { |
1631 | fdabc366 | bellard | FT0 = float64_div(FT0, FT1, &env->fp_status); |
1632 | 79aceca5 | bellard | RETURN(); |
1633 | 79aceca5 | bellard | } |
1634 | 28b6751f | bellard | |
1635 | 9a64fbe4 | bellard | /* fsqrt - fsqrt. */
|
1636 | 9a64fbe4 | bellard | PPC_OP(fsqrt) |
1637 | 28b6751f | bellard | { |
1638 | 9a64fbe4 | bellard | do_fsqrt(); |
1639 | 9a64fbe4 | bellard | RETURN(); |
1640 | 28b6751f | bellard | } |
1641 | 28b6751f | bellard | |
1642 | 9a64fbe4 | bellard | /* fres - fres. */
|
1643 | 9a64fbe4 | bellard | PPC_OP(fres) |
1644 | 28b6751f | bellard | { |
1645 | 9a64fbe4 | bellard | do_fres(); |
1646 | 9a64fbe4 | bellard | RETURN(); |
1647 | 28b6751f | bellard | } |
1648 | 28b6751f | bellard | |
1649 | 9a64fbe4 | bellard | /* frsqrte - frsqrte. */
|
1650 | 9a64fbe4 | bellard | PPC_OP(frsqrte) |
1651 | 28b6751f | bellard | { |
1652 | 4ecc3190 | bellard | do_frsqrte(); |
1653 | 9a64fbe4 | bellard | RETURN(); |
1654 | 28b6751f | bellard | } |
1655 | 28b6751f | bellard | |
1656 | 9a64fbe4 | bellard | /* fsel - fsel. */
|
1657 | 9a64fbe4 | bellard | PPC_OP(fsel) |
1658 | 28b6751f | bellard | { |
1659 | 9a64fbe4 | bellard | do_fsel(); |
1660 | 9a64fbe4 | bellard | RETURN(); |
1661 | 28b6751f | bellard | } |
1662 | 28b6751f | bellard | |
1663 | 9a64fbe4 | bellard | /*** Floating-Point multiply-and-add ***/
|
1664 | 9a64fbe4 | bellard | /* fmadd - fmadd. */
|
1665 | 9a64fbe4 | bellard | PPC_OP(fmadd) |
1666 | 28b6751f | bellard | { |
1667 | e864cabd | j_mayer | #if USE_PRECISE_EMULATION
|
1668 | e864cabd | j_mayer | do_fmadd(); |
1669 | e864cabd | j_mayer | #else
|
1670 | 76a66253 | j_mayer | FT0 = float64_mul(FT0, FT1, &env->fp_status); |
1671 | 76a66253 | j_mayer | FT0 = float64_add(FT0, FT2, &env->fp_status); |
1672 | e864cabd | j_mayer | #endif
|
1673 | 9a64fbe4 | bellard | RETURN(); |
1674 | 28b6751f | bellard | } |
1675 | 28b6751f | bellard | |
1676 | 9a64fbe4 | bellard | /* fmsub - fmsub. */
|
1677 | 9a64fbe4 | bellard | PPC_OP(fmsub) |
1678 | 28b6751f | bellard | { |
1679 | e864cabd | j_mayer | #if USE_PRECISE_EMULATION
|
1680 | e864cabd | j_mayer | do_fmsub(); |
1681 | e864cabd | j_mayer | #else
|
1682 | 76a66253 | j_mayer | FT0 = float64_mul(FT0, FT1, &env->fp_status); |
1683 | 76a66253 | j_mayer | FT0 = float64_sub(FT0, FT2, &env->fp_status); |
1684 | e864cabd | j_mayer | #endif
|
1685 | 9a64fbe4 | bellard | RETURN(); |
1686 | 28b6751f | bellard | } |
1687 | 28b6751f | bellard | |
1688 | 9a64fbe4 | bellard | /* fnmadd - fnmadd. - fnmadds - fnmadds. */
|
1689 | 9a64fbe4 | bellard | PPC_OP(fnmadd) |
1690 | 28b6751f | bellard | { |
1691 | 4b3686fa | bellard | do_fnmadd(); |
1692 | 9a64fbe4 | bellard | RETURN(); |
1693 | 28b6751f | bellard | } |
1694 | 28b6751f | bellard | |
1695 | 9a64fbe4 | bellard | /* fnmsub - fnmsub. */
|
1696 | 9a64fbe4 | bellard | PPC_OP(fnmsub) |
1697 | 28b6751f | bellard | { |
1698 | 4b3686fa | bellard | do_fnmsub(); |
1699 | 9a64fbe4 | bellard | RETURN(); |
1700 | 28b6751f | bellard | } |
1701 | 28b6751f | bellard | |
1702 | 9a64fbe4 | bellard | /*** Floating-Point round & convert ***/
|
1703 | 9a64fbe4 | bellard | /* frsp - frsp. */
|
1704 | 9a64fbe4 | bellard | PPC_OP(frsp) |
1705 | 28b6751f | bellard | { |
1706 | 76a66253 | j_mayer | FT0 = float64_to_float32(FT0, &env->fp_status); |
1707 | 9a64fbe4 | bellard | RETURN(); |
1708 | 28b6751f | bellard | } |
1709 | 28b6751f | bellard | |
1710 | 9a64fbe4 | bellard | /* fctiw - fctiw. */
|
1711 | 9a64fbe4 | bellard | PPC_OP(fctiw) |
1712 | 28b6751f | bellard | { |
1713 | 9a64fbe4 | bellard | do_fctiw(); |
1714 | 9a64fbe4 | bellard | RETURN(); |
1715 | 28b6751f | bellard | } |
1716 | 28b6751f | bellard | |
1717 | 9a64fbe4 | bellard | /* fctiwz - fctiwz. */
|
1718 | 9a64fbe4 | bellard | PPC_OP(fctiwz) |
1719 | 28b6751f | bellard | { |
1720 | 9a64fbe4 | bellard | do_fctiwz(); |
1721 | 9a64fbe4 | bellard | RETURN(); |
1722 | 28b6751f | bellard | } |
1723 | 28b6751f | bellard | |
1724 | 426613db | j_mayer | #if defined(TARGET_PPC64)
|
1725 | 426613db | j_mayer | /* fcfid - fcfid. */
|
1726 | 426613db | j_mayer | PPC_OP(fcfid) |
1727 | 426613db | j_mayer | { |
1728 | 426613db | j_mayer | do_fcfid(); |
1729 | 426613db | j_mayer | RETURN(); |
1730 | 426613db | j_mayer | } |
1731 | 426613db | j_mayer | |
1732 | 426613db | j_mayer | /* fctid - fctid. */
|
1733 | 426613db | j_mayer | PPC_OP(fctid) |
1734 | 426613db | j_mayer | { |
1735 | 426613db | j_mayer | do_fctid(); |
1736 | 426613db | j_mayer | RETURN(); |
1737 | 426613db | j_mayer | } |
1738 | 426613db | j_mayer | |
1739 | 426613db | j_mayer | /* fctidz - fctidz. */
|
1740 | 426613db | j_mayer | PPC_OP(fctidz) |
1741 | 426613db | j_mayer | { |
1742 | 426613db | j_mayer | do_fctidz(); |
1743 | 426613db | j_mayer | RETURN(); |
1744 | 426613db | j_mayer | } |
1745 | 426613db | j_mayer | #endif
|
1746 | 426613db | j_mayer | |
1747 | 9a64fbe4 | bellard | /*** Floating-Point compare ***/
|
1748 | 9a64fbe4 | bellard | /* fcmpu */
|
1749 | 9a64fbe4 | bellard | PPC_OP(fcmpu) |
1750 | 28b6751f | bellard | { |
1751 | 9a64fbe4 | bellard | do_fcmpu(); |
1752 | 9a64fbe4 | bellard | RETURN(); |
1753 | 28b6751f | bellard | } |
1754 | 28b6751f | bellard | |
1755 | 9a64fbe4 | bellard | /* fcmpo */
|
1756 | 9a64fbe4 | bellard | PPC_OP(fcmpo) |
1757 | 28b6751f | bellard | { |
1758 | 9a64fbe4 | bellard | do_fcmpo(); |
1759 | 9a64fbe4 | bellard | RETURN(); |
1760 | fb0eaffc | bellard | } |
1761 | fb0eaffc | bellard | |
1762 | 9a64fbe4 | bellard | /*** Floating-point move ***/
|
1763 | 9a64fbe4 | bellard | /* fabs */
|
1764 | 9a64fbe4 | bellard | PPC_OP(fabs) |
1765 | fb0eaffc | bellard | { |
1766 | fdabc366 | bellard | FT0 = float64_abs(FT0); |
1767 | fb0eaffc | bellard | RETURN(); |
1768 | fb0eaffc | bellard | } |
1769 | fb0eaffc | bellard | |
1770 | 9a64fbe4 | bellard | /* fnabs */
|
1771 | 9a64fbe4 | bellard | PPC_OP(fnabs) |
1772 | fb0eaffc | bellard | { |
1773 | fdabc366 | bellard | FT0 = float64_abs(FT0); |
1774 | fdabc366 | bellard | FT0 = float64_chs(FT0); |
1775 | fb0eaffc | bellard | RETURN(); |
1776 | fb0eaffc | bellard | } |
1777 | fb0eaffc | bellard | |
1778 | 9a64fbe4 | bellard | /* fneg */
|
1779 | 9a64fbe4 | bellard | PPC_OP(fneg) |
1780 | fb0eaffc | bellard | { |
1781 | fdabc366 | bellard | FT0 = float64_chs(FT0); |
1782 | fb0eaffc | bellard | RETURN(); |
1783 | fb0eaffc | bellard | } |
1784 | fb0eaffc | bellard | |
1785 | 9a64fbe4 | bellard | /* Load and store */
|
1786 | 9a64fbe4 | bellard | #define MEMSUFFIX _raw
|
1787 | 76a66253 | j_mayer | #include "op_helper.h" |
1788 | 9a64fbe4 | bellard | #include "op_mem.h" |
1789 | a541f297 | bellard | #if !defined(CONFIG_USER_ONLY)
|
1790 | 9a64fbe4 | bellard | #define MEMSUFFIX _user
|
1791 | 76a66253 | j_mayer | #include "op_helper.h" |
1792 | 9a64fbe4 | bellard | #include "op_mem.h" |
1793 | 9a64fbe4 | bellard | #define MEMSUFFIX _kernel
|
1794 | 76a66253 | j_mayer | #include "op_helper.h" |
1795 | 9a64fbe4 | bellard | #include "op_mem.h" |
1796 | 9a64fbe4 | bellard | #endif
|
1797 | 9a64fbe4 | bellard | |
1798 | 4b3686fa | bellard | /* Special op to check and maybe clear reservation */
|
1799 | d9bce9d9 | j_mayer | void OPPROTO op_check_reservation (void) |
1800 | 4b3686fa | bellard | { |
1801 | fdabc366 | bellard | if ((uint32_t)env->reserve == (uint32_t)(T0 & ~0x00000003)) |
1802 | fdabc366 | bellard | env->reserve = -1;
|
1803 | 4b3686fa | bellard | RETURN(); |
1804 | 4b3686fa | bellard | } |
1805 | 4b3686fa | bellard | |
1806 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1807 | d9bce9d9 | j_mayer | void OPPROTO op_check_reservation_64 (void) |
1808 | d9bce9d9 | j_mayer | { |
1809 | d9bce9d9 | j_mayer | if ((uint64_t)env->reserve == (uint64_t)(T0 & ~0x00000003)) |
1810 | d9bce9d9 | j_mayer | env->reserve = -1;
|
1811 | d9bce9d9 | j_mayer | RETURN(); |
1812 | d9bce9d9 | j_mayer | } |
1813 | d9bce9d9 | j_mayer | #endif
|
1814 | d9bce9d9 | j_mayer | |
1815 | 9a64fbe4 | bellard | /* Return from interrupt */
|
1816 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
1817 | 76a66253 | j_mayer | void OPPROTO op_rfi (void) |
1818 | fb0eaffc | bellard | { |
1819 | fdabc366 | bellard | do_rfi(); |
1820 | fb0eaffc | bellard | RETURN(); |
1821 | fb0eaffc | bellard | } |
1822 | d9bce9d9 | j_mayer | |
1823 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1824 | 426613db | j_mayer | void OPPROTO op_rfid (void) |
1825 | 426613db | j_mayer | { |
1826 | 426613db | j_mayer | do_rfid(); |
1827 | 426613db | j_mayer | RETURN(); |
1828 | 426613db | j_mayer | } |
1829 | d9bce9d9 | j_mayer | #endif
|
1830 | 76a66253 | j_mayer | #endif
|
1831 | fb0eaffc | bellard | |
1832 | 9a64fbe4 | bellard | /* Trap word */
|
1833 | 76a66253 | j_mayer | void OPPROTO op_tw (void) |
1834 | fb0eaffc | bellard | { |
1835 | 76a66253 | j_mayer | do_tw(PARAM1); |
1836 | fb0eaffc | bellard | RETURN(); |
1837 | fb0eaffc | bellard | } |
1838 | fb0eaffc | bellard | |
1839 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1840 | d9bce9d9 | j_mayer | void OPPROTO op_td (void) |
1841 | d9bce9d9 | j_mayer | { |
1842 | d9bce9d9 | j_mayer | do_td(PARAM1); |
1843 | d9bce9d9 | j_mayer | RETURN(); |
1844 | d9bce9d9 | j_mayer | } |
1845 | d9bce9d9 | j_mayer | #endif
|
1846 | d9bce9d9 | j_mayer | |
1847 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
1848 | 9a64fbe4 | bellard | /* tlbia */
|
1849 | 9a64fbe4 | bellard | PPC_OP(tlbia) |
1850 | fb0eaffc | bellard | { |
1851 | 9a64fbe4 | bellard | do_tlbia(); |
1852 | 9a64fbe4 | bellard | RETURN(); |
1853 | 9a64fbe4 | bellard | } |
1854 | 9a64fbe4 | bellard | |
1855 | 9a64fbe4 | bellard | /* tlbie */
|
1856 | d9bce9d9 | j_mayer | void OPPROTO op_tlbie (void) |
1857 | 9a64fbe4 | bellard | { |
1858 | 9a64fbe4 | bellard | do_tlbie(); |
1859 | fb0eaffc | bellard | RETURN(); |
1860 | 28b6751f | bellard | } |
1861 | d9bce9d9 | j_mayer | |
1862 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1863 | d9bce9d9 | j_mayer | void OPPROTO op_tlbie_64 (void) |
1864 | d9bce9d9 | j_mayer | { |
1865 | d9bce9d9 | j_mayer | do_tlbie_64(); |
1866 | d9bce9d9 | j_mayer | RETURN(); |
1867 | d9bce9d9 | j_mayer | } |
1868 | d9bce9d9 | j_mayer | #endif
|
1869 | d9bce9d9 | j_mayer | |
1870 | d9bce9d9 | j_mayer | #if defined(TARGET_PPC64)
|
1871 | d9bce9d9 | j_mayer | void OPPROTO op_slbia (void) |
1872 | d9bce9d9 | j_mayer | { |
1873 | d9bce9d9 | j_mayer | do_slbia(); |
1874 | d9bce9d9 | j_mayer | RETURN(); |
1875 | d9bce9d9 | j_mayer | } |
1876 | d9bce9d9 | j_mayer | |
1877 | d9bce9d9 | j_mayer | void OPPROTO op_slbie (void) |
1878 | d9bce9d9 | j_mayer | { |
1879 | d9bce9d9 | j_mayer | do_slbie(); |
1880 | d9bce9d9 | j_mayer | RETURN(); |
1881 | d9bce9d9 | j_mayer | } |
1882 | d9bce9d9 | j_mayer | #endif
|
1883 | 76a66253 | j_mayer | #endif
|
1884 | 3fc6c082 | bellard | |
1885 | 76a66253 | j_mayer | /* PowerPC 602/603/755 software TLB load instructions */
|
1886 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
1887 | 76a66253 | j_mayer | void OPPROTO op_6xx_tlbld (void) |
1888 | 76a66253 | j_mayer | { |
1889 | 76a66253 | j_mayer | do_load_6xx_tlb(0);
|
1890 | 76a66253 | j_mayer | RETURN(); |
1891 | 76a66253 | j_mayer | } |
1892 | 76a66253 | j_mayer | |
1893 | 76a66253 | j_mayer | void OPPROTO op_6xx_tlbli (void) |
1894 | 76a66253 | j_mayer | { |
1895 | 76a66253 | j_mayer | do_load_6xx_tlb(1);
|
1896 | 76a66253 | j_mayer | RETURN(); |
1897 | 76a66253 | j_mayer | } |
1898 | 76a66253 | j_mayer | #endif
|
1899 | 76a66253 | j_mayer | |
1900 | 76a66253 | j_mayer | /* 601 specific */
|
1901 | 76a66253 | j_mayer | void OPPROTO op_load_601_rtcl (void) |
1902 | 76a66253 | j_mayer | { |
1903 | 76a66253 | j_mayer | T0 = cpu_ppc601_load_rtcl(env); |
1904 | 76a66253 | j_mayer | RETURN(); |
1905 | 76a66253 | j_mayer | } |
1906 | 76a66253 | j_mayer | |
1907 | 76a66253 | j_mayer | void OPPROTO op_load_601_rtcu (void) |
1908 | 76a66253 | j_mayer | { |
1909 | 76a66253 | j_mayer | T0 = cpu_ppc601_load_rtcu(env); |
1910 | 76a66253 | j_mayer | RETURN(); |
1911 | 76a66253 | j_mayer | } |
1912 | 76a66253 | j_mayer | |
1913 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
1914 | 76a66253 | j_mayer | void OPPROTO op_store_601_rtcl (void) |
1915 | 76a66253 | j_mayer | { |
1916 | 76a66253 | j_mayer | cpu_ppc601_store_rtcl(env, T0); |
1917 | 76a66253 | j_mayer | RETURN(); |
1918 | 76a66253 | j_mayer | } |
1919 | 76a66253 | j_mayer | |
1920 | 76a66253 | j_mayer | void OPPROTO op_store_601_rtcu (void) |
1921 | 76a66253 | j_mayer | { |
1922 | 76a66253 | j_mayer | cpu_ppc601_store_rtcu(env, T0); |
1923 | 76a66253 | j_mayer | RETURN(); |
1924 | 76a66253 | j_mayer | } |
1925 | 76a66253 | j_mayer | |
1926 | 76a66253 | j_mayer | void OPPROTO op_load_601_bat (void) |
1927 | 76a66253 | j_mayer | { |
1928 | 76a66253 | j_mayer | T0 = env->IBAT[PARAM1][PARAM2]; |
1929 | 76a66253 | j_mayer | RETURN(); |
1930 | 76a66253 | j_mayer | } |
1931 | 76a66253 | j_mayer | #endif /* !defined(CONFIG_USER_ONLY) */ |
1932 | 76a66253 | j_mayer | |
1933 | 76a66253 | j_mayer | /* 601 unified BATs store.
|
1934 | 76a66253 | j_mayer | * To avoid using specific MMU code for 601, we store BATs in
|
1935 | 76a66253 | j_mayer | * IBAT and DBAT simultaneously, then emulate unified BATs.
|
1936 | 76a66253 | j_mayer | */
|
1937 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
1938 | 76a66253 | j_mayer | void OPPROTO op_store_601_batl (void) |
1939 | 76a66253 | j_mayer | { |
1940 | 76a66253 | j_mayer | int nr = PARAM1;
|
1941 | 76a66253 | j_mayer | |
1942 | 76a66253 | j_mayer | env->IBAT[1][nr] = T0;
|
1943 | 76a66253 | j_mayer | env->DBAT[1][nr] = T0;
|
1944 | 76a66253 | j_mayer | RETURN(); |
1945 | 76a66253 | j_mayer | } |
1946 | 76a66253 | j_mayer | |
1947 | 76a66253 | j_mayer | void OPPROTO op_store_601_batu (void) |
1948 | 76a66253 | j_mayer | { |
1949 | 76a66253 | j_mayer | do_store_601_batu(PARAM1); |
1950 | 76a66253 | j_mayer | RETURN(); |
1951 | 76a66253 | j_mayer | } |
1952 | 76a66253 | j_mayer | #endif /* !defined(CONFIG_USER_ONLY) */ |
1953 | 76a66253 | j_mayer | |
1954 | 76a66253 | j_mayer | /* PowerPC 601 specific instructions (POWER bridge) */
|
1955 | 76a66253 | j_mayer | /* XXX: those micro-ops need tests ! */
|
1956 | 76a66253 | j_mayer | void OPPROTO op_POWER_abs (void) |
1957 | 76a66253 | j_mayer | { |
1958 | 76a66253 | j_mayer | if (T0 == INT32_MIN)
|
1959 | 76a66253 | j_mayer | T0 = INT32_MAX; |
1960 | 76a66253 | j_mayer | else if (T0 < 0) |
1961 | 76a66253 | j_mayer | T0 = -T0; |
1962 | 76a66253 | j_mayer | RETURN(); |
1963 | 76a66253 | j_mayer | } |
1964 | 76a66253 | j_mayer | |
1965 | 76a66253 | j_mayer | void OPPROTO op_POWER_abso (void) |
1966 | 76a66253 | j_mayer | { |
1967 | 76a66253 | j_mayer | do_POWER_abso(); |
1968 | 76a66253 | j_mayer | RETURN(); |
1969 | 76a66253 | j_mayer | } |
1970 | 76a66253 | j_mayer | |
1971 | 76a66253 | j_mayer | void OPPROTO op_POWER_clcs (void) |
1972 | 76a66253 | j_mayer | { |
1973 | 76a66253 | j_mayer | do_POWER_clcs(); |
1974 | 76a66253 | j_mayer | RETURN(); |
1975 | 76a66253 | j_mayer | } |
1976 | 76a66253 | j_mayer | |
1977 | 76a66253 | j_mayer | void OPPROTO op_POWER_div (void) |
1978 | 76a66253 | j_mayer | { |
1979 | 76a66253 | j_mayer | do_POWER_div(); |
1980 | 76a66253 | j_mayer | RETURN(); |
1981 | 76a66253 | j_mayer | } |
1982 | 76a66253 | j_mayer | |
1983 | 76a66253 | j_mayer | void OPPROTO op_POWER_divo (void) |
1984 | 76a66253 | j_mayer | { |
1985 | 76a66253 | j_mayer | do_POWER_divo(); |
1986 | 76a66253 | j_mayer | RETURN(); |
1987 | 76a66253 | j_mayer | } |
1988 | 76a66253 | j_mayer | |
1989 | 76a66253 | j_mayer | void OPPROTO op_POWER_divs (void) |
1990 | 76a66253 | j_mayer | { |
1991 | 76a66253 | j_mayer | do_POWER_divs(); |
1992 | 76a66253 | j_mayer | RETURN(); |
1993 | 76a66253 | j_mayer | } |
1994 | 76a66253 | j_mayer | |
1995 | 76a66253 | j_mayer | void OPPROTO op_POWER_divso (void) |
1996 | 76a66253 | j_mayer | { |
1997 | 76a66253 | j_mayer | do_POWER_divso(); |
1998 | 76a66253 | j_mayer | RETURN(); |
1999 | 76a66253 | j_mayer | } |
2000 | 76a66253 | j_mayer | |
2001 | 76a66253 | j_mayer | void OPPROTO op_POWER_doz (void) |
2002 | 76a66253 | j_mayer | { |
2003 | d9bce9d9 | j_mayer | if ((int32_t)T1 > (int32_t)T0)
|
2004 | 76a66253 | j_mayer | T0 = T1 - T0; |
2005 | 76a66253 | j_mayer | else
|
2006 | 76a66253 | j_mayer | T0 = 0;
|
2007 | 76a66253 | j_mayer | RETURN(); |
2008 | 76a66253 | j_mayer | } |
2009 | 76a66253 | j_mayer | |
2010 | 76a66253 | j_mayer | void OPPROTO op_POWER_dozo (void) |
2011 | 76a66253 | j_mayer | { |
2012 | 76a66253 | j_mayer | do_POWER_dozo(); |
2013 | 76a66253 | j_mayer | RETURN(); |
2014 | 76a66253 | j_mayer | } |
2015 | 76a66253 | j_mayer | |
2016 | 76a66253 | j_mayer | void OPPROTO op_load_xer_cmp (void) |
2017 | 76a66253 | j_mayer | { |
2018 | 76a66253 | j_mayer | T2 = xer_cmp; |
2019 | 76a66253 | j_mayer | RETURN(); |
2020 | 76a66253 | j_mayer | } |
2021 | 76a66253 | j_mayer | |
2022 | 76a66253 | j_mayer | void OPPROTO op_POWER_maskg (void) |
2023 | 76a66253 | j_mayer | { |
2024 | 76a66253 | j_mayer | do_POWER_maskg(); |
2025 | 76a66253 | j_mayer | RETURN(); |
2026 | 76a66253 | j_mayer | } |
2027 | 76a66253 | j_mayer | |
2028 | 76a66253 | j_mayer | void OPPROTO op_POWER_maskir (void) |
2029 | 76a66253 | j_mayer | { |
2030 | 76a66253 | j_mayer | T0 = (T0 & ~T2) | (T1 & T2); |
2031 | 76a66253 | j_mayer | RETURN(); |
2032 | 76a66253 | j_mayer | } |
2033 | 76a66253 | j_mayer | |
2034 | 76a66253 | j_mayer | void OPPROTO op_POWER_mul (void) |
2035 | 76a66253 | j_mayer | { |
2036 | 76a66253 | j_mayer | uint64_t tmp; |
2037 | 76a66253 | j_mayer | |
2038 | 76a66253 | j_mayer | tmp = (uint64_t)T0 * (uint64_t)T1; |
2039 | 76a66253 | j_mayer | env->spr[SPR_MQ] = tmp >> 32;
|
2040 | 76a66253 | j_mayer | T0 = tmp; |
2041 | 76a66253 | j_mayer | RETURN(); |
2042 | 76a66253 | j_mayer | } |
2043 | 76a66253 | j_mayer | |
2044 | 76a66253 | j_mayer | void OPPROTO op_POWER_mulo (void) |
2045 | 76a66253 | j_mayer | { |
2046 | 76a66253 | j_mayer | do_POWER_mulo(); |
2047 | 76a66253 | j_mayer | RETURN(); |
2048 | 76a66253 | j_mayer | } |
2049 | 76a66253 | j_mayer | |
2050 | 76a66253 | j_mayer | void OPPROTO op_POWER_nabs (void) |
2051 | 76a66253 | j_mayer | { |
2052 | 76a66253 | j_mayer | if (T0 > 0) |
2053 | 76a66253 | j_mayer | T0 = -T0; |
2054 | 76a66253 | j_mayer | RETURN(); |
2055 | 76a66253 | j_mayer | } |
2056 | 76a66253 | j_mayer | |
2057 | 76a66253 | j_mayer | void OPPROTO op_POWER_nabso (void) |
2058 | 76a66253 | j_mayer | { |
2059 | 76a66253 | j_mayer | /* nabs never overflows */
|
2060 | 76a66253 | j_mayer | if (T0 > 0) |
2061 | 76a66253 | j_mayer | T0 = -T0; |
2062 | 76a66253 | j_mayer | xer_ov = 0;
|
2063 | 76a66253 | j_mayer | RETURN(); |
2064 | 76a66253 | j_mayer | } |
2065 | 76a66253 | j_mayer | |
2066 | 76a66253 | j_mayer | /* XXX: factorise POWER rotates... */
|
2067 | 76a66253 | j_mayer | void OPPROTO op_POWER_rlmi (void) |
2068 | 76a66253 | j_mayer | { |
2069 | 76a66253 | j_mayer | T0 = rotl32(T0, T2) & PARAM1; |
2070 | 76a66253 | j_mayer | T0 |= T1 & PARAM2; |
2071 | 76a66253 | j_mayer | RETURN(); |
2072 | 76a66253 | j_mayer | } |
2073 | 76a66253 | j_mayer | |
2074 | 76a66253 | j_mayer | void OPPROTO op_POWER_rrib (void) |
2075 | 76a66253 | j_mayer | { |
2076 | 76a66253 | j_mayer | T2 &= 0x1FUL;
|
2077 | 76a66253 | j_mayer | T0 = rotl32(T0 & INT32_MIN, T2); |
2078 | 76a66253 | j_mayer | T0 |= T1 & ~rotl32(INT32_MIN, T2); |
2079 | 76a66253 | j_mayer | RETURN(); |
2080 | 76a66253 | j_mayer | } |
2081 | 76a66253 | j_mayer | |
2082 | 76a66253 | j_mayer | void OPPROTO op_POWER_sle (void) |
2083 | 76a66253 | j_mayer | { |
2084 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2085 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, T1); |
2086 | 76a66253 | j_mayer | T0 = T0 << T1; |
2087 | 76a66253 | j_mayer | RETURN(); |
2088 | 76a66253 | j_mayer | } |
2089 | 76a66253 | j_mayer | |
2090 | 76a66253 | j_mayer | void OPPROTO op_POWER_sleq (void) |
2091 | 76a66253 | j_mayer | { |
2092 | 76a66253 | j_mayer | uint32_t tmp = env->spr[SPR_MQ]; |
2093 | 76a66253 | j_mayer | |
2094 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2095 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, T1); |
2096 | 76a66253 | j_mayer | T0 = T0 << T1; |
2097 | 76a66253 | j_mayer | T0 |= tmp >> (32 - T1);
|
2098 | 76a66253 | j_mayer | RETURN(); |
2099 | 76a66253 | j_mayer | } |
2100 | 76a66253 | j_mayer | |
2101 | 76a66253 | j_mayer | void OPPROTO op_POWER_sllq (void) |
2102 | 76a66253 | j_mayer | { |
2103 | 76a66253 | j_mayer | uint32_t msk = -1;
|
2104 | 76a66253 | j_mayer | |
2105 | 76a66253 | j_mayer | msk = msk << (T1 & 0x1FUL);
|
2106 | 76a66253 | j_mayer | if (T1 & 0x20UL) |
2107 | 76a66253 | j_mayer | msk = ~msk; |
2108 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2109 | 76a66253 | j_mayer | T0 = (T0 << T1) & msk; |
2110 | 76a66253 | j_mayer | T0 |= env->spr[SPR_MQ] & ~msk; |
2111 | 76a66253 | j_mayer | RETURN(); |
2112 | 76a66253 | j_mayer | } |
2113 | 76a66253 | j_mayer | |
2114 | 76a66253 | j_mayer | void OPPROTO op_POWER_slq (void) |
2115 | 76a66253 | j_mayer | { |
2116 | 76a66253 | j_mayer | uint32_t msk = -1, tmp;
|
2117 | 76a66253 | j_mayer | |
2118 | 76a66253 | j_mayer | msk = msk << (T1 & 0x1FUL);
|
2119 | 76a66253 | j_mayer | if (T1 & 0x20UL) |
2120 | 76a66253 | j_mayer | msk = ~msk; |
2121 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2122 | 76a66253 | j_mayer | tmp = rotl32(T0, T1); |
2123 | 76a66253 | j_mayer | T0 = tmp & msk; |
2124 | 76a66253 | j_mayer | env->spr[SPR_MQ] = tmp; |
2125 | 76a66253 | j_mayer | RETURN(); |
2126 | 76a66253 | j_mayer | } |
2127 | 76a66253 | j_mayer | |
2128 | 76a66253 | j_mayer | void OPPROTO op_POWER_sraq (void) |
2129 | 76a66253 | j_mayer | { |
2130 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, 32 - (T1 & 0x1FUL)); |
2131 | 76a66253 | j_mayer | if (T1 & 0x20UL) |
2132 | 76a66253 | j_mayer | T0 = -1L;
|
2133 | 76a66253 | j_mayer | else
|
2134 | d9bce9d9 | j_mayer | T0 = (int32_t)T0 >> T1; |
2135 | 76a66253 | j_mayer | RETURN(); |
2136 | 76a66253 | j_mayer | } |
2137 | 76a66253 | j_mayer | |
2138 | 76a66253 | j_mayer | void OPPROTO op_POWER_sre (void) |
2139 | 76a66253 | j_mayer | { |
2140 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2141 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
2142 | d9bce9d9 | j_mayer | T0 = (int32_t)T0 >> T1; |
2143 | 76a66253 | j_mayer | RETURN(); |
2144 | 76a66253 | j_mayer | } |
2145 | 76a66253 | j_mayer | |
2146 | 76a66253 | j_mayer | void OPPROTO op_POWER_srea (void) |
2147 | 76a66253 | j_mayer | { |
2148 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2149 | 76a66253 | j_mayer | env->spr[SPR_MQ] = T0 >> T1; |
2150 | d9bce9d9 | j_mayer | T0 = (int32_t)T0 >> T1; |
2151 | 76a66253 | j_mayer | RETURN(); |
2152 | 76a66253 | j_mayer | } |
2153 | 76a66253 | j_mayer | |
2154 | 76a66253 | j_mayer | void OPPROTO op_POWER_sreq (void) |
2155 | 76a66253 | j_mayer | { |
2156 | 76a66253 | j_mayer | uint32_t tmp; |
2157 | 76a66253 | j_mayer | int32_t msk; |
2158 | 76a66253 | j_mayer | |
2159 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2160 | 76a66253 | j_mayer | msk = INT32_MIN >> T1; |
2161 | 76a66253 | j_mayer | tmp = env->spr[SPR_MQ]; |
2162 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
2163 | 76a66253 | j_mayer | T0 = T0 >> T1; |
2164 | 76a66253 | j_mayer | T0 |= tmp & msk; |
2165 | 76a66253 | j_mayer | RETURN(); |
2166 | 76a66253 | j_mayer | } |
2167 | 76a66253 | j_mayer | |
2168 | 76a66253 | j_mayer | void OPPROTO op_POWER_srlq (void) |
2169 | 76a66253 | j_mayer | { |
2170 | 76a66253 | j_mayer | uint32_t tmp; |
2171 | 76a66253 | j_mayer | int32_t msk; |
2172 | 76a66253 | j_mayer | |
2173 | 76a66253 | j_mayer | msk = INT32_MIN >> (T1 & 0x1FUL);
|
2174 | 76a66253 | j_mayer | if (T1 & 0x20UL) |
2175 | 76a66253 | j_mayer | msk = ~msk; |
2176 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2177 | 76a66253 | j_mayer | tmp = env->spr[SPR_MQ]; |
2178 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
2179 | 76a66253 | j_mayer | T0 = T0 >> T1; |
2180 | 76a66253 | j_mayer | T0 &= msk; |
2181 | 76a66253 | j_mayer | T0 |= tmp & ~msk; |
2182 | 76a66253 | j_mayer | RETURN(); |
2183 | 76a66253 | j_mayer | } |
2184 | 76a66253 | j_mayer | |
2185 | 76a66253 | j_mayer | void OPPROTO op_POWER_srq (void) |
2186 | 76a66253 | j_mayer | { |
2187 | 76a66253 | j_mayer | T1 &= 0x1FUL;
|
2188 | 76a66253 | j_mayer | env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
2189 | 76a66253 | j_mayer | T0 = T0 >> T1; |
2190 | 76a66253 | j_mayer | RETURN(); |
2191 | 76a66253 | j_mayer | } |
2192 | 76a66253 | j_mayer | |
2193 | 76a66253 | j_mayer | /* POWER instructions not implemented in PowerPC 601 */
|
2194 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
2195 | 76a66253 | j_mayer | void OPPROTO op_POWER_mfsri (void) |
2196 | 76a66253 | j_mayer | { |
2197 | 76a66253 | j_mayer | T1 = T0 >> 28;
|
2198 | 76a66253 | j_mayer | T0 = env->sr[T1]; |
2199 | 76a66253 | j_mayer | RETURN(); |
2200 | 76a66253 | j_mayer | } |
2201 | 76a66253 | j_mayer | |
2202 | 76a66253 | j_mayer | void OPPROTO op_POWER_rac (void) |
2203 | 76a66253 | j_mayer | { |
2204 | 76a66253 | j_mayer | do_POWER_rac(); |
2205 | 76a66253 | j_mayer | RETURN(); |
2206 | 76a66253 | j_mayer | } |
2207 | 76a66253 | j_mayer | |
2208 | 76a66253 | j_mayer | void OPPROTO op_POWER_rfsvc (void) |
2209 | 76a66253 | j_mayer | { |
2210 | 76a66253 | j_mayer | do_POWER_rfsvc(); |
2211 | 76a66253 | j_mayer | RETURN(); |
2212 | 76a66253 | j_mayer | } |
2213 | 76a66253 | j_mayer | #endif
|
2214 | 76a66253 | j_mayer | |
2215 | 76a66253 | j_mayer | /* PowerPC 602 specific instruction */
|
2216 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
2217 | 76a66253 | j_mayer | void OPPROTO op_602_mfrom (void) |
2218 | 76a66253 | j_mayer | { |
2219 | 76a66253 | j_mayer | do_op_602_mfrom(); |
2220 | 76a66253 | j_mayer | RETURN(); |
2221 | 76a66253 | j_mayer | } |
2222 | 76a66253 | j_mayer | #endif
|
2223 | 76a66253 | j_mayer | |
2224 | 76a66253 | j_mayer | /* PowerPC 4xx specific micro-ops */
|
2225 | 76a66253 | j_mayer | void OPPROTO op_405_add_T0_T2 (void) |
2226 | 76a66253 | j_mayer | { |
2227 | 76a66253 | j_mayer | T0 = (int32_t)T0 + (int32_t)T2; |
2228 | 76a66253 | j_mayer | RETURN(); |
2229 | 76a66253 | j_mayer | } |
2230 | 76a66253 | j_mayer | |
2231 | 76a66253 | j_mayer | void OPPROTO op_405_mulchw (void) |
2232 | 76a66253 | j_mayer | { |
2233 | 76a66253 | j_mayer | T0 = ((int16_t)T0) * ((int16_t)(T1 >> 16));
|
2234 | 76a66253 | j_mayer | RETURN(); |
2235 | 76a66253 | j_mayer | } |
2236 | 76a66253 | j_mayer | |
2237 | 76a66253 | j_mayer | void OPPROTO op_405_mulchwu (void) |
2238 | 76a66253 | j_mayer | { |
2239 | 76a66253 | j_mayer | T0 = ((uint16_t)T0) * ((uint16_t)(T1 >> 16));
|
2240 | 76a66253 | j_mayer | RETURN(); |
2241 | 76a66253 | j_mayer | } |
2242 | 76a66253 | j_mayer | |
2243 | 76a66253 | j_mayer | void OPPROTO op_405_mulhhw (void) |
2244 | 76a66253 | j_mayer | { |
2245 | 76a66253 | j_mayer | T0 = ((int16_t)(T0 >> 16)) * ((int16_t)(T1 >> 16)); |
2246 | 76a66253 | j_mayer | RETURN(); |
2247 | 76a66253 | j_mayer | } |
2248 | 76a66253 | j_mayer | |
2249 | 76a66253 | j_mayer | void OPPROTO op_405_mulhhwu (void) |
2250 | 76a66253 | j_mayer | { |
2251 | 76a66253 | j_mayer | T0 = ((uint16_t)(T0 >> 16)) * ((uint16_t)(T1 >> 16)); |
2252 | 76a66253 | j_mayer | RETURN(); |
2253 | 76a66253 | j_mayer | } |
2254 | 76a66253 | j_mayer | |
2255 | 76a66253 | j_mayer | void OPPROTO op_405_mullhw (void) |
2256 | 76a66253 | j_mayer | { |
2257 | 76a66253 | j_mayer | T0 = ((int16_t)T0) * ((int16_t)T1); |
2258 | 76a66253 | j_mayer | RETURN(); |
2259 | 76a66253 | j_mayer | } |
2260 | 76a66253 | j_mayer | |
2261 | 76a66253 | j_mayer | void OPPROTO op_405_mullhwu (void) |
2262 | 76a66253 | j_mayer | { |
2263 | 76a66253 | j_mayer | T0 = ((uint16_t)T0) * ((uint16_t)T1); |
2264 | 76a66253 | j_mayer | RETURN(); |
2265 | 76a66253 | j_mayer | } |
2266 | 76a66253 | j_mayer | |
2267 | 76a66253 | j_mayer | void OPPROTO op_405_check_ov (void) |
2268 | 76a66253 | j_mayer | { |
2269 | 76a66253 | j_mayer | do_405_check_ov(); |
2270 | 76a66253 | j_mayer | RETURN(); |
2271 | 76a66253 | j_mayer | } |
2272 | 76a66253 | j_mayer | |
2273 | 76a66253 | j_mayer | void OPPROTO op_405_check_sat (void) |
2274 | 76a66253 | j_mayer | { |
2275 | 76a66253 | j_mayer | do_405_check_sat(); |
2276 | 76a66253 | j_mayer | RETURN(); |
2277 | 76a66253 | j_mayer | } |
2278 | 76a66253 | j_mayer | |
2279 | 76a66253 | j_mayer | void OPPROTO op_405_check_ovu (void) |
2280 | 76a66253 | j_mayer | { |
2281 | 76a66253 | j_mayer | if (likely(T0 >= T2)) {
|
2282 | 76a66253 | j_mayer | xer_ov = 0;
|
2283 | 76a66253 | j_mayer | } else {
|
2284 | 76a66253 | j_mayer | xer_ov = 1;
|
2285 | 76a66253 | j_mayer | xer_so = 1;
|
2286 | 76a66253 | j_mayer | } |
2287 | 76a66253 | j_mayer | RETURN(); |
2288 | 76a66253 | j_mayer | } |
2289 | 76a66253 | j_mayer | |
2290 | 76a66253 | j_mayer | void OPPROTO op_405_check_satu (void) |
2291 | 76a66253 | j_mayer | { |
2292 | 76a66253 | j_mayer | if (unlikely(T0 < T2)) {
|
2293 | 76a66253 | j_mayer | /* Saturate result */
|
2294 | 76a66253 | j_mayer | T0 = -1;
|
2295 | 76a66253 | j_mayer | } |
2296 | 76a66253 | j_mayer | RETURN(); |
2297 | 76a66253 | j_mayer | } |
2298 | 76a66253 | j_mayer | |
2299 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
2300 | a42bd6cc | j_mayer | void OPPROTO op_load_dcr (void) |
2301 | 76a66253 | j_mayer | { |
2302 | a42bd6cc | j_mayer | do_load_dcr(); |
2303 | 76a66253 | j_mayer | RETURN(); |
2304 | 76a66253 | j_mayer | } |
2305 | 76a66253 | j_mayer | |
2306 | a42bd6cc | j_mayer | void OPPROTO op_store_dcr (void) |
2307 | 76a66253 | j_mayer | { |
2308 | a42bd6cc | j_mayer | do_store_dcr(); |
2309 | 76a66253 | j_mayer | RETURN(); |
2310 | 76a66253 | j_mayer | } |
2311 | 76a66253 | j_mayer | |
2312 | 76a66253 | j_mayer | /* Return from critical interrupt :
|
2313 | 76a66253 | j_mayer | * same as rfi, except nip & MSR are loaded from SRR2/3 instead of SRR0/1
|
2314 | 76a66253 | j_mayer | */
|
2315 | a42bd6cc | j_mayer | void OPPROTO op_40x_rfci (void) |
2316 | a42bd6cc | j_mayer | { |
2317 | a42bd6cc | j_mayer | do_40x_rfci(); |
2318 | a42bd6cc | j_mayer | RETURN(); |
2319 | a42bd6cc | j_mayer | } |
2320 | a42bd6cc | j_mayer | |
2321 | a42bd6cc | j_mayer | void OPPROTO op_rfci (void) |
2322 | a42bd6cc | j_mayer | { |
2323 | a42bd6cc | j_mayer | do_rfci(); |
2324 | a42bd6cc | j_mayer | RETURN(); |
2325 | a42bd6cc | j_mayer | } |
2326 | a42bd6cc | j_mayer | |
2327 | a42bd6cc | j_mayer | void OPPROTO op_rfdi (void) |
2328 | a42bd6cc | j_mayer | { |
2329 | a42bd6cc | j_mayer | do_rfdi(); |
2330 | a42bd6cc | j_mayer | RETURN(); |
2331 | a42bd6cc | j_mayer | } |
2332 | a42bd6cc | j_mayer | |
2333 | a42bd6cc | j_mayer | void OPPROTO op_rfmci (void) |
2334 | 76a66253 | j_mayer | { |
2335 | a42bd6cc | j_mayer | do_rfmci(); |
2336 | 76a66253 | j_mayer | RETURN(); |
2337 | 76a66253 | j_mayer | } |
2338 | 76a66253 | j_mayer | |
2339 | a42bd6cc | j_mayer | void OPPROTO op_wrte (void) |
2340 | 76a66253 | j_mayer | { |
2341 | 76a66253 | j_mayer | msr_ee = T0 >> 16;
|
2342 | 76a66253 | j_mayer | RETURN(); |
2343 | 76a66253 | j_mayer | } |
2344 | 76a66253 | j_mayer | |
2345 | 76a66253 | j_mayer | void OPPROTO op_4xx_tlbre_lo (void) |
2346 | 76a66253 | j_mayer | { |
2347 | 76a66253 | j_mayer | do_4xx_tlbre_lo(); |
2348 | 76a66253 | j_mayer | RETURN(); |
2349 | 76a66253 | j_mayer | } |
2350 | 76a66253 | j_mayer | |
2351 | 76a66253 | j_mayer | void OPPROTO op_4xx_tlbre_hi (void) |
2352 | 76a66253 | j_mayer | { |
2353 | 76a66253 | j_mayer | do_4xx_tlbre_hi(); |
2354 | 76a66253 | j_mayer | RETURN(); |
2355 | 76a66253 | j_mayer | } |
2356 | 76a66253 | j_mayer | |
2357 | 76a66253 | j_mayer | void OPPROTO op_4xx_tlbsx (void) |
2358 | 76a66253 | j_mayer | { |
2359 | 76a66253 | j_mayer | do_4xx_tlbsx(); |
2360 | 76a66253 | j_mayer | RETURN(); |
2361 | 76a66253 | j_mayer | } |
2362 | 76a66253 | j_mayer | |
2363 | 76a66253 | j_mayer | void OPPROTO op_4xx_tlbsx_ (void) |
2364 | 76a66253 | j_mayer | { |
2365 | 76a66253 | j_mayer | do_4xx_tlbsx_(); |
2366 | 76a66253 | j_mayer | RETURN(); |
2367 | 76a66253 | j_mayer | } |
2368 | 76a66253 | j_mayer | |
2369 | 76a66253 | j_mayer | void OPPROTO op_4xx_tlbwe_lo (void) |
2370 | 76a66253 | j_mayer | { |
2371 | 76a66253 | j_mayer | do_4xx_tlbwe_lo(); |
2372 | 76a66253 | j_mayer | RETURN(); |
2373 | 76a66253 | j_mayer | } |
2374 | 76a66253 | j_mayer | |
2375 | 76a66253 | j_mayer | void OPPROTO op_4xx_tlbwe_hi (void) |
2376 | 76a66253 | j_mayer | { |
2377 | 76a66253 | j_mayer | do_4xx_tlbwe_hi(); |
2378 | 76a66253 | j_mayer | RETURN(); |
2379 | 76a66253 | j_mayer | } |
2380 | 76a66253 | j_mayer | #endif
|
2381 | 76a66253 | j_mayer | |
2382 | 76a66253 | j_mayer | /* SPR micro-ops */
|
2383 | 76a66253 | j_mayer | /* 440 specific */
|
2384 | 76a66253 | j_mayer | void OPPROTO op_440_dlmzb (void) |
2385 | 76a66253 | j_mayer | { |
2386 | 76a66253 | j_mayer | do_440_dlmzb(); |
2387 | 76a66253 | j_mayer | RETURN(); |
2388 | 76a66253 | j_mayer | } |
2389 | 76a66253 | j_mayer | |
2390 | 76a66253 | j_mayer | void OPPROTO op_440_dlmzb_update_Rc (void) |
2391 | 76a66253 | j_mayer | { |
2392 | 76a66253 | j_mayer | if (T0 == 8) |
2393 | 76a66253 | j_mayer | T0 = 0x2;
|
2394 | 76a66253 | j_mayer | else if (T0 < 4) |
2395 | 76a66253 | j_mayer | T0 = 0x4;
|
2396 | 76a66253 | j_mayer | else
|
2397 | 76a66253 | j_mayer | T0 = 0x8;
|
2398 | 76a66253 | j_mayer | RETURN(); |
2399 | 76a66253 | j_mayer | } |
2400 | 76a66253 | j_mayer | |
2401 | 76a66253 | j_mayer | #if !defined(CONFIG_USER_ONLY)
|
2402 | 76a66253 | j_mayer | void OPPROTO op_store_pir (void) |
2403 | 3fc6c082 | bellard | { |
2404 | 3fc6c082 | bellard | env->spr[SPR_PIR] = T0 & 0x0000000FUL;
|
2405 | 3fc6c082 | bellard | RETURN(); |
2406 | 3fc6c082 | bellard | } |
2407 | 76a66253 | j_mayer | |
2408 | 76a66253 | j_mayer | void OPPROTO op_load_403_pb (void) |
2409 | 76a66253 | j_mayer | { |
2410 | 76a66253 | j_mayer | do_load_403_pb(PARAM1); |
2411 | 76a66253 | j_mayer | RETURN(); |
2412 | 76a66253 | j_mayer | } |
2413 | 76a66253 | j_mayer | |
2414 | 76a66253 | j_mayer | void OPPROTO op_store_403_pb (void) |
2415 | 76a66253 | j_mayer | { |
2416 | 76a66253 | j_mayer | do_store_403_pb(PARAM1); |
2417 | 76a66253 | j_mayer | RETURN(); |
2418 | 76a66253 | j_mayer | } |
2419 | 76a66253 | j_mayer | |
2420 | 76a66253 | j_mayer | void OPPROTO op_load_40x_pit (void) |
2421 | 76a66253 | j_mayer | { |
2422 | 76a66253 | j_mayer | T0 = load_40x_pit(env); |
2423 | 76a66253 | j_mayer | RETURN(); |
2424 | 76a66253 | j_mayer | } |
2425 | 76a66253 | j_mayer | |
2426 | 76a66253 | j_mayer | void OPPROTO op_store_40x_pit (void) |
2427 | 76a66253 | j_mayer | { |
2428 | 76a66253 | j_mayer | store_40x_pit(env, T0); |
2429 | 76a66253 | j_mayer | RETURN(); |
2430 | 76a66253 | j_mayer | } |
2431 | 76a66253 | j_mayer | |
2432 | 76a66253 | j_mayer | void OPPROTO op_store_booke_tcr (void) |
2433 | 76a66253 | j_mayer | { |
2434 | 76a66253 | j_mayer | store_booke_tcr(env, T0); |
2435 | 76a66253 | j_mayer | RETURN(); |
2436 | 76a66253 | j_mayer | } |
2437 | 76a66253 | j_mayer | |
2438 | 76a66253 | j_mayer | void OPPROTO op_store_booke_tsr (void) |
2439 | 76a66253 | j_mayer | { |
2440 | 76a66253 | j_mayer | store_booke_tsr(env, T0); |
2441 | 76a66253 | j_mayer | RETURN(); |
2442 | 76a66253 | j_mayer | } |
2443 | 0487d6a8 | j_mayer | |
2444 | 76a66253 | j_mayer | #endif /* !defined(CONFIG_USER_ONLY) */ |
2445 | 0487d6a8 | j_mayer | |
2446 | 0487d6a8 | j_mayer | #if defined(TARGET_PPCSPE)
|
2447 | 0487d6a8 | j_mayer | /* SPE extension */
|
2448 | 0487d6a8 | j_mayer | void OPPROTO op_splatw_T1_64 (void) |
2449 | 0487d6a8 | j_mayer | { |
2450 | 0487d6a8 | j_mayer | T1_64 = (T1_64 << 32) | (T1_64 & 0x00000000FFFFFFFFULL); |
2451 | e864cabd | j_mayer | RETURN(); |
2452 | 0487d6a8 | j_mayer | } |
2453 | 0487d6a8 | j_mayer | |
2454 | 0487d6a8 | j_mayer | void OPPROTO op_splatwi_T0_64 (void) |
2455 | 0487d6a8 | j_mayer | { |
2456 | 0487d6a8 | j_mayer | uint64_t tmp = PARAM1; |
2457 | 0487d6a8 | j_mayer | |
2458 | 0487d6a8 | j_mayer | T0_64 = (tmp << 32) | tmp;
|
2459 | e864cabd | j_mayer | RETURN(); |
2460 | 0487d6a8 | j_mayer | } |
2461 | 0487d6a8 | j_mayer | |
2462 | 0487d6a8 | j_mayer | void OPPROTO op_splatwi_T1_64 (void) |
2463 | 0487d6a8 | j_mayer | { |
2464 | 0487d6a8 | j_mayer | uint64_t tmp = PARAM1; |
2465 | 0487d6a8 | j_mayer | |
2466 | 0487d6a8 | j_mayer | T1_64 = (tmp << 32) | tmp;
|
2467 | e864cabd | j_mayer | RETURN(); |
2468 | 0487d6a8 | j_mayer | } |
2469 | 0487d6a8 | j_mayer | |
2470 | 0487d6a8 | j_mayer | void OPPROTO op_extsh_T1_64 (void) |
2471 | 0487d6a8 | j_mayer | { |
2472 | 0487d6a8 | j_mayer | T1_64 = (int32_t)((int16_t)T1_64); |
2473 | 0487d6a8 | j_mayer | RETURN(); |
2474 | 0487d6a8 | j_mayer | } |
2475 | 0487d6a8 | j_mayer | |
2476 | 0487d6a8 | j_mayer | void OPPROTO op_sli16_T1_64 (void) |
2477 | 0487d6a8 | j_mayer | { |
2478 | 0487d6a8 | j_mayer | T1_64 = T1_64 << 16;
|
2479 | 0487d6a8 | j_mayer | RETURN(); |
2480 | 0487d6a8 | j_mayer | } |
2481 | 0487d6a8 | j_mayer | |
2482 | 0487d6a8 | j_mayer | void OPPROTO op_sli32_T1_64 (void) |
2483 | 0487d6a8 | j_mayer | { |
2484 | 0487d6a8 | j_mayer | T1_64 = T1_64 << 32;
|
2485 | 0487d6a8 | j_mayer | RETURN(); |
2486 | 0487d6a8 | j_mayer | } |
2487 | 0487d6a8 | j_mayer | |
2488 | 0487d6a8 | j_mayer | void OPPROTO op_srli32_T1_64 (void) |
2489 | 0487d6a8 | j_mayer | { |
2490 | 0487d6a8 | j_mayer | T1_64 = T1_64 >> 32;
|
2491 | 0487d6a8 | j_mayer | RETURN(); |
2492 | 0487d6a8 | j_mayer | } |
2493 | 0487d6a8 | j_mayer | |
2494 | 0487d6a8 | j_mayer | void OPPROTO op_evsel (void) |
2495 | 0487d6a8 | j_mayer | { |
2496 | 0487d6a8 | j_mayer | do_evsel(); |
2497 | 0487d6a8 | j_mayer | RETURN(); |
2498 | 0487d6a8 | j_mayer | } |
2499 | 0487d6a8 | j_mayer | |
2500 | 0487d6a8 | j_mayer | void OPPROTO op_evaddw (void) |
2501 | 0487d6a8 | j_mayer | { |
2502 | 0487d6a8 | j_mayer | do_evaddw(); |
2503 | 0487d6a8 | j_mayer | RETURN(); |
2504 | 0487d6a8 | j_mayer | } |
2505 | 0487d6a8 | j_mayer | |
2506 | 0487d6a8 | j_mayer | void OPPROTO op_evsubfw (void) |
2507 | 0487d6a8 | j_mayer | { |
2508 | 0487d6a8 | j_mayer | do_evsubfw(); |
2509 | 0487d6a8 | j_mayer | RETURN(); |
2510 | 0487d6a8 | j_mayer | } |
2511 | 0487d6a8 | j_mayer | |
2512 | 0487d6a8 | j_mayer | void OPPROTO op_evneg (void) |
2513 | 0487d6a8 | j_mayer | { |
2514 | 0487d6a8 | j_mayer | do_evneg(); |
2515 | 0487d6a8 | j_mayer | RETURN(); |
2516 | 0487d6a8 | j_mayer | } |
2517 | 0487d6a8 | j_mayer | |
2518 | 0487d6a8 | j_mayer | void OPPROTO op_evabs (void) |
2519 | 0487d6a8 | j_mayer | { |
2520 | 0487d6a8 | j_mayer | do_evabs(); |
2521 | 0487d6a8 | j_mayer | RETURN(); |
2522 | 0487d6a8 | j_mayer | } |
2523 | 0487d6a8 | j_mayer | |
2524 | 0487d6a8 | j_mayer | void OPPROTO op_evextsh (void) |
2525 | 0487d6a8 | j_mayer | { |
2526 | 0487d6a8 | j_mayer | T0_64 = ((uint64_t)((int32_t)(int16_t)(T0_64 >> 32)) << 32) | |
2527 | 0487d6a8 | j_mayer | (uint64_t)((int32_t)(int16_t)T0_64); |
2528 | 0487d6a8 | j_mayer | RETURN(); |
2529 | 0487d6a8 | j_mayer | } |
2530 | 0487d6a8 | j_mayer | |
2531 | 0487d6a8 | j_mayer | void OPPROTO op_evextsb (void) |
2532 | 0487d6a8 | j_mayer | { |
2533 | 0487d6a8 | j_mayer | T0_64 = ((uint64_t)((int32_t)(int8_t)(T0_64 >> 32)) << 32) | |
2534 | 0487d6a8 | j_mayer | (uint64_t)((int32_t)(int8_t)T0_64); |
2535 | 0487d6a8 | j_mayer | RETURN(); |
2536 | 0487d6a8 | j_mayer | } |
2537 | 0487d6a8 | j_mayer | |
2538 | 0487d6a8 | j_mayer | void OPPROTO op_evcntlzw (void) |
2539 | 0487d6a8 | j_mayer | { |
2540 | 0487d6a8 | j_mayer | do_evcntlzw(); |
2541 | 0487d6a8 | j_mayer | RETURN(); |
2542 | 0487d6a8 | j_mayer | } |
2543 | 0487d6a8 | j_mayer | |
2544 | 0487d6a8 | j_mayer | void OPPROTO op_evrndw (void) |
2545 | 0487d6a8 | j_mayer | { |
2546 | 0487d6a8 | j_mayer | do_evrndw(); |
2547 | 0487d6a8 | j_mayer | RETURN(); |
2548 | 0487d6a8 | j_mayer | } |
2549 | 0487d6a8 | j_mayer | |
2550 | 0487d6a8 | j_mayer | void OPPROTO op_brinc (void) |
2551 | 0487d6a8 | j_mayer | { |
2552 | 0487d6a8 | j_mayer | do_brinc(); |
2553 | 0487d6a8 | j_mayer | RETURN(); |
2554 | 0487d6a8 | j_mayer | } |
2555 | 0487d6a8 | j_mayer | |
2556 | 0487d6a8 | j_mayer | void OPPROTO op_evcntlsw (void) |
2557 | 0487d6a8 | j_mayer | { |
2558 | 0487d6a8 | j_mayer | do_evcntlsw(); |
2559 | 0487d6a8 | j_mayer | RETURN(); |
2560 | 0487d6a8 | j_mayer | } |
2561 | 0487d6a8 | j_mayer | |
2562 | 0487d6a8 | j_mayer | void OPPROTO op_evand (void) |
2563 | 0487d6a8 | j_mayer | { |
2564 | 0487d6a8 | j_mayer | T0_64 &= T1_64; |
2565 | 0487d6a8 | j_mayer | RETURN(); |
2566 | 0487d6a8 | j_mayer | } |
2567 | 0487d6a8 | j_mayer | |
2568 | 0487d6a8 | j_mayer | void OPPROTO op_evandc (void) |
2569 | 0487d6a8 | j_mayer | { |
2570 | 0487d6a8 | j_mayer | T0_64 &= ~T1_64; |
2571 | 0487d6a8 | j_mayer | RETURN(); |
2572 | 0487d6a8 | j_mayer | } |
2573 | 0487d6a8 | j_mayer | |
2574 | 0487d6a8 | j_mayer | void OPPROTO op_evor (void) |
2575 | 0487d6a8 | j_mayer | { |
2576 | 0487d6a8 | j_mayer | T0_64 |= T1_64; |
2577 | 0487d6a8 | j_mayer | RETURN(); |
2578 | 0487d6a8 | j_mayer | } |
2579 | 0487d6a8 | j_mayer | |
2580 | 0487d6a8 | j_mayer | void OPPROTO op_evxor (void) |
2581 | 0487d6a8 | j_mayer | { |
2582 | 0487d6a8 | j_mayer | T0_64 ^= T1_64; |
2583 | 0487d6a8 | j_mayer | RETURN(); |
2584 | 0487d6a8 | j_mayer | } |
2585 | 0487d6a8 | j_mayer | |
2586 | 0487d6a8 | j_mayer | void OPPROTO op_eveqv (void) |
2587 | 0487d6a8 | j_mayer | { |
2588 | 0487d6a8 | j_mayer | T0_64 = ~(T0_64 ^ T1_64); |
2589 | 0487d6a8 | j_mayer | RETURN(); |
2590 | 0487d6a8 | j_mayer | } |
2591 | 0487d6a8 | j_mayer | |
2592 | 0487d6a8 | j_mayer | void OPPROTO op_evnor (void) |
2593 | 0487d6a8 | j_mayer | { |
2594 | 0487d6a8 | j_mayer | T0_64 = ~(T0_64 | T1_64); |
2595 | 0487d6a8 | j_mayer | RETURN(); |
2596 | 0487d6a8 | j_mayer | } |
2597 | 0487d6a8 | j_mayer | |
2598 | 0487d6a8 | j_mayer | void OPPROTO op_evorc (void) |
2599 | 0487d6a8 | j_mayer | { |
2600 | 0487d6a8 | j_mayer | T0_64 |= ~T1_64; |
2601 | 0487d6a8 | j_mayer | RETURN(); |
2602 | 0487d6a8 | j_mayer | } |
2603 | 0487d6a8 | j_mayer | |
2604 | 0487d6a8 | j_mayer | void OPPROTO op_evnand (void) |
2605 | 0487d6a8 | j_mayer | { |
2606 | 0487d6a8 | j_mayer | T0_64 = ~(T0_64 & T1_64); |
2607 | 0487d6a8 | j_mayer | RETURN(); |
2608 | 0487d6a8 | j_mayer | } |
2609 | 0487d6a8 | j_mayer | |
2610 | 0487d6a8 | j_mayer | void OPPROTO op_evsrws (void) |
2611 | 0487d6a8 | j_mayer | { |
2612 | 0487d6a8 | j_mayer | do_evsrws(); |
2613 | 0487d6a8 | j_mayer | RETURN(); |
2614 | 0487d6a8 | j_mayer | } |
2615 | 0487d6a8 | j_mayer | |
2616 | 0487d6a8 | j_mayer | void OPPROTO op_evsrwu (void) |
2617 | 0487d6a8 | j_mayer | { |
2618 | 0487d6a8 | j_mayer | do_evsrwu(); |
2619 | 0487d6a8 | j_mayer | RETURN(); |
2620 | 0487d6a8 | j_mayer | } |
2621 | 0487d6a8 | j_mayer | |
2622 | 0487d6a8 | j_mayer | void OPPROTO op_evslw (void) |
2623 | 0487d6a8 | j_mayer | { |
2624 | 0487d6a8 | j_mayer | do_evslw(); |
2625 | 0487d6a8 | j_mayer | RETURN(); |
2626 | 0487d6a8 | j_mayer | } |
2627 | 0487d6a8 | j_mayer | |
2628 | 0487d6a8 | j_mayer | void OPPROTO op_evrlw (void) |
2629 | 0487d6a8 | j_mayer | { |
2630 | 0487d6a8 | j_mayer | do_evrlw(); |
2631 | 0487d6a8 | j_mayer | RETURN(); |
2632 | 0487d6a8 | j_mayer | } |
2633 | 0487d6a8 | j_mayer | |
2634 | 0487d6a8 | j_mayer | void OPPROTO op_evmergelo (void) |
2635 | 0487d6a8 | j_mayer | { |
2636 | 0487d6a8 | j_mayer | T0_64 = (T0_64 << 32) | (T1_64 & 0x00000000FFFFFFFFULL); |
2637 | 0487d6a8 | j_mayer | RETURN(); |
2638 | 0487d6a8 | j_mayer | } |
2639 | 0487d6a8 | j_mayer | |
2640 | 0487d6a8 | j_mayer | void OPPROTO op_evmergehi (void) |
2641 | 0487d6a8 | j_mayer | { |
2642 | 0487d6a8 | j_mayer | T0_64 = (T0_64 & 0xFFFFFFFF00000000ULL) | (T1_64 >> 32); |
2643 | 0487d6a8 | j_mayer | RETURN(); |
2644 | 0487d6a8 | j_mayer | } |
2645 | 0487d6a8 | j_mayer | |
2646 | 0487d6a8 | j_mayer | void OPPROTO op_evmergelohi (void) |
2647 | 0487d6a8 | j_mayer | { |
2648 | 0487d6a8 | j_mayer | T0_64 = (T0_64 << 32) | (T1_64 >> 32); |
2649 | 0487d6a8 | j_mayer | RETURN(); |
2650 | 0487d6a8 | j_mayer | } |
2651 | 0487d6a8 | j_mayer | |
2652 | 0487d6a8 | j_mayer | void OPPROTO op_evmergehilo (void) |
2653 | 0487d6a8 | j_mayer | { |
2654 | 0487d6a8 | j_mayer | T0_64 = (T0_64 & 0xFFFFFFFF00000000ULL) | (T1_64 & 0x00000000FFFFFFFFULL); |
2655 | 0487d6a8 | j_mayer | RETURN(); |
2656 | 0487d6a8 | j_mayer | } |
2657 | 0487d6a8 | j_mayer | |
2658 | 0487d6a8 | j_mayer | void OPPROTO op_evcmpgts (void) |
2659 | 0487d6a8 | j_mayer | { |
2660 | 0487d6a8 | j_mayer | do_evcmpgts(); |
2661 | 0487d6a8 | j_mayer | RETURN(); |
2662 | 0487d6a8 | j_mayer | } |
2663 | 0487d6a8 | j_mayer | |
2664 | 0487d6a8 | j_mayer | void OPPROTO op_evcmpgtu (void) |
2665 | 0487d6a8 | j_mayer | { |
2666 | 0487d6a8 | j_mayer | do_evcmpgtu(); |
2667 | 0487d6a8 | j_mayer | RETURN(); |
2668 | 0487d6a8 | j_mayer | } |
2669 | 0487d6a8 | j_mayer | |
2670 | 0487d6a8 | j_mayer | void OPPROTO op_evcmplts (void) |
2671 | 0487d6a8 | j_mayer | { |
2672 | 0487d6a8 | j_mayer | do_evcmplts(); |
2673 | 0487d6a8 | j_mayer | RETURN(); |
2674 | 0487d6a8 | j_mayer | } |
2675 | 0487d6a8 | j_mayer | |
2676 | 0487d6a8 | j_mayer | void OPPROTO op_evcmpltu (void) |
2677 | 0487d6a8 | j_mayer | { |
2678 | 0487d6a8 | j_mayer | do_evcmpltu(); |
2679 | 0487d6a8 | j_mayer | RETURN(); |
2680 | 0487d6a8 | j_mayer | } |
2681 | 0487d6a8 | j_mayer | |
2682 | 0487d6a8 | j_mayer | void OPPROTO op_evcmpeq (void) |
2683 | 0487d6a8 | j_mayer | { |
2684 | 0487d6a8 | j_mayer | do_evcmpeq(); |
2685 | 0487d6a8 | j_mayer | RETURN(); |
2686 | 0487d6a8 | j_mayer | } |
2687 | 0487d6a8 | j_mayer | |
2688 | 0487d6a8 | j_mayer | void OPPROTO op_evfssub (void) |
2689 | 0487d6a8 | j_mayer | { |
2690 | 0487d6a8 | j_mayer | do_evfssub(); |
2691 | 0487d6a8 | j_mayer | RETURN(); |
2692 | 0487d6a8 | j_mayer | } |
2693 | 0487d6a8 | j_mayer | |
2694 | 0487d6a8 | j_mayer | void OPPROTO op_evfsadd (void) |
2695 | 0487d6a8 | j_mayer | { |
2696 | 0487d6a8 | j_mayer | do_evfsadd(); |
2697 | 0487d6a8 | j_mayer | RETURN(); |
2698 | 0487d6a8 | j_mayer | } |
2699 | 0487d6a8 | j_mayer | |
2700 | 0487d6a8 | j_mayer | void OPPROTO op_evfsnabs (void) |
2701 | 0487d6a8 | j_mayer | { |
2702 | 0487d6a8 | j_mayer | do_evfsnabs(); |
2703 | 0487d6a8 | j_mayer | RETURN(); |
2704 | 0487d6a8 | j_mayer | } |
2705 | 0487d6a8 | j_mayer | |
2706 | 0487d6a8 | j_mayer | void OPPROTO op_evfsabs (void) |
2707 | 0487d6a8 | j_mayer | { |
2708 | 0487d6a8 | j_mayer | do_evfsabs(); |
2709 | 0487d6a8 | j_mayer | RETURN(); |
2710 | 0487d6a8 | j_mayer | } |
2711 | 0487d6a8 | j_mayer | |
2712 | 0487d6a8 | j_mayer | void OPPROTO op_evfsneg (void) |
2713 | 0487d6a8 | j_mayer | { |
2714 | 0487d6a8 | j_mayer | do_evfsneg(); |
2715 | 0487d6a8 | j_mayer | RETURN(); |
2716 | 0487d6a8 | j_mayer | } |
2717 | 0487d6a8 | j_mayer | |
2718 | 0487d6a8 | j_mayer | void OPPROTO op_evfsdiv (void) |
2719 | 0487d6a8 | j_mayer | { |
2720 | 0487d6a8 | j_mayer | do_evfsdiv(); |
2721 | 0487d6a8 | j_mayer | RETURN(); |
2722 | 0487d6a8 | j_mayer | } |
2723 | 0487d6a8 | j_mayer | |
2724 | 0487d6a8 | j_mayer | void OPPROTO op_evfsmul (void) |
2725 | 0487d6a8 | j_mayer | { |
2726 | 0487d6a8 | j_mayer | do_evfsmul(); |
2727 | 0487d6a8 | j_mayer | RETURN(); |
2728 | 0487d6a8 | j_mayer | } |
2729 | 0487d6a8 | j_mayer | |
2730 | 0487d6a8 | j_mayer | void OPPROTO op_evfscmplt (void) |
2731 | 0487d6a8 | j_mayer | { |
2732 | 0487d6a8 | j_mayer | do_evfscmplt(); |
2733 | 0487d6a8 | j_mayer | RETURN(); |
2734 | 0487d6a8 | j_mayer | } |
2735 | 0487d6a8 | j_mayer | |
2736 | 0487d6a8 | j_mayer | void OPPROTO op_evfscmpgt (void) |
2737 | 0487d6a8 | j_mayer | { |
2738 | 0487d6a8 | j_mayer | do_evfscmpgt(); |
2739 | 0487d6a8 | j_mayer | RETURN(); |
2740 | 0487d6a8 | j_mayer | } |
2741 | 0487d6a8 | j_mayer | |
2742 | 0487d6a8 | j_mayer | void OPPROTO op_evfscmpeq (void) |
2743 | 0487d6a8 | j_mayer | { |
2744 | 0487d6a8 | j_mayer | do_evfscmpeq(); |
2745 | 0487d6a8 | j_mayer | RETURN(); |
2746 | 0487d6a8 | j_mayer | } |
2747 | 0487d6a8 | j_mayer | |
2748 | 0487d6a8 | j_mayer | void OPPROTO op_evfscfsi (void) |
2749 | 0487d6a8 | j_mayer | { |
2750 | 0487d6a8 | j_mayer | do_evfscfsi(); |
2751 | 0487d6a8 | j_mayer | RETURN(); |
2752 | 0487d6a8 | j_mayer | } |
2753 | 0487d6a8 | j_mayer | |
2754 | 0487d6a8 | j_mayer | void OPPROTO op_evfscfui (void) |
2755 | 0487d6a8 | j_mayer | { |
2756 | 0487d6a8 | j_mayer | do_evfscfui(); |
2757 | 0487d6a8 | j_mayer | RETURN(); |
2758 | 0487d6a8 | j_mayer | } |
2759 | 0487d6a8 | j_mayer | |
2760 | 0487d6a8 | j_mayer | void OPPROTO op_evfscfsf (void) |
2761 | 0487d6a8 | j_mayer | { |
2762 | 0487d6a8 | j_mayer | do_evfscfsf(); |
2763 | 0487d6a8 | j_mayer | RETURN(); |
2764 | 0487d6a8 | j_mayer | } |
2765 | 0487d6a8 | j_mayer | |
2766 | 0487d6a8 | j_mayer | void OPPROTO op_evfscfuf (void) |
2767 | 0487d6a8 | j_mayer | { |
2768 | 0487d6a8 | j_mayer | do_evfscfuf(); |
2769 | 0487d6a8 | j_mayer | RETURN(); |
2770 | 0487d6a8 | j_mayer | } |
2771 | 0487d6a8 | j_mayer | |
2772 | 0487d6a8 | j_mayer | void OPPROTO op_evfsctsi (void) |
2773 | 0487d6a8 | j_mayer | { |
2774 | 0487d6a8 | j_mayer | do_evfsctsi(); |
2775 | 0487d6a8 | j_mayer | RETURN(); |
2776 | 0487d6a8 | j_mayer | } |
2777 | 0487d6a8 | j_mayer | |
2778 | 0487d6a8 | j_mayer | void OPPROTO op_evfsctui (void) |
2779 | 0487d6a8 | j_mayer | { |
2780 | 0487d6a8 | j_mayer | do_evfsctui(); |
2781 | 0487d6a8 | j_mayer | RETURN(); |
2782 | 0487d6a8 | j_mayer | } |
2783 | 0487d6a8 | j_mayer | |
2784 | 0487d6a8 | j_mayer | void OPPROTO op_evfsctsf (void) |
2785 | 0487d6a8 | j_mayer | { |
2786 | 0487d6a8 | j_mayer | do_evfsctsf(); |
2787 | 0487d6a8 | j_mayer | RETURN(); |
2788 | 0487d6a8 | j_mayer | } |
2789 | 0487d6a8 | j_mayer | |
2790 | 0487d6a8 | j_mayer | void OPPROTO op_evfsctuf (void) |
2791 | 0487d6a8 | j_mayer | { |
2792 | 0487d6a8 | j_mayer | do_evfsctuf(); |
2793 | 0487d6a8 | j_mayer | RETURN(); |
2794 | 0487d6a8 | j_mayer | } |
2795 | 0487d6a8 | j_mayer | |
2796 | 0487d6a8 | j_mayer | void OPPROTO op_evfsctuiz (void) |
2797 | 0487d6a8 | j_mayer | { |
2798 | 0487d6a8 | j_mayer | do_evfsctuiz(); |
2799 | 0487d6a8 | j_mayer | RETURN(); |
2800 | 0487d6a8 | j_mayer | } |
2801 | 0487d6a8 | j_mayer | |
2802 | 0487d6a8 | j_mayer | void OPPROTO op_evfsctsiz (void) |
2803 | 0487d6a8 | j_mayer | { |
2804 | 0487d6a8 | j_mayer | do_evfsctsiz(); |
2805 | 0487d6a8 | j_mayer | RETURN(); |
2806 | 0487d6a8 | j_mayer | } |
2807 | 0487d6a8 | j_mayer | |
2808 | 0487d6a8 | j_mayer | void OPPROTO op_evfststlt (void) |
2809 | 0487d6a8 | j_mayer | { |
2810 | 0487d6a8 | j_mayer | do_evfststlt(); |
2811 | 0487d6a8 | j_mayer | RETURN(); |
2812 | 0487d6a8 | j_mayer | } |
2813 | 0487d6a8 | j_mayer | |
2814 | 0487d6a8 | j_mayer | void OPPROTO op_evfststgt (void) |
2815 | 0487d6a8 | j_mayer | { |
2816 | 0487d6a8 | j_mayer | do_evfststgt(); |
2817 | 0487d6a8 | j_mayer | RETURN(); |
2818 | 0487d6a8 | j_mayer | } |
2819 | 0487d6a8 | j_mayer | |
2820 | 0487d6a8 | j_mayer | void OPPROTO op_evfststeq (void) |
2821 | 0487d6a8 | j_mayer | { |
2822 | 0487d6a8 | j_mayer | do_evfststeq(); |
2823 | 0487d6a8 | j_mayer | RETURN(); |
2824 | 0487d6a8 | j_mayer | } |
2825 | 0487d6a8 | j_mayer | |
2826 | 0487d6a8 | j_mayer | void OPPROTO op_efssub (void) |
2827 | 0487d6a8 | j_mayer | { |
2828 | 0487d6a8 | j_mayer | T0_64 = _do_efssub(T0_64, T1_64); |
2829 | 0487d6a8 | j_mayer | RETURN(); |
2830 | 0487d6a8 | j_mayer | } |
2831 | 0487d6a8 | j_mayer | |
2832 | 0487d6a8 | j_mayer | void OPPROTO op_efsadd (void) |
2833 | 0487d6a8 | j_mayer | { |
2834 | 0487d6a8 | j_mayer | T0_64 = _do_efsadd(T0_64, T1_64); |
2835 | 0487d6a8 | j_mayer | RETURN(); |
2836 | 0487d6a8 | j_mayer | } |
2837 | 0487d6a8 | j_mayer | |
2838 | 0487d6a8 | j_mayer | void OPPROTO op_efsnabs (void) |
2839 | 0487d6a8 | j_mayer | { |
2840 | 0487d6a8 | j_mayer | T0_64 = _do_efsnabs(T0_64); |
2841 | 0487d6a8 | j_mayer | RETURN(); |
2842 | 0487d6a8 | j_mayer | } |
2843 | 0487d6a8 | j_mayer | |
2844 | 0487d6a8 | j_mayer | void OPPROTO op_efsabs (void) |
2845 | 0487d6a8 | j_mayer | { |
2846 | 0487d6a8 | j_mayer | T0_64 = _do_efsabs(T0_64); |
2847 | 0487d6a8 | j_mayer | RETURN(); |
2848 | 0487d6a8 | j_mayer | } |
2849 | 0487d6a8 | j_mayer | |
2850 | 0487d6a8 | j_mayer | void OPPROTO op_efsneg (void) |
2851 | 0487d6a8 | j_mayer | { |
2852 | 0487d6a8 | j_mayer | T0_64 = _do_efsneg(T0_64); |
2853 | 0487d6a8 | j_mayer | RETURN(); |
2854 | 0487d6a8 | j_mayer | } |
2855 | 0487d6a8 | j_mayer | |
2856 | 0487d6a8 | j_mayer | void OPPROTO op_efsdiv (void) |
2857 | 0487d6a8 | j_mayer | { |
2858 | 0487d6a8 | j_mayer | T0_64 = _do_efsdiv(T0_64, T1_64); |
2859 | 0487d6a8 | j_mayer | RETURN(); |
2860 | 0487d6a8 | j_mayer | } |
2861 | 0487d6a8 | j_mayer | |
2862 | 0487d6a8 | j_mayer | void OPPROTO op_efsmul (void) |
2863 | 0487d6a8 | j_mayer | { |
2864 | 0487d6a8 | j_mayer | T0_64 = _do_efsmul(T0_64, T1_64); |
2865 | 0487d6a8 | j_mayer | RETURN(); |
2866 | 0487d6a8 | j_mayer | } |
2867 | 0487d6a8 | j_mayer | |
2868 | 0487d6a8 | j_mayer | void OPPROTO op_efscmplt (void) |
2869 | 0487d6a8 | j_mayer | { |
2870 | 0487d6a8 | j_mayer | do_efscmplt(); |
2871 | 0487d6a8 | j_mayer | RETURN(); |
2872 | 0487d6a8 | j_mayer | } |
2873 | 0487d6a8 | j_mayer | |
2874 | 0487d6a8 | j_mayer | void OPPROTO op_efscmpgt (void) |
2875 | 0487d6a8 | j_mayer | { |
2876 | 0487d6a8 | j_mayer | do_efscmpgt(); |
2877 | 0487d6a8 | j_mayer | RETURN(); |
2878 | 0487d6a8 | j_mayer | } |
2879 | 0487d6a8 | j_mayer | |
2880 | 0487d6a8 | j_mayer | void OPPROTO op_efscfd (void) |
2881 | 0487d6a8 | j_mayer | { |
2882 | 0487d6a8 | j_mayer | do_efscfd(); |
2883 | 0487d6a8 | j_mayer | RETURN(); |
2884 | 0487d6a8 | j_mayer | } |
2885 | 0487d6a8 | j_mayer | |
2886 | 0487d6a8 | j_mayer | void OPPROTO op_efscmpeq (void) |
2887 | 0487d6a8 | j_mayer | { |
2888 | 0487d6a8 | j_mayer | do_efscmpeq(); |
2889 | 0487d6a8 | j_mayer | RETURN(); |
2890 | 0487d6a8 | j_mayer | } |
2891 | 0487d6a8 | j_mayer | |
2892 | 0487d6a8 | j_mayer | void OPPROTO op_efscfsi (void) |
2893 | 0487d6a8 | j_mayer | { |
2894 | 0487d6a8 | j_mayer | do_efscfsi(); |
2895 | 0487d6a8 | j_mayer | RETURN(); |
2896 | 0487d6a8 | j_mayer | } |
2897 | 0487d6a8 | j_mayer | |
2898 | 0487d6a8 | j_mayer | void OPPROTO op_efscfui (void) |
2899 | 0487d6a8 | j_mayer | { |
2900 | 0487d6a8 | j_mayer | do_efscfui(); |
2901 | 0487d6a8 | j_mayer | RETURN(); |
2902 | 0487d6a8 | j_mayer | } |
2903 | 0487d6a8 | j_mayer | |
2904 | 0487d6a8 | j_mayer | void OPPROTO op_efscfsf (void) |
2905 | 0487d6a8 | j_mayer | { |
2906 | 0487d6a8 | j_mayer | do_efscfsf(); |
2907 | 0487d6a8 | j_mayer | RETURN(); |
2908 | 0487d6a8 | j_mayer | } |
2909 | 0487d6a8 | j_mayer | |
2910 | 0487d6a8 | j_mayer | void OPPROTO op_efscfuf (void) |
2911 | 0487d6a8 | j_mayer | { |
2912 | 0487d6a8 | j_mayer | do_efscfuf(); |
2913 | 0487d6a8 | j_mayer | RETURN(); |
2914 | 0487d6a8 | j_mayer | } |
2915 | 0487d6a8 | j_mayer | |
2916 | 0487d6a8 | j_mayer | void OPPROTO op_efsctsi (void) |
2917 | 0487d6a8 | j_mayer | { |
2918 | 0487d6a8 | j_mayer | do_efsctsi(); |
2919 | 0487d6a8 | j_mayer | RETURN(); |
2920 | 0487d6a8 | j_mayer | } |
2921 | 0487d6a8 | j_mayer | |
2922 | 0487d6a8 | j_mayer | void OPPROTO op_efsctui (void) |
2923 | 0487d6a8 | j_mayer | { |
2924 | 0487d6a8 | j_mayer | do_efsctui(); |
2925 | 0487d6a8 | j_mayer | RETURN(); |
2926 | 0487d6a8 | j_mayer | } |
2927 | 0487d6a8 | j_mayer | |
2928 | 0487d6a8 | j_mayer | void OPPROTO op_efsctsf (void) |
2929 | 0487d6a8 | j_mayer | { |
2930 | 0487d6a8 | j_mayer | do_efsctsf(); |
2931 | 0487d6a8 | j_mayer | RETURN(); |
2932 | 0487d6a8 | j_mayer | } |
2933 | 0487d6a8 | j_mayer | |
2934 | 0487d6a8 | j_mayer | void OPPROTO op_efsctuf (void) |
2935 | 0487d6a8 | j_mayer | { |
2936 | 0487d6a8 | j_mayer | do_efsctuf(); |
2937 | 0487d6a8 | j_mayer | RETURN(); |
2938 | 0487d6a8 | j_mayer | } |
2939 | 0487d6a8 | j_mayer | |
2940 | 0487d6a8 | j_mayer | void OPPROTO op_efsctsiz (void) |
2941 | 0487d6a8 | j_mayer | { |
2942 | 0487d6a8 | j_mayer | do_efsctsiz(); |
2943 | 0487d6a8 | j_mayer | RETURN(); |
2944 | 0487d6a8 | j_mayer | } |
2945 | 0487d6a8 | j_mayer | |
2946 | 0487d6a8 | j_mayer | void OPPROTO op_efsctuiz (void) |
2947 | 0487d6a8 | j_mayer | { |
2948 | 0487d6a8 | j_mayer | do_efsctuiz(); |
2949 | 0487d6a8 | j_mayer | RETURN(); |
2950 | 0487d6a8 | j_mayer | } |
2951 | 0487d6a8 | j_mayer | |
2952 | 0487d6a8 | j_mayer | void OPPROTO op_efststlt (void) |
2953 | 0487d6a8 | j_mayer | { |
2954 | 0487d6a8 | j_mayer | T0 = _do_efststlt(T0_64, T1_64); |
2955 | 0487d6a8 | j_mayer | RETURN(); |
2956 | 0487d6a8 | j_mayer | } |
2957 | 0487d6a8 | j_mayer | |
2958 | 0487d6a8 | j_mayer | void OPPROTO op_efststgt (void) |
2959 | 0487d6a8 | j_mayer | { |
2960 | 0487d6a8 | j_mayer | T0 = _do_efststgt(T0_64, T1_64); |
2961 | 0487d6a8 | j_mayer | RETURN(); |
2962 | 0487d6a8 | j_mayer | } |
2963 | 0487d6a8 | j_mayer | |
2964 | 0487d6a8 | j_mayer | void OPPROTO op_efststeq (void) |
2965 | 0487d6a8 | j_mayer | { |
2966 | 0487d6a8 | j_mayer | T0 = _do_efststeq(T0_64, T1_64); |
2967 | 0487d6a8 | j_mayer | RETURN(); |
2968 | 0487d6a8 | j_mayer | } |
2969 | 0487d6a8 | j_mayer | |
2970 | 0487d6a8 | j_mayer | void OPPROTO op_efdsub (void) |
2971 | 0487d6a8 | j_mayer | { |
2972 | 0487d6a8 | j_mayer | union {
|
2973 | 0487d6a8 | j_mayer | uint64_t u; |
2974 | 0487d6a8 | j_mayer | float64 f; |
2975 | 0487d6a8 | j_mayer | } u1, u2; |
2976 | 0487d6a8 | j_mayer | u1.u = T0_64; |
2977 | 0487d6a8 | j_mayer | u2.u = T1_64; |
2978 | 0487d6a8 | j_mayer | u1.f = float64_sub(u1.f, u2.f, &env->spe_status); |
2979 | 0487d6a8 | j_mayer | T0_64 = u1.u; |
2980 | 0487d6a8 | j_mayer | RETURN(); |
2981 | 0487d6a8 | j_mayer | } |
2982 | 0487d6a8 | j_mayer | |
2983 | 0487d6a8 | j_mayer | void OPPROTO op_efdadd (void) |
2984 | 0487d6a8 | j_mayer | { |
2985 | 0487d6a8 | j_mayer | union {
|
2986 | 0487d6a8 | j_mayer | uint64_t u; |
2987 | 0487d6a8 | j_mayer | float64 f; |
2988 | 0487d6a8 | j_mayer | } u1, u2; |
2989 | 0487d6a8 | j_mayer | u1.u = T0_64; |
2990 | 0487d6a8 | j_mayer | u2.u = T1_64; |
2991 | 0487d6a8 | j_mayer | u1.f = float64_add(u1.f, u2.f, &env->spe_status); |
2992 | 0487d6a8 | j_mayer | T0_64 = u1.u; |
2993 | 0487d6a8 | j_mayer | RETURN(); |
2994 | 0487d6a8 | j_mayer | } |
2995 | 0487d6a8 | j_mayer | |
2996 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfsid (void) |
2997 | 0487d6a8 | j_mayer | { |
2998 | 0487d6a8 | j_mayer | do_efdcfsi(); |
2999 | 0487d6a8 | j_mayer | RETURN(); |
3000 | 0487d6a8 | j_mayer | } |
3001 | 0487d6a8 | j_mayer | |
3002 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfuid (void) |
3003 | 0487d6a8 | j_mayer | { |
3004 | 0487d6a8 | j_mayer | do_efdcfui(); |
3005 | 0487d6a8 | j_mayer | RETURN(); |
3006 | 0487d6a8 | j_mayer | } |
3007 | 0487d6a8 | j_mayer | |
3008 | 0487d6a8 | j_mayer | void OPPROTO op_efdnabs (void) |
3009 | 0487d6a8 | j_mayer | { |
3010 | 0487d6a8 | j_mayer | T0_64 |= 0x8000000000000000ULL;
|
3011 | 0487d6a8 | j_mayer | RETURN(); |
3012 | 0487d6a8 | j_mayer | } |
3013 | 0487d6a8 | j_mayer | |
3014 | 0487d6a8 | j_mayer | void OPPROTO op_efdabs (void) |
3015 | 0487d6a8 | j_mayer | { |
3016 | 0487d6a8 | j_mayer | T0_64 &= ~0x8000000000000000ULL;
|
3017 | 0487d6a8 | j_mayer | RETURN(); |
3018 | 0487d6a8 | j_mayer | } |
3019 | 0487d6a8 | j_mayer | |
3020 | 0487d6a8 | j_mayer | void OPPROTO op_efdneg (void) |
3021 | 0487d6a8 | j_mayer | { |
3022 | 0487d6a8 | j_mayer | T0_64 ^= 0x8000000000000000ULL;
|
3023 | 0487d6a8 | j_mayer | RETURN(); |
3024 | 0487d6a8 | j_mayer | } |
3025 | 0487d6a8 | j_mayer | |
3026 | 0487d6a8 | j_mayer | void OPPROTO op_efddiv (void) |
3027 | 0487d6a8 | j_mayer | { |
3028 | 0487d6a8 | j_mayer | union {
|
3029 | 0487d6a8 | j_mayer | uint64_t u; |
3030 | 0487d6a8 | j_mayer | float64 f; |
3031 | 0487d6a8 | j_mayer | } u1, u2; |
3032 | 0487d6a8 | j_mayer | u1.u = T0_64; |
3033 | 0487d6a8 | j_mayer | u2.u = T1_64; |
3034 | 0487d6a8 | j_mayer | u1.f = float64_div(u1.f, u2.f, &env->spe_status); |
3035 | 0487d6a8 | j_mayer | T0_64 = u1.u; |
3036 | 0487d6a8 | j_mayer | RETURN(); |
3037 | 0487d6a8 | j_mayer | } |
3038 | 0487d6a8 | j_mayer | |
3039 | 0487d6a8 | j_mayer | void OPPROTO op_efdmul (void) |
3040 | 0487d6a8 | j_mayer | { |
3041 | 0487d6a8 | j_mayer | union {
|
3042 | 0487d6a8 | j_mayer | uint64_t u; |
3043 | 0487d6a8 | j_mayer | float64 f; |
3044 | 0487d6a8 | j_mayer | } u1, u2; |
3045 | 0487d6a8 | j_mayer | u1.u = T0_64; |
3046 | 0487d6a8 | j_mayer | u2.u = T1_64; |
3047 | 0487d6a8 | j_mayer | u1.f = float64_mul(u1.f, u2.f, &env->spe_status); |
3048 | 0487d6a8 | j_mayer | T0_64 = u1.u; |
3049 | 0487d6a8 | j_mayer | RETURN(); |
3050 | 0487d6a8 | j_mayer | } |
3051 | 0487d6a8 | j_mayer | |
3052 | 0487d6a8 | j_mayer | void OPPROTO op_efdctsidz (void) |
3053 | 0487d6a8 | j_mayer | { |
3054 | 0487d6a8 | j_mayer | do_efdctsiz(); |
3055 | 0487d6a8 | j_mayer | RETURN(); |
3056 | 0487d6a8 | j_mayer | } |
3057 | 0487d6a8 | j_mayer | |
3058 | 0487d6a8 | j_mayer | void OPPROTO op_efdctuidz (void) |
3059 | 0487d6a8 | j_mayer | { |
3060 | 0487d6a8 | j_mayer | do_efdctuiz(); |
3061 | 0487d6a8 | j_mayer | RETURN(); |
3062 | 0487d6a8 | j_mayer | } |
3063 | 0487d6a8 | j_mayer | |
3064 | 0487d6a8 | j_mayer | void OPPROTO op_efdcmplt (void) |
3065 | 0487d6a8 | j_mayer | { |
3066 | 0487d6a8 | j_mayer | do_efdcmplt(); |
3067 | 0487d6a8 | j_mayer | RETURN(); |
3068 | 0487d6a8 | j_mayer | } |
3069 | 0487d6a8 | j_mayer | |
3070 | 0487d6a8 | j_mayer | void OPPROTO op_efdcmpgt (void) |
3071 | 0487d6a8 | j_mayer | { |
3072 | 0487d6a8 | j_mayer | do_efdcmpgt(); |
3073 | 0487d6a8 | j_mayer | RETURN(); |
3074 | 0487d6a8 | j_mayer | } |
3075 | 0487d6a8 | j_mayer | |
3076 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfs (void) |
3077 | 0487d6a8 | j_mayer | { |
3078 | 0487d6a8 | j_mayer | do_efdcfs(); |
3079 | 0487d6a8 | j_mayer | RETURN(); |
3080 | 0487d6a8 | j_mayer | } |
3081 | 0487d6a8 | j_mayer | |
3082 | 0487d6a8 | j_mayer | void OPPROTO op_efdcmpeq (void) |
3083 | 0487d6a8 | j_mayer | { |
3084 | 0487d6a8 | j_mayer | do_efdcmpeq(); |
3085 | 0487d6a8 | j_mayer | RETURN(); |
3086 | 0487d6a8 | j_mayer | } |
3087 | 0487d6a8 | j_mayer | |
3088 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfsi (void) |
3089 | 0487d6a8 | j_mayer | { |
3090 | 0487d6a8 | j_mayer | do_efdcfsi(); |
3091 | 0487d6a8 | j_mayer | RETURN(); |
3092 | 0487d6a8 | j_mayer | } |
3093 | 0487d6a8 | j_mayer | |
3094 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfui (void) |
3095 | 0487d6a8 | j_mayer | { |
3096 | 0487d6a8 | j_mayer | do_efdcfui(); |
3097 | 0487d6a8 | j_mayer | RETURN(); |
3098 | 0487d6a8 | j_mayer | } |
3099 | 0487d6a8 | j_mayer | |
3100 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfsf (void) |
3101 | 0487d6a8 | j_mayer | { |
3102 | 0487d6a8 | j_mayer | do_efdcfsf(); |
3103 | 0487d6a8 | j_mayer | RETURN(); |
3104 | 0487d6a8 | j_mayer | } |
3105 | 0487d6a8 | j_mayer | |
3106 | 0487d6a8 | j_mayer | void OPPROTO op_efdcfuf (void) |
3107 | 0487d6a8 | j_mayer | { |
3108 | 0487d6a8 | j_mayer | do_efdcfuf(); |
3109 | 0487d6a8 | j_mayer | RETURN(); |
3110 | 0487d6a8 | j_mayer | } |
3111 | 0487d6a8 | j_mayer | |
3112 | 0487d6a8 | j_mayer | void OPPROTO op_efdctsi (void) |
3113 | 0487d6a8 | j_mayer | { |
3114 | 0487d6a8 | j_mayer | do_efdctsi(); |
3115 | 0487d6a8 | j_mayer | RETURN(); |
3116 | 0487d6a8 | j_mayer | } |
3117 | 0487d6a8 | j_mayer | |
3118 | 0487d6a8 | j_mayer | void OPPROTO op_efdctui (void) |
3119 | 0487d6a8 | j_mayer | { |
3120 | 0487d6a8 | j_mayer | do_efdctui(); |
3121 | 0487d6a8 | j_mayer | RETURN(); |
3122 | 0487d6a8 | j_mayer | } |
3123 | 0487d6a8 | j_mayer | |
3124 | 0487d6a8 | j_mayer | void OPPROTO op_efdctsf (void) |
3125 | 0487d6a8 | j_mayer | { |
3126 | 0487d6a8 | j_mayer | do_efdctsf(); |
3127 | 0487d6a8 | j_mayer | RETURN(); |
3128 | 0487d6a8 | j_mayer | } |
3129 | 0487d6a8 | j_mayer | |
3130 | 0487d6a8 | j_mayer | void OPPROTO op_efdctuf (void) |
3131 | 0487d6a8 | j_mayer | { |
3132 | 0487d6a8 | j_mayer | do_efdctuf(); |
3133 | 0487d6a8 | j_mayer | RETURN(); |
3134 | 0487d6a8 | j_mayer | } |
3135 | 0487d6a8 | j_mayer | |
3136 | 0487d6a8 | j_mayer | void OPPROTO op_efdctuiz (void) |
3137 | 0487d6a8 | j_mayer | { |
3138 | 0487d6a8 | j_mayer | do_efdctuiz(); |
3139 | 0487d6a8 | j_mayer | RETURN(); |
3140 | 0487d6a8 | j_mayer | } |
3141 | 0487d6a8 | j_mayer | |
3142 | 0487d6a8 | j_mayer | void OPPROTO op_efdctsiz (void) |
3143 | 0487d6a8 | j_mayer | { |
3144 | 0487d6a8 | j_mayer | do_efdctsiz(); |
3145 | 0487d6a8 | j_mayer | RETURN(); |
3146 | 0487d6a8 | j_mayer | } |
3147 | 0487d6a8 | j_mayer | |
3148 | 0487d6a8 | j_mayer | void OPPROTO op_efdtstlt (void) |
3149 | 0487d6a8 | j_mayer | { |
3150 | 0487d6a8 | j_mayer | T0 = _do_efdtstlt(T0_64, T1_64); |
3151 | 0487d6a8 | j_mayer | RETURN(); |
3152 | 0487d6a8 | j_mayer | } |
3153 | 0487d6a8 | j_mayer | |
3154 | 0487d6a8 | j_mayer | void OPPROTO op_efdtstgt (void) |
3155 | 0487d6a8 | j_mayer | { |
3156 | 0487d6a8 | j_mayer | T0 = _do_efdtstgt(T0_64, T1_64); |
3157 | 0487d6a8 | j_mayer | RETURN(); |
3158 | 0487d6a8 | j_mayer | } |
3159 | 0487d6a8 | j_mayer | |
3160 | 0487d6a8 | j_mayer | void OPPROTO op_efdtsteq (void) |
3161 | 0487d6a8 | j_mayer | { |
3162 | 0487d6a8 | j_mayer | T0 = _do_efdtsteq(T0_64, T1_64); |
3163 | 0487d6a8 | j_mayer | RETURN(); |
3164 | 0487d6a8 | j_mayer | } |
3165 | 0487d6a8 | j_mayer | #endif /* defined(TARGET_PPCSPE) */ |