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