aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-ppc/op.c')
-rw-r--r--target-ppc/op.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/target-ppc/op.c b/target-ppc/op.c
index ea5967e79d..972b8bc29d 100644
--- a/target-ppc/op.c
+++ b/target-ppc/op.c
@@ -122,6 +122,12 @@
#define REG 31
#include "op_template.h"
+void OPPROTO op_print_mem_EA (void)
+{
+ do_print_mem_EA(T0);
+ RETURN();
+}
+
/* PowerPC state maintenance operations */
/* set_Rc0 */
void OPPROTO op_set_Rc0 (void)
@@ -130,6 +136,13 @@ void OPPROTO op_set_Rc0 (void)
RETURN();
}
+/* Constants load */
+void OPPROTO op_reset_T0 (void)
+{
+ T0 = 0;
+ RETURN();
+}
+
void OPPROTO op_set_T0 (void)
{
T0 = (uint32_t)PARAM1;
@@ -190,11 +203,50 @@ void OPPROTO op_raise_exception_err (void)
do_raise_exception_err(PARAM1, PARAM2);
}
+void OPPROTO op_update_nip (void)
+{
+ env->nip = (uint32_t)PARAM1;
+ RETURN();
+}
+
+#if defined(TARGET_PPC64)
+void OPPROTO op_update_nip_64 (void)
+{
+ env->nip = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
+ RETURN();
+}
+#endif
+
void OPPROTO op_debug (void)
{
do_raise_exception(EXCP_DEBUG);
}
+/* Load/store special registers */
+void OPPROTO op_load_cr (void)
+{
+ do_load_cr();
+ RETURN();
+}
+
+void OPPROTO op_store_cr (void)
+{
+ do_store_cr(PARAM1);
+ RETURN();
+}
+
+void OPPROTO op_load_cro (void)
+{
+ T0 = env->crf[PARAM1];
+ RETURN();
+}
+
+void OPPROTO op_store_cro (void)
+{
+ env->crf[PARAM1] = T0;
+ RETURN();
+}
+
void OPPROTO op_load_xer_cr (void)
{
T0 = (xer_so << 3) | (xer_ov << 2) | (xer_ca << 1);
@@ -300,6 +352,27 @@ void OPPROTO op_store_asr (void)
}
#endif
+void OPPROTO op_load_msr (void)
+{
+ T0 = env->msr;
+ RETURN();
+}
+
+void OPPROTO op_store_msr (void)
+{
+ do_store_msr();
+ RETURN();
+}
+
+#if defined (TARGET_PPC64)
+void OPPROTO op_store_msr_32 (void)
+{
+ T0 = (env->msr & ~0xFFFFFFFFULL) | (T0 & 0xFFFFFFFF);
+ do_store_msr();
+ RETURN();
+}
+#endif
+
void OPPROTO op_update_riee (void)
{
/* We don't call do_store_msr here as we won't trigger
@@ -1304,6 +1377,20 @@ void OPPROTO op_isel (void)
RETURN();
}
+void OPPROTO op_popcntb (void)
+{
+ do_popcntb();
+ RETURN();
+}
+
+#if defined(TARGET_PPC64)
+void OPPROTO op_popcntb_64 (void)
+{
+ do_popcntb_64();
+ RETURN();
+}
+#endif
+
/*** Integer logical ***/
/* and */
void OPPROTO op_and (void)