From patchwork Wed May 13 16:32:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186655 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp617194ilb; Wed, 13 May 2020 09:38:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjkRUAQHT5rGkew63K/6ugcQu3eS87+RhYiznQ7SjJMi6bXhfmkDBbP6cvXIuVMHfnmlxF X-Received: by 2002:a37:9702:: with SMTP id z2mr587898qkd.28.1589387924491; Wed, 13 May 2020 09:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589387924; cv=none; d=google.com; s=arc-20160816; b=yBpmYjYLn0oAwiv60IKOIZOO4TLmJZQ6w2jgunpoSFEF3DADhzRjjsVGEul2++iwGF mN2x+AcahlDyptlAEBNhjxCSwSOomwbCIGq2dZJ0zhWHtVvFGUVv2Ko54bBWEwBi9/Ef E15on5a/jcYTI/vo+YVoUWQ4eBpzgHgNHadMfwJ+l9TjMDqwzkYOs1RLlLKZyzg+GcgJ 6k7WEebUGnpZEQdNXgp9iqVAyiukQ3DAWMmsNNcQ9TQW3mOgdSYjxwdc8ywnZDQDiDks 90Kx6ORkHXH/+KYXUWOe7haXBMg4NLvpcAvK5j3uc3i7hZF/AQRvaQAEy8yYjHPXUySE WeWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=2WJ6plpfPlfef610n9KhYRt52HX2ijIyS18DrRrsIPs=; b=T+b+S47knK4yJLhJFKldgIPIRygiRw2KaestFH892Sb0+rC2BdQInThr4rknAvZjQn Ok+CDq6Z8dHP3sobofLrgQsh2cbUQIaPSpzaw76qePLc5cBnyrQTstxevcFbs5gD8ptI MwPoOfK12Qnailnn13C6w/+wvYJHqnq/7efTYEgD4ZDMoXQyaG/FuTICmZw+juz2Lu2t mGVQZUEiJGXkC0p6P9/0Kij4OQ2EoD2EN19tCxwotBYT00qaolodGVFnkj9NgHhxzmTN ZNME+aAWX/laM0q3cYptj6dAcisMt//xsRGGkCFCRLWcBp80/1Wuf+4xQf3sYJLwpxER 1BEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHu6zi3v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k1si35236qvz.30.2020.05.13.09.38.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 May 2020 09:38:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHu6zi3v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYuP5-0003Ql-W4 for patch@linaro.org; Wed, 13 May 2020 12:38:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYuJT-0003d7-N4 for qemu-devel@nongnu.org; Wed, 13 May 2020 12:32:55 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:39227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYuJS-000206-Mb for qemu-devel@nongnu.org; Wed, 13 May 2020 12:32:55 -0400 Received: by mail-pj1-x1044.google.com with SMTP id e6so11215539pjt.4 for ; Wed, 13 May 2020 09:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2WJ6plpfPlfef610n9KhYRt52HX2ijIyS18DrRrsIPs=; b=yHu6zi3v58tBaVlgx8pCuRGdfufTf/Nf0iEz1oczi01XRLJgh0KxCS4r8UW/sZRvU8 6TLIjCDJVaUf7qJAWux4U3jhowBNP8C0+sH55PV8fagWm8DmeVmS0cqU1mGXsytaF4mt 8+6PrU5rdaQWoA/AlBru3wLHfb/lbQqiw+oFmHsAK6oFQfQ57Lf8wqlzxNsBHAiM8tKl 4F8Ijqpl+wBzjuaI2wqPMP2TfY/Irg0oSRItTGnQEARow3FRUKeXkoH3hCCfgXXVJGGm xNuePPAt5dfkEHNSWXjQloM9tjppbrfC9CTOIgwt38aX601NLJnDqp2lNE8hL3Mrh5YY 02/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2WJ6plpfPlfef610n9KhYRt52HX2ijIyS18DrRrsIPs=; b=b+Xae/4ut9hpb7l+JDcpJywyGkeHHibqFWDgmL/66oNV/lWk/7wr/2hQQ5k7cs4+mo 5m3djqBC7SQhrxg8dewSP++xbSdUPapSNEDTqa2nLnS6/Pb3RzqMF3111BK2fhVVQ5IT rpP3XlJMIdXC2LdxBUIvMRIKRAf7sF3p0XaODWcW1AE3vQuPQ26NWxgRTYPNAeYFIgpr pRrjUtxnNOmn4LGOq8zz58VBz1ih2Cx3ceM9WtHsyQRCSjzohqokvNchxJUd56z8/n3w Z4v0B3FK/CFYnoXMYo55WaL0K1aJFDZUDh9sQfUJV9jv4pqQRIShevy4DcFuH5fy8YLr 2Chw== X-Gm-Message-State: AOAM533YWSwbyjGWmUMrF7YdjR7GtC/r9ZO2xYziGm1K5CWgr2T4Au0o p6nU/w1koaS0OPdsuB9JcmNyKBf9vy4= X-Received: by 2002:a17:902:8349:: with SMTP id z9mr70073pln.38.1589387573009; Wed, 13 May 2020 09:32:53 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id b11sm158025pgq.50.2020.05.13.09.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 09:32:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 04/16] target/arm: Remove unnecessary range check for VSHL Date: Wed, 13 May 2020 09:32:33 -0700 Message-Id: <20200513163245.17915-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513163245.17915-1-richard.henderson@linaro.org> References: <20200513163245.17915-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In 1dc8425e551, while converting to gvec, I added an extra range check against the shift count. This was unnecessary because the encoding of the shift count produces 0 to the element size - 1. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.20.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 3c489852dc..2eec689c5e 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5752,16 +5752,8 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) gen_gvec_sli(size, rd_ofs, rm_ofs, shift, vec_size, vec_size); } else { /* VSHL */ - /* Shifts larger than the element size are - * architecturally valid and results in zero. - */ - if (shift >= 8 << size) { - tcg_gen_gvec_dup_imm(size, rd_ofs, - vec_size, vec_size, 0); - } else { - tcg_gen_gvec_shli(size, rd_ofs, rm_ofs, shift, - vec_size, vec_size); - } + tcg_gen_gvec_shli(size, rd_ofs, rm_ofs, shift, + vec_size, vec_size); } return 0; }