From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52838 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5Doq-00064x-HK for qemu-devel@nongnu.org; Mon, 11 Oct 2010 04:33:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5Dce-0007r9-H7 for qemu-devel@nongnu.org; Mon, 11 Oct 2010 04:20:41 -0400 Received: from mail-ew0-f45.google.com ([209.85.215.45]:53344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5Dce-0007o3-Bc for qemu-devel@nongnu.org; Mon, 11 Oct 2010 04:20:40 -0400 Received: by mail-ew0-f45.google.com with SMTP id 26so1961613ewy.4 for ; Mon, 11 Oct 2010 01:20:40 -0700 (PDT) From: Johan Bengtsson Date: Mon, 11 Oct 2010 10:18:58 +0200 Message-Id: <1286785138-20401-3-git-send-email-teofrastius@gmail.com> In-Reply-To: <1286785138-20401-1-git-send-email-teofrastius@gmail.com> References: <1286785138-20401-1-git-send-email-teofrastius@gmail.com> Subject: [Qemu-devel] [PATCH 4/4] target-arm: Fix problems with VCVT fixpoint conversion List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Johan Bengtsson There were two problems with VCVT fixpoint conversion. The most grave was that the micro-ops sequence generated by the instruction triggered a failed assertion in tcg. The second problem was that the extraction of the fraction field from the opcode was erroneous. Signed-off-by: Johan Bengtsson --- target-arm/translate.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index b530a53..652cac9 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -2877,7 +2877,7 @@ static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn) VFP_DREG_D(rd, insn); } - if (op == 15 && (rn == 16 || rn == 17)) { + if (op == 15 && ((rn & 0x14) == 0x14)) { /* Integer source. */ rm = ((insn << 1) & 0x1e) | ((insn >> 5) & 1); } else { @@ -3179,7 +3179,7 @@ static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn) /* Write back the result. */ if (op == 15 && (rn >= 8 && rn <= 11)) ; /* Comparison, do nothing. */ - else if (op == 15 && rn > 17) + else if (op == 15 && rn > 17 && ((rn & 0x14) != 0x14)) /* Integer result. */ gen_mov_vreg_F0(0, rd); else if (op == 15 && rn == 15) -- 1.7.0.4