From patchwork Thu May 29 18:05:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 31144 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 07DC3203E6 for ; Thu, 29 May 2014 18:05:30 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id y10sf42850pdj.4 for ; Thu, 29 May 2014 11:05:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=xJCsfb3jphtHSL9P+TShoYBz2iRkhuNWUglGe6DV400=; b=flVnnGarMkFl+v5nNZO3BjhxNxhMlm/ZmCySK+3vzDlmw07a+bMMjhBMa0C550v/mI tJMCCiSijmLce6ZNzaoIcseeSlxGEiA/dnpUAbDqr/od/doLjMUXoeXWqlg9Z3RknVQn qBvCR0zo4KnVwnhte6e6Xt1Evc++D/LzIwcpSaRv4jKGuqUotEcyq7vqGjpT6q/Ln4r2 0Icv9UORgd+/Vd8xILkIRmonO78W85yj2SR7BMae4Bbvc0/UyezcY2mz4sdnp144rml/ 0xleS10PVybTUi2XohonlEj7I9plR9oW0rdksYcBsw8gJgavCNRVuqwII17jOPJKj40b qHYg== X-Gm-Message-State: ALoCoQlYz2ZXBDI9qr+NXRzGaPAPj4HVc6XfffqroRWbE1Tdaf7Xf++rbTOLZGaQ4a6HE3xvHQgY X-Received: by 10.66.230.226 with SMTP id tb2mr2460144pac.41.1401386730032; Thu, 29 May 2014 11:05:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.7 with SMTP id 7ls678658qgo.60.gmail; Thu, 29 May 2014 11:05:29 -0700 (PDT) X-Received: by 10.52.72.4 with SMTP id z4mr2305221vdu.71.1401386729894; Thu, 29 May 2014 11:05:29 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id i19si1131070vdt.5.2014.05.29.11.05.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 May 2014 11:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id im17so818447vcb.10 for ; Thu, 29 May 2014 11:05:29 -0700 (PDT) X-Received: by 10.52.227.138 with SMTP id sa10mr6962640vdc.25.1401386729812; Thu, 29 May 2014 11:05:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp48362vcb; Thu, 29 May 2014 11:05:29 -0700 (PDT) X-Received: by 10.68.89.4 with SMTP id bk4mr10715792pbb.153.1401386728311; Thu, 29 May 2014 11:05:28 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id qz7si1962108pbb.24.2014.05.29.11.05.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 29 May 2014 11:05:28 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Wq4hg-0006uT-Ai; Thu, 29 May 2014 19:05:24 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Ard Biesheuvel , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 2/3] target-arm: Allow 3reg_wide undefreq to encode more bad size options Date: Thu, 29 May 2014 19:05:23 +0100 Message-Id: <1401386724-26529-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1401386724-26529-1-git-send-email-peter.maydell@linaro.org> References: <1401386724-26529-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The current undefreq field in the neon_3reg_wide handling allows us to encode "UNDEF if size != 0" and "UNDEF if size == 0". This is no longer sufficient with the advent of 64-bit polynomial VMULL, which means we want to UNDEF if size == 1. Change the undefreq encoding to use separate bits for all of "UNDEF if size == 0", "UNDEF if size == 1" and "UNDEF if size == 2". Signed-off-by: Peter Maydell --- target-arm/translate.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index ab3713d..b79209b 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -5953,10 +5953,11 @@ static int disas_neon_data_insn(CPUARMState * env, DisasContext *s, uint32_t ins int src1_wide; int src2_wide; int prewiden; - /* undefreq: bit 0 : UNDEF if size != 0 - * bit 1 : UNDEF if size == 0 - * bit 2 : UNDEF if U == 1 - * Note that [1:0] set implies 'always UNDEF' + /* undefreq: bit 0 : UNDEF if size == 0 + * bit 1 : UNDEF if size == 1 + * bit 2 : UNDEF if size == 2 + * bit 3 : UNDEF if U == 1 + * Note that [2:0] set implies 'always UNDEF' */ int undefreq; /* prewiden, src1_wide, src2_wide, undefreq */ @@ -5970,13 +5971,13 @@ static int disas_neon_data_insn(CPUARMState * env, DisasContext *s, uint32_t ins {0, 1, 1, 0}, /* VSUBHN */ {0, 0, 0, 0}, /* VABDL */ {0, 0, 0, 0}, /* VMLAL */ - {0, 0, 0, 6}, /* VQDMLAL */ + {0, 0, 0, 9}, /* VQDMLAL */ {0, 0, 0, 0}, /* VMLSL */ - {0, 0, 0, 6}, /* VQDMLSL */ + {0, 0, 0, 9}, /* VQDMLSL */ {0, 0, 0, 0}, /* Integer VMULL */ - {0, 0, 0, 2}, /* VQDMULL */ - {0, 0, 0, 5}, /* Polynomial VMULL */ - {0, 0, 0, 3}, /* Reserved: always UNDEF */ + {0, 0, 0, 1}, /* VQDMULL */ + {0, 0, 0, 15}, /* Polynomial VMULL */ + {0, 0, 0, 7}, /* Reserved: always UNDEF */ }; prewiden = neon_3reg_wide[op][0]; @@ -5984,9 +5985,8 @@ static int disas_neon_data_insn(CPUARMState * env, DisasContext *s, uint32_t ins src2_wide = neon_3reg_wide[op][2]; undefreq = neon_3reg_wide[op][3]; - if (((undefreq & 1) && (size != 0)) || - ((undefreq & 2) && (size == 0)) || - ((undefreq & 4) && u)) { + if ((undefreq & (1 << size)) || + ((undefreq & 8) && u)) { return 1; } if ((src1_wide && (rn & 1)) ||