aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-17 09:51:40 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-17 09:51:40 +0000
commit966439a67830239a6c520c5df6c55627b8153c8b (patch)
treef77bda4ac6380b82e92ab553a560447a43266a99 /target-ppc/op_helper.c
parent3608160206ed55c35be916df0f5d43dccc183513 (diff)
PowerPC flags update/use fixes:
- fix confusion between overflow/summary overflow, as reported by S Bansal. - reset carry in addic. optimized case (as it was already done in addic). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3179 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index e584e1c655..4afbfd84f1 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -311,8 +311,8 @@ void do_addmeo (void)
((uint32_t)T1 ^ (uint32_t)T0) & (1UL << 31)))) {
xer_ov = 0;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
}
if (likely(T1 != 0))
xer_ca = 1;
@@ -327,8 +327,8 @@ void do_addmeo_64 (void)
((uint64_t)T1 ^ (uint64_t)T0) & (1ULL << 63)))) {
xer_ov = 0;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
}
if (likely(T1 != 0))
xer_ca = 1;
@@ -342,8 +342,8 @@ void do_divwo (void)
xer_ov = 0;
T0 = (int32_t)T0 / (int32_t)T1;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
T0 = (-1) * ((uint32_t)T0 >> 31);
}
}
@@ -356,8 +356,8 @@ void do_divdo (void)
xer_ov = 0;
T0 = (int64_t)T0 / (int64_t)T1;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
T0 = (-1ULL) * ((uint64_t)T0 >> 63);
}
}
@@ -369,8 +369,8 @@ void do_divwuo (void)
xer_ov = 0;
T0 = (uint32_t)T0 / (uint32_t)T1;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
T0 = 0;
}
}
@@ -382,8 +382,8 @@ void do_divduo (void)
xer_ov = 0;
T0 = (uint64_t)T0 / (uint64_t)T1;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
T0 = 0;
}
}
@@ -475,8 +475,8 @@ void do_subfmeo (void)
(1UL << 31)))) {
xer_ov = 0;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
}
if (likely((uint32_t)T1 != UINT32_MAX))
xer_ca = 1;
@@ -491,8 +491,8 @@ void do_subfmeo_64 (void)
(1ULL << 63)))) {
xer_ov = 0;
} else {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
}
if (likely((uint64_t)T1 != UINT64_MAX))
xer_ca = 1;
@@ -1073,8 +1073,8 @@ void do_POWER_dozo (void)
T0 = T1 - T0;
if (((uint32_t)(~T2) ^ (uint32_t)T1 ^ UINT32_MAX) &
((uint32_t)(~T2) ^ (uint32_t)T0) & (1UL << 31)) {
- xer_so = 1;
xer_ov = 1;
+ xer_so = 1;
} else {
xer_ov = 0;
}
@@ -2499,7 +2499,7 @@ void do_4xx_tlbsx (void)
void do_4xx_tlbsx_ (void)
{
- int tmp = xer_ov;
+ int tmp = xer_so;
T0 = ppcemb_tlb_search(env, T0, env->spr[SPR_40x_PID]);
if (T0 != -1)