diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-17 09:51:40 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-17 09:51:40 +0000 |
commit | 966439a67830239a6c520c5df6c55627b8153c8b (patch) | |
tree | f77bda4ac6380b82e92ab553a560447a43266a99 /target-ppc/op.c | |
parent | 3608160206ed55c35be916df0f5d43dccc183513 (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.c')
-rw-r--r-- | target-ppc/op.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/target-ppc/op.c b/target-ppc/op.c index 550ee002e7..8ad222348c 100644 --- a/target-ppc/op.c +++ b/target-ppc/op.c @@ -131,7 +131,7 @@ void OPPROTO op_print_mem_EA (void) /* set_Rc0 */ void OPPROTO op_set_Rc0 (void) { - env->crf[0] = T0 | xer_ov; + env->crf[0] = T0 | xer_so; RETURN(); } @@ -731,8 +731,8 @@ void OPPROTO op_check_addo (void) ((uint32_t)T2 ^ (uint32_t)T0) & (1UL << 31)))) { xer_ov = 0; } else { - xer_so = 1; xer_ov = 1; + xer_so = 1; } RETURN(); } @@ -744,8 +744,8 @@ void OPPROTO op_check_addo_64 (void) ((uint64_t)T2 ^ (uint64_t)T0) & (1ULL << 63)))) { xer_ov = 0; } else { - xer_so = 1; xer_ov = 1; + xer_so = 1; } RETURN(); } @@ -1028,8 +1028,8 @@ void OPPROTO op_check_subfo (void) ((uint32_t)(~T2) ^ (uint32_t)T0) & (1UL << 31)))) { xer_ov = 0; } else { - xer_so = 1; xer_ov = 1; + xer_so = 1; } RETURN(); } @@ -1041,8 +1041,8 @@ void OPPROTO op_check_subfo_64 (void) ((uint64_t)(~T2) ^ (uint64_t)T0) & (1ULL << 63)))) { xer_ov = 0; } else { - xer_so = 1; xer_ov = 1; + xer_so = 1; } RETURN(); } @@ -1196,6 +1196,7 @@ void OPPROTO op_cmp (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } @@ -1209,6 +1210,7 @@ void OPPROTO op_cmp_64 (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } #endif @@ -1223,6 +1225,7 @@ void OPPROTO op_cmpi (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } @@ -1236,6 +1239,7 @@ void OPPROTO op_cmpi_64 (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } #endif @@ -1250,6 +1254,7 @@ void OPPROTO op_cmpl (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } @@ -1263,6 +1268,7 @@ void OPPROTO op_cmpl_64 (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } #endif @@ -1277,6 +1283,7 @@ void OPPROTO op_cmpli (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } @@ -1290,6 +1297,7 @@ void OPPROTO op_cmpli_64 (void) } else { T0 = 0x02; } + T0 |= xer_so; RETURN(); } #endif |