aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op_template.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-04 14:57:11 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-04 14:57:11 +0000
commitfb0eaffc6d9982b5eee439b8461851bd18bf35ce (patch)
tree2ca3095648df44d4813b4dd56202de4f9d1efcfa /target-ppc/op_template.h
parent07ad1b93a365a15c77b5848bba0f6a3399bce076 (diff)
PowerPC fixes (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@483 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_template.h')
-rw-r--r--target-ppc/op_template.h76
1 files changed, 74 insertions, 2 deletions
diff --git a/target-ppc/op_template.h b/target-ppc/op_template.h
index d0a3f85f19..4a849ffea4 100644
--- a/target-ppc/op_template.h
+++ b/target-ppc/op_template.h
@@ -70,18 +70,90 @@ void OPPROTO glue(op_store_T1_crf_crf, REG)(void)
regs->crf[REG] = T1;
}
+/* Floating point condition and status register moves */
+void OPPROTO glue(op_load_fpscr_T0_fpscr, REG)(void)
+{
+ T0 = regs->fpscr[REG];
+ RETURN();
+}
+
+#if REG == 0
+void OPPROTO glue(op_store_T0_fpscr_fpscr, REG)(void)
+{
+ regs->fpscr[REG] = (regs->fpscr[REG] & 0x9) | (T0 & ~0x9);
+ RETURN();
+}
+
+void OPPROTO glue(op_store_T0_fpscri_fpscr, REG)(void)
+{
+ regs->fpscr[REG] = (regs->fpscr[REG] & ~0x9) | (PARAM(1) & 0x9);
+ RETURN();
+}
+
+void OPPROTO glue(op_clear_fpscr_fpscr, REG)(void)
+{
+ regs->fpscr[REG] = (regs->fpscr[REG] & 0x9);
+ RETURN();
+}
+#else
+void OPPROTO glue(op_store_T0_fpscr_fpscr, REG)(void)
+{
+ regs->fpscr[REG] = T0;
+ RETURN();
+}
+
+void OPPROTO glue(op_store_T0_fpscri_fpscr, REG)(void)
+{
+ regs->fpscr[REG] = PARAM(1);
+ RETURN();
+}
+
+void OPPROTO glue(op_clear_fpscr_fpscr, REG)(void)
+{
+ regs->fpscr[REG] = 0x0;
+ RETURN();
+}
+#endif
+
#endif /* REG <= 7 */
/* float moves */
-void OPPROTO glue(op_load_FT0_fpr, REG)(void)
+/* floating point registers moves */
+void OPPROTO glue(op_load_fpr_FT0_fpr, REG)(void)
{
FT0 = env->fpr[REG];
+ RETURN();
}
-void OPPROTO glue(op_store_FT0_fpr, REG)(void)
+void OPPROTO glue(op_store_FT0_fpr_fpr, REG)(void)
{
env->fpr[REG] = FT0;
+ RETURN();
+}
+
+void OPPROTO glue(op_load_fpr_FT1_fpr, REG)(void)
+{
+ FT1 = env->fpr[REG];
+ RETURN();
+}
+
+void OPPROTO glue(op_store_FT1_fpr_fpr, REG)(void)
+{
+ env->fpr[REG] = FT1;
+ RETURN();
+}
+
+void OPPROTO glue(op_load_fpr_FT2_fpr, REG)(void)
+{
+ FT2 = env->fpr[REG];
+ RETURN();
+}
+
+void OPPROTO glue(op_store_FT2_fpr_fpr, REG)(void)
+{
+ env->fpr[REG] = FT2;
+ RETURN();
}
#undef REG