summaryrefslogtreecommitdiffstats
path: root/target-ppc/op.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-03-22 22:17:08 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-03-22 22:17:08 +0000
commite864cabdc0a38bb598ddcf88b264896dc6f3e3b2 (patch)
treeb0ee2c4af21aec414b5dd1d461aec4739061be95 /target-ppc/op.c
parenta7222580366605ec15f3ffd83ddb0e62451b353b (diff)
downloadhqemu-e864cabdc0a38bb598ddcf88b264896dc6f3e3b2.zip
hqemu-e864cabdc0a38bb598ddcf88b264896dc6f3e3b2.tar.gz
PowerPC bugfixes:
- must clear carry bit when doing addic with a zero immediate value - fix missing RETURN in micro-operation that would lead to random failures and crashes - add USE_PRECISE_EMULATION compilation-time option to choose between getting exact floating point results and fast but less accurate computation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2526 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op.c')
-rw-r--r--target-ppc/op.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/target-ppc/op.c b/target-ppc/op.c
index f13f6f5..068ccb5 100644
--- a/target-ppc/op.c
+++ b/target-ppc/op.c
@@ -261,10 +261,15 @@ PPC_OP(load_xer_cr)
RETURN();
}
-PPC_OP(clear_xer_cr)
+PPC_OP(clear_xer_ov)
{
xer_so = 0;
xer_ov = 0;
+ RETURN();
+}
+
+PPC_OP(clear_xer_ca)
+{
xer_ca = 0;
RETURN();
}
@@ -714,6 +719,7 @@ void OPPROTO op_check_addo (void)
xer_so = 1;
xer_ov = 1;
}
+ RETURN();
}
#if defined(TARGET_PPC64)
@@ -726,6 +732,7 @@ void OPPROTO op_check_addo_64 (void)
xer_so = 1;
xer_ov = 1;
}
+ RETURN();
}
#endif
@@ -1643,16 +1650,24 @@ PPC_OP(fsel)
/* fmadd - fmadd. */
PPC_OP(fmadd)
{
+#if USE_PRECISE_EMULATION
+ do_fmadd();
+#else
FT0 = float64_mul(FT0, FT1, &env->fp_status);
FT0 = float64_add(FT0, FT2, &env->fp_status);
+#endif
RETURN();
}
/* fmsub - fmsub. */
PPC_OP(fmsub)
{
+#if USE_PRECISE_EMULATION
+ do_fmsub();
+#else
FT0 = float64_mul(FT0, FT1, &env->fp_status);
FT0 = float64_sub(FT0, FT2, &env->fp_status);
+#endif
RETURN();
}
@@ -2378,6 +2393,7 @@ void OPPROTO op_store_booke_tsr (void)
void OPPROTO op_splatw_T1_64 (void)
{
T1_64 = (T1_64 << 32) | (T1_64 & 0x00000000FFFFFFFFULL);
+ RETURN();
}
void OPPROTO op_splatwi_T0_64 (void)
@@ -2385,6 +2401,7 @@ void OPPROTO op_splatwi_T0_64 (void)
uint64_t tmp = PARAM1;
T0_64 = (tmp << 32) | tmp;
+ RETURN();
}
void OPPROTO op_splatwi_T1_64 (void)
@@ -2392,6 +2409,7 @@ void OPPROTO op_splatwi_T1_64 (void)
uint64_t tmp = PARAM1;
T1_64 = (tmp << 32) | tmp;
+ RETURN();
}
void OPPROTO op_extsh_T1_64 (void)
OpenPOWER on IntegriCloud