From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MAWbM-0001Ju-M3 for qemu-devel@nongnu.org; Sat, 30 May 2009 18:00:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MAWbG-0001JK-2p for qemu-devel@nongnu.org; Sat, 30 May 2009 18:00:26 -0400 Received: from [199.232.76.173] (port=48429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MAWbF-0001JH-TJ for qemu-devel@nongnu.org; Sat, 30 May 2009 18:00:21 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:41825) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MAWbF-0004hH-AR for qemu-devel@nongnu.org; Sat, 30 May 2009 18:00:21 -0400 From: Andreas Schwab References: <1243636921-23054-1-git-send-email-laurent@vivier.eu> <1243636921-23054-2-git-send-email-laurent@vivier.eu> <1243636921-23054-3-git-send-email-laurent@vivier.eu> <1243636921-23054-4-git-send-email-laurent@vivier.eu> <1243636921-23054-5-git-send-email-laurent@vivier.eu> <1243636921-23054-6-git-send-email-laurent@vivier.eu> <1243636921-23054-7-git-send-email-laurent@vivier.eu> <1243636921-23054-8-git-send-email-laurent@vivier.eu> Date: Sun, 31 May 2009 00:00:17 +0200 In-Reply-To: <1243636921-23054-8-git-send-email-laurent@vivier.eu> (Laurent Vivier's message of "Sat, 30 May 2009 00:41:51 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 07/17] m68k: add DBcc instruction. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: qemu-devel@nongnu.org Laurent Vivier writes: > + tmp = tcg_temp_new(); > + tcg_gen_ext16s_i32(tmp, reg); > + tcg_gen_addi_i32(tmp, tmp, -1); > + gen_partset_reg(OS_WORD, reg, tmp); > + tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, 0, l1); The counter needs to be compared with -1, not 0. Andreas. --- >>From 07f10a1b4a4aa4a54468e1106a4bbc28c5ada45e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 30 May 2009 23:52:11 +0200 Subject: [PATCH] m68k: fix decoding of dbcc The counter needs to be compared with -1, not 0. Signed-off-by: Andreas Schwab --- target-m68k/translate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index 9d68b02..ea6b34b 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -942,7 +942,7 @@ DISAS_INSN(dbcc) tcg_gen_ext16s_i32(tmp, reg); tcg_gen_addi_i32(tmp, tmp, -1); gen_partset_reg(OS_WORD, reg, tmp); - tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, 0, l1); + tcg_gen_brcondi_i32(TCG_COND_EQ, tmp, -1, l1); gen_jmp_tb(s, 1, base + offset); gen_set_label(l1); gen_jmp_tb(s, 0, s->pc); -- 1.6.3.1 -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."