aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Min Chao <cmchao@gmail.com>2010-06-28 23:54:05 +0800
committerDoug Goldstein <cardoe@gentoo.org>2010-07-20 17:43:47 -0500
commitc25041e5cf039e0c6111ca8410380f03742cca8b (patch)
tree3c47225d6aef5071640c3a37af6c3b9512c0bfbd
parenttarget-arm: fix addsub/subadd implementation (diff)
downloadqemu-kvm-c25041e5cf039e0c6111ca8410380f03742cca8b.tar.gz
qemu-kvm-c25041e5cf039e0c6111ca8410380f03742cca8b.tar.bz2
qemu-kvm-c25041e5cf039e0c6111ca8410380f03742cca8b.zip
target-arm : fix thumb2 parallel add/sub opcode decoding
Signed-off-by: Chih-Min Chao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit ed89a2f1b11db03fbdb0ddab93c25913a16c0374)
-rw-r--r--target-arm/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 45bf77256..d910f72fa 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -561,7 +561,7 @@ static void gen_arm_parallel_addsub(int op1, int op2, TCGv a, TCGv b)
/* For unknown reasons Arm and Thumb-2 use arbitrarily different encodings. */
#define PAS_OP(pfx) \
- switch (op2) { \
+ switch (op1) { \
case 0: gen_pas_helper(glue(pfx,add8)); break; \
case 1: gen_pas_helper(glue(pfx,add16)); break; \
case 2: gen_pas_helper(glue(pfx,addsubx)); break; \
@@ -573,7 +573,7 @@ static void gen_thumb2_parallel_addsub(int op1, int op2, TCGv a, TCGv b)
{
TCGv_ptr tmp;
- switch (op1) {
+ switch (op2) {
#define gen_pas_helper(name) glue(gen_helper_,name)(a, a, b, tmp)
case 0:
tmp = tcg_temp_new_ptr();