From patchwork Thu Jun 9 09:05:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 580286 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp672310max; Thu, 9 Jun 2022 04:12:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa++Yg/OHYyoqHIEfGCetp7sByzt1jVN6y9MDU2TaRz9rZKHN2ETAFEQAkE+JjvTIw4xbZ X-Received: by 2002:a05:6214:2589:b0:464:69ea:771c with SMTP id fq9-20020a056214258900b0046469ea771cmr33391512qvb.41.1654773147171; Thu, 09 Jun 2022 04:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654773147; cv=none; d=google.com; s=arc-20160816; b=wg1MDoF7yB3Ux4giir3+fAisuPz7q5yJAC5D97x4kd/4tDNKYm3Ac7W1gjMovS373c tnh2IL3Q2+MG0tHK8RwITeme4xgLPI1C1KYAxQSwI3rpRBWENLCDVa+TswHIzN+ovlFG P0grJGllxbzGgWDz/7jo+88EJ0m+6cUiShKVg6GJvv4yf5uR6Yl7GBXnnBwAWyQuoWVx XDLAd72MkUXesnn7267t1fXgnbkTagDWw0OqRkB1RcVan1EpHSdFNTwxeSGmoBVpKrGt htWyuJutmCV5gWpdQWFsEMq9A842EvwxAk1+eYCJkwuXIPyMuAFBvzxKN4b25dHipVb8 tWwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=cex5x9L9Gl/d10/8cuiaJvgz9NAjknIKjSgIAlTWGEg=; b=fQjIX/SPpZBb0oBcYXhCWxXstOk8lLbjh9lr+3re2VhRwMtGVskPjOqovODwcBlrNy 8KFUcm5rDjmWw+5fZZqC5ZlYlDafqez2JS00hAwUr6DlGI/utFPmKOp2LTEx/74t82kw ewSet3lO9N0wTW9BA/8+N0DBNSVN4/iMlgBW7bOjZ3uMQca8RcskCGf3FIuD0Lst/QdE cJVoO6wQ5PCEIKgltSUzTACwhaz6WLdPX/BMegUBGKx+ysjVuF26J53PmSw0KnWzw6wL l1zRYPHsTBnQwEpWAbZ6tttq/WPIp0cR2jAu+KqjwMMEAZn2epxv/XWjaPcgr/qxrKXv VyLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UO2hkPRO; 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 bq14-20020a05620a468e00b006a6c5527372si4858598qkb.761.2022.06.09.04.12.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jun 2022 04:12:27 -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=UO2hkPRO; 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]:35476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzG5R-0001l8-3u for patch@linaro.org; Thu, 09 Jun 2022 07:12:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzE7r-0001sd-4j for qemu-devel@nongnu.org; Thu, 09 Jun 2022 05:06:48 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:42899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzE7e-00060y-O5 for qemu-devel@nongnu.org; Thu, 09 Jun 2022 05:06:46 -0400 Received: by mail-wr1-x432.google.com with SMTP id s1so8358409wra.9 for ; Thu, 09 Jun 2022 02:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cex5x9L9Gl/d10/8cuiaJvgz9NAjknIKjSgIAlTWGEg=; b=UO2hkPROv7vuihUX1utcuWVxNMFTDbgBcFfusZtlQkk/9VhAHIEPABTXoV/A5CdH/D xNSeL/bjHkW+0kDIXRX//0+CLnXbOUuB2k+E6XPdtgdr5yvVUlrshc9QSsZ2/pFhn+DU GlXdGda5k3fB3/hMbhImuDEcy0Ms3m+dKl+xxKABfbrdOgQQhlpJ0YVyI4herbssA5SW fkaJUmAdR5gQcLYKjb4DCshJAapMuVKAsX+UljFmxD6phzkNV5WVAGFg6G/ZUsja7uD/ w5qWP2gmUCsGD/H14t6ZuO3+ilobOvLwpiRZJCeNvtN6P1tIOz/xxfdLIxBVCSXXDean C6QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cex5x9L9Gl/d10/8cuiaJvgz9NAjknIKjSgIAlTWGEg=; b=GFOM9rLypc2/QpYdnYgPq7GaC/vMpd1xXezbyOEOFCnDUAnHVTxK0sRoCt+fRIJ79L XzlOiYuZ4AzRN/23qrbO+LwrN0Wlfza7Saun7PEV2fpR7fWyO5F5SL0V1/4DMQMtx5tG 7fvjQWar7DjbI1xigE789KZqX91NZio+FsymP4DaNeo2jyM4NrBMpqR17vm6nl58rGzt 0OYXMBRkSQO1vYe3qmwOl1iRx3klNW63dP37FUoZxnnuaY3aD/WTj5xmlv+eTDTKqD3b /FQZMW/3+aiB1h9vGNYISak+zZMFy1EwXuMfPGdMg+HWYMF7uxWkSJRqXbK6Rjy6h9dT N1HA== X-Gm-Message-State: AOAM532cg53Y0Uv6tQNvZIGXTo+fL+mmc9IgdQ4ovchzyT+Lf3jdNYLg l2k1fl8gFIdYXvrjn/p2AxLEDdjAmyForQ== X-Received: by 2002:a5d:5222:0:b0:213:b7f7:58fe with SMTP id i2-20020a5d5222000000b00213b7f758femr31629529wra.620.1654765593905; Thu, 09 Jun 2022 02:06:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id c13-20020adffb0d000000b002183cf9cd69sm11349796wrr.15.2022.06.09.02.06.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 02:06:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 51/55] target/arm: Use expand_pred_b in mve_helper.c Date: Thu, 9 Jun 2022 10:05:33 +0100 Message-Id: <20220609090537.1971756-52-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220609090537.1971756-1-peter.maydell@linaro.org> References: <20220609090537.1971756-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Use the function instead of the array directly. Because the function performs its own masking, via the uint8_t parameter, we need to do nothing extra within the users: the bits above the first 2 (_uh) or 4 (_uw) will be discarded by assignment to the local bmask variables, and of course _uq uses the entire uint64_t result. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20220607203306.657998-17-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/mve_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/mve_helper.c b/target/arm/mve_helper.c index 846962bf4c5..403b345ea3b 100644 --- a/target/arm/mve_helper.c +++ b/target/arm/mve_helper.c @@ -726,7 +726,7 @@ static void mergemask_sb(int8_t *d, int8_t r, uint16_t mask) static void mergemask_uh(uint16_t *d, uint16_t r, uint16_t mask) { - uint16_t bmask = expand_pred_b_data[mask & 3]; + uint16_t bmask = expand_pred_b(mask); *d = (*d & ~bmask) | (r & bmask); } @@ -737,7 +737,7 @@ static void mergemask_sh(int16_t *d, int16_t r, uint16_t mask) static void mergemask_uw(uint32_t *d, uint32_t r, uint16_t mask) { - uint32_t bmask = expand_pred_b_data[mask & 0xf]; + uint32_t bmask = expand_pred_b(mask); *d = (*d & ~bmask) | (r & bmask); } @@ -748,7 +748,7 @@ static void mergemask_sw(int32_t *d, int32_t r, uint16_t mask) static void mergemask_uq(uint64_t *d, uint64_t r, uint16_t mask) { - uint64_t bmask = expand_pred_b_data[mask & 0xff]; + uint64_t bmask = expand_pred_b(mask); *d = (*d & ~bmask) | (r & bmask); }