From: Chih-Min Chao Date: Mon, 28 Jun 2010 15:54:05 +0000 (+0800) Subject: target-arm : fix thumb2 parallel add/sub opcode decoding X-Git-Tag: v0.12.5~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9067bac11da17f8a15614d300f51d84e0602b0c0;p=thirdparty%2Fqemu.git target-arm : fix thumb2 parallel add/sub opcode decoding Signed-off-by: Chih-Min Chao Signed-off-by: Aurelien Jarno (cherry picked from commit ed89a2f1b11db03fbdb0ddab93c25913a16c0374) --- diff --git a/target-arm/translate.c b/target-arm/translate.c index 45bf77256f2..d910f72fae9 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();