From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvjzy-0002A9-Ga for qemu-devel@nongnu.org; Fri, 22 May 2015 06:16:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvjzu-0003jF-DB for qemu-devel@nongnu.org; Fri, 22 May 2015 06:16:14 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:57328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvjzu-0003iI-69 for qemu-devel@nongnu.org; Fri, 22 May 2015 06:16:10 -0400 From: Bastian Koppelmann Date: Fri, 22 May 2015 12:15:56 +0200 Message-Id: <1432289758-6250-2-git-send-email-kbastian@mail.uni-paderborn.de> In-Reply-To: <1432289758-6250-1-git-send-email-kbastian@mail.uni-paderborn.de> References: <1432289758-6250-1-git-send-email-kbastian@mail.uni-paderborn.de> Subject: [Qemu-devel] [PATCH 1/3] target-tricore: fix OPC2_32_RR_DVINIT_HU having write before use on the result List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org If the argument r1 was the same as the extended result register r3+1, we would overwrite r1 and then use it. Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 663b2a0..4b935fd 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -6321,8 +6321,8 @@ static void decode_rr_divide(CPUTriCoreState *env, DisasContext *ctx) /* sv */ tcg_gen_or_tl(cpu_PSW_SV, cpu_PSW_SV, cpu_PSW_V); /* write result */ - tcg_gen_mov_tl(cpu_gpr_d[r3+1], temp3); tcg_gen_shli_tl(cpu_gpr_d[r3], cpu_gpr_d[r1], 16); + tcg_gen_mov_tl(cpu_gpr_d[r3+1], temp3); tcg_temp_free(temp); tcg_temp_free(temp2); tcg_temp_free(temp3); -- 2.4.1