Skip to contentSkip to conversation

[5913] ARM: fix smmul and smmla/smmls usage of registers (Mans Rullgard).

Qemu-devel Andrzej Zaborowski 1 participant 1 message Dec 7, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5913

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5913
Author:   balrog
Date:     2008-12-07 14:18:02 +0000 (Sun, 07 Dec 2008)

Log Message:
-----------
ARM: fix smmul and smmla/smmls usage of registers (Mans Rullgard).

This fixes the destination and accumulator registers for the smmul and smmla instructions.

Modified Paths:
--------------
trunk/target-arm/translate.c

Modified: trunk/target-arm/translate.c
===================================================================

target-arm/translate.c +3 -3
@@ -6507,8 +6507,8 @@
                         tcg_gen_shri_i64(tmp64, tmp64, 32);
                         tmp = new_tmp();
                         tcg_gen_trunc_i64_i32(tmp, tmp64);
-                        if (rn != 15) {
-                            tmp2 = load_reg(s, rn);
+                        if (rd != 15) {
+                            tmp2 = load_reg(s, rd);
                             if (insn & (1 << 6)) {
                                 tcg_gen_sub_i32(tmp, tmp, tmp2);
                             } else {
@@ -6516,7 +6516,7 @@
                             }
                             dead_tmp(tmp2);
                         }
-                        store_reg(s, rd, tmp);
+                        store_reg(s, rn, tmp);
                     } else {
                         if (insn & (1 << 5))
                             gen_swap_half(tmp2);