diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-05-13 22:45:23 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-05-13 22:45:23 +0000 |
commit | ff8263a951c5ce22bef919c792d20e5cbf5066b3 (patch) | |
tree | 1a1eef28450d113a8d054660fd5bbdeda62e00a3 /target-arm/translate.c | |
parent | 04d81be884925127e2ebee994e4a89ce44eab06e (diff) |
ARM saturating arithmetic fixes (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1431 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/translate.c')
-rw-r--r-- | target-arm/translate.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index 29657416f3..2a62c56285 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -1019,20 +1019,15 @@ static void disas_arm_insn(CPUState * env, DisasContext *s) case 0x5: /* saturating add/subtract */ rd = (insn >> 12) & 0xf; rn = (insn >> 16) & 0xf; - gen_movl_T0_reg(s, rn); - if (op1 & 2) { - gen_movl_T1_reg(s, rn); - if (op1 & 1) - gen_op_subl_T0_T1_saturate(); - else - gen_op_addl_T0_T1_saturate(); - } - gen_movl_T1_reg(s, rm); + gen_movl_T0_reg(s, rm); + gen_movl_T1_reg(s, rn); + if (op1 & 2) + gen_op_double_T1_saturate(); if (op1 & 1) gen_op_subl_T0_T1_saturate(); else gen_op_addl_T0_T1_saturate(); - gen_movl_reg_T0(s, rn); + gen_movl_reg_T0(s, rd); break; case 0x8: /* signed multiply */ case 0xa: |