From patchwork Sat May 2 22:44:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186062 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp2284160ilf; Sat, 2 May 2020 15:46:31 -0700 (PDT) X-Google-Smtp-Source: APiQypI4PCC2otMdKGSKdV0qL5Ci6MjKfKu/Kh82w3tgodmta8WmhZ3DWmQhSQYXv9c89BxJSMsW X-Received: by 2002:ae9:e217:: with SMTP id c23mr9544908qkc.409.1588459591853; Sat, 02 May 2020 15:46:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588459591; cv=none; d=google.com; s=arc-20160816; b=TZuxTz9+ftAx/Tu/mKtg/TebT2CrWvVFrNU1xR4WPr1d81oaNxDZCqtWGsDzkBoNXt BpJDwb9kKsoiX+vHhMAuajB5DbuOSvOf/COOgdPufyut4YeZqf7QL7HzzrCrgwNZEMzk 7KT4QdL9PjHJovu7O9PThrRHlFUCEo2sI7AUrii9CtGrVfy2xSq3nl2JzfWz5OlQLTGP CmO3YRbgO7muuwW/m014Jk17eieW0PTVWElenoz2KTH/uS9JKUcnZKa7RTC6k04INfHm uMxi3bhUSHuzV0W62nc917Zns5OGX3fopEaq9FD4wtOd4O7+G1pN6MVv0mayPxzOQlhI rmXA== 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=T6CcolLGmewGB263Dq5JcXqXdOTfepA8BlCHSWd+1xw=; b=ovk1iaBusIJnuJGO2ntLIF0FfhKwqjCgWvFPsi44x/NlQz6tL0J+D2WRawCbsvuxjn ez3ZBaNppCfuibOvrtWkhGEPM7kV709N8/6D+77FpIChSI8SV3bmqgilDOIMsy3sPXaM HAbsvcsr1T0UwiRLPJJlQ3P/9/fGkbUTOyYSuQ6TbI4ssh9w9FQnOZlo8aoz0duWA1YY MA9KQbA9ARTeQrP5Z4Aewepb1WYrG/1Qr074z4lZBfFLNwIYz9pkqgsPWicJ4OD+C49+ wPhloh8Fs6ZLJa+WLrEM8rBY1mN8oQNqDDl2kyzxv4BuiW7jMQ+GoXTRGKHhvy6G7Qxv XU1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h74GJ9/M"; 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 q195si4267597qke.279.2020.05.02.15.46.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 May 2020 15:46:31 -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="h74GJ9/M"; 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]:34008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jV0tz-0004qu-9D for patch@linaro.org; Sat, 02 May 2020 18:46:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jV0sm-0003Cr-CP for qemu-devel@nongnu.org; Sat, 02 May 2020 18:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jV0si-0004Z9-Uu for qemu-devel@nongnu.org; Sat, 02 May 2020 18:45:16 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:41010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jV0si-0004Wb-FK for qemu-devel@nongnu.org; Sat, 02 May 2020 18:45:12 -0400 Received: by mail-pl1-x643.google.com with SMTP id x6so498029plv.8 for ; Sat, 02 May 2020 15:45:12 -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=T6CcolLGmewGB263Dq5JcXqXdOTfepA8BlCHSWd+1xw=; b=h74GJ9/MpsCpfBTQpBDLff4tMognUlFC4b0ivMZSZTwssgq6FJEWdd+KzUwU4N4mVC t39XPNtINTGIs922woQCgZk/FXyqgy2u3ktjD1Jzzof7FQ1SvdQvcJtTjAdqYtEFpXpd ZlP85XdQw+Bi0Q0DVVVURyEFeWCcisgG0X2KsWddu8mer5xrh8xjzYWWtBcJGLOsJ/Hy yg1raanr09QUWTMZsiYdsglVKlOvBSqJ1FoySUjzmCdMWckDJDXaj1fqwqQ0/ZtYuKV0 okJAw6NjWUUUYz0RrDMnu+sI3TPh1UjOXXIXIO/HZ417C203gHO6YCB9pMB/hC62lNFl Exvg== 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=T6CcolLGmewGB263Dq5JcXqXdOTfepA8BlCHSWd+1xw=; b=ZgbCBqowg91zGjqHjN2X450hTs5+VyzmQ6UnrcMSMBwBlG/dipp0POv/bTbZpOlkEv MwBM5aKb8o2o9mSnmybiAs+L7AWezQjrBVDQWbLN2hcVaRNSdkg+kyrhDvLeuSNdtGGH rVQdkqqoELVIt7bPEk/5aDMKLoRBGpJWyZJ5Fh2EjrAQGbWfvCLdYpV6qBKIPl5yKtjb KG+BVZjFuq5j06838wvNFRkCvXrwJsZTk8nxR/KKNxKEccJFhiWdO212+n3ufWXZ1XNi YtFJyUhFRsKQqjK6saNbDXiIiU6H293v+lhGKpurp5ng/HC/ZcXypcmN73pFLcbpTpp5 CaeA== X-Gm-Message-State: AGi0PuYeVtoar0K34WjunTk2XcF86SsF9fG7qbNnFbQ9Oxefg0CnXtxb nbNwt5pDjP7flCz+Mv9MorxjyCzM00k= X-Received: by 2002:a17:90a:80c2:: with SMTP id k2mr8262344pjw.6.1588459510888; Sat, 02 May 2020 15:45:10 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id h5sm2956182pjv.4.2020.05.02.15.45.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2020 15:45:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 04/15] target/arm: Remove unnecessary range check for VSHL Date: Sat, 2 May 2020 15:44:52 -0700 Message-Id: <20200502224503.2282-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200502224503.2282-1-richard.henderson@linaro.org> References: <20200502224503.2282-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::643 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 diff --git a/target/arm/translate.c b/target/arm/translate.c index f730eb5b75..f082384117 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -6126,16 +6126,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; }