diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-11 00:18:34 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-11 00:18:34 +0000 |
commit | c3e10c7b4377c1cbc0a4fbc12312c2cf41c0cda7 (patch) | |
tree | a49e92ffaeb9672c585601f608bc726e3fab134c /target-ppc/translate.c | |
parent | a76dc35afd2663343229d9dc05d493950d067b56 (diff) |
Optimize PowerPC overflow flag computation in most useful cases.
Use the same routines to check overflow for addo, subfo and PowerPC 405
multiply and add cases.
Fix carry reset in addme(o) and subfme(o) cases.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3574 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 1adff9fdf5..73b2e2212c 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -888,17 +888,17 @@ GEN_INT_ARITH1_64 (neg, 0x1F, 0x08, 0x03, PPC_INTEGER); /* subf subf. subfo subfo. */ static always_inline void gen_op_subfo (void) { - gen_op_move_T2_T0(); + gen_op_moven_T2_T0(); gen_op_subf(); - gen_op_check_subfo(); + gen_op_check_addo(); } #if defined(TARGET_PPC64) #define gen_op_subf_64 gen_op_subf static always_inline void gen_op_subfo_64 (void) { - gen_op_move_T2_T0(); + gen_op_moven_T2_T0(); gen_op_subf(); - gen_op_check_subfo_64(); + gen_op_check_addo_64(); } #endif GEN_INT_ARITH2_64 (subf, 0x1F, 0x08, 0x01, PPC_INTEGER); @@ -910,10 +910,10 @@ static always_inline void gen_op_subfc (void) } static always_inline void gen_op_subfco (void) { - gen_op_move_T2_T0(); + gen_op_moven_T2_T0(); gen_op_subf(); gen_op_check_subfc(); - gen_op_check_subfo(); + gen_op_check_addo(); } #if defined(TARGET_PPC64) static always_inline void gen_op_subfc_64 (void) @@ -923,27 +923,27 @@ static always_inline void gen_op_subfc_64 (void) } static always_inline void gen_op_subfco_64 (void) { - gen_op_move_T2_T0(); + gen_op_moven_T2_T0(); gen_op_subf(); gen_op_check_subfc_64(); - gen_op_check_subfo_64(); + gen_op_check_addo_64(); } #endif GEN_INT_ARITH2_64 (subfc, 0x1F, 0x08, 0x00, PPC_INTEGER); /* subfe subfe. subfeo subfeo. */ static always_inline void gen_op_subfeo (void) { - gen_op_move_T2_T0(); + gen_op_moven_T2_T0(); gen_op_subfe(); - gen_op_check_subfo(); + gen_op_check_addo(); } #if defined(TARGET_PPC64) #define gen_op_subfe_64 gen_op_subfe static always_inline void gen_op_subfeo_64 (void) { - gen_op_move_T2_T0(); + gen_op_moven_T2_T0(); gen_op_subfe_64(); - gen_op_check_subfo_64(); + gen_op_check_addo_64(); } #endif GEN_INT_ARITH2_64 (subfe, 0x1F, 0x08, 0x04, PPC_INTEGER); @@ -5116,7 +5116,7 @@ static always_inline void gen_405_mulladd_insn (DisasContext *ctx, if (opc3 & 0x10) { /* Check overflow */ if (opc3 & 0x01) - gen_op_405_check_ov(); + gen_op_check_addo(); else gen_op_405_check_ovu(); } |