From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaKfQ-0004Le-Ux for qemu-devel@nongnu.org; Tue, 24 Mar 2015 04:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaKfM-0007b5-PY for qemu-devel@nongnu.org; Tue, 24 Mar 2015 04:58:32 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:35524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaKfM-0007ar-KC for qemu-devel@nongnu.org; Tue, 24 Mar 2015 04:58:28 -0400 From: Bastian Koppelmann Date: Tue, 24 Mar 2015 09:58:18 +0100 Message-Id: <1427187499-28387-4-git-send-email-kbastian@mail.uni-paderborn.de> In-Reply-To: <1427187499-28387-1-git-send-email-kbastian@mail.uni-paderborn.de> References: <1427187499-28387-1-git-send-email-kbastian@mail.uni-paderborn.de> Subject: [Qemu-devel] [PULL 3/4] target-tricore: fix RRPW_DEXTR using wrong reg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org RRPW_DEXTR used r1 for the low part and r2 for the high part. It should be the other way round. This also fixes that the result of the first shift was not saved in a temp and could overwrite registers that were needed for the second shift. Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 989a047..bbcfee9 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -8044,8 +8044,8 @@ static void decode_32Bit_opc(CPUTriCoreState *env, DisasContext *ctx) tcg_gen_rotli_tl(cpu_gpr_d[r3], cpu_gpr_d[r1], const16); } else { temp = tcg_temp_new(); - tcg_gen_shli_tl(cpu_gpr_d[r3], cpu_gpr_d[r2], const16); - tcg_gen_shri_tl(temp, cpu_gpr_d[r1], 32 - const16); + tcg_gen_shli_tl(temp, cpu_gpr_d[r1], const16); + tcg_gen_shri_tl(cpu_gpr_d[r3], cpu_gpr_d[r2], 32 - const16); tcg_gen_or_tl(cpu_gpr_d[r3], cpu_gpr_d[r3], temp); tcg_temp_free(temp); } -- 2.3.3