From patchwork Fri May 8 15:21:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186385 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp96796ill; Fri, 8 May 2020 08:40:18 -0700 (PDT) X-Google-Smtp-Source: APiQypKCTzqulHv/KSTr58Z2jKGeyOpjHE6zFx1D7MnUI8snsN6tSNKWQxPgCnLWToCPOAde0/hr X-Received: by 2002:a37:8881:: with SMTP id k123mr3393997qkd.164.1588952418164; Fri, 08 May 2020 08:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588952418; cv=none; d=google.com; s=arc-20160816; b=mN29Vn205Z/vBWXfvFcjs4gZZFZQKzWMH2o1OnPG4Q8QoXWGkQswKzvdcubSd6nYqU WSYBjPToynZWXWTmRtrvv/+Z5dQWstoaHv74lZCN0ZZQNhO2KDoOgF3lpiPpZkmnhDud Ftx8C7CtDGmsm1FxJSkrgBap1m6feScCnjM0LY1ugUzyOkW/V8lHTjP1Wns/76+4lSf9 gIR0PIO8znUXhr8pxZt5lDMsvCnJ8z3fjCvfykcAIBwOliixfb9liT0KL7VAwVyKutYo FVSYkZU2bqLJcik/I5G0jEe7WDC4OnkdITpAz2V6zAhuA2kPPz5zfrnHMzJz1VR+8UkP HgPw== 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=P8q6V0iik55UUDqAciuD8of8rt9ZSjxKLPBKIwVKE6U=; b=djOL3HUd/rLYg81gZIWDewmLbM0G8fF5YsTZ9DS0yiTTGgsYd6FIXmvfg+n7RMw4/r YXFXzkAQVnNVEZYw4Gq1DCMEO9V0f9iOyz+odKGbyFtTRJY5c/F9qKr1mYNE0Y2WKq7o ZY8Vz5kg3esc16qfMiZOU4z5uDFO+6PtHyOMqCFMF9kFj84/UGb2WCizPLZhbSBrqO6e KAhzuPFGdSN7QzhgwFZWL0s8kx0yCY9/EfqB3i7wa8PbZdkEhh2BjFjVJJd8H8pjKu5l w9vDQDcuriiaeDDs+Co4IA0gkCaKqCmEvWx6J4SIqKaSBA3dBfvYL10G/kuiEW25rU+/ 1oHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SASCfKKQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::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. [2001:470:142::17]) by mx.google.com with ESMTPS id o4si1147833qtq.360.2020.05.08.08.40.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 May 2020 08:40:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SASCfKKQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::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]:53842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX56n-00088V-Lf for patch@linaro.org; Fri, 08 May 2020 11:40:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX4pG-0004TB-Dn for qemu-devel@nongnu.org; Fri, 08 May 2020 11:22:10 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:53720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX4pF-00074W-Gm for qemu-devel@nongnu.org; Fri, 08 May 2020 11:22:10 -0400 Received: by mail-pj1-x1041.google.com with SMTP id hi11so4406718pjb.3 for ; Fri, 08 May 2020 08:22:09 -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=P8q6V0iik55UUDqAciuD8of8rt9ZSjxKLPBKIwVKE6U=; b=SASCfKKQNfB4YH8qYJvppHPRmjaTeg8nyvXp1tYN4R6JQlKj9ocdu2JxPxPntXL36O rMKuTTczpRiDZJbKaTMeXoE+Az9Pe7NkENqELts71YtQbUdwWhgQZLlkMlBTiyqKPngF UHERB4wVdoZJSIyy1igzSsYES5qmlAUIkMYfV+U6eMS0os+LdM0b7xBAkhjvcjk14fVh bePQ4Pkel192dW2AovobBxGBj8bbMDpoaOYWWR+U9gpk46TrbWAXOuA+OIbQP7f+0m3/ YueXxiCcwGCNhmmjLGRUTC84lrSY5wRU2KDCdiwOGLWTnl93eeqT/6M00+LsiGCSf9BH qlSg== 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=P8q6V0iik55UUDqAciuD8of8rt9ZSjxKLPBKIwVKE6U=; b=HNuoGEbISOYlqZ5GT0iyw7pMwpJkzMwVLcgI4gLAurKeabB3XIFIy6GbCi8Bd4naQM xnn7ZxIdJkgCRiqwKLEFobZtyV9r6EJxCVbDmMAUrnSLc77lVHh6VkPoJ/gMkazba19k DHJbbanNL0v0/k2sUvK6jwQ3SFx9/32qZVgUFiakut/Zoi4AdgiqctR5ZQHM644EcbF0 aUbWZPTA/K9aw3hnhIxj9Ki9feic2ZBsH01SWlptV0d25J4gRGXo34EBdRdE1Mc1G5XF 0C72/hDQDmGpAXS+gPX/+e6FzQMUZHM2wDLFn/LcJyHkWhd7PVPcc2bCM4xlHmR/rPHY sK2A== X-Gm-Message-State: AGi0PuYfMgpTSZK446WhBVgZZ+OqpKR+iQ+GLW70PxkbSp0FHDpTLIPs NKqsfK5Sj1OXBeWZigjZ2PqICdB2oXk= X-Received: by 2002:a17:90a:2e82:: with SMTP id r2mr6809299pjd.128.1588951327715; Fri, 08 May 2020 08:22:07 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id n16sm2104575pfq.61.2020.05.08.08.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 08:22:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 04/16] target/arm: Remove unnecessary range check for VSHL Date: Fri, 8 May 2020 08:21:48 -0700 Message-Id: <20200508152200.6547-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200508152200.6547-1-richard.henderson@linaro.org> References: <20200508152200.6547-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1041.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. Signed-off-by: Richard Henderson --- target/arm/translate.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.20.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate.c b/target/arm/translate.c index e221d0c959..967108b3f4 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5750,16 +5750,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; }