2 * PowerPC emulation micro-operations for qemu.
4 * Copyright (c) 2003-2007 Jocelyn Mayer
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "host-utils.h"
26 #include "helper_regs.h"
27 #include "op_helper.h"
30 #include "op_template.h"
33 #include "op_template.h"
36 #include "op_template.h"
39 #include "op_template.h"
42 #include "op_template.h"
45 #include "op_template.h"
48 #include "op_template.h"
51 #include "op_template.h"
54 #include "op_template.h"
57 #include "op_template.h"
60 #include "op_template.h"
63 #include "op_template.h"
66 #include "op_template.h"
69 #include "op_template.h"
72 #include "op_template.h"
75 #include "op_template.h"
78 #include "op_template.h"
81 #include "op_template.h"
84 #include "op_template.h"
87 #include "op_template.h"
90 #include "op_template.h"
93 #include "op_template.h"
96 #include "op_template.h"
99 #include "op_template.h"
102 #include "op_template.h"
105 #include "op_template.h"
108 #include "op_template.h"
111 #include "op_template.h"
114 #include "op_template.h"
117 #include "op_template.h"
120 #include "op_template.h"
123 #include "op_template.h"
125 void OPPROTO
op_print_mem_EA (void)
131 /* PowerPC state maintenance operations */
133 void OPPROTO
op_set_Rc0 (void)
135 env
->crf
[0] = T0
| xer_so
;
140 void OPPROTO
op_reset_T0 (void)
146 void OPPROTO
op_set_T0 (void)
148 T0
= (uint32_t)PARAM1
;
152 #if defined(TARGET_PPC64)
153 void OPPROTO
op_set_T0_64 (void)
155 T0
= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
160 void OPPROTO
op_set_T1 (void)
162 T1
= (uint32_t)PARAM1
;
166 #if defined(TARGET_PPC64)
167 void OPPROTO
op_set_T1_64 (void)
169 T1
= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
175 void OPPROTO
op_set_T2 (void)
177 T2
= (uint32_t)PARAM1
;
182 void OPPROTO
op_move_T1_T0 (void)
188 void OPPROTO
op_move_T2_T0 (void)
194 void OPPROTO
op_moven_T2_T0 (void)
200 /* Generate exceptions */
201 void OPPROTO
op_raise_exception_err (void)
203 do_raise_exception_err(PARAM1
, PARAM2
);
206 void OPPROTO
op_update_nip (void)
208 env
->nip
= (uint32_t)PARAM1
;
212 #if defined(TARGET_PPC64)
213 void OPPROTO
op_update_nip_64 (void)
215 env
->nip
= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
220 void OPPROTO
op_debug (void)
222 do_raise_exception(EXCP_DEBUG
);
225 void OPPROTO
op_exit_tb (void)
230 /* Load/store special registers */
231 void OPPROTO
op_load_cr (void)
237 void OPPROTO
op_store_cr (void)
243 void OPPROTO
op_load_cro (void)
245 T0
= env
->crf
[PARAM1
];
249 void OPPROTO
op_store_cro (void)
251 env
->crf
[PARAM1
] = T0
;
255 void OPPROTO
op_load_xer_cr (void)
257 T0
= (xer_so
<< 3) | (xer_ov
<< 2) | (xer_ca
<< 1);
261 void OPPROTO
op_clear_xer_ov (void)
268 void OPPROTO
op_clear_xer_ca (void)
274 void OPPROTO
op_load_xer_bc (void)
280 void OPPROTO
op_store_xer_bc (void)
286 void OPPROTO
op_load_xer (void)
288 T0
= hreg_load_xer(env
);
292 void OPPROTO
op_store_xer (void)
294 hreg_store_xer(env
, T0
);
298 #if defined(TARGET_PPC64)
299 void OPPROTO
op_store_pri (void)
301 do_store_pri(PARAM1
);
306 #if !defined(CONFIG_USER_ONLY)
307 /* Segment registers load and store */
308 void OPPROTO
op_load_sr (void)
314 void OPPROTO
op_store_sr (void)
316 do_store_sr(env
, T1
, T0
);
320 #if defined(TARGET_PPC64)
321 void OPPROTO
op_load_slb (void)
323 T0
= ppc_load_slb(env
, T1
);
327 void OPPROTO
op_store_slb (void)
329 ppc_store_slb(env
, T1
, T0
);
332 #endif /* defined(TARGET_PPC64) */
334 void OPPROTO
op_load_sdr1 (void)
340 void OPPROTO
op_store_sdr1 (void)
342 do_store_sdr1(env
, T0
);
346 #if defined (TARGET_PPC64)
347 void OPPROTO
op_load_asr (void)
353 void OPPROTO
op_store_asr (void)
355 ppc_store_asr(env
, T0
);
360 void OPPROTO
op_load_msr (void)
366 void OPPROTO
op_store_msr (void)
372 #if defined (TARGET_PPC64)
373 void OPPROTO
op_store_msr_32 (void)
375 T0
= (env
->msr
& ~0xFFFFFFFFULL
) | (T0
& 0xFFFFFFFF);
381 void OPPROTO
op_update_riee (void)
383 /* We don't call do_store_msr here as we won't trigger
384 * any special case nor change hflags
386 T0
&= (1 << MSR_RI
) | (1 << MSR_EE
);
387 env
->msr
&= ~(1 << MSR_RI
) | (1 << MSR_EE
);
394 void OPPROTO
op_load_spr (void)
396 T0
= env
->spr
[PARAM1
];
400 void OPPROTO
op_store_spr (void)
402 env
->spr
[PARAM1
] = T0
;
406 void OPPROTO
op_load_dump_spr (void)
408 T0
= ppc_load_dump_spr(PARAM1
);
412 void OPPROTO
op_store_dump_spr (void)
414 ppc_store_dump_spr(PARAM1
, T0
);
418 void OPPROTO
op_mask_spr (void)
420 env
->spr
[PARAM1
] &= ~T0
;
424 void OPPROTO
op_load_lr (void)
430 void OPPROTO
op_store_lr (void)
436 void OPPROTO
op_load_ctr (void)
442 void OPPROTO
op_store_ctr (void)
448 void OPPROTO
op_load_tbl (void)
450 T0
= cpu_ppc_load_tbl(env
);
454 void OPPROTO
op_load_tbu (void)
456 T0
= cpu_ppc_load_tbu(env
);
460 void OPPROTO
op_load_atbl (void)
462 T0
= cpu_ppc_load_atbl(env
);
466 void OPPROTO
op_load_atbu (void)
468 T0
= cpu_ppc_load_atbu(env
);
472 #if !defined(CONFIG_USER_ONLY)
473 void OPPROTO
op_store_tbl (void)
475 cpu_ppc_store_tbl(env
, T0
);
479 void OPPROTO
op_store_tbu (void)
481 cpu_ppc_store_tbu(env
, T0
);
485 void OPPROTO
op_store_atbl (void)
487 cpu_ppc_store_atbl(env
, T0
);
491 void OPPROTO
op_store_atbu (void)
493 cpu_ppc_store_atbu(env
, T0
);
497 void OPPROTO
op_load_decr (void)
499 T0
= cpu_ppc_load_decr(env
);
503 void OPPROTO
op_store_decr (void)
505 cpu_ppc_store_decr(env
, T0
);
509 void OPPROTO
op_load_ibat (void)
511 T0
= env
->IBAT
[PARAM1
][PARAM2
];
515 void OPPROTO
op_store_ibatu (void)
517 do_store_ibatu(env
, PARAM1
, T0
);
521 void OPPROTO
op_store_ibatl (void)
524 env
->IBAT
[1][PARAM1
] = T0
;
526 do_store_ibatl(env
, PARAM1
, T0
);
531 void OPPROTO
op_load_dbat (void)
533 T0
= env
->DBAT
[PARAM1
][PARAM2
];
537 void OPPROTO
op_store_dbatu (void)
539 do_store_dbatu(env
, PARAM1
, T0
);
543 void OPPROTO
op_store_dbatl (void)
546 env
->DBAT
[1][PARAM1
] = T0
;
548 do_store_dbatl(env
, PARAM1
, T0
);
552 #endif /* !defined(CONFIG_USER_ONLY) */
555 #ifdef CONFIG_SOFTFLOAT
556 void OPPROTO
op_reset_fpstatus (void)
558 env
->fp_status
.float_exception_flags
= 0;
563 void OPPROTO
op_compute_fprf (void)
565 do_compute_fprf(PARAM1
);
569 #ifdef CONFIG_SOFTFLOAT
570 void OPPROTO
op_float_check_status (void)
572 do_float_check_status();
576 void OPPROTO
op_float_check_status (void)
578 if (env
->exception_index
== POWERPC_EXCP_PROGRAM
&&
579 (env
->error_code
& POWERPC_EXCP_FP
)) {
580 /* Differred floating-point exception after target FPR update */
581 if (msr_fe0
!= 0 || msr_fe1
!= 0)
582 do_raise_exception_err(env
->exception_index
, env
->error_code
);
588 #if defined(WORDS_BIGENDIAN)
595 void OPPROTO
op_load_fpscr_FT0 (void)
597 /* The 32 MSB of the target fpr are undefined.
608 u
.s
.u
[WORD1
] = env
->fpscr
;
613 void OPPROTO
op_set_FT0 (void)
623 u
.s
.u
[WORD1
] = PARAM1
;
630 void OPPROTO
op_load_fpscr_T0 (void)
632 T0
= (env
->fpscr
>> PARAM1
) & 0xF;
636 void OPPROTO
op_load_fpcc (void)
642 void OPPROTO
op_fpscr_resetbit (void)
644 env
->fpscr
&= PARAM1
;
648 void OPPROTO
op_fpscr_setbit (void)
650 do_fpscr_setbit(PARAM1
);
654 void OPPROTO
op_store_fpscr (void)
656 do_store_fpscr(PARAM1
);
663 void OPPROTO
op_setlr (void)
665 env
->lr
= (uint32_t)PARAM1
;
669 #if defined (TARGET_PPC64)
670 void OPPROTO
op_setlr_64 (void)
672 env
->lr
= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
677 void OPPROTO
op_goto_tb0 (void)
679 GOTO_TB(op_goto_tb0
, PARAM1
, 0);
682 void OPPROTO
op_goto_tb1 (void)
684 GOTO_TB(op_goto_tb1
, PARAM1
, 1);
687 void OPPROTO
op_b_T1 (void)
689 env
->nip
= (uint32_t)(T1
& ~3);
693 #if defined (TARGET_PPC64)
694 void OPPROTO
op_b_T1_64 (void)
696 env
->nip
= (uint64_t)(T1
& ~3);
701 void OPPROTO
op_jz_T0 (void)
708 void OPPROTO
op_btest_T1 (void)
711 env
->nip
= (uint32_t)(T1
& ~3);
713 env
->nip
= (uint32_t)PARAM1
;
718 #if defined (TARGET_PPC64)
719 void OPPROTO
op_btest_T1_64 (void)
722 env
->nip
= (uint64_t)(T1
& ~3);
724 env
->nip
= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
730 void OPPROTO
op_movl_T1_ctr (void)
736 void OPPROTO
op_movl_T1_lr (void)
742 /* tests with result in T0 */
743 void OPPROTO
op_test_ctr (void)
745 T0
= (uint32_t)env
->ctr
;
749 #if defined(TARGET_PPC64)
750 void OPPROTO
op_test_ctr_64 (void)
752 T0
= (uint64_t)env
->ctr
;
757 void OPPROTO
op_test_ctr_true (void)
759 T0
= ((uint32_t)env
->ctr
!= 0 && (T0
& PARAM1
) != 0);
763 #if defined(TARGET_PPC64)
764 void OPPROTO
op_test_ctr_true_64 (void)
766 T0
= ((uint64_t)env
->ctr
!= 0 && (T0
& PARAM1
) != 0);
771 void OPPROTO
op_test_ctr_false (void)
773 T0
= ((uint32_t)env
->ctr
!= 0 && (T0
& PARAM1
) == 0);
777 #if defined(TARGET_PPC64)
778 void OPPROTO
op_test_ctr_false_64 (void)
780 T0
= ((uint64_t)env
->ctr
!= 0 && (T0
& PARAM1
) == 0);
785 void OPPROTO
op_test_ctrz (void)
787 T0
= ((uint32_t)env
->ctr
== 0);
791 #if defined(TARGET_PPC64)
792 void OPPROTO
op_test_ctrz_64 (void)
794 T0
= ((uint64_t)env
->ctr
== 0);
799 void OPPROTO
op_test_ctrz_true (void)
801 T0
= ((uint32_t)env
->ctr
== 0 && (T0
& PARAM1
) != 0);
805 #if defined(TARGET_PPC64)
806 void OPPROTO
op_test_ctrz_true_64 (void)
808 T0
= ((uint64_t)env
->ctr
== 0 && (T0
& PARAM1
) != 0);
813 void OPPROTO
op_test_ctrz_false (void)
815 T0
= ((uint32_t)env
->ctr
== 0 && (T0
& PARAM1
) == 0);
819 #if defined(TARGET_PPC64)
820 void OPPROTO
op_test_ctrz_false_64 (void)
822 T0
= ((uint64_t)env
->ctr
== 0 && (T0
& PARAM1
) == 0);
827 void OPPROTO
op_test_true (void)
833 void OPPROTO
op_test_false (void)
835 T0
= ((T0
& PARAM1
) == 0);
839 /* CTR maintenance */
840 void OPPROTO
op_dec_ctr (void)
846 /*** Integer arithmetic ***/
848 void OPPROTO
op_add (void)
854 void OPPROTO
op_check_addo (void)
856 xer_ov
= (((uint32_t)T2
^ (uint32_t)T1
^ UINT32_MAX
) &
857 ((uint32_t)T2
^ (uint32_t)T0
)) >> 31;
862 #if defined(TARGET_PPC64)
863 void OPPROTO
op_check_addo_64 (void)
865 xer_ov
= (((uint64_t)T2
^ (uint64_t)T1
^ UINT64_MAX
) &
866 ((uint64_t)T2
^ (uint64_t)T0
)) >> 63;
873 void OPPROTO
op_check_addc (void)
875 if (likely((uint32_t)T0
>= (uint32_t)T2
)) {
883 #if defined(TARGET_PPC64)
884 void OPPROTO
op_check_addc_64 (void)
886 if (likely((uint64_t)T0
>= (uint64_t)T2
)) {
896 void OPPROTO
op_adde (void)
902 #if defined(TARGET_PPC64)
903 void OPPROTO
op_adde_64 (void)
911 void OPPROTO
op_addi (void)
913 T0
+= (int32_t)PARAM1
;
917 /* add to minus one extended */
918 void OPPROTO
op_add_me (void)
921 if (likely((uint32_t)T1
!= 0))
928 #if defined(TARGET_PPC64)
929 void OPPROTO
op_add_me_64 (void)
932 if (likely((uint64_t)T1
!= 0))
940 void OPPROTO
op_addmeo (void)
946 void OPPROTO
op_addmeo_64 (void)
952 /* add to zero extended */
953 void OPPROTO
op_add_ze (void)
960 void OPPROTO
op_divw (void)
962 if (unlikely(((int32_t)T0
== INT32_MIN
&& (int32_t)T1
== (int32_t)-1) ||
964 T0
= (int32_t)(UINT32_MAX
* ((uint32_t)T0
>> 31));
966 T0
= (int32_t)T0
/ (int32_t)T1
;
971 #if defined(TARGET_PPC64)
972 void OPPROTO
op_divd (void)
974 if (unlikely(((int64_t)T0
== INT64_MIN
&& (int64_t)T1
== (int64_t)-1LL) ||
976 T0
= (int64_t)(UINT64_MAX
* ((uint64_t)T0
>> 63));
978 T0
= (int64_t)T0
/ (int64_t)T1
;
984 void OPPROTO
op_divwo (void)
990 #if defined(TARGET_PPC64)
991 void OPPROTO
op_divdo (void)
998 /* divide word unsigned */
999 void OPPROTO
op_divwu (void)
1001 if (unlikely(T1
== 0)) {
1004 T0
= (uint32_t)T0
/ (uint32_t)T1
;
1009 #if defined(TARGET_PPC64)
1010 void OPPROTO
op_divdu (void)
1012 if (unlikely(T1
== 0)) {
1021 void OPPROTO
op_divwuo (void)
1027 #if defined(TARGET_PPC64)
1028 void OPPROTO
op_divduo (void)
1035 /* multiply high word */
1036 void OPPROTO
op_mulhw (void)
1038 T0
= ((int64_t)((int32_t)T0
) * (int64_t)((int32_t)T1
)) >> 32;
1042 #if defined(TARGET_PPC64)
1043 void OPPROTO
op_mulhd (void)
1047 muls64(&tl
, &th
, T0
, T1
);
1053 /* multiply high word unsigned */
1054 void OPPROTO
op_mulhwu (void)
1056 T0
= ((uint64_t)(uint32_t)T0
* (uint64_t)(uint32_t)T1
) >> 32;
1060 #if defined(TARGET_PPC64)
1061 void OPPROTO
op_mulhdu (void)
1065 mulu64(&tl
, &th
, T0
, T1
);
1071 /* multiply low immediate */
1072 void OPPROTO
op_mulli (void)
1074 T0
= ((int32_t)T0
* (int32_t)PARAM1
);
1078 /* multiply low word */
1079 void OPPROTO
op_mullw (void)
1081 T0
= (int32_t)(T0
* T1
);
1085 #if defined(TARGET_PPC64)
1086 void OPPROTO
op_mulld (void)
1093 void OPPROTO
op_mullwo (void)
1099 #if defined(TARGET_PPC64)
1100 void OPPROTO
op_mulldo (void)
1108 void OPPROTO
op_neg (void)
1110 if (likely(T0
!= INT32_MIN
)) {
1116 #if defined(TARGET_PPC64)
1117 void OPPROTO
op_neg_64 (void)
1119 if (likely(T0
!= INT64_MIN
)) {
1126 void OPPROTO
op_nego (void)
1132 #if defined(TARGET_PPC64)
1133 void OPPROTO
op_nego_64 (void)
1141 void OPPROTO
op_subf (void)
1147 /* subtract from carrying */
1148 void OPPROTO
op_check_subfc (void)
1150 if (likely((uint32_t)T0
> (uint32_t)T1
)) {
1158 #if defined(TARGET_PPC64)
1159 void OPPROTO
op_check_subfc_64 (void)
1161 if (likely((uint64_t)T0
> (uint64_t)T1
)) {
1170 /* subtract from extended */
1171 void OPPROTO
op_subfe (void)
1177 #if defined(TARGET_PPC64)
1178 void OPPROTO
op_subfe_64 (void)
1185 /* subtract from immediate carrying */
1186 void OPPROTO
op_subfic (void)
1188 T0
= (int32_t)PARAM1
+ ~T0
+ 1;
1189 if ((uint32_t)T0
<= (uint32_t)PARAM1
) {
1197 #if defined(TARGET_PPC64)
1198 void OPPROTO
op_subfic_64 (void)
1200 T0
= (int64_t)PARAM1
+ ~T0
+ 1;
1201 if ((uint64_t)T0
<= (uint64_t)PARAM1
) {
1210 /* subtract from minus one extended */
1211 void OPPROTO
op_subfme (void)
1213 T0
= ~T0
+ xer_ca
- 1;
1214 if (likely((uint32_t)T0
!= UINT32_MAX
))
1221 #if defined(TARGET_PPC64)
1222 void OPPROTO
op_subfme_64 (void)
1224 T0
= ~T0
+ xer_ca
- 1;
1225 if (likely((uint64_t)T0
!= UINT64_MAX
))
1233 void OPPROTO
op_subfmeo (void)
1239 #if defined(TARGET_PPC64)
1240 void OPPROTO
op_subfmeo_64 (void)
1247 /* subtract from zero extended */
1248 void OPPROTO
op_subfze (void)
1252 if ((uint32_t)T0
< (uint32_t)T1
) {
1260 #if defined(TARGET_PPC64)
1261 void OPPROTO
op_subfze_64 (void)
1265 if ((uint64_t)T0
< (uint64_t)T1
) {
1274 void OPPROTO
op_subfzeo (void)
1280 #if defined(TARGET_PPC64)
1281 void OPPROTO
op_subfzeo_64 (void)
1288 /*** Integer comparison ***/
1290 void OPPROTO
op_cmp (void)
1292 if ((int32_t)T0
< (int32_t)T1
) {
1294 } else if ((int32_t)T0
> (int32_t)T1
) {
1303 #if defined(TARGET_PPC64)
1304 void OPPROTO
op_cmp_64 (void)
1306 if ((int64_t)T0
< (int64_t)T1
) {
1308 } else if ((int64_t)T0
> (int64_t)T1
) {
1318 /* compare immediate */
1319 void OPPROTO
op_cmpi (void)
1321 if ((int32_t)T0
< (int32_t)PARAM1
) {
1323 } else if ((int32_t)T0
> (int32_t)PARAM1
) {
1332 #if defined(TARGET_PPC64)
1333 void OPPROTO
op_cmpi_64 (void)
1335 if ((int64_t)T0
< (int64_t)((int32_t)PARAM1
)) {
1337 } else if ((int64_t)T0
> (int64_t)((int32_t)PARAM1
)) {
1347 /* compare logical */
1348 void OPPROTO
op_cmpl (void)
1350 if ((uint32_t)T0
< (uint32_t)T1
) {
1352 } else if ((uint32_t)T0
> (uint32_t)T1
) {
1361 #if defined(TARGET_PPC64)
1362 void OPPROTO
op_cmpl_64 (void)
1364 if ((uint64_t)T0
< (uint64_t)T1
) {
1366 } else if ((uint64_t)T0
> (uint64_t)T1
) {
1376 /* compare logical immediate */
1377 void OPPROTO
op_cmpli (void)
1379 if ((uint32_t)T0
< (uint32_t)PARAM1
) {
1381 } else if ((uint32_t)T0
> (uint32_t)PARAM1
) {
1390 #if defined(TARGET_PPC64)
1391 void OPPROTO
op_cmpli_64 (void)
1393 if ((uint64_t)T0
< (uint64_t)PARAM1
) {
1395 } else if ((uint64_t)T0
> (uint64_t)PARAM1
) {
1405 void OPPROTO
op_isel (void)
1414 void OPPROTO
op_popcntb (void)
1420 #if defined(TARGET_PPC64)
1421 void OPPROTO
op_popcntb_64 (void)
1428 /*** Integer logical ***/
1430 void OPPROTO
op_and (void)
1437 void OPPROTO
op_andc (void)
1444 void OPPROTO
op_andi_T0 (void)
1446 T0
&= (uint32_t)PARAM1
;
1450 void OPPROTO
op_andi_T1 (void)
1452 T1
&= (uint32_t)PARAM1
;
1456 #if defined(TARGET_PPC64)
1457 void OPPROTO
op_andi_T0_64 (void)
1459 T0
&= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
1463 void OPPROTO
op_andi_T1_64 (void)
1465 T1
&= ((uint64_t)PARAM1
<< 32) | (uint64_t)PARAM2
;
1470 /* count leading zero */
1471 void OPPROTO
op_cntlzw (void)
1477 #if defined(TARGET_PPC64)
1478 void OPPROTO
op_cntlzd (void)
1486 void OPPROTO
op_eqv (void)
1492 /* extend sign byte */
1493 void OPPROTO
op_extsb (void)
1495 #if defined (TARGET_PPC64)
1496 T0
= (int64_t)((int8_t)T0
);
1498 T0
= (int32_t)((int8_t)T0
);
1503 /* extend sign half word */
1504 void OPPROTO
op_extsh (void)
1506 #if defined (TARGET_PPC64)
1507 T0
= (int64_t)((int16_t)T0
);
1509 T0
= (int32_t)((int16_t)T0
);
1514 #if defined (TARGET_PPC64)
1515 void OPPROTO
op_extsw (void)
1517 T0
= (int64_t)((int32_t)T0
);
1523 void OPPROTO
op_nand (void)
1530 void OPPROTO
op_nor (void)
1537 void OPPROTO
op_or (void)
1544 void OPPROTO
op_orc (void)
1551 void OPPROTO
op_ori (void)
1553 T0
|= (uint32_t)PARAM1
;
1558 void OPPROTO
op_xor (void)
1565 void OPPROTO
op_xori (void)
1567 T0
^= (uint32_t)PARAM1
;
1571 /*** Integer rotate ***/
1572 void OPPROTO
op_rotl32_T0_T1 (void)
1574 T0
= rotl32(T0
, T1
& 0x1F);
1578 void OPPROTO
op_rotli32_T0 (void)
1580 T0
= rotl32(T0
, PARAM1
);
1584 #if defined(TARGET_PPC64)
1585 void OPPROTO
op_rotl64_T0_T1 (void)
1587 T0
= rotl64(T0
, T1
& 0x3F);
1591 void OPPROTO
op_rotli64_T0 (void)
1593 T0
= rotl64(T0
, PARAM1
);
1598 /*** Integer shift ***/
1599 /* shift left word */
1600 void OPPROTO
op_slw (void)
1605 T0
= (uint32_t)(T0
<< T1
);
1610 #if defined(TARGET_PPC64)
1611 void OPPROTO
op_sld (void)
1622 /* shift right algebraic word */
1623 void OPPROTO
op_sraw (void)
1629 #if defined(TARGET_PPC64)
1630 void OPPROTO
op_srad (void)
1637 /* shift right algebraic word immediate */
1638 void OPPROTO
op_srawi (void)
1640 uint32_t mask
= (uint32_t)PARAM2
;
1642 T0
= (int32_t)T0
>> PARAM1
;
1643 if ((int32_t)T1
< 0 && (T1
& mask
) != 0) {
1651 #if defined(TARGET_PPC64)
1652 void OPPROTO
op_sradi (void)
1654 uint64_t mask
= ((uint64_t)PARAM2
<< 32) | (uint64_t)PARAM3
;
1656 T0
= (int64_t)T0
>> PARAM1
;
1657 if ((int64_t)T1
< 0 && ((uint64_t)T1
& mask
) != 0) {
1666 /* shift right word */
1667 void OPPROTO
op_srw (void)
1672 T0
= (uint32_t)T0
>> T1
;
1677 #if defined(TARGET_PPC64)
1678 void OPPROTO
op_srd (void)
1683 T0
= (uint64_t)T0
>> T1
;
1689 void OPPROTO
op_sl_T0_T1 (void)
1695 void OPPROTO
op_sli_T0 (void)
1701 void OPPROTO
op_sli_T1 (void)
1707 void OPPROTO
op_srl_T0_T1 (void)
1709 T0
= (uint32_t)T0
>> T1
;
1713 #if defined(TARGET_PPC64)
1714 void OPPROTO
op_srl_T0_T1_64 (void)
1716 T0
= (uint32_t)T0
>> T1
;
1721 void OPPROTO
op_srli_T0 (void)
1723 T0
= (uint32_t)T0
>> PARAM1
;
1727 #if defined(TARGET_PPC64)
1728 void OPPROTO
op_srli_T0_64 (void)
1730 T0
= (uint64_t)T0
>> PARAM1
;
1735 void OPPROTO
op_srli_T1 (void)
1737 T1
= (uint32_t)T1
>> PARAM1
;
1741 #if defined(TARGET_PPC64)
1742 void OPPROTO
op_srli_T1_64 (void)
1744 T1
= (uint64_t)T1
>> PARAM1
;
1749 /*** Floating-Point arithmetic ***/
1751 void OPPROTO
op_fadd (void)
1753 #if USE_PRECISE_EMULATION
1756 FT0
= float64_add(FT0
, FT1
, &env
->fp_status
);
1762 void OPPROTO
op_fsub (void)
1764 #if USE_PRECISE_EMULATION
1767 FT0
= float64_sub(FT0
, FT1
, &env
->fp_status
);
1773 void OPPROTO
op_fmul (void)
1775 #if USE_PRECISE_EMULATION
1778 FT0
= float64_mul(FT0
, FT1
, &env
->fp_status
);
1784 void OPPROTO
op_fdiv (void)
1786 #if USE_PRECISE_EMULATION
1789 FT0
= float64_div(FT0
, FT1
, &env
->fp_status
);
1794 /* fsqrt - fsqrt. */
1795 void OPPROTO
op_fsqrt (void)
1802 void OPPROTO
op_fre (void)
1809 void OPPROTO
op_fres (void)
1815 /* frsqrte - frsqrte. */
1816 void OPPROTO
op_frsqrte (void)
1823 void OPPROTO
op_fsel (void)
1829 /*** Floating-Point multiply-and-add ***/
1830 /* fmadd - fmadd. */
1831 void OPPROTO
op_fmadd (void)
1833 #if USE_PRECISE_EMULATION
1836 FT0
= float64_mul(FT0
, FT1
, &env
->fp_status
);
1837 FT0
= float64_add(FT0
, FT2
, &env
->fp_status
);
1842 /* fmsub - fmsub. */
1843 void OPPROTO
op_fmsub (void)
1845 #if USE_PRECISE_EMULATION
1848 FT0
= float64_mul(FT0
, FT1
, &env
->fp_status
);
1849 FT0
= float64_sub(FT0
, FT2
, &env
->fp_status
);
1854 /* fnmadd - fnmadd. - fnmadds - fnmadds. */
1855 void OPPROTO
op_fnmadd (void)
1861 /* fnmsub - fnmsub. */
1862 void OPPROTO
op_fnmsub (void)
1868 /*** Floating-Point round & convert ***/
1870 void OPPROTO
op_frsp (void)
1872 #if USE_PRECISE_EMULATION
1875 FT0
= float64_to_float32(FT0
, &env
->fp_status
);
1880 /* fctiw - fctiw. */
1881 void OPPROTO
op_fctiw (void)
1887 /* fctiwz - fctiwz. */
1888 void OPPROTO
op_fctiwz (void)
1894 #if defined(TARGET_PPC64)
1895 /* fcfid - fcfid. */
1896 void OPPROTO
op_fcfid (void)
1902 /* fctid - fctid. */
1903 void OPPROTO
op_fctid (void)
1909 /* fctidz - fctidz. */
1910 void OPPROTO
op_fctidz (void)
1917 void OPPROTO
op_frin (void)
1923 void OPPROTO
op_friz (void)
1929 void OPPROTO
op_frip (void)
1935 void OPPROTO
op_frim (void)
1941 /*** Floating-Point compare ***/
1943 void OPPROTO
op_fcmpu (void)
1950 void OPPROTO
op_fcmpo (void)
1956 /*** Floating-point move ***/
1958 void OPPROTO
op_fabs (void)
1960 FT0
= float64_abs(FT0
);
1965 void OPPROTO
op_fnabs (void)
1967 FT0
= float64_abs(FT0
);
1968 FT0
= float64_chs(FT0
);
1973 void OPPROTO
op_fneg (void)
1975 FT0
= float64_chs(FT0
);
1979 /* Load and store */
1980 #define MEMSUFFIX _raw
1981 #include "op_helper.h"
1983 #if !defined(CONFIG_USER_ONLY)
1984 #define MEMSUFFIX _user
1985 #include "op_helper.h"
1987 #define MEMSUFFIX _kernel
1988 #include "op_helper.h"
1990 #define MEMSUFFIX _hypv
1991 #include "op_helper.h"
1995 /* Special op to check and maybe clear reservation */
1996 void OPPROTO
op_check_reservation (void)
1998 if ((uint32_t)env
->reserve
== (uint32_t)(T0
& ~0x00000003))
1999 env
->reserve
= (target_ulong
)-1ULL;
2003 #if defined(TARGET_PPC64)
2004 void OPPROTO
op_check_reservation_64 (void)
2006 if ((uint64_t)env
->reserve
== (uint64_t)(T0
& ~0x00000003))
2007 env
->reserve
= (target_ulong
)-1ULL;
2012 void OPPROTO
op_wait (void)
2018 /* Return from interrupt */
2019 #if !defined(CONFIG_USER_ONLY)
2020 void OPPROTO
op_rfi (void)
2026 #if defined(TARGET_PPC64)
2027 void OPPROTO
op_rfid (void)
2033 void OPPROTO
op_hrfid (void)
2040 /* Exception vectors */
2041 void OPPROTO
op_store_excp_prefix (void)
2043 T0
&= env
->ivpr_mask
;
2044 env
->excp_prefix
= T0
;
2048 void OPPROTO
op_store_excp_vector (void)
2050 T0
&= env
->ivor_mask
;
2051 env
->excp_vectors
[PARAM1
] = T0
;
2057 void OPPROTO
op_tw (void)
2063 #if defined(TARGET_PPC64)
2064 void OPPROTO
op_td (void)
2071 #if !defined(CONFIG_USER_ONLY)
2073 void OPPROTO
op_tlbia (void)
2075 ppc_tlb_invalidate_all(env
);
2080 void OPPROTO
op_tlbie (void)
2082 ppc_tlb_invalidate_one(env
, (uint32_t)T0
);
2086 #if defined(TARGET_PPC64)
2087 void OPPROTO
op_tlbie_64 (void)
2089 ppc_tlb_invalidate_one(env
, T0
);
2094 #if defined(TARGET_PPC64)
2095 void OPPROTO
op_slbia (void)
2097 ppc_slb_invalidate_all(env
);
2101 void OPPROTO
op_slbie (void)
2103 ppc_slb_invalidate_one(env
, (uint32_t)T0
);
2107 void OPPROTO
op_slbie_64 (void)
2109 ppc_slb_invalidate_one(env
, T0
);
2115 #if !defined(CONFIG_USER_ONLY)
2116 /* PowerPC 602/603/755 software TLB load instructions */
2117 void OPPROTO
op_6xx_tlbld (void)
2123 void OPPROTO
op_6xx_tlbli (void)
2129 /* PowerPC 74xx software TLB load instructions */
2130 void OPPROTO
op_74xx_tlbld (void)
2132 do_load_74xx_tlb(0);
2136 void OPPROTO
op_74xx_tlbli (void)
2138 do_load_74xx_tlb(1);
2144 void OPPROTO
op_load_601_rtcl (void)
2146 T0
= cpu_ppc601_load_rtcl(env
);
2150 void OPPROTO
op_load_601_rtcu (void)
2152 T0
= cpu_ppc601_load_rtcu(env
);
2156 #if !defined(CONFIG_USER_ONLY)
2157 void OPPROTO
op_store_601_rtcl (void)
2159 cpu_ppc601_store_rtcl(env
, T0
);
2163 void OPPROTO
op_store_601_rtcu (void)
2165 cpu_ppc601_store_rtcu(env
, T0
);
2169 void OPPROTO
op_store_hid0_601 (void)
2171 do_store_hid0_601();
2175 void OPPROTO
op_load_601_bat (void)
2177 T0
= env
->IBAT
[PARAM1
][PARAM2
];
2181 void OPPROTO
op_store_601_batl (void)
2183 do_store_ibatl_601(env
, PARAM1
, T0
);
2187 void OPPROTO
op_store_601_batu (void)
2189 do_store_ibatu_601(env
, PARAM1
, T0
);
2192 #endif /* !defined(CONFIG_USER_ONLY) */
2194 /* PowerPC 601 specific instructions (POWER bridge) */
2195 /* XXX: those micro-ops need tests ! */
2196 void OPPROTO
op_POWER_abs (void)
2198 if ((int32_t)T0
== INT32_MIN
)
2200 else if ((int32_t)T0
< 0)
2205 void OPPROTO
op_POWER_abso (void)
2211 void OPPROTO
op_POWER_clcs (void)
2217 void OPPROTO
op_POWER_div (void)
2223 void OPPROTO
op_POWER_divo (void)
2229 void OPPROTO
op_POWER_divs (void)
2235 void OPPROTO
op_POWER_divso (void)
2241 void OPPROTO
op_POWER_doz (void)
2243 if ((int32_t)T1
> (int32_t)T0
)
2250 void OPPROTO
op_POWER_dozo (void)
2256 void OPPROTO
op_load_xer_cmp (void)
2262 void OPPROTO
op_POWER_maskg (void)
2268 void OPPROTO
op_POWER_maskir (void)
2270 T0
= (T0
& ~T2
) | (T1
& T2
);
2274 void OPPROTO
op_POWER_mul (void)
2278 tmp
= (uint64_t)T0
* (uint64_t)T1
;
2279 env
->spr
[SPR_MQ
] = tmp
>> 32;
2284 void OPPROTO
op_POWER_mulo (void)
2290 void OPPROTO
op_POWER_nabs (void)
2297 void OPPROTO
op_POWER_nabso (void)
2299 /* nabs never overflows */
2306 /* XXX: factorise POWER rotates... */
2307 void OPPROTO
op_POWER_rlmi (void)
2309 T0
= rotl32(T0
, T2
) & PARAM1
;
2310 T0
|= T1
& (uint32_t)PARAM2
;
2314 void OPPROTO
op_POWER_rrib (void)
2317 T0
= rotl32(T0
& INT32_MIN
, T2
);
2318 T0
|= T1
& ~rotl32(INT32_MIN
, T2
);
2322 void OPPROTO
op_POWER_sle (void)
2325 env
->spr
[SPR_MQ
] = rotl32(T0
, T1
);
2330 void OPPROTO
op_POWER_sleq (void)
2332 uint32_t tmp
= env
->spr
[SPR_MQ
];
2335 env
->spr
[SPR_MQ
] = rotl32(T0
, T1
);
2337 T0
|= tmp
>> (32 - T1
);
2341 void OPPROTO
op_POWER_sllq (void)
2343 uint32_t msk
= UINT32_MAX
;
2345 msk
= msk
<< (T1
& 0x1FUL
);
2349 T0
= (T0
<< T1
) & msk
;
2350 T0
|= env
->spr
[SPR_MQ
] & ~msk
;
2354 void OPPROTO
op_POWER_slq (void)
2356 uint32_t msk
= UINT32_MAX
, tmp
;
2358 msk
= msk
<< (T1
& 0x1FUL
);
2362 tmp
= rotl32(T0
, T1
);
2364 env
->spr
[SPR_MQ
] = tmp
;
2368 void OPPROTO
op_POWER_sraq (void)
2370 env
->spr
[SPR_MQ
] = rotl32(T0
, 32 - (T1
& 0x1FUL
));
2374 T0
= (int32_t)T0
>> T1
;
2378 void OPPROTO
op_POWER_sre (void)
2381 env
->spr
[SPR_MQ
] = rotl32(T0
, 32 - T1
);
2382 T0
= (int32_t)T0
>> T1
;
2386 void OPPROTO
op_POWER_srea (void)
2389 env
->spr
[SPR_MQ
] = T0
>> T1
;
2390 T0
= (int32_t)T0
>> T1
;
2394 void OPPROTO
op_POWER_sreq (void)
2400 msk
= INT32_MIN
>> T1
;
2401 tmp
= env
->spr
[SPR_MQ
];
2402 env
->spr
[SPR_MQ
] = rotl32(T0
, 32 - T1
);
2408 void OPPROTO
op_POWER_srlq (void)
2413 msk
= INT32_MIN
>> (T1
& 0x1FUL
);
2417 tmp
= env
->spr
[SPR_MQ
];
2418 env
->spr
[SPR_MQ
] = rotl32(T0
, 32 - T1
);
2425 void OPPROTO
op_POWER_srq (void)
2428 env
->spr
[SPR_MQ
] = rotl32(T0
, 32 - T1
);
2433 /* POWER instructions not implemented in PowerPC 601 */
2434 #if !defined(CONFIG_USER_ONLY)
2435 void OPPROTO
op_POWER_mfsri (void)
2442 void OPPROTO
op_POWER_rac (void)
2448 void OPPROTO
op_POWER_rfsvc (void)
2455 /* PowerPC 602 specific instruction */
2456 #if !defined(CONFIG_USER_ONLY)
2457 void OPPROTO
op_602_mfrom (void)
2464 /* PowerPC 4xx specific micro-ops */
2465 void OPPROTO
op_405_add_T0_T2 (void)
2467 T0
= (int32_t)T0
+ (int32_t)T2
;
2471 void OPPROTO
op_405_mulchw (void)
2473 T0
= ((int16_t)T0
) * ((int16_t)(T1
>> 16));
2477 void OPPROTO
op_405_mulchwu (void)
2479 T0
= ((uint16_t)T0
) * ((uint16_t)(T1
>> 16));
2483 void OPPROTO
op_405_mulhhw (void)
2485 T0
= ((int16_t)(T0
>> 16)) * ((int16_t)(T1
>> 16));
2489 void OPPROTO
op_405_mulhhwu (void)
2491 T0
= ((uint16_t)(T0
>> 16)) * ((uint16_t)(T1
>> 16));
2495 void OPPROTO
op_405_mullhw (void)
2497 T0
= ((int16_t)T0
) * ((int16_t)T1
);
2501 void OPPROTO
op_405_mullhwu (void)
2503 T0
= ((uint16_t)T0
) * ((uint16_t)T1
);
2507 void OPPROTO
op_405_check_sat (void)
2513 void OPPROTO
op_405_check_ovu (void)
2515 if (likely(T0
>= T2
)) {
2524 void OPPROTO
op_405_check_satu (void)
2526 if (unlikely(T0
< T2
)) {
2527 /* Saturate result */
2533 void OPPROTO
op_load_dcr (void)
2539 void OPPROTO
op_store_dcr (void)
2545 #if !defined(CONFIG_USER_ONLY)
2546 /* Return from critical interrupt :
2547 * same as rfi, except nip & MSR are loaded from SRR2/3 instead of SRR0/1
2549 void OPPROTO
op_40x_rfci (void)
2555 void OPPROTO
op_rfci (void)
2561 void OPPROTO
op_rfdi (void)
2567 void OPPROTO
op_rfmci (void)
2573 void OPPROTO
op_wrte (void)
2575 /* We don't call do_store_msr here as we won't trigger
2576 * any special case nor change hflags
2579 env
->msr
&= ~(1 << MSR_EE
);
2584 void OPPROTO
op_440_tlbre (void)
2586 do_440_tlbre(PARAM1
);
2590 void OPPROTO
op_440_tlbsx (void)
2592 T0
= ppcemb_tlb_search(env
, T0
, env
->spr
[SPR_440_MMUCR
] & 0xFF);
2596 void OPPROTO
op_4xx_tlbsx_check (void)
2607 void OPPROTO
op_440_tlbwe (void)
2609 do_440_tlbwe(PARAM1
);
2613 void OPPROTO
op_4xx_tlbre_lo (void)
2619 void OPPROTO
op_4xx_tlbre_hi (void)
2625 void OPPROTO
op_4xx_tlbsx (void)
2627 T0
= ppcemb_tlb_search(env
, T0
, env
->spr
[SPR_40x_PID
]);
2631 void OPPROTO
op_4xx_tlbwe_lo (void)
2637 void OPPROTO
op_4xx_tlbwe_hi (void)
2646 void OPPROTO
op_440_dlmzb (void)
2652 void OPPROTO
op_440_dlmzb_update_Rc (void)
2663 #if !defined(CONFIG_USER_ONLY)
2664 void OPPROTO
op_store_pir (void)
2666 env
->spr
[SPR_PIR
] = T0
& 0x0000000FUL
;
2670 void OPPROTO
op_load_403_pb (void)
2672 do_load_403_pb(PARAM1
);
2676 void OPPROTO
op_store_403_pb (void)
2678 do_store_403_pb(PARAM1
);
2682 void OPPROTO
op_load_40x_pit (void)
2684 T0
= load_40x_pit(env
);
2688 void OPPROTO
op_store_40x_pit (void)
2690 store_40x_pit(env
, T0
);
2694 void OPPROTO
op_store_40x_dbcr0 (void)
2696 store_40x_dbcr0(env
, T0
);
2700 void OPPROTO
op_store_40x_sler (void)
2702 store_40x_sler(env
, T0
);
2706 void OPPROTO
op_store_booke_tcr (void)
2708 store_booke_tcr(env
, T0
);
2712 void OPPROTO
op_store_booke_tsr (void)
2714 store_booke_tsr(env
, T0
);
2717 #endif /* !defined(CONFIG_USER_ONLY) */
2720 void OPPROTO
op_splatw_T1_64 (void)
2722 T1_64
= (T1_64
<< 32) | (T1_64
& 0x00000000FFFFFFFFULL
);
2726 void OPPROTO
op_splatwi_T0_64 (void)
2728 uint64_t tmp
= PARAM1
;
2730 T0_64
= (tmp
<< 32) | tmp
;
2734 void OPPROTO
op_splatwi_T1_64 (void)
2736 uint64_t tmp
= PARAM1
;
2738 T1_64
= (tmp
<< 32) | tmp
;
2742 void OPPROTO
op_extsh_T1_64 (void)
2744 T1_64
= (int32_t)((int16_t)T1_64
);
2748 void OPPROTO
op_sli16_T1_64 (void)
2750 T1_64
= T1_64
<< 16;
2754 void OPPROTO
op_sli32_T1_64 (void)
2756 T1_64
= T1_64
<< 32;
2760 void OPPROTO
op_srli32_T1_64 (void)
2762 T1_64
= T1_64
>> 32;
2766 void OPPROTO
op_evsel (void)
2772 void OPPROTO
op_evaddw (void)
2778 void OPPROTO
op_evsubfw (void)
2784 void OPPROTO
op_evneg (void)
2790 void OPPROTO
op_evabs (void)
2796 void OPPROTO
op_evextsh (void)
2798 T0_64
= ((uint64_t)((int32_t)(int16_t)(T0_64
>> 32)) << 32) |
2799 (uint64_t)((int32_t)(int16_t)T0_64
);
2803 void OPPROTO
op_evextsb (void)
2805 T0_64
= ((uint64_t)((int32_t)(int8_t)(T0_64
>> 32)) << 32) |
2806 (uint64_t)((int32_t)(int8_t)T0_64
);
2810 void OPPROTO
op_evcntlzw (void)
2816 void OPPROTO
op_evrndw (void)
2822 void OPPROTO
op_brinc (void)
2828 void OPPROTO
op_evcntlsw (void)
2834 void OPPROTO
op_evand (void)
2840 void OPPROTO
op_evandc (void)
2846 void OPPROTO
op_evor (void)
2852 void OPPROTO
op_evxor (void)
2858 void OPPROTO
op_eveqv (void)
2860 T0_64
= ~(T0_64
^ T1_64
);
2864 void OPPROTO
op_evnor (void)
2866 T0_64
= ~(T0_64
| T1_64
);
2870 void OPPROTO
op_evorc (void)
2876 void OPPROTO
op_evnand (void)
2878 T0_64
= ~(T0_64
& T1_64
);
2882 void OPPROTO
op_evsrws (void)
2888 void OPPROTO
op_evsrwu (void)
2894 void OPPROTO
op_evslw (void)
2900 void OPPROTO
op_evrlw (void)
2906 void OPPROTO
op_evmergelo (void)
2908 T0_64
= (T0_64
<< 32) | (T1_64
& 0x00000000FFFFFFFFULL
);
2912 void OPPROTO
op_evmergehi (void)
2914 T0_64
= (T0_64
& 0xFFFFFFFF00000000ULL
) | (T1_64
>> 32);
2918 void OPPROTO
op_evmergelohi (void)
2920 T0_64
= (T0_64
<< 32) | (T1_64
>> 32);
2924 void OPPROTO
op_evmergehilo (void)
2926 T0_64
= (T0_64
& 0xFFFFFFFF00000000ULL
) | (T1_64
& 0x00000000FFFFFFFFULL
);
2930 void OPPROTO
op_evcmpgts (void)
2936 void OPPROTO
op_evcmpgtu (void)
2942 void OPPROTO
op_evcmplts (void)
2948 void OPPROTO
op_evcmpltu (void)
2954 void OPPROTO
op_evcmpeq (void)
2960 void OPPROTO
op_evfssub (void)
2966 void OPPROTO
op_evfsadd (void)
2972 void OPPROTO
op_evfsnabs (void)
2978 void OPPROTO
op_evfsabs (void)
2984 void OPPROTO
op_evfsneg (void)
2990 void OPPROTO
op_evfsdiv (void)
2996 void OPPROTO
op_evfsmul (void)
3002 void OPPROTO
op_evfscmplt (void)
3008 void OPPROTO
op_evfscmpgt (void)
3014 void OPPROTO
op_evfscmpeq (void)
3020 void OPPROTO
op_evfscfsi (void)
3026 void OPPROTO
op_evfscfui (void)
3032 void OPPROTO
op_evfscfsf (void)
3038 void OPPROTO
op_evfscfuf (void)
3044 void OPPROTO
op_evfsctsi (void)
3050 void OPPROTO
op_evfsctui (void)
3056 void OPPROTO
op_evfsctsf (void)
3062 void OPPROTO
op_evfsctuf (void)
3068 void OPPROTO
op_evfsctuiz (void)
3074 void OPPROTO
op_evfsctsiz (void)
3080 void OPPROTO
op_evfststlt (void)
3086 void OPPROTO
op_evfststgt (void)
3092 void OPPROTO
op_evfststeq (void)
3098 void OPPROTO
op_efssub (void)
3100 T0_64
= _do_efssub(T0_64
, T1_64
);
3104 void OPPROTO
op_efsadd (void)
3106 T0_64
= _do_efsadd(T0_64
, T1_64
);
3110 void OPPROTO
op_efsnabs (void)
3112 T0_64
= _do_efsnabs(T0_64
);
3116 void OPPROTO
op_efsabs (void)
3118 T0_64
= _do_efsabs(T0_64
);
3122 void OPPROTO
op_efsneg (void)
3124 T0_64
= _do_efsneg(T0_64
);
3128 void OPPROTO
op_efsdiv (void)
3130 T0_64
= _do_efsdiv(T0_64
, T1_64
);
3134 void OPPROTO
op_efsmul (void)
3136 T0_64
= _do_efsmul(T0_64
, T1_64
);
3140 void OPPROTO
op_efscmplt (void)
3146 void OPPROTO
op_efscmpgt (void)
3152 void OPPROTO
op_efscfd (void)
3158 void OPPROTO
op_efscmpeq (void)
3164 void OPPROTO
op_efscfsi (void)
3170 void OPPROTO
op_efscfui (void)
3176 void OPPROTO
op_efscfsf (void)
3182 void OPPROTO
op_efscfuf (void)
3188 void OPPROTO
op_efsctsi (void)
3194 void OPPROTO
op_efsctui (void)
3200 void OPPROTO
op_efsctsf (void)
3206 void OPPROTO
op_efsctuf (void)
3212 void OPPROTO
op_efsctsiz (void)
3218 void OPPROTO
op_efsctuiz (void)
3224 void OPPROTO
op_efststlt (void)
3226 T0
= _do_efststlt(T0_64
, T1_64
);
3230 void OPPROTO
op_efststgt (void)
3232 T0
= _do_efststgt(T0_64
, T1_64
);
3236 void OPPROTO
op_efststeq (void)
3238 T0
= _do_efststeq(T0_64
, T1_64
);
3242 void OPPROTO
op_efdsub (void)
3250 u1
.f
= float64_sub(u1
.f
, u2
.f
, &env
->spe_status
);
3255 void OPPROTO
op_efdadd (void)
3263 u1
.f
= float64_add(u1
.f
, u2
.f
, &env
->spe_status
);
3268 void OPPROTO
op_efdcfsid (void)
3274 void OPPROTO
op_efdcfuid (void)
3280 void OPPROTO
op_efdnabs (void)
3282 T0_64
|= 0x8000000000000000ULL
;
3286 void OPPROTO
op_efdabs (void)
3288 T0_64
&= ~0x8000000000000000ULL
;
3292 void OPPROTO
op_efdneg (void)
3294 T0_64
^= 0x8000000000000000ULL
;
3298 void OPPROTO
op_efddiv (void)
3306 u1
.f
= float64_div(u1
.f
, u2
.f
, &env
->spe_status
);
3311 void OPPROTO
op_efdmul (void)
3319 u1
.f
= float64_mul(u1
.f
, u2
.f
, &env
->spe_status
);
3324 void OPPROTO
op_efdctsidz (void)
3330 void OPPROTO
op_efdctuidz (void)
3336 void OPPROTO
op_efdcmplt (void)
3342 void OPPROTO
op_efdcmpgt (void)
3348 void OPPROTO
op_efdcfs (void)
3354 void OPPROTO
op_efdcmpeq (void)
3360 void OPPROTO
op_efdcfsi (void)
3366 void OPPROTO
op_efdcfui (void)
3372 void OPPROTO
op_efdcfsf (void)
3378 void OPPROTO
op_efdcfuf (void)
3384 void OPPROTO
op_efdctsi (void)
3390 void OPPROTO
op_efdctui (void)
3396 void OPPROTO
op_efdctsf (void)
3402 void OPPROTO
op_efdctuf (void)
3408 void OPPROTO
op_efdctuiz (void)
3414 void OPPROTO
op_efdctsiz (void)
3420 void OPPROTO
op_efdtstlt (void)
3422 T0
= _do_efdtstlt(T0_64
, T1_64
);
3426 void OPPROTO
op_efdtstgt (void)
3428 T0
= _do_efdtstgt(T0_64
, T1_64
);
3432 void OPPROTO
op_efdtsteq (void)
3434 T0
= _do_efdtsteq(T0_64
, T1_64
);