From patchwork Mon Oct 11 08:18:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Bengtsson X-Patchwork-Id: 67391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CD533B7043 for ; Mon, 11 Oct 2010 19:36:33 +1100 (EST) Received: from localhost ([127.0.0.1]:41597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5Drz-0007M3-2O for incoming@patchwork.ozlabs.org; Mon, 11 Oct 2010 04:36:31 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=vTmF5cWyc8TBUTvTmld4eJ/SnJtN0ZLAqeVnIgINZd8=; b=ALrY1WvsoPpOO4MnZ0T4LJ+/MfRvCsz4W3yGVG00jzB5CMLMYZfOHwONgGJFAaJm0O JeOODZv7GdAl3idncL0yea5sS0VwZHlUE9lt7P3UBJWNoN7fE5r4xwhkLLGJTleuynA6 fnkcfNcAX8EgeVsAwMWhnhzOt1lqC7EeM56Mc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=CNtlfXzv6jF2BjaAJ1dVZO9YK3BuArYBeoOQMUdeVQ8uz1sxnFX+CS0y7bRcNCQ+vI 2m2FXB0xMnYk8UKXmsggg/f9qsI/IWDgPnZbEMYlEMtxa2PZHldTz96/tDPZiSQacrae LcrSHCG2/x+0S3UzfoZl2ozjzCOWsdROY8dQk= Received: by 10.213.7.12 with SMTP id b12mr1507472ebb.76.1286785240061; Mon, 11 Oct 2010 01:20:40 -0700 (PDT) Received: from localhost.localdomain (store.iar.se [213.136.49.54]) by mx.google.com with ESMTPS id p53sm3050424eeh.7.2010.10.11.01.20.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Oct 2010 01:20:39 -0700 (PDT) From: Johan Bengtsson To: qemu-devel@nongnu.org Date: Mon, 11 Oct 2010 10:18:58 +0200 Message-Id: <1286785138-20401-3-git-send-email-teofrastius@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286785138-20401-1-git-send-email-teofrastius@gmail.com> References: <1286785138-20401-1-git-send-email-teofrastius@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Johan Bengtsson Subject: [Qemu-devel] [PATCH 4/4] target-arm: Fix problems with VCVT fixpoint conversion X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)