From patchwork Mon May 30 16:05:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577194 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp378156mag; Mon, 30 May 2022 09:13:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7NYtmYlRLIs9H6fycYOtpdRQrZ+BAPJqUzNcb4CMsp3TryoQpz6BYufIZ93zS0vnaK2yu X-Received: by 2002:a05:620a:4485:b0:6a6:4a07:3f5f with SMTP id x5-20020a05620a448500b006a64a073f5fmr3292qkp.323.1653927228735; Mon, 30 May 2022 09:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927228; cv=none; d=google.com; s=arc-20160816; b=P71VBh33pqKVrDSSW559f84SjVfab23s/EJZXOf3kD7iu/i0Xq3Hy9MMW8YQgUovOW /e4gnU5/1BloBJwTYknPWoREMGs+pfqNuy5JKKLEwT9YXCBXYQd8VzQ5nHQl1QnxL26I x7CrzhzlgY2amcqoq/wAwwfutHPAVY4H9WvFklSbu9VDJHOg0Y4eQE7dBElWuhW8dk5p q1d8yu3tspmgnY0JNPdFtGjgtWE5YbKKJErge9v6b7D+qz9EtCXn0le9oECxgdwi1XF3 UX/Tj48VLmZDhrmDZQw/1x/OAPz/41ENrcuSEH4ioE+bYjJTjjqBgt6OWcpOg8Hj/oei xYLQ== 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=jmdSDi7OZ3CLw863mo3YNTbjzT20pYO5UsVwQ0Hh3hM=; b=n+ZjYLkRR5HzqQnqUsoU+U7VKmHaW1HAUiBQC3k/6SFQ1sYG6U061SCRjWlkZKstjw 4QNixXb2F5eu52UORrXrw81El87O2c0tmyto8krKR4i2lhiiq5T5e9+Ucdu+pRwh1fio CpY7Nrd0tsfWLGOxi+3eVjw/Rs6TQsB49mv1DUMwyIYiosasP6Ky6VBQX9kRdiVAaA1y tILFs3DLe48cYCcQSL5nmHQ4MjbEcn8TQZTGJm8shoLm8qnls9hv1wjA51cMnKAakTaG NgiJcxJkBr1dvqSyxK4L3OCw8OoWN+kqYXV80rXkrbASZhGsOWx5ARmTDQYYBZH57p29 TY1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pPonqTdh; 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 g3-20020ac87d03000000b002f382ce460csi7342260qtb.672.2022.05.30.09.13.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:13:48 -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=pPonqTdh; 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]:48864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvi1c-0000V7-Bl for patch@linaro.org; Mon, 30 May 2022 12:13:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvM-0002dv-4F for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:35739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvF-0007AS-6Z for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:19 -0400 Received: by mail-wr1-x436.google.com with SMTP id q21so4085428wra.2 for ; Mon, 30 May 2022 09:07:12 -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=jmdSDi7OZ3CLw863mo3YNTbjzT20pYO5UsVwQ0Hh3hM=; b=pPonqTdhlY5Iu5hOCS1urVfiJOleXxk6jYICjBI6A8ZyC/NvW8jwwtcFI0E3kJH86U XurGISrJAe/Z7dPv/W5MQmRyZN/JedVg5XV2RimqmOM1RHU6PhH+M5+vGpxo+IXcVSzi Qab7UD7ddGl+/VHoskQzG1av4G2kKVRvfkrA4y4n3HSap906ACxw4PDP48KA2o79Db3A eo1OZ22BGaRNL8npllydCQ8PJlS9fB4atFNJJ0NE4KJFggQZcAE18hLJ/V9jJC6eQEmf KkUTsOHb56J7pY624QGhiZJjHZJIMuqWdKcBd9h+fu5fyuH1vogDZPwHdqDXarJD2skH t64w== 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=jmdSDi7OZ3CLw863mo3YNTbjzT20pYO5UsVwQ0Hh3hM=; b=Q5hh8M5HXFa0jeLGhW5d3s29q1xB4tuXb3qDpLsfdPPsq57J5l5I0Gar02zVPCmneC tLpHcLM0TFE+4ufa5j8Jft3Gltuix0aHfnH8IHiX4E6dm11+MzGKk9qXBM7uYnWzhyrT BTOYWwrRT8lYez6Ms3TBgm/4hXEeeXhCrpVidrPX2NL8L8WJGJCe9P1ZzV05IUenkfL/ n7deWE5XF42tmWQcyYhUgT7v8UEShYb7POoQBMvxGsEyxlxpDjpT6mg8tbppR6zCrEoZ 9hKlfItsRlr+dHzeq0nMahJK3mCbNmE2jgrPmH9MpVYQ/ANNWvbVyg4KEvV5SV+Z5u3i Ke6w== X-Gm-Message-State: AOAM5330vQ076BqOo5c/SrT48r6mH4kAnw2y9GzV2C8bA8+wr5sn434l YVd0q4MI/nyrRpwb4EWCrVNUqZfy5zarBw== X-Received: by 2002:adf:f80a:0:b0:210:32ed:35bf with SMTP id s10-20020adff80a000000b0021032ed35bfmr5341015wrp.51.1653926831101; Mon, 30 May 2022 09:07:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:10 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 001/117] docs/system/arm: Add FEAT_HCX to list of emulated features Date: Mon, 30 May 2022 17:05:12 +0100 Message-Id: <20220530160708.726466-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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" In commit 5814d587fe861fe9 we added support for emulating FEAT_HCX (Support for the HCRX_EL2 register). However we forgot to add it to the list in emulated.rst. Correct the omission. Fixes: 5814d587fe861fe9 ("target/arm: Enable FEAT_HCX for -cpu max") Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220520084320.424166-1-peter.maydell@linaro.org --- docs/system/arm/emulation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 3e95bba0d24..49cc3e8340e 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -29,6 +29,7 @@ the following architecture extensions: - FEAT_FRINTTS (Floating-point to integer instructions) - FEAT_FlagM (Flag manipulation instructions v2) - FEAT_FlagM2 (Enhancements to flag manipulation instructions) +- FEAT_HCX (Support for the HCRX_EL2 register) - FEAT_HPDS (Hierarchical permission disables) - FEAT_I8MM (AArch64 Int8 matrix multiplication instructions) - FEAT_IDST (ID space trap handling) From patchwork Mon May 30 16:05:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577196 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp382310mag; Mon, 30 May 2022 09:18:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNYXHVdoDHsayzS9oqdI6ajvCllPEwdfsCJvqfYpSKD15rxsLgaMMdiOcIpo/XzGKuQ9KI X-Received: by 2002:a05:6214:27c1:b0:464:2c1e:3feb with SMTP id ge1-20020a05621427c100b004642c1e3febmr13861007qvb.69.1653927527343; Mon, 30 May 2022 09:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927527; cv=none; d=google.com; s=arc-20160816; b=ysiFjvp7SF/rhZuzlNkQm5Wl8XmqhMfV8llXI1Bu3kGQ6PciY/jpk7rx5JucH6FQ7V ETY2+LHH3dyYf/iqoOO6QAqbhfCNLgTMA/2+ZBKsQNHmlRZMPnX92GMxK7BfdKYPaflN m6tgbxabJAcb9pHBq0ycKvv/y/xlYIi5iWQZX8Y7yRwDOrcmHmQXNLh0TAH4gs/RXqEH llnbG3vqVHmLWDAisZNPnHw8MfFtLDKhAHHdRhZhRUiIiuxgrdwZJWAYbEfg+2JrhU1Y cfgHiiAf85iLE2XQ5gTCqWzmIVxOts9zjJFvxDcm5I/246PzXfX7nQK32F1CULRgUuqj ul8Q== 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=z/EiYIg0W6+dtf+QTbWYS+jOx0Pk8vnVY1fISas01J4=; b=Art+pWRMOu9I02ucodqdsAla+DTQBZnQ5eeRH2cEVgLYOBm1kJFMnRMoMp0ccj5WdE tJlbPxgqXJGH9/QK7GHSCngqDvnv/xSph6P/2ZOueUXsKMYAzGnpG/pKtBVcwQoUpDRI CJCKBQK536Wl4zgLwEmWTSrghjk3mLfdgAJOA0KaTxTjxGU5IN+Sr1RQzgEBcF2ySX7r 5CsGWmsBopmuKNMR9kZ91B4CXiZZJgfKOq5/WYQk7l5M/EJjYkRFgzTead2Pfgsks+SO PYtdcue8Fja1mKTsAFiQVgIdmqzG43L8VInoT9zDLiFDwDTWdYlQxZL/byrFUYbGXXuE HAmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kSps6zC8; 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 z20-20020ac87f94000000b002f93e72b3a0si7575985qtj.644.2022.05.30.09.18.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:18:47 -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=kSps6zC8; 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]:56514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvi6Q-0005oQ-TB for patch@linaro.org; Mon, 30 May 2022 12:18:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvN-0002e5-6V for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:46991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvG-0007AW-4g for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:20 -0400 Received: by mail-wm1-x329.google.com with SMTP id r123-20020a1c2b81000000b0039c1439c33cso1164091wmr.5 for ; Mon, 30 May 2022 09:07:12 -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=z/EiYIg0W6+dtf+QTbWYS+jOx0Pk8vnVY1fISas01J4=; b=kSps6zC81cchITJlV9DqAehU8MN3pIWwZPfsVjI7CHGg0KTNXSFt0PLL+VDy+viEwp O5CGVwwvXs5dactB0ZpTQt66sjKLvbjdwys8Cvjei+A43GXxlXauMLK3QUMtsiQJLKQ2 o4ssVn/5TpOtc32cNEtFgs+TFpugIHAZV+NSv4F3WSf3orwSZ3hSusSQpWc2qldguifx XgSR8RS5VAxnkWPUbTr0YoUjwrP1N5Dyt9EwV0rS9/YHDrOx1vTXzP6/lBtMufq+E8JZ q9P8h62b5r9oH20DDQhGHt7SGVTHQeHLj9xp+FuHpzW+9WCOHm7WAyGWMb8LLhs2tM2A HWNA== 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=z/EiYIg0W6+dtf+QTbWYS+jOx0Pk8vnVY1fISas01J4=; b=VEFscJm7mVNyi9qxMY3P6E7ful3qLTCVf8H/oU+FSC0Ho1rhvacpXJCShnXUMRXuuq zIPQEPwr4F3ae0Ly42/I/yXs50B/fvZXHfj7AqNucnEQQX8rcO4VlIjx47f14K7rhNrH DfnA/uCFzAKFpa38ptJK2/KjyMpssA0Upu/sn1jpNNPgg5SqbdRGfQAIxdnxL2CnWZaV 06/333rin7KZm7jDw9QropKwNDmrqoI3KxNtWGSJIzpw4wtXi4fbkNzawX/p7FyTfSiE h4NnlsfSujxKSb53bm6SzdQgVUPRlcaobOnyMV7NGKcMmyB7xPftztBy6unu3JV8Lmvm JGcA== X-Gm-Message-State: AOAM533OT7OCN3i8yIKZyLzxZooOxTDxgCTXTw1OqDkVXRucEfSHqL+e oBuZeoYTtPXTcT2ZkXQAYzvES3J1y7pzow== X-Received: by 2002:a05:600c:3ac7:b0:397:5cb4:a2b5 with SMTP id d7-20020a05600c3ac700b003975cb4a2b5mr19592605wms.5.1653926831789; Mon, 30 May 2022 09:07:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 002/117] target/arm/hvf: Include missing "cpregs.h" Date: Mon, 30 May 2022 17:05:13 +0100 Message-Id: <20220530160708.726466-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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: Philippe Mathieu-Daudé Fix when building HVF on macOS Aarch64: target/arm/hvf/hvf.c:586:15: error: unknown type name 'ARMCPRegInfo'; did you mean 'ARMCPUInfo'? const ARMCPRegInfo *ri; ^~~~~~~~~~~~ ARMCPUInfo target/arm/cpu-qom.h:38:3: note: 'ARMCPUInfo' declared here } ARMCPUInfo; ^ target/arm/hvf/hvf.c:589:14: error: implicit declaration of function 'get_arm_cp_reginfo' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ri = get_arm_cp_reginfo(arm_cpu->cp_regs, key); ^ target/arm/hvf/hvf.c:589:12: warning: incompatible integer to pointer conversion assigning to 'const ARMCPUInfo *' (aka 'const struct ARMCPUInfo *') from 'int' [-Wint-conversion] ri = get_arm_cp_reginfo(arm_cpu->cp_regs, key); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target/arm/hvf/hvf.c:591:26: error: no member named 'type' in 'struct ARMCPUInfo' assert(!(ri->type & ARM_CP_NO_RAW)); ~~ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0) ^ target/arm/hvf/hvf.c:591:33: error: use of undeclared identifier 'ARM_CP_NO_RAW' assert(!(ri->type & ARM_CP_NO_RAW)); ^ 1 warning and 4 errors generated. Fixes: cf7c6d1004 ("target/arm: Split out cpregs.h") Reported-by: Duncan Bayne Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20220525161926.34233-1-philmd@fungible.com Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1029 Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 86710509d20..1fdc5eef92b 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -17,6 +17,7 @@ #include "sysemu/hvf_int.h" #include "sysemu/hw_accel.h" #include "hvf_arm.h" +#include "cpregs.h" #include From patchwork Mon May 30 16:05:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577195 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp380796mag; Mon, 30 May 2022 09:16:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbqpc0xNKy/EVaqFNadZtzyPQhA7+0G5N1VYxvQOHamFjVZmjKE0Gw6BKIWEN//w4Eg1JU X-Received: by 2002:a05:620a:84b:b0:6a3:4895:d272 with SMTP id u11-20020a05620a084b00b006a34895d272mr35448647qku.338.1653927409856; Mon, 30 May 2022 09:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927409; cv=none; d=google.com; s=arc-20160816; b=Ita7QhrwjL2WO09b+JbqVRXammVf/qBS4xa5q63SaGJ0cDhuTPJasyWblY3H56RfSg zXR+SZDIN0EKndJ0vRf5urqp0AQ4jIfuoo2+Lw4LX/XWLIv7o1bgHw17/1Sp+Nr+8Zmf seeOrw5Sfqmt4z/YRv0bJelNrGXWEweSe5p6/sWu3ySEJQ57ep6mtVi2IjDuswz1Ojeh zPmWVMSmARQ05pGmWwYfVGEm3LTG2ajWT0CRcnY4fNmTk28PavhilXAoWRxWoqAXTELI vhjOEOg57TdOViZ8srEidlOalKhE+aZN0vdBO8LU9kfUSB/RRPIUKK/HuF8DBACyOipp eX1w== 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=lKRJrIgeaUwwXJZeQ6utUWAPa0M3UoWr4zCBZlSuKrQ=; b=MjUq4mg5C7xzei4+B20GAAmSftU2nu2gY8Y8T7v44tfEz7HTyqyJnWF4ayzy8gOaPn 1M8OqHcrJejVc0bHxeZXYzoid3pE+M4FHquPwvTpx8wXfb11BZxmUtvsJ4IP5JlEogQr PHMDbrdeCwzuUu82H9AmRfA6GbMV+2HcU80LquoFRoTZUE6S34jInxZNVSWlocPRhXbX fzwvtmkWSGvaEhk4TvuxFUi0v/d1+RASPZ5qzg5iFR/m7V0F3JCW+C/lha2jyHNDTqGR QDdf7+sHvuaq7dp2mFJ0za/1x2suRDqn9Bd6hHjjtStAnEqwhAV2XTl1ZNvtYJyzKVMP M67Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nnGJUoR1; 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 j11-20020a05620a288b00b0069f8790d19dsi8579773qkp.42.2022.05.30.09.16.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:16:49 -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=nnGJUoR1; 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]:53862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvi4W-0003wY-Pz for patch@linaro.org; Mon, 30 May 2022 12:16:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvI-0002dr-NG for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:20 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvG-0007Aa-53 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:15 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15256837wrg.12 for ; Mon, 30 May 2022 09:07:13 -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=lKRJrIgeaUwwXJZeQ6utUWAPa0M3UoWr4zCBZlSuKrQ=; b=nnGJUoR1pe2AtKF4AS+uHIpw3GvqBm7CcyZQ7HecJvP5Tlgwq+NzJk2BjJDNZuNo6J czMpOxWFymuvMV8VOrskc7GEH5hECZy1Rj8nMjNIyGPlBZOPspmc5lMW4rn47ijVr0QW FKpVRx7Vnh9vlTB5XXa7Anz8Z9Pb3qvvSAjXa975DxRUzW4S49sVUNU7KbRHqg4DOtmF iI5AmF5MpE9kMXMSSYSugJSXx+QnX+fMw8TpdeRYeFVy+3X3cnCvfP5SJfrbep6QZfjN 9VM3+McwbOpzZdATkJGPeqrxj7UCKPfOnRQlJq6fGFe9qqLpgv/kHz7QAhxXTj3XH2Ox CMJA== 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=lKRJrIgeaUwwXJZeQ6utUWAPa0M3UoWr4zCBZlSuKrQ=; b=WgG35KXKgpXro9jyrRNEvQBaPcYt80zFxB4xbN/vJY7348ZkCnI65whmOJi68LvG2s lvRCq7yTlZlcQNH3tyjyIZemYhIKKFc0onFMuRWqeeYlLR6KGDYZaBQBWsMhmWyjiVKL IWawKnwMNHZucyvRBJDIuP5ZQ1udFPcBdaxGL3szaW1CXB4QSkRPmpYIf5mvRowsywIk epCc4hzaUYHzwfrptVpq0ZG8Es3UMe8QEBw0mnjp+TL/aCsef9FexqP1XpZFFGIExWge K4pI6uHEAWEEK23pKY1CAbxiZQUpNbZiAUmkB4uIp+eABOHjq7PjrRYI+TJ+ekq3Vd6Q p1ww== X-Gm-Message-State: AOAM533eVlUvcogDbrnbwpCfzYeT/v43hZHA2FTogwp8nejfHOXUoJsg 1cz0YeIoaTNt8WwJU8s31rMJ0rZNzt6xCA== X-Received: by 2002:a5d:6c66:0:b0:20f:86f3:ea05 with SMTP id r6-20020a5d6c66000000b0020f86f3ea05mr40690832wrz.154.1653926832550; Mon, 30 May 2022 09:07:12 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 003/117] hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready Date: Mon, 30 May 2022 17:05:14 +0100 Message-Id: <20220530160708.726466-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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: Icenowy Zheng U-Boot queries the FIFO water level to reduce checking status register when doing PIO SD card operation. Report a FIFO water level of 1 when data is ready, to prevent the code from trying to read 0 words from the FIFO each time. Signed-off-by: Icenowy Zheng Message-id: 20220520124200.2112699-1-uwu@icenowy.me Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/sd/allwinner-sdhost.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/sd/allwinner-sdhost.c b/hw/sd/allwinner-sdhost.c index 041e45c6804..455d6eabf64 100644 --- a/hw/sd/allwinner-sdhost.c +++ b/hw/sd/allwinner-sdhost.c @@ -114,7 +114,9 @@ enum { }; enum { + SD_STAR_FIFO_EMPTY = (1 << 2), SD_STAR_CARD_PRESENT = (1 << 8), + SD_STAR_FIFO_LEVEL_1 = (1 << 17), }; enum { @@ -467,6 +469,11 @@ static uint64_t allwinner_sdhost_read(void *opaque, hwaddr offset, break; case REG_SD_STAR: /* Status */ res = s->status; + if (sdbus_data_ready(&s->sdbus)) { + res |= SD_STAR_FIFO_LEVEL_1; + } else { + res |= SD_STAR_FIFO_EMPTY; + } break; case REG_SD_FWLR: /* FIFO Water Level */ res = s->fifo_wlevel; From patchwork Mon May 30 16:05:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577211 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp391754mag; Mon, 30 May 2022 09:31:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzycgvYrP6Qx3jgwXIcc0QhenE1va11Yew660JGqKIsO+XUcvb+sxCkG1VuB2rviWvW5Qq X-Received: by 2002:a05:622a:1a21:b0:2f1:f29e:40a with SMTP id f33-20020a05622a1a2100b002f1f29e040amr43960495qtb.235.1653928314206; Mon, 30 May 2022 09:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928314; cv=none; d=google.com; s=arc-20160816; b=MqkuAZ/O7D4nszLxAH2VEWhnmTNcr2k/j/O/0zx7dqt+c93eT6UrQVU6kBVTXCudjJ w5Jmv0HGlF6dhqLt3t9eSjHpsKW3JG7pZQ1Y+IeWvvAxqg8d8phegq41eeg5TEdQA/u2 u+aiZlsPnfGKrXk3+MrYtb9j2M3+WIVPWOUowiRvip2hc6PXYfQq6yWgonlmO6sJRX9H 1wmGOIzZDUOi3AgHAxpTrtDG5w0YH+eBaJGaUcCW2sQR+20J8N+a2zMzOlQb7gC3vwxQ ihZrxgtoIoQzwmrXcy4KNEb9kTQ9x9sGO+CjaHlc8FCglwZclvcCVjfhMa3pSxW7uJ9F 9ATQ== 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=uhQoBBJ/7iTjtvKeEpgab8YkXq728EARbWasfrH6vg8=; b=jq48YyzYAhpFqkAkRED+izFo8C9LqRuYzVl9oLJc1LkIV4JtRctOcd3i6mpcWHs1Fs b60aLxVnShCFCveF8nKyblaYKm8mxPymVd8YEf8/II7P3UxmU3UFHLql8Sup6EPgpLo9 HoO62EYa2E7udZLxfGBzA+W35NCa6dfimQRQ07PQlzMJc7/FWAZLnt999EPPKNvLyLeP sipnAnPr2Va08JHTnipBZypDbvnpVo73LArXJ49TikY8FUl+XeDcTc13D4gTUMHAyzah g3WRnsp4byYxJz4WRvqUNzT3p4yI9dHZEQbEmdoJQ6zj0J3kFc95GYIU5WNep7Rc8sKs zJUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XqSlHNQo; 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 if7-20020a0562141c4700b0045646468813si8446874qvb.116.2022.05.30.09.31.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:31:54 -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=XqSlHNQo; 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]:33108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviJ7-0003WN-Ot for patch@linaro.org; Mon, 30 May 2022 12:31:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0002rf-U4 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:30 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvH-0007Aj-14 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:30 -0400 Received: by mail-wr1-x42b.google.com with SMTP id e2so15314489wrc.1 for ; Mon, 30 May 2022 09:07:14 -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=uhQoBBJ/7iTjtvKeEpgab8YkXq728EARbWasfrH6vg8=; b=XqSlHNQoyp4RqJKgZZ33cI7BrJQV7ENarKuMSRmMG9kBOXItdqG8dYFnzR/EED28kt sg5Y1uYtJhOKJ5lV5C7qpbFoWe2zmyub/1kDV3MrIS3fqncCRNtQQova44jSMAUYiwBQ hz6mhw7iIOev4KKdQHzv3CUesjtjx6Ht4IMyunj4JyDB6Pd91Dk6Wd3PHBjNWkcOK0/2 5A6zOJRSF7QJjiPZfZF7bsERt9OANpJD3Q2UtfN2h/szUUrcwNbiJ1m4145vhkEearYE o3K7n2Zd+KuswOyaJhpry6CCa2jgfGO9EfF6qSQzOw03SBWb1QwRu5hpi0j6AiBYLVeR n2bQ== 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=uhQoBBJ/7iTjtvKeEpgab8YkXq728EARbWasfrH6vg8=; b=xG8ZHUbGn/zSW/SsMJgrGcOyRT3HnBiVLPr6DNb/50Hj2BEv2hJQrBN6TZJCpSM98t 4a6FF/PeN8NBt3aMmz8zV5BNRsgZQ2txz7NAuEEXtf7tuevI+87V4fTKStJ/ZOPmJsY4 KzcV1MMhBJbofyyjcVTuDQOGIEFucPz5eX38/Jao7lFNWvvtlxumY9/HfyxO1Ch30Yy1 fcandDNLK9rUmlBJsbY5lE4aU9FQsoBZuYxiheUbCqbX7H0YozMcHm5DgJsj7pqnb98J cXexzzo0dOAKA8z6TSCBlCYrfq2a03/pJQ8tIWnAHENCvHqgJPUSz8XNNEmTXs9iYiM/ N9/g== X-Gm-Message-State: AOAM531nVeJAAUacehUugsAS2zlzKhz/a4mnGtFACKaA2783+DM0YLIO hU2rX5nvgLJPG6IdZyXwsKh6ZzlrbZVnvA== X-Received: by 2002:adf:e0c3:0:b0:20c:5672:9577 with SMTP id m3-20020adfe0c3000000b0020c56729577mr45678404wri.466.1653926833319; Mon, 30 May 2022 09:07:13 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 004/117] target/arm: Introduce TRANS, TRANS_FEAT Date: Mon, 30 May 2022 17:05:15 +0100 Message-Id: <20220530160708.726466-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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 Steal the idea for these leaf function expanders from PowerPC. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-2-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/arm/translate.h b/target/arm/translate.h index 6f0ebdc88e5..9f0bb270c5b 100644 --- a/target/arm/translate.h +++ b/target/arm/translate.h @@ -576,4 +576,15 @@ static inline MemOp finalize_memop(DisasContext *s, MemOp opc) */ uint64_t asimd_imm_const(uint32_t imm, int cmode, int op); +/* + * Helpers for implementing sets of trans_* functions. + * Defer the implementation of NAME to FUNC, with optional extra arguments. + */ +#define TRANS(NAME, FUNC, ...) \ + static bool trans_##NAME(DisasContext *s, arg_##NAME *a) \ + { return FUNC(s, __VA_ARGS__); } +#define TRANS_FEAT(NAME, FEAT, FUNC, ...) \ + static bool trans_##NAME(DisasContext *s, arg_##NAME *a) \ + { return dc_isar_feature(FEAT, s) && FUNC(s, __VA_ARGS__); } + #endif /* TARGET_ARM_TRANSLATE_H */ From patchwork Mon May 30 16:05:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577193 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp374706mag; Mon, 30 May 2022 09:09:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygqRcnn4aQng7A3M7Jvi2N9N/qHnSZVQe/s3fCQXGyJ4/sYS5gWx5+thD4T6TOmWtVzlXV X-Received: by 2002:ac8:6ed0:0:b0:2f9:4564:97b5 with SMTP id f16-20020ac86ed0000000b002f9456497b5mr25373407qtv.669.1653926981850; Mon, 30 May 2022 09:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653926981; cv=none; d=google.com; s=arc-20160816; b=gDthmZ5rUGKgrrz+Bip3liV2R53OAXxQzR2+LF9m+NFSNxii5+BtJu97/HEqdt+prB R7xnsTC6M0cToBinsoLqZQ5bG3DlCyfW4APl/FVDFrRCi49+H8bBjIlNpPfBf0vyueAA rlev9dbhLbEu8pRgKD0fTd7NegyroFj76jVGExl4W/RJIQ4B1p1yEN2cTMpMmJji12jt 5lWqYcMJwPnZHntzP9Us7UlARHKZCP78Td9tbUeszofV9R7ZS2UIFumntpPRyUnCARLo aCUj8/pajj43xHkNCA0BlEy9Wb9OTIjpd0ieBdhgVugD9udqUzGKoZ6eGpYV92+8G9HS chEg== 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=AnL2hapY+NZhJ7mggxRcg8oo4xHVA4awAFFe84llHYQ=; b=gS4PNWmBy8fJZ/MGTEkU2gSJx2fPljWygwoBIR0hrZ03Pi9NlN6wbMQvUe+MRG8Ium ATVGoPrxG6QDVnrCl2AXXqHohKpiGPyQ49BJrEblZXbhyXsDwzOtBB1oR8HtYH4tD6w8 w4LnDJdMJX4pZq8RyuXVazvqxfvu4DkJUWh4tfFWQYBTowKeKAR1YwSKP018ALPaa7z3 dRS+YMKng4suKGoZ/w/vP0BDfVmPgKmgMaIOoIiqT38PKLz0/dYbZphWa6DL11c+X62K J7wYyc3MmuNWLq1FriyzkfYbB2lmNFI0SSOq6HnFFi1cmNWvmq9spsdP1p6KGEv7FFp6 j4mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qWY49Mbh; 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 i15-20020ad45c6f000000b0046248de4075si7941379qvh.448.2022.05.30.09.09.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:09:41 -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=qWY49Mbh; 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]:40802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvhxd-00036w-Ey for patch@linaro.org; Mon, 30 May 2022 12:09:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvN-0002e6-6X for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:33600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvK-0007An-HL for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:20 -0400 Received: by mail-wr1-x430.google.com with SMTP id h5so7195481wrb.0 for ; Mon, 30 May 2022 09:07:15 -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=AnL2hapY+NZhJ7mggxRcg8oo4xHVA4awAFFe84llHYQ=; b=qWY49MbhyECw+6OLw0acu+Y26AOTRVFWWH6LeM4SPdf5uc+gGzdluSpLNj/z/UFxN1 qKnzoCxvAKr0zKCpToZEVagmq2WRSQelwbxh0T4ttOYPPGlBDa76xf9OcQfkxbLnh4li C6tSTXsCqls0IfakjI4mZKncyWtLqcFEUrh+6B09vLRQHwRKAsoR9mTHz+gsR9rw9PwU 2aok0k72r0KaJrRHjphcqF7Led37/7otEo8nVzxpU+osSzDp9eo+QRoIY0ULfFwig9m0 KvS3gv5HrfoEqxEOorpC74YLBkHqjV6cV1vW22VjcSXGlkY+ECI38GasQCBpKV4aktiU Pt2Q== 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=AnL2hapY+NZhJ7mggxRcg8oo4xHVA4awAFFe84llHYQ=; b=wfQazbxehhwyVNSj5tuNvGUJMevBiv47/kjH0jUT4br8Y8mM3WcIp0fJLSK6u4pXcL 4B4wdkDr9O5ooUlb/06JdC5vETq/ARpC/qc3QBFwwZaIz1gmC7EZ43Dg5B0/wOMLl5Rp 8M/9W9Z76Tn0t6acqBgNgmvOBKxdp3ZRo/5PY8mGQFXx5JFlMDTmOpSWczlneicD/aXE kzfYSomtaq34ZMxswFUYcqQC1mfAd0Je8bTrnQ7Flu1fEwQMv374lvs/LnA1dT2viGr7 fHCK5jt6w/H5UeEaLH4VczTPUvQkynKBA36npFkDDevCc3R4o1tt1xtW9jVWAia6fURY 3tng== X-Gm-Message-State: AOAM533P4klOYYfYv19fmJDncJKGywCaTbEoyT6Jst1ioB/zQspTURE1 +ZLdslJTLzPhas4yTT/2bCGr03D3KlJH/Q== X-Received: by 2002:adf:f252:0:b0:210:2a67:2d9 with SMTP id b18-20020adff252000000b002102a6702d9mr8756033wrp.17.1653926834167; Mon, 30 May 2022 09:07:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 005/117] target/arm: Move null function and sve check into gen_gvec_ool_zz Date: Mon, 30 May 2022 17:05:16 +0100 Message-Id: <20220530160708.726466-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-3-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index dd4a5b23ab6..903514cb6a8 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -137,13 +137,19 @@ static int pred_gvec_reg_size(DisasContext *s) } /* Invoke an out-of-line helper on 2 Zregs. */ -static void gen_gvec_ool_zz(DisasContext *s, gen_helper_gvec_2 *fn, +static bool gen_gvec_ool_zz(DisasContext *s, gen_helper_gvec_2 *fn, int rd, int rn, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_2_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_2_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vsz, vsz, data, fn); + } + return true; } /* Invoke an out-of-line helper on 3 Zregs. */ @@ -1377,13 +1383,7 @@ static bool trans_FEXPA(DisasContext *s, arg_rr_esz *a) gen_helper_sve_fexpa_s, gen_helper_sve_fexpa_d, }; - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); - } - return true; + return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); } static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) @@ -2424,11 +2424,7 @@ static bool trans_REV_v(DisasContext *s, arg_rr_esz *a) gen_helper_sve_rev_b, gen_helper_sve_rev_h, gen_helper_sve_rev_s, gen_helper_sve_rev_d }; - - if (sve_access_check(s)) { - gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); - } - return true; + return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); } static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) @@ -8385,10 +8381,8 @@ static bool trans_AESMC(DisasContext *s, arg_AESMC *a) if (!dc_isar_feature(aa64_sve2_aes, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zz(s, gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt); - } - return true; + return gen_gvec_ool_zz(s, gen_helper_crypto_aesmc, + a->rd, a->rd, a->decrypt); } static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt) From patchwork Mon May 30 16:05:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577201 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp385666mag; Mon, 30 May 2022 09:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4XDE/b2tDq9Mp8THhebFVtkfttd9jAJzi/DASnwOsTBTIEjoI40geWXXHwf6auzT+/a5Y X-Received: by 2002:a05:620a:e0f:b0:6a5:e7fb:5d74 with SMTP id y15-20020a05620a0e0f00b006a5e7fb5d74mr10596252qkm.46.1653927803568; Mon, 30 May 2022 09:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927803; cv=none; d=google.com; s=arc-20160816; b=GZnWodPhJos0dECZvItcKjOfSMQXgidOJi7Rc01yNbOP/hvoIh7hMYRJ04LLdmgYSg /ugpf8A/K7yFZmVYXA048ZQ1zWXFzWBJjVVQGkPXFXy4TroZth/LqpQ69PsS57THNq9y qCgsGvmQCAK1yOGg00smsEYJ6N1P3SkumMkxHK9Hpf1rCLHxIJRBK5o9WZFd3GGIKXAC jk977669rtAUTpIKYf7YHR1GReCKvUDv8l0Y1ybF/kvzWDF7dYJgW+O0d73oz4p24hrd PU6tPyBEbMVn1pyTEcPOf+2dzGawD1xlenuplYPvkZRXLbtMRwVMnZ3+e5h8ksT6XTyg 8nzw== 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=F7D5A4jK2slAbzXLwOeiXimVOY+Rz3I47iq2p6PuNZA=; b=IqIo3kRBgGaRq6qHhsgPFkC133cjRkza/3DbpGXofQWddsbFVLanNrnzL59LR+or7B TEbWhGe9/SP+ZnFfzDJrmv+tbu/hlDODOGtdlDeitqg3yiT50h9lg+AwlULESy1zsPvL 44CAw+7lh7r9ZG8+HUMKV0A58D+MlxhOUL04vp8okbBrWQVSaAct6WVqkETi0Oyh49nb 3Rf2MCqQ/M0h8cPtdwcWIxAd1jrEsZ32ykq4f3MBKn3QLZNAa5DrUT4fdb3dGe//zu+F uTITKtfc1l6rfaeHKDSS8gYnyfT73f2JGcFfInWebGy0BiC9eFOmoU2oqezVRP6OO9Dq z8uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Te0kRqsO; 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 r125-20020a37a883000000b006a106586d8bsi6874344qke.608.2022.05.30.09.23.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:23:23 -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=Te0kRqsO; 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]:39342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviAt-0004yX-6F for patch@linaro.org; Mon, 30 May 2022 12:23:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvN-0002e4-3g for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvK-0007Aw-HI for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:20 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:07:15 -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=F7D5A4jK2slAbzXLwOeiXimVOY+Rz3I47iq2p6PuNZA=; b=Te0kRqsOBh0senBIW5ECaxO+cTprzFMD6sxjkvcCNF/5e8sE2emPJ7ewspA0HoEl0A CYsEbE1xfzrfX7nBgInFY4eQSMAuUPttuVpv12aFFueTk43PKqDL+KZ/8ZZxpwYYcXKd ZIRg1W8eTlGLes7vuTs7LvsvcOzAE1rT7aoV+xQ9L+z3OEsnQ74kVcUtmJP4Trx4fET4 B8BZFg6TldWstpGKy/1u80pcowmZlADShxxPHfQVzswvSgXmVao5k8ZYSEjck4Zq3Qhj MhX4J30JVI4XjPOj0tcqUZ6q05GO+DyAY+xqRwhgGm/kcKOjR6Tb3oH/hjIo6Zi52PRD Dl5A== 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=F7D5A4jK2slAbzXLwOeiXimVOY+Rz3I47iq2p6PuNZA=; b=3euv9MnwQBVXj++eBI48DRoy0CLD8ydDUpxzwPKMLpHLnxqBVEU+9s4Isk/yKMpbXd df/98Y3/r2IAypjRJ1HzvSnOccCA1jIcf/jbq2DFdUoveOaJHiByFIhWz1mYYuWiwaQH NvbtpJxupYV6fHBJcIpIH9nJH/5ozRlceuZm0H7njs355jwVPfdTCSWyfXdDMrmHOSaZ 45m9ooLO4+eR1xE0XUKHWxOrkn2jUzISfdXr/qexva2XepWdBk48czAqcw2Oohl50DZH AYteyYUk79Pg5CiYMmVKM2uyK4q/ppY7yI7snf8xvJTe6kiNbV4q7InyQj17RPE4rAYS RdYw== X-Gm-Message-State: AOAM5336Qe0pVG4tUoZqH+uE561yVXGsZaxPv6nstEmkgT3PIclwS3DT fVoKeN2G5dDuMNKJi+yZH2RW9dk/Zzf+XA== X-Received: by 2002:a5d:6847:0:b0:20f:c0b6:d783 with SMTP id o7-20020a5d6847000000b0020fc0b6d783mr40461499wrw.101.1653926834974; Mon, 30 May 2022 09:07:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 006/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz Date: Mon, 30 May 2022 17:05:17 +0100 Message-Id: <20220530160708.726466-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using gen_gvec_ool_zz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-4-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 39 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 903514cb6a8..f7e7a569b7a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1375,16 +1375,12 @@ static bool trans_ADR_u32(DisasContext *s, arg_rrri *a) *** SVE Integer Misc - Unpredicated Group */ -static bool trans_FEXPA(DisasContext *s, arg_rr_esz *a) -{ - static gen_helper_gvec_2 * const fns[4] = { - NULL, - gen_helper_sve_fexpa_h, - gen_helper_sve_fexpa_s, - gen_helper_sve_fexpa_d, - }; - return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); -} +static gen_helper_gvec_2 * const fexpa_fns[4] = { + NULL, gen_helper_sve_fexpa_h, + gen_helper_sve_fexpa_s, gen_helper_sve_fexpa_d, +}; +TRANS_FEAT(FEXPA, aa64_sve, gen_gvec_ool_zz, + fexpa_fns[a->esz], a->rd, a->rn, 0) static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) { @@ -2418,14 +2414,11 @@ static bool trans_INSR_r(DisasContext *s, arg_rrr_esz *a) return true; } -static bool trans_REV_v(DisasContext *s, arg_rr_esz *a) -{ - static gen_helper_gvec_2 * const fns[4] = { - gen_helper_sve_rev_b, gen_helper_sve_rev_h, - gen_helper_sve_rev_s, gen_helper_sve_rev_d - }; - return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); -} +static gen_helper_gvec_2 * const rev_fns[4] = { + gen_helper_sve_rev_b, gen_helper_sve_rev_h, + gen_helper_sve_rev_s, gen_helper_sve_rev_d +}; +TRANS_FEAT(REV_v, aa64_sve, gen_gvec_ool_zz, rev_fns[a->esz], a->rd, a->rn, 0) static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) { @@ -8376,14 +8369,8 @@ static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) return true; } -static bool trans_AESMC(DisasContext *s, arg_AESMC *a) -{ - if (!dc_isar_feature(aa64_sve2_aes, s)) { - return false; - } - return gen_gvec_ool_zz(s, gen_helper_crypto_aesmc, - a->rd, a->rd, a->decrypt); -} +TRANS_FEAT(AESMC, aa64_sve2_aes, gen_gvec_ool_zz, + gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt) static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt) { From patchwork Mon May 30 16:05:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577198 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp384464mag; Mon, 30 May 2022 09:21:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiRMWUZDW8MZ2ayyuRAzHmqX3cerozdr1ojdnvk700zcOWBI2KgFqI+XSgir/U2QdVFIS/ X-Received: by 2002:a05:622a:103:b0:2fc:606a:ed33 with SMTP id u3-20020a05622a010300b002fc606aed33mr17900455qtw.179.1653927699810; Mon, 30 May 2022 09:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927699; cv=none; d=google.com; s=arc-20160816; b=KlAFID2y4TNlm7Onf3XldamkV1fRzY6zPhuEKO+69pL4oqPivW4AvPeHIvqtDXW8+9 7u9pHv9pSL4MuinjStadI+Sut6wRCz4KcN+0y9a+0OOAPGv5dIkEUwtTZBLnJe5Ah6TP ZA2tkhxUeS2lQLwSlAmkHCRKHFcBl3VeQ1YeJEpbf72UtJ0lbJ3zqTkKw2p2HYobCio4 Ey8UChg9GGp76na7r8IoxOz/t4ywR71e/3DV3gQ84WciSFtvIGfY7oo2gSrajH7sgCVx /ZAmJbcwMfwCWS0i12U1057KoZz+NKpOMZ2nKjuGFnOpByMcaJ4cKhz2UVqBjIDKvixF BevQ== 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=sOUheYAQJ8+bQRv31tELNanExF9i4j1PcXkMCL/gELU=; b=f4GYehTcmofUnv6mIoDYFl14FKz4eF6tAQ5gVJKH3EX8ZipuHGA7u1GyJX15IErm34 S84mCglYqbwhrH/hBLhje/SFG14sLRx6F7u7RjLbcCp1C0K5I8vjgBZBanAd/bozTlPH 48kqgIjC4vClE0+ldZ0kyPukifS6o5ElBUhj741wgSJmVK5jeT1BuVsdPymehFf+Dkxk rp2cUtDoPZjprJhn2Fdlj1C4L3BKCUwhKQQw3PXWmmOvjKE/+Q8YVaFWlbZwwi/x89KM 5pjcF5OgQWbT2vQxsVC6GQlXR/zxB2eL0UnIv2Bir0PuwDfMUpFupc+5Aw2YCHb2PKER Xocw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e9jFaVAb; 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 q4-20020ad45744000000b004645bfe13e4si326576qvx.52.2022.05.30.09.21.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:21:39 -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=e9jFaVAb; 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]:33434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvi9D-0000se-DF for patch@linaro.org; Mon, 30 May 2022 12:21:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvN-0002f5-N6 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvK-0007Aa-HK for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:21 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15256837wrg.12 for ; Mon, 30 May 2022 09:07:16 -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=sOUheYAQJ8+bQRv31tELNanExF9i4j1PcXkMCL/gELU=; b=e9jFaVAb3fctOemzcYoM/kUeH8iqJuzeeHwyAxYgx5lvSfrZl1N9L/dOu9i3SBGPWA Qe2yOi/gXgXns0bC6iR6DZ8X9egS+yD/ZrNo2CFxhZw125xeEf+D4ZXHmBfWZT7igC+6 k/Od9gm35SsMnXvOhre8IulxDQT26Ocm8cNbS41sIzaSawjNGCuk7kLv211CfF/migva jwpvQhDuV+JDkjrcVK+hs8Q1jp9u4T0dhcqN0DPC0I29nP8cOQ8r2Zej/kooDF1inxDo NGNPdo43u5O3stu8JMKA8Ohgvc2qqp5/KjyGaJYgioGLVYUmA3ud4d3m87CJ00vEeoDM O5Rw== 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=sOUheYAQJ8+bQRv31tELNanExF9i4j1PcXkMCL/gELU=; b=eSCMnMJB7dbzoZOzqqliBhlJiQigu82k0OELIziALI4CwbDlvm2AqMmA8TrIezZ+mE 9vftxcOVRnA7p/D8hoUf3przEyPSJhbBAsMzLfFt6BJNW/ScgZSb7npGZpaAmdm2Fuif XMXc22D4bzHBIOOUJ5oCqdKVpmhlLjGQzOQ/HmyTDpgog3mGSaLZuFF8n1SP9weL5rmv 0NBhPJC9MdqGgNXeC1uDtcGIzk5AyYjEdSkQGYQBaBW2gIo4uE04v17+2COkFmfBkARs JiXlKDGWRgBzCQ1AqNULumsJRG2Ejx/NhwqbiTM8TdTeDxzIYzUB7XjsQc80x4TfNnLc MUtw== X-Gm-Message-State: AOAM532wXFN3aHZ03j35DRsQWq/vqceabm9UBPMfZwmX7miXnobbs0ro 3PK1vuU1TJAn4CBDJQSxEU6UX+F0V3hL8g== X-Received: by 2002:a5d:64ab:0:b0:20f:ef37:a9d1 with SMTP id m11-20020a5d64ab000000b0020fef37a9d1mr26043381wrp.197.1653926835775; Mon, 30 May 2022 09:07:15 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 007/117] target/arm: Move null function and sve check into gen_gvec_ool_zzz Date: Mon, 30 May 2022 17:05:18 +0100 Message-Id: <20220530160708.726466-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-5-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 74 ++++++++++++-------------------------- 1 file changed, 23 insertions(+), 51 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f7e7a569b7a..fd1d749c0ea 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -153,14 +153,20 @@ static bool gen_gvec_ool_zz(DisasContext *s, gen_helper_gvec_2 *fn, } /* Invoke an out-of-line helper on 3 Zregs. */ -static void gen_gvec_ool_zzz(DisasContext *s, gen_helper_gvec_3 *fn, +static bool gen_gvec_ool_zzz(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int rm, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + vsz, vsz, data, fn); + } + return true; } /* Invoke an out-of-line helper on 4 Zregs. */ @@ -1173,13 +1179,7 @@ static bool trans_LSL_zzi(DisasContext *s, arg_rri_esz *a) static bool do_zzw_ool(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) { - if (fn == NULL) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); - } - return true; + return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); } #define DO_ZZW(NAME, name) \ @@ -1345,10 +1345,7 @@ static bool trans_RDVL(DisasContext *s, arg_RDVL *a) static bool do_adr(DisasContext *s, arg_rrri *a, gen_helper_gvec_3 *fn) { - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, a->imm); - } - return true; + return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, a->imm); } static bool trans_ADR_p32(DisasContext *s, arg_rrri *a) @@ -1390,13 +1387,7 @@ static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) gen_helper_sve_ftssel_s, gen_helper_sve_ftssel_d, }; - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); - } - return true; + return gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); } /* @@ -2426,11 +2417,7 @@ static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) gen_helper_sve_tbl_b, gen_helper_sve_tbl_h, gen_helper_sve_tbl_s, gen_helper_sve_tbl_d }; - - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); - } - return true; + return gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); } static bool trans_TBL_sve2(DisasContext *s, arg_rrr_esz *a) @@ -2460,10 +2447,7 @@ static bool trans_TBX(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); - } - return true; + return gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); } static bool trans_UNPK(DisasContext *s, arg_UNPK *a) @@ -2618,10 +2602,7 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high) static bool do_zzz_data_ool(DisasContext *s, arg_rrr_esz *a, int data, gen_helper_gvec_3 *fn) { - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data); - } - return true; + return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data); } static bool trans_ZIP1_z(DisasContext *s, arg_rrr_esz *a) @@ -6693,13 +6674,10 @@ static bool trans_MUL_zzz(DisasContext *s, arg_rrr_esz *a) static bool do_sve2_zzz_ool(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) { - if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) { + if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); - } - return true; + return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); } static bool trans_SMULH_zzz(DisasContext *s, arg_rrr_esz *a) @@ -8377,11 +8355,8 @@ static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt) if (!dc_isar_feature(aa64_sve2_aes, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, gen_helper_crypto_aese, - a->rd, a->rn, a->rm, decrypt); - } - return true; + return gen_gvec_ool_zzz(s, gen_helper_crypto_aese, + a->rd, a->rn, a->rm, decrypt); } static bool trans_AESE(DisasContext *s, arg_rrr_esz *a) @@ -8399,10 +8374,7 @@ static bool do_sm4(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) if (!dc_isar_feature(aa64_sve2_sm4, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); - } - return true; + return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); } static bool trans_SM4E(DisasContext *s, arg_rrr_esz *a) From patchwork Mon May 30 16:05:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577202 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp385977mag; Mon, 30 May 2022 09:23:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCvQsLKCBQ63Y60JrozfHTw10rpaJHMKnPTcpR3+yjk2MSYLfe4n60NPoJfoSjshvD+EOS X-Received: by 2002:a05:622a:1392:b0:2f3:f485:4cf3 with SMTP id o18-20020a05622a139200b002f3f4854cf3mr44889098qtk.227.1653927832493; Mon, 30 May 2022 09:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927832; cv=none; d=google.com; s=arc-20160816; b=LoDrj/yUg8eDfhbwCFmEuTEDzlpgmTl6gbdCPW4i0qkXGZaLd5aJ0QXr1XIeEUGbRJ m9YjgMS/Z7O1IvbBk4WD3IBIEk6y4CIwPHzHwlnB1XE2YA2/2etKKjPzi86Om4U0abnl bw/lZH4pfrWvrQQG13s3LWa/ooOdHbvx+qccyRbDxoISW/SioZp9Fmk/miOxeRzv11V6 QiCG+2jR81g3++pRJ2o+MSH2Av1a7I70yB3F+jNrq05JMMzMig9QgMBpa6bVa7PMYzh0 kYYKr5mzlkqW2f8wUPatwVWqyoyM5a259fUv7NPApPZYZtYy68tj2HMXD3qZ1f48HNAr 2BFg== 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=VdNkyR5z0XbjA/F5PwkHevb5zlirZdP3cknohAbWffo=; b=m6sgpu0tljCBABUyBAcdh4KunPB3AIG/a9utbGMkJRpUwS5WAH+1PGjQ7ZLF8oELwB 154qc+smt2NxtcvDxNxNNw2jCgbBaRkbSCmuHWOasEPQ7X5rpG6HyQ35i6qGvubqtwKz M815CoK/EGNbeUe0X9XSBm2WMhDZLowTRZnhgrNEd2pzrMXUOOt45qV1ytQWQN+AzhLo zGJgkkhRJHmyagxIPiT180YkX1O3udlzEMgRlsNFKLPJzuJJBadokE60rhfPPkH2jTIh hSJkaFn9lhZoFhP1/mjNK4HcVeZpqsskLmvbSjzzf6WdTYw96Cl90I8OE5rMVyphNo9e 91MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BXjhKFSx; 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 x10-20020a05622a000a00b002f36fe23dd3si117909qtw.15.2022.05.30.09.23.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:23:52 -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=BXjhKFSx; 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]:41714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviBM-0006a1-2Y for patch@linaro.org; Mon, 30 May 2022 12:23:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvO-0002hV-PU for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:23 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:40672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvL-0007BB-Gu for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:22 -0400 Received: by mail-wr1-x42c.google.com with SMTP id k16so10940533wrg.7 for ; Mon, 30 May 2022 09:07:17 -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=VdNkyR5z0XbjA/F5PwkHevb5zlirZdP3cknohAbWffo=; b=BXjhKFSxdj5Vx/YDP8m0Xn9AnbQGp6oBGDLwVbwskwAdJl3PLRHDj0hTdKNAJwJcGI gq3nNyswWKYxkA0SbI/lGHfN+rgttjVwoMsIliKFVgWqbECcEYPlK2X7OMAzZHNYVpGD v2Sp0DObaTskOnyGIpPeSySde5CGwM1UxIk/tC/7pdR+ZGBtI0LEWMJHfQQj6GOZllCX fozM4djx74W7fZeHkHvMtcc0QmN+ZvYGUwkuLST6uSQw/aHk9RFaNUTavsd2G0guMlqg jJH8RFWd4G+1YZVtYO46sEFDzzS7E6tH2aINQaKc9F8u0FaeZ5ITy2OO4aDOXJTp83uC M61w== 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=VdNkyR5z0XbjA/F5PwkHevb5zlirZdP3cknohAbWffo=; b=sALgk/o9exNV3VygSt5IeUdY0VmCXnjF6crlH3Qq1NJpguZtmRNkz9Be10AWA/eLl+ nilpyoCvlSqpaFyL0kwPfe24wWfxvuU7KM3ExrIQ3rxsqhI1Mzn1Am+dYxBtggWrzySn QoORshKvAvve3WrGYzAdgDWSkbNaDwtKXvEM6GA84DMZOrcoJA+D3cuoQ8o6ksAOGRIm fO0l2K134y8iBwdpA6iAke6S4xz5bo+4KBZ2rpb2ofw8mWmjAczvXJDR6er2yHZX1u3C PcKAkta5zOFk3dJPeEr111s4He+jn2jbPjUFhL6bWVftnLwMgI3RbBiDgtilekbGDRPZ lSDA== X-Gm-Message-State: AOAM531T75kBzuoyJPNXvE+5LaP2jsHqFmzmci3Gws3qk8TFNqg8bd1I AdyPa1ZaU2Eye8ZTx+jO9u4U+YfYRMhdhA== X-Received: by 2002:a05:6000:352:b0:210:3509:7364 with SMTP id e18-20020a056000035200b0021035097364mr4720781wre.82.1653926836753; Mon, 30 May 2022 09:07:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 008/117] target/arm: Introduce gen_gvec_ool_arg_zzz Date: Mon, 30 May 2022 17:05:19 +0100 Message-Id: <20220530160708.726466-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 gen_gvec_ool_arg_zzz instead of gen_gvec_ool_zzz when the arguments come from arg_rrr_esz. Replaces do_zzw_ool and do_zzz_data_ool. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-6-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 48 +++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index fd1d749c0ea..37343fb2f06 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -169,6 +169,12 @@ static bool gen_gvec_ool_zzz(DisasContext *s, gen_helper_gvec_3 *fn, return true; } +static bool gen_gvec_ool_arg_zzz(DisasContext *s, gen_helper_gvec_3 *fn, + arg_rrr_esz *a, int data) +{ + return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data); +} + /* Invoke an out-of-line helper on 4 Zregs. */ static void gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int ra, int data) @@ -1177,11 +1183,6 @@ static bool trans_LSL_zzi(DisasContext *s, arg_rri_esz *a) return do_shift_imm(s, a, false, tcg_gen_gvec_shli); } -static bool do_zzw_ool(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) -{ - return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); -} - #define DO_ZZW(NAME, name) \ static bool trans_##NAME##_zzw(DisasContext *s, arg_rrr_esz *a) \ { \ @@ -1189,7 +1190,7 @@ static bool trans_##NAME##_zzw(DisasContext *s, arg_rrr_esz *a) \ gen_helper_sve_##name##_zzw_b, gen_helper_sve_##name##_zzw_h, \ gen_helper_sve_##name##_zzw_s, NULL \ }; \ - return do_zzw_ool(s, a, fns[a->esz]); \ + return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); \ } DO_ZZW(ASR, asr) @@ -1387,7 +1388,7 @@ static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) gen_helper_sve_ftssel_s, gen_helper_sve_ftssel_d, }; - return gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); + return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); } /* @@ -2417,7 +2418,7 @@ static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) gen_helper_sve_tbl_b, gen_helper_sve_tbl_h, gen_helper_sve_tbl_s, gen_helper_sve_tbl_d }; - return gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); + return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); } static bool trans_TBL_sve2(DisasContext *s, arg_rrr_esz *a) @@ -2447,7 +2448,7 @@ static bool trans_TBX(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); + return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); } static bool trans_UNPK(DisasContext *s, arg_UNPK *a) @@ -2599,12 +2600,6 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high) return true; } -static bool do_zzz_data_ool(DisasContext *s, arg_rrr_esz *a, int data, - gen_helper_gvec_3 *fn) -{ - return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data); -} - static bool trans_ZIP1_z(DisasContext *s, arg_rrr_esz *a) { return do_zip(s, a, false); @@ -2648,12 +2643,12 @@ static gen_helper_gvec_3 * const uzp_fns[4] = { static bool trans_UZP1_z(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_data_ool(s, a, 0, uzp_fns[a->esz]); + return gen_gvec_ool_arg_zzz(s, uzp_fns[a->esz], a, 0); } static bool trans_UZP2_z(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_data_ool(s, a, 1 << a->esz, uzp_fns[a->esz]); + return gen_gvec_ool_arg_zzz(s, uzp_fns[a->esz], a, 1 << a->esz); } static bool trans_UZP1_q(DisasContext *s, arg_rrr_esz *a) @@ -2661,7 +2656,7 @@ static bool trans_UZP1_q(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve_f64mm, s)) { return false; } - return do_zzz_data_ool(s, a, 0, gen_helper_sve2_uzp_q); + return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_uzp_q, a, 0); } static bool trans_UZP2_q(DisasContext *s, arg_rrr_esz *a) @@ -2669,7 +2664,7 @@ static bool trans_UZP2_q(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve_f64mm, s)) { return false; } - return do_zzz_data_ool(s, a, 16, gen_helper_sve2_uzp_q); + return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_uzp_q, a, 16); } static gen_helper_gvec_3 * const trn_fns[4] = { @@ -2679,12 +2674,12 @@ static gen_helper_gvec_3 * const trn_fns[4] = { static bool trans_TRN1_z(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_data_ool(s, a, 0, trn_fns[a->esz]); + return gen_gvec_ool_arg_zzz(s, trn_fns[a->esz], a, 0); } static bool trans_TRN2_z(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_data_ool(s, a, 1 << a->esz, trn_fns[a->esz]); + return gen_gvec_ool_arg_zzz(s, trn_fns[a->esz], a, 1 << a->esz); } static bool trans_TRN1_q(DisasContext *s, arg_rrr_esz *a) @@ -2692,7 +2687,7 @@ static bool trans_TRN1_q(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve_f64mm, s)) { return false; } - return do_zzz_data_ool(s, a, 0, gen_helper_sve2_trn_q); + return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_trn_q, a, 0); } static bool trans_TRN2_q(DisasContext *s, arg_rrr_esz *a) @@ -2700,7 +2695,7 @@ static bool trans_TRN2_q(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve_f64mm, s)) { return false; } - return do_zzz_data_ool(s, a, 16, gen_helper_sve2_trn_q); + return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_trn_q, a, 16); } /* @@ -6677,7 +6672,7 @@ static bool do_sve2_zzz_ool(DisasContext *s, arg_rrr_esz *a, if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); + return gen_gvec_ool_arg_zzz(s, fn, a, 0); } static bool trans_SMULH_zzz(DisasContext *s, arg_rrr_esz *a) @@ -8355,8 +8350,7 @@ static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt) if (!dc_isar_feature(aa64_sve2_aes, s)) { return false; } - return gen_gvec_ool_zzz(s, gen_helper_crypto_aese, - a->rd, a->rn, a->rm, decrypt); + return gen_gvec_ool_arg_zzz(s, gen_helper_crypto_aese, a, decrypt); } static bool trans_AESE(DisasContext *s, arg_rrr_esz *a) @@ -8374,7 +8368,7 @@ static bool do_sm4(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) if (!dc_isar_feature(aa64_sve2_sm4, s)) { return false; } - return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); + return gen_gvec_ool_arg_zzz(s, fn, a, 0); } static bool trans_SM4E(DisasContext *s, arg_rrr_esz *a) From patchwork Mon May 30 16:05:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577208 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp389932mag; Mon, 30 May 2022 09:29:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBYYswPNtWZ6nsEdx5M5K+1u5aGE4aPStA9XKHpS2qKBlqqEWJ7ctyWtNCQWXbFiaJrg0p X-Received: by 2002:ae9:ef4e:0:b0:6a3:6b85:3e5f with SMTP id d75-20020ae9ef4e000000b006a36b853e5fmr30181776qkg.467.1653928166999; Mon, 30 May 2022 09:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928166; cv=none; d=google.com; s=arc-20160816; b=ErXXFRH/+dHYK9Wl6tM/ZKNAQcdh7gMOAVLr2lJY+6Sqrl1LbKVpxgmlKmiOs+4Qtx 0a8oMJKEFILwKyh0GHdWDz/zJVK/QfUueGfA1xfV1OLGwZuzWbcMTJNrKvNUKj6RUS7S Dw2pd2n/eLliEkjpPcMLwW8OykeJGUw+anI0il0MmMhj8Gfdb7f/6/QGnjVK6s8Y5iHO WJiDUovnXlb77gOsUqQk4Vkx6Xf6mY5yzpR4a0oPFh759L/ef/R8zeotrHlSUX43t8d4 vtXEC9DpMw5C7zaRtX77hjKx8sXk2ZHX1FfGpPD4n/8v2T+zul0fnD6Lw5QvW8bdZmxM GHKw== 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=zNyAuUTx6ihD+ndHDyTUrccqNI71FACMJ8QqtsYFuVc=; b=QOVqJaTYCbSKxlXOMw0hRytIWvS6iVMsOe2VtrrIb3IfQfrUhgTXrhOABNK1Tikojt XBlZS7k0sfwkkHJJoYH/YW+wLXqsS4yGABwJxFG+9KXbiSoQLc34e+cjZiHMW7QIkZRS fLRErqIEFLu2AHP8RTPi0Diatb80gheuK8v7fAo1pB3EajLDVM/HKn/Xdi4PF1Fd+IVN 9mjERwt6jDknJWZASf4g8QC0EVKWX3mtL66EahmPYOi4vMNx237NNXUMVJWj+PQWSfY3 kEJHlOclxYPyIQVyI1mYGhmbnkPr7XsZ53/sZIfFJyvO7dxUr+oOZjLz27gFtmrraFsZ LpMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Exz8VVru; 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 j14-20020a05620a410e00b006a5a3ceeb00si9410441qko.753.2022.05.30.09.29.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:29:26 -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=Exz8VVru; 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]:55742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviGj-0007o0-Hu for patch@linaro.org; Mon, 30 May 2022 12:29:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvO-0002hW-Ru for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:23 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:34549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvL-0007BE-KW for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:22 -0400 Received: by mail-wr1-x436.google.com with SMTP id e2so15314806wrc.1 for ; Mon, 30 May 2022 09:07:18 -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=zNyAuUTx6ihD+ndHDyTUrccqNI71FACMJ8QqtsYFuVc=; b=Exz8VVruC8flJi1B6aQozGecSHInkNjxYCOBbb9Yqh//kvb/c6NitrzJK/yDmUY1MK B8CS5kccnhSlAboJ0Ncbr8nixc96/BQUAUPwopJc70EWk1ENwtiX4lUc3jKDwcbbisQE HAxW19hMJGZHt3IJgDGTWAsgNRnfNZYAln2Sk+wItsAnuEn3ZSCIcDE1FYYEQ0FnNuSQ xtv0itFQPWI3s6goWR/zFt21DyOkz1JC/S5Pw2SRwYgQ4a8sOVKDOoLaI6B3PR4nxxPn 5Ot8bqj58NHyxfNuDaAzJVAk7C+VIgVLWkH9/Pi26GLDUQMAB9xliufpGVJUtQH1AewK uoGw== 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=zNyAuUTx6ihD+ndHDyTUrccqNI71FACMJ8QqtsYFuVc=; b=ltSQmK5Z07bZBuJ74b7BHn74xFSDs7x0p215TZjJb/hWlPNdr7bD8d6GzP9SbLY8NT 3xx25vIJT+j4Qx6LN0yoU76+cq7Q8SbP26Y2z6hqGTWEE6pYAfugKhrz5p5eMIOAx2cB cCzXByDsdmz2ZibogduojBoOtSEH/aExIM/C/pRXzmRU2YLL0daHmC7Yls/hiuqyaIea /jYeVxox1w9EN/Gd2wT7EuggVnF/cV94Y75V9M1BQIH75AFh1RCsl5M7VPOxy1+Pqm41 kKSA1Se2yDh1Bd9RzmuzP0OeN+ybsUmX3WyusLsinIxvqImItWAgHrX7f7kA8N+ds3+e RSbA== X-Gm-Message-State: AOAM532sRZ1unJdumVD+XvYETYHtRzlLP3Jrgyv2VTegu6MynBw73ctX TSKbWfeGN+DFb19zkwkiFuxwd27FxFH3Bg== X-Received: by 2002:a5d:58c2:0:b0:210:2baa:52b8 with SMTP id o2-20020a5d58c2000000b002102baa52b8mr8195753wrf.20.1653926837617; Mon, 30 May 2022 09:07:17 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:17 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 009/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz Date: Mon, 30 May 2022 17:05:20 +0100 Message-Id: <20220530160708.726466-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using gen_gvec_ool_arg_zzz to TRANS_FEAT. Remove trivial wrappers do_aese, do_sm4. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-7-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 165 ++++++++++--------------------------- 1 file changed, 45 insertions(+), 120 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 37343fb2f06..c89c25166c3 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1184,18 +1184,16 @@ static bool trans_LSL_zzi(DisasContext *s, arg_rri_esz *a) } #define DO_ZZW(NAME, name) \ -static bool trans_##NAME##_zzw(DisasContext *s, arg_rrr_esz *a) \ -{ \ - static gen_helper_gvec_3 * const fns[4] = { \ + static gen_helper_gvec_3 * const name##_zzw_fns[4] = { \ gen_helper_sve_##name##_zzw_b, gen_helper_sve_##name##_zzw_h, \ gen_helper_sve_##name##_zzw_s, NULL \ }; \ - return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); \ -} + TRANS_FEAT(NAME, aa64_sve, gen_gvec_ool_arg_zzz, \ + name##_zzw_fns[a->esz], a, 0) -DO_ZZW(ASR, asr) -DO_ZZW(LSR, lsr) -DO_ZZW(LSL, lsl) +DO_ZZW(ASR_zzw, asr) +DO_ZZW(LSR_zzw, lsr) +DO_ZZW(LSL_zzw, lsl) #undef DO_ZZW @@ -1380,16 +1378,11 @@ static gen_helper_gvec_2 * const fexpa_fns[4] = { TRANS_FEAT(FEXPA, aa64_sve, gen_gvec_ool_zz, fexpa_fns[a->esz], a->rd, a->rn, 0) -static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - gen_helper_sve_ftssel_h, - gen_helper_sve_ftssel_s, - gen_helper_sve_ftssel_d, - }; - return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const ftssel_fns[4] = { + NULL, gen_helper_sve_ftssel_h, + gen_helper_sve_ftssel_s, gen_helper_sve_ftssel_d, +}; +TRANS_FEAT(FTSSEL, aa64_sve, gen_gvec_ool_arg_zzz, ftssel_fns[a->esz], a, 0) /* *** SVE Predicate Logical Operations Group @@ -2412,14 +2405,11 @@ static gen_helper_gvec_2 * const rev_fns[4] = { }; TRANS_FEAT(REV_v, aa64_sve, gen_gvec_ool_zz, rev_fns[a->esz], a->rd, a->rn, 0) -static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_tbl_b, gen_helper_sve_tbl_h, - gen_helper_sve_tbl_s, gen_helper_sve_tbl_d - }; - return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const sve_tbl_fns[4] = { + gen_helper_sve_tbl_b, gen_helper_sve_tbl_h, + gen_helper_sve_tbl_s, gen_helper_sve_tbl_d +}; +TRANS_FEAT(TBL, aa64_sve, gen_gvec_ool_arg_zzz, sve_tbl_fns[a->esz], a, 0) static bool trans_TBL_sve2(DisasContext *s, arg_rrr_esz *a) { @@ -2438,18 +2428,11 @@ static bool trans_TBL_sve2(DisasContext *s, arg_rrr_esz *a) return true; } -static bool trans_TBX(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_tbx_b, gen_helper_sve2_tbx_h, - gen_helper_sve2_tbx_s, gen_helper_sve2_tbx_d - }; - - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const tbx_fns[4] = { + gen_helper_sve2_tbx_b, gen_helper_sve2_tbx_h, + gen_helper_sve2_tbx_s, gen_helper_sve2_tbx_d +}; +TRANS_FEAT(TBX, aa64_sve2, gen_gvec_ool_arg_zzz, tbx_fns[a->esz], a, 0) static bool trans_UNPK(DisasContext *s, arg_UNPK *a) { @@ -2641,62 +2624,30 @@ static gen_helper_gvec_3 * const uzp_fns[4] = { gen_helper_sve_uzp_s, gen_helper_sve_uzp_d, }; -static bool trans_UZP1_z(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_ool_arg_zzz(s, uzp_fns[a->esz], a, 0); -} +TRANS_FEAT(UZP1_z, aa64_sve, gen_gvec_ool_arg_zzz, + uzp_fns[a->esz], a, 0) +TRANS_FEAT(UZP2_z, aa64_sve, gen_gvec_ool_arg_zzz, + uzp_fns[a->esz], a, 1 << a->esz) -static bool trans_UZP2_z(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_ool_arg_zzz(s, uzp_fns[a->esz], a, 1 << a->esz); -} - -static bool trans_UZP1_q(DisasContext *s, arg_rrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_f64mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_uzp_q, a, 0); -} - -static bool trans_UZP2_q(DisasContext *s, arg_rrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_f64mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_uzp_q, a, 16); -} +TRANS_FEAT(UZP1_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, + gen_helper_sve2_uzp_q, a, 0) +TRANS_FEAT(UZP2_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, + gen_helper_sve2_uzp_q, a, 16) static gen_helper_gvec_3 * const trn_fns[4] = { gen_helper_sve_trn_b, gen_helper_sve_trn_h, gen_helper_sve_trn_s, gen_helper_sve_trn_d, }; -static bool trans_TRN1_z(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_ool_arg_zzz(s, trn_fns[a->esz], a, 0); -} +TRANS_FEAT(TRN1_z, aa64_sve, gen_gvec_ool_arg_zzz, + trn_fns[a->esz], a, 0) +TRANS_FEAT(TRN2_z, aa64_sve, gen_gvec_ool_arg_zzz, + trn_fns[a->esz], a, 1 << a->esz) -static bool trans_TRN2_z(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_ool_arg_zzz(s, trn_fns[a->esz], a, 1 << a->esz); -} - -static bool trans_TRN1_q(DisasContext *s, arg_rrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_f64mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_trn_q, a, 0); -} - -static bool trans_TRN2_q(DisasContext *s, arg_rrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_f64mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_trn_q, a, 16); -} +TRANS_FEAT(TRN1_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, + gen_helper_sve2_trn_q, a, 0) +TRANS_FEAT(TRN2_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, + gen_helper_sve2_trn_q, a, 16) /* *** SVE Permute Vector - Predicated Group @@ -8345,41 +8296,15 @@ static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) TRANS_FEAT(AESMC, aa64_sve2_aes, gen_gvec_ool_zz, gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt) -static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt) -{ - if (!dc_isar_feature(aa64_sve2_aes, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, gen_helper_crypto_aese, a, decrypt); -} +TRANS_FEAT(AESE, aa64_sve2_aes, gen_gvec_ool_arg_zzz, + gen_helper_crypto_aese, a, false) +TRANS_FEAT(AESD, aa64_sve2_aes, gen_gvec_ool_arg_zzz, + gen_helper_crypto_aese, a, true) -static bool trans_AESE(DisasContext *s, arg_rrr_esz *a) -{ - return do_aese(s, a, false); -} - -static bool trans_AESD(DisasContext *s, arg_rrr_esz *a) -{ - return do_aese(s, a, true); -} - -static bool do_sm4(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) -{ - if (!dc_isar_feature(aa64_sve2_sm4, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, fn, a, 0); -} - -static bool trans_SM4E(DisasContext *s, arg_rrr_esz *a) -{ - return do_sm4(s, a, gen_helper_crypto_sm4e); -} - -static bool trans_SM4EKEY(DisasContext *s, arg_rrr_esz *a) -{ - return do_sm4(s, a, gen_helper_crypto_sm4ekey); -} +TRANS_FEAT(SM4E, aa64_sve2_sm4, gen_gvec_ool_arg_zzz, + gen_helper_crypto_sm4e, a, 0) +TRANS_FEAT(SM4EKEY, aa64_sve2_sm4, gen_gvec_ool_arg_zzz, + gen_helper_crypto_sm4ekey, a, 0) static bool trans_RAX1(DisasContext *s, arg_rrr_esz *a) { From patchwork Mon May 30 16:05:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577199 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp384925mag; Mon, 30 May 2022 09:22:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZgdn/RjKRQEVmXBhVefwpNGyYAWdyKdt+2Q9eBHOrX66b/dQ+e+kS7YJgetu/wy1w3Su6 X-Received: by 2002:a05:620a:14ac:b0:6a3:77d0:ab43 with SMTP id x12-20020a05620a14ac00b006a377d0ab43mr27560820qkj.732.1653927736448; Mon, 30 May 2022 09:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927736; cv=none; d=google.com; s=arc-20160816; b=AxGslqBSnWbuLne/0b5CaxXMyYIT7xgls10hlWL79AFL7+4bm7HGW9qgDaEWOPXJA7 eChCWiN/6Hzom865Ixw3iS5tW4wfClnd3tjxvChvqMNGYx6ESYC3UKnl0++1g/6/LZG+ /nb8yYHNxYxanhCOFMx9vYG0+ddn9To3c3FnZTQO5NnMggO4BoQaGWCtlbZ61QcMkM70 VRUhsbvnDn9syVYrSFrHB9kR4Bn1nTTdc1Tzy/UTH/to4jS26mZFerspc5/SQwnoCv6l 3rWQTb3JhIiW73Q8HCDSNTCzQWowDvHXUhasP8imFFxFnRWDEplI7GCoJbhTv5qXMKEz flqg== 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=9CzY0zw48B06TS4ojQ0QWMwIQnZzNT7tYdJ0jpRgrIM=; b=FzVqyQ/rY6iBihDmFcame67Tbu81tKRNjwN//edWSuiIj/JKQ6p1FSaXvnhq2aXV7y M32OsH7V928nciCiI85vGCxb2RT0rUTlgVNrqboklffxi8mEBSaHVnQH5NKJoHp6fSaS 2CLISTiAcNUJyafSoCOv3gN81qPVWgGnB5yhvp8Qaxj6UMlU9ScJo7zqHw34rSfJYJDu tQBq3mkBJwVYVDEROOKA/lTDkAYZu26N93Zh9rVcGL2ROsMvE/X9bAl1+aDkyQCl7QyR tADHK5VhbcDnlDxbaVF/6oTsKWfSEQq2HDaESutCN7VQtAwdlZXHbwCb++KZRweNHvBB b2TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CWZbRgKP; 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 d20-20020ac85d94000000b002f9158436d5si7896722qtx.78.2022.05.30.09.22.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:22:16 -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=CWZbRgKP; 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]:36120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvi9o-0002nT-0P for patch@linaro.org; Mon, 30 May 2022 12:22:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvO-0002hU-M2 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:23 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvL-0007BN-Oe for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:22 -0400 Received: by mail-wr1-x42a.google.com with SMTP id t6so15296903wra.4 for ; Mon, 30 May 2022 09:07:19 -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=9CzY0zw48B06TS4ojQ0QWMwIQnZzNT7tYdJ0jpRgrIM=; b=CWZbRgKP33MDSkb7tTXUEroHC5ZXiQQoCRRqUmFj4ur29fKX0G3HfKzz+4fzBk+jYl /dYQWHZjyzzQdtZ5RKOyxlGqDqGBQKW77uaSJQi1iUjigHepuZMEhz4YFvXZKyxlQxo6 QVBOIZd7daM3bqMzXi1eTkucs4gPrsew/Gg4FXhDV28X9INHeL4WebyRIqsLgYphuBk/ t44Gebp8UGVdyRZOZGnRg/d8wh7VeZLLhVDBUGwD96/DTED8Hx+gKeg7SaV3mRCQZ9Wp NZuAi1r+n5pQeLmAPf8HevAabSz6C1H0cKcTlJOC79hEoHEYdlucyfopn3euFy/wsNTl mPQA== 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=9CzY0zw48B06TS4ojQ0QWMwIQnZzNT7tYdJ0jpRgrIM=; b=lC3dgweNFnmI2gn1nwr7s8j1S9Bin65939tkoUuPbXsbjoWgLekn71OYv5u1EmDBgS 8HE2SUkMuReuQ97J8P6SaT2+z7amDeGAzKT9i+NR/CcRSRP7sLEyIKlGVfS8Uzf5PUEe 4S6/B1AufUgiFVV33g3Xfd75YeZW55DDCKzPlObVxSg7haVq/CKgrmfBLF91GN2E3OSe SLXXvqfMpour1+tR/JZkMb2LsLhBG3uhQK3n5L138dT2NNeVVozBXmAPEp2sxsftsmGP /kqjkgcZMDbzrAIg5dtxus5O5pg5M+c+zEwwTxDbLNuEcN5gFICCeWtR8GbhF44eQYbH aaUw== X-Gm-Message-State: AOAM530fiyDMbQ+QAeQC4wPpkV15mpXxofNrqFdfG8r0PMdzitxy5j3H bq+b4BoJWsoS/04kPL6IYfJrS/n30dOThw== X-Received: by 2002:a5d:5150:0:b0:210:1d71:3dcb with SMTP id u16-20020a5d5150000000b002101d713dcbmr13140122wrt.412.1653926838416; Mon, 30 May 2022 09:07:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 010/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_ool Date: Mon, 30 May 2022 17:05:21 +0100 Message-Id: <20220530160708.726466-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zzz_ool to use TRANS_FEAT and gen_gvec_ool_arg_zzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-8-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 88 ++++++++++++++------------------------ 1 file changed, 31 insertions(+), 57 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c89c25166c3..6ec996e7f2c 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6617,55 +6617,36 @@ static bool trans_MUL_zzz(DisasContext *s, arg_rrr_esz *a) return true; } -static bool do_sve2_zzz_ool(DisasContext *s, arg_rrr_esz *a, - gen_helper_gvec_3 *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, fn, a, 0); -} +static gen_helper_gvec_3 * const smulh_zzz_fns[4] = { + gen_helper_gvec_smulh_b, gen_helper_gvec_smulh_h, + gen_helper_gvec_smulh_s, gen_helper_gvec_smulh_d, +}; +TRANS_FEAT(SMULH_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + smulh_zzz_fns[a->esz], a, 0) -static bool trans_SMULH_zzz(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_gvec_smulh_b, gen_helper_gvec_smulh_h, - gen_helper_gvec_smulh_s, gen_helper_gvec_smulh_d, - }; - return do_sve2_zzz_ool(s, a, fns[a->esz]); -} +static gen_helper_gvec_3 * const umulh_zzz_fns[4] = { + gen_helper_gvec_umulh_b, gen_helper_gvec_umulh_h, + gen_helper_gvec_umulh_s, gen_helper_gvec_umulh_d, +}; +TRANS_FEAT(UMULH_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + umulh_zzz_fns[a->esz], a, 0) -static bool trans_UMULH_zzz(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_gvec_umulh_b, gen_helper_gvec_umulh_h, - gen_helper_gvec_umulh_s, gen_helper_gvec_umulh_d, - }; - return do_sve2_zzz_ool(s, a, fns[a->esz]); -} +TRANS_FEAT(PMUL_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + gen_helper_gvec_pmul_b, a, 0) -static bool trans_PMUL_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return do_sve2_zzz_ool(s, a, gen_helper_gvec_pmul_b); -} +static gen_helper_gvec_3 * const sqdmulh_zzz_fns[4] = { + gen_helper_sve2_sqdmulh_b, gen_helper_sve2_sqdmulh_h, + gen_helper_sve2_sqdmulh_s, gen_helper_sve2_sqdmulh_d, +}; +TRANS_FEAT(SQDMULH_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + sqdmulh_zzz_fns[a->esz], a, 0) -static bool trans_SQDMULH_zzz(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_sqdmulh_b, gen_helper_sve2_sqdmulh_h, - gen_helper_sve2_sqdmulh_s, gen_helper_sve2_sqdmulh_d, - }; - return do_sve2_zzz_ool(s, a, fns[a->esz]); -} - -static bool trans_SQRDMULH_zzz(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_sqrdmulh_b, gen_helper_sve2_sqrdmulh_h, - gen_helper_sve2_sqrdmulh_s, gen_helper_sve2_sqrdmulh_d, - }; - return do_sve2_zzz_ool(s, a, fns[a->esz]); -} +static gen_helper_gvec_3 * const sqrdmulh_zzz_fns[4] = { + gen_helper_sve2_sqrdmulh_b, gen_helper_sve2_sqrdmulh_h, + gen_helper_sve2_sqrdmulh_s, gen_helper_sve2_sqrdmulh_d, +}; +TRANS_FEAT(SQRDMULH_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + sqrdmulh_zzz_fns[a->esz], a, 0) /* * SVE2 Integer - Predicated @@ -7964,14 +7945,12 @@ static bool trans_UQRSHRNT(DisasContext *s, arg_rri_esz *a) } #define DO_SVE2_ZZZ_NARROW(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ -{ \ - static gen_helper_gvec_3 * const fns[4] = { \ + static gen_helper_gvec_3 * const name##_fns[4] = { \ NULL, gen_helper_sve2_##name##_h, \ gen_helper_sve2_##name##_s, gen_helper_sve2_##name##_d, \ }; \ - return do_sve2_zzz_ool(s, a, fns[a->esz]); \ -} + TRANS_FEAT(NAME, aa64_sve2, gen_gvec_ool_arg_zzz, \ + name##_fns[a->esz], a, 0) DO_SVE2_ZZZ_NARROW(ADDHNB, addhnb) DO_SVE2_ZZZ_NARROW(ADDHNT, addhnt) @@ -8016,13 +7995,8 @@ static bool trans_HISTCNT(DisasContext *s, arg_rprr_esz *a) return do_sve2_zpzz_ool(s, a, fns[a->esz - 2]); } -static bool trans_HISTSEG(DisasContext *s, arg_rrr_esz *a) -{ - if (a->esz != 0) { - return false; - } - return do_sve2_zzz_ool(s, a, gen_helper_sve2_histseg); -} +TRANS_FEAT(HISTSEG, aa64_sve2, gen_gvec_ool_arg_zzz, + a->esz == 0 ? gen_helper_sve2_histseg : NULL, a, 0) static bool do_sve2_zpzz_fp(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_4_ptr *fn) From patchwork Mon May 30 16:05:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577205 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp387395mag; Mon, 30 May 2022 09:25:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkugwf2UkpdcHWO72XJMyF+8G8HCP9Es6Zej2+R7Hyi4t6bKRb7n689yxGldCn2bwvIU5/ X-Received: by 2002:a05:620a:24cb:b0:6a5:ac26:4819 with SMTP id m11-20020a05620a24cb00b006a5ac264819mr16144506qkn.465.1653927946579; Mon, 30 May 2022 09:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927946; cv=none; d=google.com; s=arc-20160816; b=PYFjGKU8AkgNF6xvQwV7mDZw2loG08uQ2gmvFTAJ5M8i1SDke2YAU3qt+9OAIobt59 Ha4FczP+9dg3spnstqNeriJwoECDrYfYpca/7rJqvqSnC9sen0jHuAFiQot1BaOB+odJ yKYDB7VvdEc16D3VHvkn8rtp0SlTsOacspm6GT46tkvMqCtoKOwHyA0BFtba5vDlzSKc AxeXXng+21iwL05IaI6lhi6UT4oOqVZs+iMrBax5jxgXO6s1vXSyirjd/esXXJfiVPI0 hzbnInc2z5JpFeqb7MeV/yizCijbveCkMztFQxyaeNGTE1yQdveLgDqK+3MIPwW7p1qc xSbQ== 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=+av7Nfa96shW5223AokMt8Y0sDU9JlT7w2ffhuy9fI8=; b=mRhg3qmOOY/d44VGXMVYpu5Vy8AEGba2n+bewrPjqCu1tjEJawXIy0TeYL8MwBnrJO 7Srl8uPhXoNkkBeFqJ+gS4BN/v/bD1UnIfDfmiSs1zTzcn+jGHThpepE4CTWxh8Ttsvd KtNp3aWlqHj8oBfVJIbMIK7rKcNwlH0QOHoz0g0OegrtBAz/2Yi0Ojh0hI9dnltGD3qw tcHRXnSJOdHHsEYM1HJmsrNn2Qyo32P9iprSxSvWEch+f1DP/hooRMX/uMmsKwiFw1CJ XEQjlvUTKr2D7XpZA5zPd7izEol3KeO8/wxrlMkS8IIi5J4PurJttnlvwXLKp6M3MbyB v4jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q8Zen59g; 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 s5-20020a05620a29c500b006a5a691b669si9769268qkp.671.2022.05.30.09.25.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:25:46 -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=q8Zen59g; 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]:47606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviDC-0002C8-0z for patch@linaro.org; Mon, 30 May 2022 12:25:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvP-0002hX-6g for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:23 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvM-0007BT-OT for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:22 -0400 Received: by mail-wm1-x331.google.com with SMTP id 129-20020a1c0287000000b003974edd7c56so5306756wmc.2 for ; Mon, 30 May 2022 09:07:20 -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=+av7Nfa96shW5223AokMt8Y0sDU9JlT7w2ffhuy9fI8=; b=q8Zen59gph0Zzk/+t92brDvop774TFMFUlcnNMtnIsx66kozf2jNe7T5YoQyBEqGqn RJsCEpUTdccGnURT3Wr3jUoN1KK9wwBHuNqvgpxIcgpZQF/LZgsim/+luvfVV+Do2VKL jkIP3O3fCM+2xt7NV/4y9bPWcrPP7fsgZA+wC5bNUy2fP8AgGpXZl1nk2FJ9cC0S1MWg imVGAX8dSOphkcqcgcZlS5GJ52DtF9K/5lEkbThBMOydjhbBS9pz1UdGPVBhvNWX29KY dIq1mZVM/eAQswB9DPPrR/QphhLMHa/gvD5GgD14Q0VSJ+FZD4pnMDosXrs4wSsipjlW LLKw== 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=+av7Nfa96shW5223AokMt8Y0sDU9JlT7w2ffhuy9fI8=; b=CNmXHv1tjCYaCevYnqd287g01+XXtftFAYeEp5q2bqsznX9YBEMVWDQPR/30ylyRKJ 8cvvbvKRSWOdZ4LhUANfx4cNaGJleyFp66TUjZVE8gNA7j0v13autlqjEfjs3jEn8UlG gvJcNwxOVdrhWnMk6H5sIGqHahiinmRTudGXgK5InLdXq6uzKhgpkizg/cEZh6Ljg8wx lBjBVZzJ2QuWbmzj99nQDKgLXnK8JTrM1Ov+cU5cdMuTKIGsT0Z0350zmGRlMFBtBvru 6Hd2n++U23lmXX3aNT2V8uUl9yGasxojywdxhjkfeU3sver8Y0r2bBr7/2zRGLze3lnU Hzcw== X-Gm-Message-State: AOAM532dz/eQNT8y9HP0tEVJ2FCinIlY1SSVBqDOc1jqpHrHHf1i7hh5 +DU6xVEIvc6igS73BtbHnRUQdRs3vTQQcQ== X-Received: by 2002:a7b:c00a:0:b0:397:475b:1ad7 with SMTP id c10-20020a7bc00a000000b00397475b1ad7mr20025824wmb.42.1653926839235; Mon, 30 May 2022 09:07:19 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 011/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzz Date: Mon, 30 May 2022 17:05:22 +0100 Message-Id: <20220530160708.726466-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-9-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 102 ++++++++++++++----------------------- 1 file changed, 38 insertions(+), 64 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6ec996e7f2c..5aaef5b18f6 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -176,15 +176,21 @@ static bool gen_gvec_ool_arg_zzz(DisasContext *s, gen_helper_gvec_3 *fn, } /* Invoke an out-of-line helper on 4 Zregs. */ -static void gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, +static bool gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int ra, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - vec_full_reg_offset(s, ra), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + vec_full_reg_offset(s, ra), + vsz, vsz, data, fn); + } + return true; } /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ @@ -2421,11 +2427,8 @@ static bool trans_TBL_sve2(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, - (a->rn + 1) % 32, a->rm, 0); - } - return true; + return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, + (a->rn + 1) % 32, a->rm, 0); } static gen_helper_gvec_3 * const tbx_fns[4] = { @@ -3813,11 +3816,8 @@ static bool trans_DOT_zzzz(DisasContext *s, arg_DOT_zzzz *a) { gen_helper_gvec_sdot_b, gen_helper_gvec_sdot_h }, { gen_helper_gvec_udot_b, gen_helper_gvec_udot_h } }; - - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fns[a->u][a->sz], a->rd, a->rn, a->rm, a->ra, 0); - } - return true; + return gen_gvec_ool_zzzz(s, fns[a->u][a->sz], + a->rd, a->rn, a->rm, a->ra, 0); } /* @@ -3827,13 +3827,7 @@ static bool trans_DOT_zzzz(DisasContext *s, arg_DOT_zzzz *a) static bool do_zzxz_ool(DisasContext *s, arg_rrxr_esz *a, gen_helper_gvec_4 *fn) { - if (fn == NULL) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, a->index); - } - return true; + return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, a->index); } #define DO_RRXR(NAME, FUNC) \ @@ -7122,13 +7116,10 @@ static bool trans_SQCADD_rot270(DisasContext *s, arg_rrr_esz *a) static bool do_sve2_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, gen_helper_gvec_4 *fn, int data) { - if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) { + if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); - } - return true; + return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); } static bool do_abal(DisasContext *s, arg_rrrr_esz *a, bool uns, bool sel) @@ -8215,24 +8206,21 @@ static bool trans_CMLA_zzzz(DisasContext *s, arg_CMLA_zzzz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, a->rm, a->ra, a->rot); - } - return true; + return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, + a->rm, a->ra, a->rot); } static bool trans_CDOT_zzzz(DisasContext *s, arg_CMLA_zzzz *a) { - if (!dc_isar_feature(aa64_sve2, s) || a->esz < MO_32) { + static gen_helper_gvec_4 * const fns[] = { + NULL, NULL, gen_helper_sve2_cdot_zzzz_s, gen_helper_sve2_cdot_zzzz_d + }; + + if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_helper_gvec_4 *fn = (a->esz == MO_32 - ? gen_helper_sve2_cdot_zzzz_s - : gen_helper_sve2_cdot_zzzz_d); - gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, a->rot); - } - return true; + return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, + a->rm, a->ra, a->rot); } static bool trans_SQRDCMLAH_zzzz(DisasContext *s, arg_SQRDCMLAH_zzzz *a) @@ -8245,10 +8233,8 @@ static bool trans_SQRDCMLAH_zzzz(DisasContext *s, arg_SQRDCMLAH_zzzz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, a->rm, a->ra, a->rot); - } - return true; + return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, + a->rm, a->ra, a->rot); } static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) @@ -8452,10 +8438,7 @@ static bool do_i8mm_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, if (!dc_isar_feature(aa64_sve_i8mm, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); - } - return true; + return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); } static bool trans_SMMLA(DisasContext *s, arg_rrrr_esz *a) @@ -8478,11 +8461,8 @@ static bool trans_BFDOT_zzzz(DisasContext *s, arg_rrrr_esz *a) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, gen_helper_gvec_bfdot, - a->rd, a->rn, a->rm, a->ra, 0); - } - return true; + return gen_gvec_ool_zzzz(s, gen_helper_gvec_bfdot, + a->rd, a->rn, a->rm, a->ra, 0); } static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) @@ -8490,11 +8470,8 @@ static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, gen_helper_gvec_bfdot_idx, - a->rd, a->rn, a->rm, a->ra, a->index); - } - return true; + return gen_gvec_ool_zzzz(s, gen_helper_gvec_bfdot_idx, + a->rd, a->rn, a->rm, a->ra, a->index); } static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a) @@ -8502,11 +8479,8 @@ static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzz(s, gen_helper_gvec_bfmmla, - a->rd, a->rn, a->rm, a->ra, 0); - } - return true; + return gen_gvec_ool_zzzz(s, gen_helper_gvec_bfmmla, + a->rd, a->rn, a->rm, a->ra, 0); } static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) From patchwork Mon May 30 16:05:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577212 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp392837mag; Mon, 30 May 2022 09:33:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSKCz5v8CWGgzeGkBesCN/H2jIKs3d/bx4GyTuM7BkRzecnI20e6iCMHJTX8wijA/9irlo X-Received: by 2002:a05:620a:190a:b0:69c:3ee7:7c8d with SMTP id bj10-20020a05620a190a00b0069c3ee77c8dmr37278966qkb.743.1653928401695; Mon, 30 May 2022 09:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928401; cv=none; d=google.com; s=arc-20160816; b=IVZEQ0oHyUFHTt1D/g90EV6H9acNzIdnkzCTfzPQHt8HydIPc8CCbkfgKLPMxnSFqI ewvIlP6q54AeZcp/zYLGxKXE0TMwbyMlRXvcCZy0Sn0wYpOiumFtP7kXCXmRpePH0hi3 az2xNz+bPhafxFImZOQJGSlyPOykD5BY+hNhxzDKr85dUJ382/IhVIZBtJBaErJ+W8Lg +Nyt7Kg8lmE5VA4TxWArejRtbaMlE5QlLRGXzUXHLyYiDlPSbAxOEyUOXECn2p1aHkPh /PNjMRHzRfiihVBroVxShHVxyt5tsd9hU7U0bPgZSOKk9t9Dsjr6+yDEWzPma5RQ6KC9 GGsw== 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=EJooXvjMt0bio7UJ01BHtEOrjyHn6A1qFvpaAU2Qnps=; b=VfeEB45Qse+WShjOGluoG5JKY/KUL3r2LrI/19pIn8yA1tZGZeBybvOb+EyseTjTqu j+065xrqtftXfFUW38rCoysptDIKkF+Ayv4vBZXjUZp941xhm5pUh0V/0W3o0zPxfjSb i4vZsUMhrNgyFFGkEP6AZtftJ5tqIKG5wbDz/Z/uM5dyW8/Q1RoLJzfKDiuevxHJvhLX 91Wg5Odkc/xWzV0hcVQlf9YWG4T70EMPkvtUWfLUBKSQlpD6HzKgvx9kJb9f5imtgirN F4Al4TtZgI6nRELvUiCCdTseuzkJsd5CbNYCHt2NCh+n6IZgw9dMncobQSDOEmPfQAMt NbTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xc/1zAvH"; 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 h4-20020a379e04000000b006a575482c17si7619807qke.302.2022.05.30.09.33.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:33:21 -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="xc/1zAvH"; 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]:35498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviKX-0005I4-9V for patch@linaro.org; Mon, 30 May 2022 12:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvQ-0002jS-7m for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:24 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvN-0007Be-KQ for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:23 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15257378wrg.12 for ; Mon, 30 May 2022 09:07:21 -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=EJooXvjMt0bio7UJ01BHtEOrjyHn6A1qFvpaAU2Qnps=; b=xc/1zAvHqxeTkHGUQgn3vuk1IOq1HNyA8UtVyyaqJEke/LXegwroFljHO3Loas6eSB yyy2CCZYVHVclO4yUBXTmy62kyczEQqH9RkORCgAOXirSxK2RilCVQOGpLWeySXeN00X 7JYpDHZQvCDyWc/rWzOrTzkeYgA3KYB8WBP/HDr4TX0RC6q0ZLd8fn5yXGnguB9ik5io 3O+WVe6anddZuMlycdLOzMSTqVMVKJqUp62uxNmDe4YD4nT4Z2iP7h2+6Eq4TO2h5GpC +aYl7fvafiGE1eS4xdm7Pd7BQXUjBxitadvnqF6zrhkhx2EjdgivTJk9c9EcIW+GPMur ug9w== 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=EJooXvjMt0bio7UJ01BHtEOrjyHn6A1qFvpaAU2Qnps=; b=WT0J0KQlrZ7DDyIiy1WK2TXdYhFN0XqtPFofmYcoWMhsWWf5QqeZxz1K4A0kvru+Jy qJMJaYfZNsqNTprX2iylxuPdLMmN840BI0xuOgeRAkk6KryRGmIMfSlTNdnMP6sb0TNr JYvJOscBCCydPpAXcV4CnlKO43D264ck8qJwPnzS4PGtumzGiZZIPy1bZek89FD4Tu88 S1Ws58ZqnG4VOopaNpA8+d2FUGXtFH4Fratb/28ashTublvu7632LpPnXKd0EQI2WfYL qzup2uxzJwMUxLPhDTV8EVXVtuDpyQnmY76dqZC/4pz7nfYqAM4gjm83VDOoZm67xxIb 3+QA== X-Gm-Message-State: AOAM533ZUDzqevZoePYaMtWNAIU/zWKt2d86wnoBoEgLUS/Hk4v9TuGu zirBIVpGqCr6NtVLUzKly0tQDkRvD0wCmQ== X-Received: by 2002:a5d:6c66:0:b0:20f:86f3:ea05 with SMTP id r6-20020a5d6c66000000b0020f86f3ea05mr40691288wrz.154.1653926840040; Mon, 30 May 2022 09:07:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:19 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 012/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zzzz Date: Mon, 30 May 2022 17:05:23 +0100 Message-Id: <20220530160708.726466-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions directly using gen_gvec_ool_zzzz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-10-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 89 +++++++++++++------------------------- 1 file changed, 29 insertions(+), 60 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 5aaef5b18f6..823c1d0ae3a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2417,19 +2417,12 @@ static gen_helper_gvec_3 * const sve_tbl_fns[4] = { }; TRANS_FEAT(TBL, aa64_sve, gen_gvec_ool_arg_zzz, sve_tbl_fns[a->esz], a, 0) -static bool trans_TBL_sve2(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_4 * const fns[4] = { - gen_helper_sve2_tbl_b, gen_helper_sve2_tbl_h, - gen_helper_sve2_tbl_s, gen_helper_sve2_tbl_d - }; - - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, - (a->rn + 1) % 32, a->rm, 0); -} +static gen_helper_gvec_4 * const sve2_tbl_fns[4] = { + gen_helper_sve2_tbl_b, gen_helper_sve2_tbl_h, + gen_helper_sve2_tbl_s, gen_helper_sve2_tbl_d +}; +TRANS_FEAT(TBL_sve2, aa64_sve2, gen_gvec_ool_zzzz, sve2_tbl_fns[a->esz], + a->rd, a->rn, (a->rn + 1) % 32, a->rm, 0) static gen_helper_gvec_3 * const tbx_fns[4] = { gen_helper_sve2_tbx_b, gen_helper_sve2_tbx_h, @@ -3810,15 +3803,12 @@ DO_ZZI(UMIN, umin) #undef DO_ZZI -static bool trans_DOT_zzzz(DisasContext *s, arg_DOT_zzzz *a) -{ - static gen_helper_gvec_4 * const fns[2][2] = { - { gen_helper_gvec_sdot_b, gen_helper_gvec_sdot_h }, - { gen_helper_gvec_udot_b, gen_helper_gvec_udot_h } - }; - return gen_gvec_ool_zzzz(s, fns[a->u][a->sz], - a->rd, a->rn, a->rm, a->ra, 0); -} +static gen_helper_gvec_4 * const dot_fns[2][2] = { + { gen_helper_gvec_sdot_b, gen_helper_gvec_sdot_h }, + { gen_helper_gvec_udot_b, gen_helper_gvec_udot_h } +}; +TRANS_FEAT(DOT_zzzz, aa64_sve, gen_gvec_ool_zzzz, + dot_fns[a->u][a->sz], a->rd, a->rn, a->rm, a->ra, 0) /* * SVE Multiply - Indexed @@ -8196,46 +8186,25 @@ static bool trans_UMLSLT_zzzw(DisasContext *s, arg_rrrr_esz *a) return do_umlsl_zzzw(s, a, true); } -static bool trans_CMLA_zzzz(DisasContext *s, arg_CMLA_zzzz *a) -{ - static gen_helper_gvec_4 * const fns[] = { - gen_helper_sve2_cmla_zzzz_b, gen_helper_sve2_cmla_zzzz_h, - gen_helper_sve2_cmla_zzzz_s, gen_helper_sve2_cmla_zzzz_d, - }; +static gen_helper_gvec_4 * const cmla_fns[] = { + gen_helper_sve2_cmla_zzzz_b, gen_helper_sve2_cmla_zzzz_h, + gen_helper_sve2_cmla_zzzz_s, gen_helper_sve2_cmla_zzzz_d, +}; +TRANS_FEAT(CMLA_zzzz, aa64_sve2, gen_gvec_ool_zzzz, + cmla_fns[a->esz], a->rd, a->rn, a->rm, a->ra, a->rot) - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, - a->rm, a->ra, a->rot); -} +static gen_helper_gvec_4 * const cdot_fns[] = { + NULL, NULL, gen_helper_sve2_cdot_zzzz_s, gen_helper_sve2_cdot_zzzz_d +}; +TRANS_FEAT(CDOT_zzzz, aa64_sve2, gen_gvec_ool_zzzz, + cdot_fns[a->esz], a->rd, a->rn, a->rm, a->ra, a->rot) -static bool trans_CDOT_zzzz(DisasContext *s, arg_CMLA_zzzz *a) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, NULL, gen_helper_sve2_cdot_zzzz_s, gen_helper_sve2_cdot_zzzz_d - }; - - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, - a->rm, a->ra, a->rot); -} - -static bool trans_SQRDCMLAH_zzzz(DisasContext *s, arg_SQRDCMLAH_zzzz *a) -{ - static gen_helper_gvec_4 * const fns[] = { - gen_helper_sve2_sqrdcmlah_zzzz_b, gen_helper_sve2_sqrdcmlah_zzzz_h, - gen_helper_sve2_sqrdcmlah_zzzz_s, gen_helper_sve2_sqrdcmlah_zzzz_d, - }; - - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_zzzz(s, fns[a->esz], a->rd, a->rn, - a->rm, a->ra, a->rot); -} +static gen_helper_gvec_4 * const sqrdcmlah_fns[] = { + gen_helper_sve2_sqrdcmlah_zzzz_b, gen_helper_sve2_sqrdcmlah_zzzz_h, + gen_helper_sve2_sqrdcmlah_zzzz_s, gen_helper_sve2_sqrdcmlah_zzzz_d, +}; +TRANS_FEAT(SQRDCMLAH_zzzz, aa64_sve2, gen_gvec_ool_zzzz, + sqrdcmlah_fns[a->esz], a->rd, a->rn, a->rm, a->ra, a->rot) static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) { From patchwork Mon May 30 16:05:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577200 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp384957mag; Mon, 30 May 2022 09:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaRvxBCRf2/gjsgjeh4tyIukGRo5Vcv8NdpNJmHJkpANXNZHk3RpwLZxuCU+lJF6iyAeP2 X-Received: by 2002:a05:6214:4009:b0:464:5bcd:fe74 with SMTP id kd9-20020a056214400900b004645bcdfe74mr1064705qvb.3.1653927738661; Mon, 30 May 2022 09:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927738; cv=none; d=google.com; s=arc-20160816; b=uCG5io9OkCN2/nga9epNFsa0gwn5RnFSy+s9Zm+aojKRCejcCuthJl06KSfbzNcX8x wIPNHtNQqvWTExOyNOmUeUeHkBhQvc+ZLRSfQyS7nplMHkZ6yXgsRiDI6RFaT4Qmv2a1 xkL44V/1CUKCNQSThYBhtZ7IE5Eg2Dpl8pmAlCtK9C84swopqvFD3bXP2FnwyyK9HK36 psaxOsAFmwHWHyrm416lxj2DEQRk7+Qd0Abwr4mfPMvdgpwOw35lGJ1MPCYsv/5brd3x 4BIZvTiJ9Y8cOBM3yLLAYX+fvxe7z9sSFWLnqAOASMCmw4GjuHXcXqzAM2KVIbLzNnqq 8hAQ== 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=6ehhYcgsWzgLa9qGxoVnyglPKrIl8i+RKUk9KpgaKus=; b=Db0UeCy/AQ6vadPJ74bSNx0uqoDHzh1o/6wuo2y/mqrEcP5vZpbzhZjsm3uguNAewG /dP0xdNUjCwxI/fAWB0JN72zZ0QbbxVLYBjqT6faXJkwiwugHWsE+eQiltEUSUmrBNPn G6wmFTTDeZiLRuVTS0wLsOHnEjhhj86m2oIRRPVJqIJ6/nSToWHTaTKW+28PbVfcaHPh oesZ5Wjn2bWnad6pQ/efvGCZUCfc5fE8BS8zNB/N+PEmPNv+PY864Q9KzlRExLZ4wYtm JEjKLdoqiZ2XJP9zb45d8afcSpHJ1lnZlu8HSD4rDHvCYxprCIXOO6yCDKbVe/P/DhfY 8Efw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UCisQSX9; 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 v1-20020ac85781000000b002f38751921bsi7280272qta.9.2022.05.30.09.22.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:22:18 -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=UCisQSX9; 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]:36316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvi9q-0002va-9T for patch@linaro.org; Mon, 30 May 2022 12:22:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvQ-0002jd-AL for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:24 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvO-0007By-Av for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:24 -0400 Received: by mail-wr1-x42f.google.com with SMTP id e2so15315033wrc.1 for ; Mon, 30 May 2022 09:07:21 -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=6ehhYcgsWzgLa9qGxoVnyglPKrIl8i+RKUk9KpgaKus=; b=UCisQSX9r3rzky7Nd1FeBn53Vd0JouvzoOu3WuWpmAOzgN5oB5xcZ1ba8j7nq0xnuA 9SUFlPfwTmlU1RQgqoZWN7E1IEl1RgU5qir1vKOe1a8fai6EgDxd4m1DCRcBT8CJbnBF 6ARbJ4Z3qt+/+h7yG1bzys3Zyjtb0imSk1I9dQk/Zih0N8T3Z9QGDAaS/3vmVJ21SaQi NLpt1bNRiu7SwOMtJKVBcFafWgZZhaS2piklEEQ9W4IAJ3XANd3qL+S8VyqoDASmHYJH NcRj6NT4BLBzj3mfkq/vz0+sQDrGxYdylbnJrZU5XA5SHLyxg+p6xxVFoCGhOwFT/TKl txiA== 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=6ehhYcgsWzgLa9qGxoVnyglPKrIl8i+RKUk9KpgaKus=; b=A/vbKpppmwqmPfnbf3beUwWBRqmpgi3e0+jPjXmJT/21ZK5oRxsykoPvOzKrJfKA/B Kf6giFSo99G2hY6Vam4NRwYMffygNYoAPinnumq7grukHBx7VNiQgTs1c+G2Usp6I9At R6vYvQ7cKX4UuI1LCZZYHrpCOV2To7cZAWQPIT4tt4BYECEc9ST85W2a3vhMpb9fj2Sb MRazGTMLYEKyZe8rdczFxA7uKqSB2b6k4+leZ7RmPOKNUaBoqZB+7FzcjT3EHSECRsut 3wXVEo2umYATRImEq2E/k8HQR+5BQ+iklW17Gl7WrxsVFLi6siVpFZXsoQNwHhyhgVKX oAuw== X-Gm-Message-State: AOAM530qGszOkamoRSCA//fZgQaX8g3Xj/pD3t5J4XcBB2+P1uSHlybO exCS1SmmQEaMM1LQIhsvJtBVxItSf79Qaw== X-Received: by 2002:a5d:6487:0:b0:210:11c5:b10e with SMTP id o7-20020a5d6487000000b0021011c5b10emr17230600wri.657.1653926840822; Mon, 30 May 2022 09:07:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 013/117] target/arm: Introduce gen_gvec_ool_arg_zzzz Date: Mon, 30 May 2022 17:05:24 +0100 Message-Id: <20220530160708.726466-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 gen_gvec_ool_arg_zzzz instead of gen_gvec_ool_zzzz when the arguments come from arg_rrrr_esz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-11-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 823c1d0ae3a..e795baf6f92 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -193,6 +193,12 @@ static bool gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, return true; } +static bool gen_gvec_ool_arg_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, + arg_rrrr_esz *a, int data) +{ + return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); +} + /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ static void gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) @@ -7109,7 +7115,7 @@ static bool do_sve2_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); + return gen_gvec_ool_arg_zzzz(s, fn, a, data); } static bool do_abal(DisasContext *s, arg_rrrr_esz *a, bool uns, bool sel) @@ -8407,7 +8413,7 @@ static bool do_i8mm_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, if (!dc_isar_feature(aa64_sve_i8mm, s)) { return false; } - return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); + return gen_gvec_ool_arg_zzzz(s, fn, a, data); } static bool trans_SMMLA(DisasContext *s, arg_rrrr_esz *a) @@ -8430,8 +8436,7 @@ static bool trans_BFDOT_zzzz(DisasContext *s, arg_rrrr_esz *a) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - return gen_gvec_ool_zzzz(s, gen_helper_gvec_bfdot, - a->rd, a->rn, a->rm, a->ra, 0); + return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfdot, a, 0); } static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) @@ -8448,8 +8453,7 @@ static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - return gen_gvec_ool_zzzz(s, gen_helper_gvec_bfmmla, - a->rd, a->rn, a->rm, a->ra, 0); + return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfmmla, a, 0); } static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) From patchwork Mon May 30 16:05:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577204 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp386819mag; Mon, 30 May 2022 09:24:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf1IgeflfdM9Ldj1AWc63jR16aE2bIX1o6b3f5v++13jdlqyPvexZIitSuJ17y6M+IfUD7 X-Received: by 2002:a05:620a:a4b:b0:6a5:bc8e:221 with SMTP id j11-20020a05620a0a4b00b006a5bc8e0221mr14835258qka.677.1653927898789; Mon, 30 May 2022 09:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927898; cv=none; d=google.com; s=arc-20160816; b=QbjhKmR5i4ROBarCV1WIcHyClWcQxL/aN9eWxNeCMhCkt0DwQAl1xNS7P5MW3ciUo7 TwwVY2PXPVtpKrcbh7/NR2MoSio63tBlNLkN1PxgS5e2dRizX+V1gdGRU0fElvybj/qP oM6aWzFUI36gRe/nu/54jkZ3XFJ80R1OG1p9uxnBuTroGrBuM357GXbVFPyVn5tQq0Nh UKIjyJSCDQo17S+Lb81XqYLcrTMYUJWMIOg34lwhJncOV/S4oz1JCXyB2HXGhvuMNTQ8 bKB5Mqu6eWvlergiZMLpM7+RgT3C3RvXFxfFKULmA98vQsjsDNGZbwSHRpl7GV3KJAAw W24Q== 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=O3L/9QMpX61DzYXZh2zSuMODu8njIKKHvrLP8VuXitE=; b=Rwdxdd1KNqo3fuVKgJcg7IsM1sIn29BbN/4mJjcagJdRMHEkKli896OEaBZbiJD9aw LhkO0N9DWTNU11W7gXm0xxL2/0nCiZd9fRYZR6f2h3eBjnOqoOR+OhAyKIKSZIBNqVq5 UoH+ETmtqKyp9K6UpuwaKvCMTdkVqWKhfQ/eLEXYU6eCEVueVlwr/veXnnl0xWP/jSti V5xJClp69IBMsuMxRbT/XIk9rZK5SqS//WRZnywq6kLE+FMPtCWAv3OcLNQQOpsbXMs5 e+ImAujRZyiKqLBEam3BEZd4m/MTcav7Swq5/hbSO6fNLTPadoymLvfdqePzA6+Wy/+7 vxcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GjlVSiLq; 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 a9-20020ac85b89000000b002fea6554f28si5248733qta.653.2022.05.30.09.24.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:24:58 -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=GjlVSiLq; 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]:44400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviCQ-0008QA-BL for patch@linaro.org; Mon, 30 May 2022 12:24:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvR-0002nt-MY for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:25 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:44824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvP-0007DP-4x for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:25 -0400 Received: by mail-wr1-x432.google.com with SMTP id e25so4650957wra.11 for ; Mon, 30 May 2022 09:07:22 -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=O3L/9QMpX61DzYXZh2zSuMODu8njIKKHvrLP8VuXitE=; b=GjlVSiLq3jyGy0kHbLKRmcXNTUeM81cOGCnMDxdiYpkMEyy44OYZX6w6XFuRo3SVNO EwYIXs+820L7wv/dQORZx0V7LNhufN0Sx+d2qFrAP2vLk/NWqZks/MBvK5l6yD+ygFZZ GGuv7p3AENnCgt7io20TX93kO67sT7NrhlP1Ur55JwrHaT6spXa3BxoGB/PeVFuiyHHY acVjsvS4UQ7o3YjcVT45EfSy/8wgVZvmoEmzItE5k4ExCyHcsyJUFQOQUP73CZXypk7l MS2e5UCjlCE9MLjUxlocKwsn3tgUdkx0y4fe2YtqBHAXS+RyS+ihK5nKXsm3osB/BWB6 K2lw== 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=O3L/9QMpX61DzYXZh2zSuMODu8njIKKHvrLP8VuXitE=; b=h1X0mtQI0/BaR2Zj+N/NVrvTq0KqSSl9kMRnIFxw07j57fx+IocweuxEsk9sg+A1jC o4b2izrUj3IfLYwzVyF2UqSCgbDUW0VZML3Ir61hsAU9xRR7+Siu2inZjRezFGcB3FHj Wi8ffbZYb5GwulG2474SoIfSNNWwhlyypiJraeLQQkDG/wKnleZLt0GLprEKCpHpsua4 6JDR2MheXS6zCJ+fEcsAq5lovCp1y/MQhLjUQLS6aSvq8UbtrzGxjC9THBSoDp0dcby4 dLoJle0dVXmB/cUoIorYrRmS9ApaIOPgCIsj4mdrJshLLujNQCuuXaxxd3VWuBwoeQlF piFA== X-Gm-Message-State: AOAM532jFm/Ta7T2Yn0bjMeoCZbQ75I+zeV/2h5wJdPHT4YR5nWb4Kq/ aTm+frxgk42GPrpTqOfeDcMoxfpqe8OVMA== X-Received: by 2002:adf:e0c3:0:b0:20c:5672:9577 with SMTP id m3-20020adfe0c3000000b0020c56729577mr45678896wri.466.1653926841786; Mon, 30 May 2022 09:07:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 014/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool Date: Mon, 30 May 2022 17:05:25 +0100 Message-Id: <20220530160708.726466-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zzzz_ool to use TRANS_FEAT and gen_gvec_ool_arg_zzzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-12-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 263 +++++++++++-------------------------- 1 file changed, 79 insertions(+), 184 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e795baf6f92..cae6df705a4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7109,45 +7109,19 @@ static bool trans_SQCADD_rot270(DisasContext *s, arg_rrr_esz *a) return do_cadd(s, a, true, true); } -static bool do_sve2_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, - gen_helper_gvec_4 *fn, int data) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, fn, a, data); -} +static gen_helper_gvec_4 * const sabal_fns[4] = { + NULL, gen_helper_sve2_sabal_h, + gen_helper_sve2_sabal_s, gen_helper_sve2_sabal_d, +}; +TRANS_FEAT(SABALB, aa64_sve2, gen_gvec_ool_arg_zzzz, sabal_fns[a->esz], a, 0) +TRANS_FEAT(SABALT, aa64_sve2, gen_gvec_ool_arg_zzzz, sabal_fns[a->esz], a, 1) -static bool do_abal(DisasContext *s, arg_rrrr_esz *a, bool uns, bool sel) -{ - static gen_helper_gvec_4 * const fns[2][4] = { - { NULL, gen_helper_sve2_sabal_h, - gen_helper_sve2_sabal_s, gen_helper_sve2_sabal_d }, - { NULL, gen_helper_sve2_uabal_h, - gen_helper_sve2_uabal_s, gen_helper_sve2_uabal_d }, - }; - return do_sve2_zzzz_ool(s, a, fns[uns][a->esz], sel); -} - -static bool trans_SABALB(DisasContext *s, arg_rrrr_esz *a) -{ - return do_abal(s, a, false, false); -} - -static bool trans_SABALT(DisasContext *s, arg_rrrr_esz *a) -{ - return do_abal(s, a, false, true); -} - -static bool trans_UABALB(DisasContext *s, arg_rrrr_esz *a) -{ - return do_abal(s, a, true, false); -} - -static bool trans_UABALT(DisasContext *s, arg_rrrr_esz *a) -{ - return do_abal(s, a, true, true); -} +static gen_helper_gvec_4 * const uabal_fns[4] = { + NULL, gen_helper_sve2_uabal_h, + gen_helper_sve2_uabal_s, gen_helper_sve2_uabal_d, +}; +TRANS_FEAT(UABALB, aa64_sve2, gen_gvec_ool_arg_zzzz, uabal_fns[a->esz], a, 0) +TRANS_FEAT(UABALT, aa64_sve2, gen_gvec_ool_arg_zzzz, uabal_fns[a->esz], a, 1) static bool do_adcl(DisasContext *s, arg_rrrr_esz *a, bool sel) { @@ -7159,18 +7133,11 @@ static bool do_adcl(DisasContext *s, arg_rrrr_esz *a, bool sel) * Note that in this case the ESZ field encodes both size and sign. * Split out 'subtract' into bit 1 of the data field for the helper. */ - return do_sve2_zzzz_ool(s, a, fns[a->esz & 1], (a->esz & 2) | sel); + return gen_gvec_ool_arg_zzzz(s, fns[a->esz & 1], a, (a->esz & 2) | sel); } -static bool trans_ADCLB(DisasContext *s, arg_rrrr_esz *a) -{ - return do_adcl(s, a, false); -} - -static bool trans_ADCLT(DisasContext *s, arg_rrrr_esz *a) -{ - return do_adcl(s, a, true); -} +TRANS_FEAT(ADCLB, aa64_sve2, do_adcl, a, false) +TRANS_FEAT(ADCLT, aa64_sve2, do_adcl, a, true) static bool do_sve2_fn2i(DisasContext *s, arg_rri_esz *a, GVecGen2iFn *fn) { @@ -8048,149 +8015,77 @@ static bool trans_FMMLA(DisasContext *s, arg_rrrr_esz *a) return true; } -static bool do_sqdmlal_zzzw(DisasContext *s, arg_rrrr_esz *a, - bool sel1, bool sel2) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, gen_helper_sve2_sqdmlal_zzzw_h, - gen_helper_sve2_sqdmlal_zzzw_s, gen_helper_sve2_sqdmlal_zzzw_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], (sel2 << 1) | sel1); -} +static gen_helper_gvec_4 * const sqdmlal_zzzw_fns[] = { + NULL, gen_helper_sve2_sqdmlal_zzzw_h, + gen_helper_sve2_sqdmlal_zzzw_s, gen_helper_sve2_sqdmlal_zzzw_d, +}; +TRANS_FEAT(SQDMLALB_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqdmlal_zzzw_fns[a->esz], a, 0) +TRANS_FEAT(SQDMLALT_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqdmlal_zzzw_fns[a->esz], a, 3) +TRANS_FEAT(SQDMLALBT, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqdmlal_zzzw_fns[a->esz], a, 2) -static bool do_sqdmlsl_zzzw(DisasContext *s, arg_rrrr_esz *a, - bool sel1, bool sel2) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, gen_helper_sve2_sqdmlsl_zzzw_h, - gen_helper_sve2_sqdmlsl_zzzw_s, gen_helper_sve2_sqdmlsl_zzzw_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], (sel2 << 1) | sel1); -} +static gen_helper_gvec_4 * const sqdmlsl_zzzw_fns[] = { + NULL, gen_helper_sve2_sqdmlsl_zzzw_h, + gen_helper_sve2_sqdmlsl_zzzw_s, gen_helper_sve2_sqdmlsl_zzzw_d, +}; +TRANS_FEAT(SQDMLSLB_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqdmlsl_zzzw_fns[a->esz], a, 0) +TRANS_FEAT(SQDMLSLT_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqdmlsl_zzzw_fns[a->esz], a, 3) +TRANS_FEAT(SQDMLSLBT, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqdmlsl_zzzw_fns[a->esz], a, 2) -static bool trans_SQDMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sqdmlal_zzzw(s, a, false, false); -} +static gen_helper_gvec_4 * const sqrdmlah_fns[] = { + gen_helper_sve2_sqrdmlah_b, gen_helper_sve2_sqrdmlah_h, + gen_helper_sve2_sqrdmlah_s, gen_helper_sve2_sqrdmlah_d, +}; +TRANS_FEAT(SQRDMLAH_zzzz, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqrdmlah_fns[a->esz], a, 0) -static bool trans_SQDMLALT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sqdmlal_zzzw(s, a, true, true); -} +static gen_helper_gvec_4 * const sqrdmlsh_fns[] = { + gen_helper_sve2_sqrdmlsh_b, gen_helper_sve2_sqrdmlsh_h, + gen_helper_sve2_sqrdmlsh_s, gen_helper_sve2_sqrdmlsh_d, +}; +TRANS_FEAT(SQRDMLSH_zzzz, aa64_sve2, gen_gvec_ool_arg_zzzz, + sqrdmlsh_fns[a->esz], a, 0) -static bool trans_SQDMLALBT(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sqdmlal_zzzw(s, a, false, true); -} +static gen_helper_gvec_4 * const smlal_zzzw_fns[] = { + NULL, gen_helper_sve2_smlal_zzzw_h, + gen_helper_sve2_smlal_zzzw_s, gen_helper_sve2_smlal_zzzw_d, +}; +TRANS_FEAT(SMLALB_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + smlal_zzzw_fns[a->esz], a, 0) +TRANS_FEAT(SMLALT_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + smlal_zzzw_fns[a->esz], a, 1) -static bool trans_SQDMLSLB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sqdmlsl_zzzw(s, a, false, false); -} +static gen_helper_gvec_4 * const umlal_zzzw_fns[] = { + NULL, gen_helper_sve2_umlal_zzzw_h, + gen_helper_sve2_umlal_zzzw_s, gen_helper_sve2_umlal_zzzw_d, +}; +TRANS_FEAT(UMLALB_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + umlal_zzzw_fns[a->esz], a, 0) +TRANS_FEAT(UMLALT_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + umlal_zzzw_fns[a->esz], a, 1) -static bool trans_SQDMLSLT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sqdmlsl_zzzw(s, a, true, true); -} +static gen_helper_gvec_4 * const smlsl_zzzw_fns[] = { + NULL, gen_helper_sve2_smlsl_zzzw_h, + gen_helper_sve2_smlsl_zzzw_s, gen_helper_sve2_smlsl_zzzw_d, +}; +TRANS_FEAT(SMLSLB_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + smlsl_zzzw_fns[a->esz], a, 0) +TRANS_FEAT(SMLSLT_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + smlsl_zzzw_fns[a->esz], a, 1) -static bool trans_SQDMLSLBT(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sqdmlsl_zzzw(s, a, false, true); -} - -static bool trans_SQRDMLAH_zzzz(DisasContext *s, arg_rrrr_esz *a) -{ - static gen_helper_gvec_4 * const fns[] = { - gen_helper_sve2_sqrdmlah_b, gen_helper_sve2_sqrdmlah_h, - gen_helper_sve2_sqrdmlah_s, gen_helper_sve2_sqrdmlah_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], 0); -} - -static bool trans_SQRDMLSH_zzzz(DisasContext *s, arg_rrrr_esz *a) -{ - static gen_helper_gvec_4 * const fns[] = { - gen_helper_sve2_sqrdmlsh_b, gen_helper_sve2_sqrdmlsh_h, - gen_helper_sve2_sqrdmlsh_s, gen_helper_sve2_sqrdmlsh_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], 0); -} - -static bool do_smlal_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, gen_helper_sve2_smlal_zzzw_h, - gen_helper_sve2_smlal_zzzw_s, gen_helper_sve2_smlal_zzzw_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], sel); -} - -static bool trans_SMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_smlal_zzzw(s, a, false); -} - -static bool trans_SMLALT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_smlal_zzzw(s, a, true); -} - -static bool do_umlal_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, gen_helper_sve2_umlal_zzzw_h, - gen_helper_sve2_umlal_zzzw_s, gen_helper_sve2_umlal_zzzw_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], sel); -} - -static bool trans_UMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_umlal_zzzw(s, a, false); -} - -static bool trans_UMLALT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_umlal_zzzw(s, a, true); -} - -static bool do_smlsl_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, gen_helper_sve2_smlsl_zzzw_h, - gen_helper_sve2_smlsl_zzzw_s, gen_helper_sve2_smlsl_zzzw_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], sel); -} - -static bool trans_SMLSLB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_smlsl_zzzw(s, a, false); -} - -static bool trans_SMLSLT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_smlsl_zzzw(s, a, true); -} - -static bool do_umlsl_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) -{ - static gen_helper_gvec_4 * const fns[] = { - NULL, gen_helper_sve2_umlsl_zzzw_h, - gen_helper_sve2_umlsl_zzzw_s, gen_helper_sve2_umlsl_zzzw_d, - }; - return do_sve2_zzzz_ool(s, a, fns[a->esz], sel); -} - -static bool trans_UMLSLB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_umlsl_zzzw(s, a, false); -} - -static bool trans_UMLSLT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_umlsl_zzzw(s, a, true); -} +static gen_helper_gvec_4 * const umlsl_zzzw_fns[] = { + NULL, gen_helper_sve2_umlsl_zzzw_h, + gen_helper_sve2_umlsl_zzzw_s, gen_helper_sve2_umlsl_zzzw_d, +}; +TRANS_FEAT(UMLSLB_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + umlsl_zzzw_fns[a->esz], a, 0) +TRANS_FEAT(UMLSLT_zzzw, aa64_sve2, gen_gvec_ool_arg_zzzz, + umlsl_zzzw_fns[a->esz], a, 1) static gen_helper_gvec_4 * const cmla_fns[] = { gen_helper_sve2_cmla_zzzz_b, gen_helper_sve2_cmla_zzzz_h, From patchwork Mon May 30 16:05:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577216 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp395577mag; Mon, 30 May 2022 09:37:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs0jKemIsVsE9I2FhAr4sXcqHqAwLUN/wZ1W+AF+qzbaDG0Ly5T7EVJ2ym0kx2jw/9c+oG X-Received: by 2002:a37:6804:0:b0:6a6:49ad:79ca with SMTP id d4-20020a376804000000b006a649ad79camr1324168qkc.264.1653928632922; Mon, 30 May 2022 09:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928632; cv=none; d=google.com; s=arc-20160816; b=pOQLYEWCZJJkacARHete50/Q4qBoRVMcpPipOyBadjMceuKGFaFljCezDr20F01yBS Qjkz1cU9TOPilSa9vPNu4g7MwoPD4x6S6O+PpBKewgrctg0bxD0DgUct7M+lHDfyMNLx IqkTg+WUboU8x+jZRPvLRUZqlZQ7rPhLH1dmhTec1trDEZLw7yF2vCmYI7fdKxMpp78j GIn5dCISrUG/+lYb14RPmfm/Zv6ujG+DMU8WLG5fXtNxCnoaHLBl/EMbyta+oyTnKCzj nj7rH9J9FidEs22SWXq37UtdKByvAb/73L1E40yMaForqWsBUOkwmdenczi8xlQf2quA E9XA== 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=Tyo1dX0e4/krx9e2lZTj/NtBJ5C9VYnXtfROtdBV5QY=; b=xcEUIguwrhPRfCP3Gqgmt6nRnO1pQ8eOC9vbe5IamTjWdfZPLLnIuVirjix4P3hHA0 40kF3aWJn0JvZs4ozw5CZvJ3z68TmgLt2WVOO871SFqdbKzHHG6eu2kKS32nR9rdE8km ikR4ay4ufwnZayKyrHNDIGp4jxP2zLmHIEzdoHhIZuzlag5plAdV4Ozta7YSA9BgDsAE +W4T4PzCPY56vfjBageq83YKlvBp/uPkMfPaxPBeoC+APOLlryqQL67AOp1KSvu5rL5S M2Y/azyw7KbBURLYZRAUuPkvLLqdFfsCZAwRYdrUP4ZKcTWef8WAd7EsxgNWbBXpSqeb UPLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ipaf3Gmq; 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 q22-20020a05620a0d9600b006a5faff6614si5357469qkl.341.2022.05.30.09.37.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:37:12 -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=Ipaf3Gmq; 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]:43950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviOG-0002tP-GE for patch@linaro.org; Mon, 30 May 2022 12:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvR-0002nx-Mg for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:25 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvQ-0007Dj-0s for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:25 -0400 Received: by mail-wr1-x42e.google.com with SMTP id u3so15268882wrg.3 for ; Mon, 30 May 2022 09:07:23 -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=Tyo1dX0e4/krx9e2lZTj/NtBJ5C9VYnXtfROtdBV5QY=; b=Ipaf3GmqmaiQzngcm+e12oElQxrbPtFWA8y5+I1gD7CK+HlmUh+ArKE/SSHgI3IxHZ 4jqOwMgYulWRqsTiwnpEVNe79kAkWzaqLGgsjexEj1zXrnCWhBL17YVggGHKoEwjXV1g dOBVG/5U/RK9kWWioaMAf+5ZAMa4RJdV7YYgfx4ELzK1NwZ02Bs/3l+ILZnwgLBSuADj 2HpGzxix0uIoTzgcTZZINgUC23vS0vkkfkOq74dgPc0U0w7gwIVnHoQopTNQbD+YLDUE q+5k1IJ+7Gc4Y0MhVmThK8dVI1X810Lsxo1AUzOn47FZNFlE9i+TWUq9f4gg1yjt0nWt N1lA== 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=Tyo1dX0e4/krx9e2lZTj/NtBJ5C9VYnXtfROtdBV5QY=; b=XuPfJ/gxdnNBcVu0PbmbCBJy1u6zsWASXeWlTNiZhEuq9BLwaNtMBPzEa6dMu2ifbe 4ebcDVIGqhrHIzu+6wp7wf954DlaXqtpa/HCQ1tIb5DKPcwjWIPfv9oVG2jTIM8VXdEv QZmVj+6o9mQtqjpiZL7OyI+TSNIATHxBRFwjtQmGJHQs9jmwdJpZKYfSECrdxWzQFRIn XDgGD77djlK4cl+U9ER2/L69bU1A5uFBlaVW6/WtKxiiDV3oIs9y7XtTH/u9LKVNDzuk 0/Sxnfwv6cgxPhtcb3s33Jy5tKDnTCm+nUCSeiZ7R3sOtNeuf+E15pBGylgXYgFCnSCw m/fQ== X-Gm-Message-State: AOAM530ye7/VXmzxIYhBcwf1F9bb0as6GuM7PPMSv0BGtu1qBN11zQwd BdZwkVP/Iah5rTlel00WCwYKjkbMlR2ayg== X-Received: by 2002:a05:6000:1b8d:b0:20c:d372:f07c with SMTP id r13-20020a0560001b8d00b0020cd372f07cmr47050648wru.607.1653926842588; Mon, 30 May 2022 09:07:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 015/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz Date: Mon, 30 May 2022 17:05:26 +0100 Message-Id: <20220530160708.726466-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions directly using gen_gvec_ool_arg_zzzz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-13-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 47 ++++++++------------------------------ 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index cae6df705a4..f7367a4f62c 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -8302,37 +8302,15 @@ static bool trans_FMLSLT_zzxw(DisasContext *s, arg_rrxr_esz *a) return do_FMLAL_zzxw(s, a, true, true); } -static bool do_i8mm_zzzz_ool(DisasContext *s, arg_rrrr_esz *a, - gen_helper_gvec_4 *fn, int data) -{ - if (!dc_isar_feature(aa64_sve_i8mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, fn, a, data); -} +TRANS_FEAT(SMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_smmla_b, a, 0) +TRANS_FEAT(USMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_usmmla_b, a, 0) +TRANS_FEAT(UMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_ummla_b, a, 0) -static bool trans_SMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_smmla_b, 0); -} - -static bool trans_USMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_usmmla_b, 0); -} - -static bool trans_UMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - return do_i8mm_zzzz_ool(s, a, gen_helper_gvec_ummla_b, 0); -} - -static bool trans_BFDOT_zzzz(DisasContext *s, arg_rrrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfdot, a, 0); -} +TRANS_FEAT(BFDOT_zzzz, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_bfdot, a, 0) static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) { @@ -8343,13 +8321,8 @@ static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) a->rd, a->rn, a->rm, a->ra, a->index); } -static bool trans_BFMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return gen_gvec_ool_arg_zzzz(s, gen_helper_gvec_bfmmla, a, 0); -} +TRANS_FEAT(BFMMLA, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, + gen_helper_gvec_bfmmla, a, 0) static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) { From patchwork Mon May 30 16:05:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577203 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp386818mag; Mon, 30 May 2022 09:24:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxdnOVi2/4JI4601TrlGInLN4qShaBIJdbEokg+cMsOMqu2s6p7DyGPMS+PvGXg90Gvw1i X-Received: by 2002:a05:622a:1654:b0:2f3:deaa:4d53 with SMTP id y20-20020a05622a165400b002f3deaa4d53mr44331863qtj.232.1653927898624; Mon, 30 May 2022 09:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653927898; cv=none; d=google.com; s=arc-20160816; b=dKO+aYk4GglPA1UiW3IlDNiE9MKu/xY9Jm5j1vOK5bPL51gcMsVh0WK1GzCUsGyElW AlsELy3O//Wis71BTA3TXxvGlcOaCerxvIPH84FAacB1Zr0Fvp96s77B2Qk2IkgyLxMQ fANPMSQCL098qOwv1BmCiE7od090h9MK7DMTwYFuneEGOfhA1NEl82QI9TPusATDIm4Z LLwOhoFG0/ISY1JzquHqSDT8mggPXLdWYfYHyCSO+NlFhNpQUIvta9yuZ+Oh9Q8sYc/1 xODsMLOgbI1uE7NJTLuHjeq2bYFSatFWSMR0cGLDnhKZB5jYB9t0uvSsh0HFiSC7xdip A9GQ== 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=7AqONkXRndtLTY/Cz7hw6z5A8ywsRInfoZHs3HnpjSk=; b=LsPtRdnkuV092/deJ8I06qZ4x6sCsuSLI/2W3juimCYSr+aKQUSqEQF9sDD1v58GBa ACV1Gs77MODqovwoCU3Q0hL0CQZzxMKLeWGmg5PiSGR/Q87VEQjgnYBg8WFGXqTELcYQ OUpEcSJW1OWIzgDE2RLZdMZXIEI4AcbsnToRuKqvxfuftU/W7rZTM1naxH/a6d7tswd1 QYccOtKsAJQDPY3B5m9Wz2X5YlteHLK8c9k5B5N06h+ad/YGf3fV0mgK7HU88DqaKx9a MpLL045f/Tl6TqjTGjvRgSNpjC2fx25dNXBgowKwjuVHbo+XQSt0Bu7R9Jk99NmUM0/H BF6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RnL12axA; 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 b17-20020ac87fd1000000b002f3bdc93211si7989297qtk.17.2022.05.30.09.24.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:24:58 -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=RnL12axA; 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]:44614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviCQ-00007t-7H for patch@linaro.org; Mon, 30 May 2022 12:24:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvS-0002qc-FE for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:26 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:51161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvQ-0007Dx-P4 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:26 -0400 Received: by mail-wm1-x329.google.com with SMTP id o9so6671204wmd.0 for ; Mon, 30 May 2022 09:07:24 -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=7AqONkXRndtLTY/Cz7hw6z5A8ywsRInfoZHs3HnpjSk=; b=RnL12axAgdgeF8rg3cKmJc3PtqtB6EzbNEkpnK9a6yD8mDDG+kvGgM52SF6mGU7xem ZjS/kfvuLgwLm6zOn1dvNHYmI2CbYVySXg7m6K3hXWDRmYNduQUS1Xi0rvbWuF9Ntw6N ljq++eJZf6Erstq6wCST+bj1G77bz9hvrsi32GU447nhTvYeqo8elhlcIgouvRKIUE83 SqZF8poSWiJw6GknrwqQCgmkmWPXkHeDv9KGY9tryLhBNmAPhWR8yL60fTab/qyXP/x9 nOzEGd7uKL+Ur8TnghqnV+P26oraZ3NLTqAATQRYfC21ClcejorO+Tay2OgtLUVaYWRj VK6Q== 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=7AqONkXRndtLTY/Cz7hw6z5A8ywsRInfoZHs3HnpjSk=; b=T6M2mU+M23ZUVa9n3sQ1pMQWPmB+FUHZRH8bbHhC7t3kkPqkKadlaIrE0P5/wAfTDf rgQ5bPrctn8Ds7f1YGmrRgKFKnZYXz26z1jlCsPpUp4JuWg74XVQeFY6AAErcxCXdPN8 0E9DDZcIQ+1KgFRNN28Jf062C5IzApuJLb5bQOB09eMR3IbyFIYNpNpOyWo0LpUPBePA 2tUaYzG37y3vjm0SNG1mj+NoPYoa2k67hH+LGCfm9AKMDF8MpYMv3pi4rvkJ+Z+6Ns5L 19xKOp/86mRl3u8pH+E1xATUXplXBE6Aq6XySmUz5z7f/NKcIo39QqJr+6fNAvda1OLR M8vA== X-Gm-Message-State: AOAM533i99CiskaVYdAlUsKCoto0v2aFmvL9q06x2dzjKI88wIn8oWQp s1snJaQP0om2CUS8gGAZKtNN0699y5DkHA== X-Received: by 2002:a05:600c:4fd2:b0:39b:893e:ff79 with SMTP id o18-20020a05600c4fd200b0039b893eff79mr7178734wmq.73.1653926843287; Mon, 30 May 2022 09:07:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 016/117] target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz Date: Mon, 30 May 2022 17:05:27 +0100 Message-Id: <20220530160708.726466-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Rename the function to match gen_gvec_ool_arg_zzzz, and move to be adjacent. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-14-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f7367a4f62c..b42df76c697 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -199,6 +199,12 @@ static bool gen_gvec_ool_arg_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, data); } +static bool gen_gvec_ool_arg_zzxz(DisasContext *s, gen_helper_gvec_4 *fn, + arg_rrxr_esz *a) +{ + return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, a->index); +} + /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ static void gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) @@ -3820,15 +3826,9 @@ TRANS_FEAT(DOT_zzzz, aa64_sve, gen_gvec_ool_zzzz, * SVE Multiply - Indexed */ -static bool do_zzxz_ool(DisasContext *s, arg_rrxr_esz *a, - gen_helper_gvec_4 *fn) -{ - return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, a->index); -} - #define DO_RRXR(NAME, FUNC) \ static bool NAME(DisasContext *s, arg_rrxr_esz *a) \ - { return do_zzxz_ool(s, a, FUNC); } + { return gen_gvec_ool_arg_zzxz(s, FUNC, a); } DO_RRXR(trans_SDOT_zzxw_s, gen_helper_gvec_sdot_idx_b) DO_RRXR(trans_SDOT_zzxw_d, gen_helper_gvec_sdot_idx_h) @@ -3840,7 +3840,7 @@ static bool trans_SUDOT_zzxw_s(DisasContext *s, arg_rrxr_esz *a) if (!dc_isar_feature(aa64_sve_i8mm, s)) { return false; } - return do_zzxz_ool(s, a, gen_helper_gvec_sudot_idx_b); + return gen_gvec_ool_arg_zzxz(s, gen_helper_gvec_sudot_idx_b, a); } static bool trans_USDOT_zzxw_s(DisasContext *s, arg_rrxr_esz *a) @@ -3848,7 +3848,7 @@ static bool trans_USDOT_zzxw_s(DisasContext *s, arg_rrxr_esz *a) if (!dc_isar_feature(aa64_sve_i8mm, s)) { return false; } - return do_zzxz_ool(s, a, gen_helper_gvec_usdot_idx_b); + return gen_gvec_ool_arg_zzxz(s, gen_helper_gvec_usdot_idx_b, a); } #undef DO_RRXR From patchwork Mon May 30 16:05:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577207 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp389187mag; Mon, 30 May 2022 09:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVW/lwqrgY26MlSRuQil4+urPP0A6OW9CHDkwa82r25U8663YNP6dDP79TCzw+Ath1BG29 X-Received: by 2002:ac8:57c3:0:b0:2f9:103f:8a87 with SMTP id w3-20020ac857c3000000b002f9103f8a87mr43372501qta.609.1653928098605; Mon, 30 May 2022 09:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928098; cv=none; d=google.com; s=arc-20160816; b=lGhNj2cv2KxmK9EVhgjKVPoRfYlbHIlMU1asGHt5kV0oRLEpkkcbXLeE7lXUGvKd3m tHIsZBECPm6NkHfa3Wk1EMoxYP1CnRic7/F1m3Cy7HeEkzDCTMt4M1ZcOHb3n0lZW9zV oCaRG7pc+fzhliHKzAd+W6UlEzlv0sUJ2WfOFURaQz5x1FvD3B3aBAN1Ng0QDZUwQVgq lcM4qdiCTxzZF0/33YRS1GhWqhs3AXJhhpKH1DMWX3+xZAoJcnbYZedtE7JEITVBCcKr oApG09Sln3gmVrNg4sy0EcM/nf+uLJLFzwgL21HIEPx2Ta2Sy6diBUon14CGW3BrY8iK wbwg== 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=WpRC+GS9ue3LwPsMr2N1fBULfRhLwBA54Un3pU0cxaw=; b=Q0v/XC8HuKhZsPqaXyXwlHoY2qPGqEW/sWOMWdUBWd0sOeZAk3CbFmsUrbQOhWEjLP uw5frsTRw/GXdcfzWagyaZYrlSrVHSGzFKK2lnOePXGZFUEpeUBxx91y7pOqydxyUVg1 ybnJJuffzxr3YKkzkvFe5iDfBtiJvQhDjsiUF4U6bHt71doMfKQmTJzt5uCc92WHxx2n vRTMt7r+zjBI83Dl2zbSpGw06/jwrXUrx2f3zYO5vLKW56O+nAkYIwzazJ/0nSggWwJx hH9/Sk0M44mG2umnoJN9fkC8Iwg858RpAOigLk4UGnP1/YpCCAnPxJeRR9Cjnnn8iMNb kjVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rm/L17Iv"; 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 jk10-20020ad45d4a000000b0044410c8ee72si6410258qvb.381.2022.05.30.09.28.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:28:18 -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="rm/L17Iv"; 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]:52922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviFe-0005sX-7B for patch@linaro.org; Mon, 30 May 2022 12:28:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvS-0002ql-Fz for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:26 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvQ-0007AQ-Tp for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:26 -0400 Received: by mail-wr1-x434.google.com with SMTP id q21so4085379wra.2 for ; Mon, 30 May 2022 09:07:24 -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=WpRC+GS9ue3LwPsMr2N1fBULfRhLwBA54Un3pU0cxaw=; b=rm/L17IvKTL88vxX3akZhSecVFTDT+3z6pAWovW9vm17o0+P2nN8nkA2tq/i42FoGu ixPRpEE36MTnqntL6rjSOnPZu597rD2QcYMeHQvb6GgQetrkKwCgALS21E69PvSij/S5 aal1IF0sMJLoCkgyAcVk8PM0vf9wn7h/lOlH1Q+0Hk9gSUPnFqH07gm5PwKiFIidr5TN HFPUxiRmCbbilx1yFKwRGkAZDaT2ImvxsEeMjanhU1oLFmBOfD18KqcQdsZ2phdwDhGj GQUvGj8SpLz19nTHKRSSqVo/yCxYowOcGfTi3A1Jqr1kHzUufgSZlWi3R8cKRCnQurfX p2Dw== 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=WpRC+GS9ue3LwPsMr2N1fBULfRhLwBA54Un3pU0cxaw=; b=KyGv6Ij1//ub+TbZGYSRHmZvOfgEfiefd1Wdk2BOnQFmoOO7OPzut/+men57S3Stf2 TlWRwcj1F2cZ5RuK7Fk29LHug/KKQ2v8cjwXeR7j4dbPxOTdZgILviNzy40y2rv8FJUa mEvtkAimWFi9omOEaU92fGusLr8x7tDAjPBROWvbk+q8qWRvBnETCEqGtfuo76yMdUim 3DJcaSFMlLBkqDLGYibfyaiuhqTMSHke+F8aaqJzKlNQtzFSD1ekwuG+a9qZB+vMZDn9 m0iD+BUpBOt51pQqjA2jKJTnfyIhOSBvX0gWFpk6lRImhsx2s78TFx12rZAvLiqkhKYT VmmQ== X-Gm-Message-State: AOAM531DeCy3iYODILH6Cg/atrB0j9VIRtkEVLlAzxSWd/wmKZ5vRCNv PliVu0uS9Vk8rmsG7IaqQuG3TGJD9+SEZA== X-Received: by 2002:a5d:4302:0:b0:210:824:48ee with SMTP id h2-20020a5d4302000000b00210082448eemr18895467wrq.471.1653926844080; Mon, 30 May 2022 09:07:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 017/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz Date: Mon, 30 May 2022 17:05:28 +0100 Message-Id: <20220530160708.726466-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions directly using gen_gvec_ool_arg_zzxz to TRANS_FEAT. Also include BFDOT_zzxz, which was using gen_gvec_ool_zzzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-15-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 48 +++++++++++--------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b42df76c697..b097b44d9f9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3826,32 +3826,19 @@ TRANS_FEAT(DOT_zzzz, aa64_sve, gen_gvec_ool_zzzz, * SVE Multiply - Indexed */ -#define DO_RRXR(NAME, FUNC) \ - static bool NAME(DisasContext *s, arg_rrxr_esz *a) \ - { return gen_gvec_ool_arg_zzxz(s, FUNC, a); } +TRANS_FEAT(SDOT_zzxw_s, aa64_sve, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_sdot_idx_b, a) +TRANS_FEAT(SDOT_zzxw_d, aa64_sve, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_sdot_idx_h, a) +TRANS_FEAT(UDOT_zzxw_s, aa64_sve, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_udot_idx_b, a) +TRANS_FEAT(UDOT_zzxw_d, aa64_sve, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_udot_idx_h, a) -DO_RRXR(trans_SDOT_zzxw_s, gen_helper_gvec_sdot_idx_b) -DO_RRXR(trans_SDOT_zzxw_d, gen_helper_gvec_sdot_idx_h) -DO_RRXR(trans_UDOT_zzxw_s, gen_helper_gvec_udot_idx_b) -DO_RRXR(trans_UDOT_zzxw_d, gen_helper_gvec_udot_idx_h) - -static bool trans_SUDOT_zzxw_s(DisasContext *s, arg_rrxr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_i8mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzxz(s, gen_helper_gvec_sudot_idx_b, a); -} - -static bool trans_USDOT_zzxw_s(DisasContext *s, arg_rrxr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_i8mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzxz(s, gen_helper_gvec_usdot_idx_b, a); -} - -#undef DO_RRXR +TRANS_FEAT(SUDOT_zzxw_s, aa64_sve_i8mm, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_sudot_idx_b, a) +TRANS_FEAT(USDOT_zzxw_s, aa64_sve_i8mm, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_usdot_idx_b, a) static bool do_sve2_zzz_data(DisasContext *s, int rd, int rn, int rm, int data, gen_helper_gvec_3 *fn) @@ -8311,15 +8298,8 @@ TRANS_FEAT(UMMLA, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, TRANS_FEAT(BFDOT_zzzz, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, gen_helper_gvec_bfdot, a, 0) - -static bool trans_BFDOT_zzxz(DisasContext *s, arg_rrxr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return gen_gvec_ool_zzzz(s, gen_helper_gvec_bfdot_idx, - a->rd, a->rn, a->rm, a->ra, a->index); -} +TRANS_FEAT(BFDOT_zzxz, aa64_sve_bf16, gen_gvec_ool_arg_zzxz, + gen_helper_gvec_bfdot_idx, a) TRANS_FEAT(BFMMLA, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, gen_helper_gvec_bfmmla, a, 0) From patchwork Mon May 30 16:05:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577220 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp398321mag; Mon, 30 May 2022 09:40:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznALX1bCFP417JQD+ayIOPPtM8he4KjQVFl1rgMpFIWpHhgWvyqWkfJe63F3M4hG4nXoK8 X-Received: by 2002:a05:622a:113:b0:304:b8ed:e8f4 with SMTP id u19-20020a05622a011300b00304b8ede8f4mr253300qtw.286.1653928837527; Mon, 30 May 2022 09:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928837; cv=none; d=google.com; s=arc-20160816; b=coNpArkD1Una6sM9VRUOQR6Nw9zZBfUJmdvWbAeqfqeequzX6QAWgfI9OXdlCWMOYY 1+wSWPRblaQgYlLYrbctvpljbenGtB/r17LUAOEJoR1FqYHXK5O4I9y7Ryg+Ca5zFfTT ghOwChlzKonms6PCorUv3scYt/n+K5Hfki1dErbUSK0cfTFP+toGJQ5upiYIMJrBXPru LWXnUDSmIksuot1BaGc76BJ53CfX2y82wouIyV1oWR8mCBWMndprIe4KRwKo/YBHKmIF jauB8dGi8VwfBu0IfufVWHD8fuyy4944XDUtV/eMYjjL29wNyl3h02hBo70yobQN/api BU5Q== 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=TVDQ6Or7QME3qE3tFHK0K8uOi4Oc5sDV6LTBguhqk5c=; b=D14HB35ZgStAfxunIV3DG2Kwk2xsPE0swVAL3mrrlrDCN1BNOZnmZ8XU3t2UWaNWbb z0dNJDDmrbQmNNUXRnVegRNbk0bAgsmwT9iNVm9tIA+6pOUK9/aGRPZDNDdKiWkgvtKK Hwf1hjAXzIV1LBqZQNi8hxsYtvHtP+emGswQzSzGWjhreyKPJ5NqQIPacczMP3SxgGyL HA2ExzMV1uDopm1NB1T5z7GNGezA7YzMSx2L60NaV9Qmu8dIYqRcxr5E7Bwuqh7CE7Og XKU4SBlcoZ/TKmlGI5HdZNhwn+bkYV6HXT0tcXmhErbbv1G58alxpeYw2m9TeNlqNrVO vjNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AZeppfag; 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 d6-20020a05622a100600b00304b7a79783si484286qte.155.2022.05.30.09.40.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:40:37 -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=AZeppfag; 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]:52652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviRZ-0000ZE-2X for patch@linaro.org; Mon, 30 May 2022 12:40:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0002rc-OG for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:30 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:41871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvS-0007EH-9k for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:27 -0400 Received: by mail-wr1-x42a.google.com with SMTP id k19so7097190wrd.8 for ; Mon, 30 May 2022 09:07:25 -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=TVDQ6Or7QME3qE3tFHK0K8uOi4Oc5sDV6LTBguhqk5c=; b=AZeppfagrCkLPMfzldEWr//8Gflo8iWSIA0os7PqJT2z6glfPTvpQ2Qk9Th1jTDegk TrTXmK5r+wAfGGtGeI2CCCZv4YhcZBvDOw9mf5ugkNhm0iDWtjgRx6kmiuqZv+jyHurS o0fjt0JjC2N3dicULx7YAVQJ0M3mdjyHwZSvGpahERS5wc2w1UPM7iS7XGPE4eV0BOym cEeqQ6e6pdqRh43e00zd/Chjgh2NSgb1gGcE339Ym3oWL3izT3t007qxzashEl1yhNwG dza2R0ok/E2Fc35Syg/R9knEt/yV9FMvzh7YSJz2u+By00GcEIeDOFbtq58PW7T1toB5 uh4Q== 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=TVDQ6Or7QME3qE3tFHK0K8uOi4Oc5sDV6LTBguhqk5c=; b=4HPSdANxVr5EyeCV7/7O9Ne7g25AfaupEtuHJuEC2f4E7xwjtQ7JMZVQnWiwLRrDQZ GktibS92r6oNzHIPOMzXcJr35UM4IHTcoTYoqRBl46AgZNhD9AjlFi7WdAkBk+nNogXD mC9es+MJRYOzbAnBLm7waQSEOTuIyH4XK7XOCXwOarF3ga/OsAO3Fw2ovWct8NPO/FDa D324BBiwxtFxBXLCgTpMEh9kKxsH1ZQF6UEBRMqqTilVHAdykqIZOFExtl7t8mKDtBzG AXZMo3zxBDXMXlrm+mOsZpUqhgpDeziz+Ojdfs+T3R1yJRtqet01L9SUSfVCVCWWPHkU STRg== X-Gm-Message-State: AOAM532dys4W8mhus1W4B2GecYwWiX1Fh2nqMPiS48IIy3gLbXzCNyj6 bFqrE1g0awfsxThGzoKtFOBd3bfMlQvCSg== X-Received: by 2002:a5d:6847:0:b0:20f:c0b6:d783 with SMTP id o7-20020a5d6847000000b0020fc0b6d783mr40462102wrw.101.1653926844872; Mon, 30 May 2022 09:07:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 018/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_data Date: Mon, 30 May 2022 17:05:29 +0100 Message-Id: <20220530160708.726466-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zzz_data to use TRANS_FEAT and gen_gvec_ool_zzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-16-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 69 ++++++++++++++------------------------ 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b097b44d9f9..ac76705da69 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3840,61 +3840,42 @@ TRANS_FEAT(SUDOT_zzxw_s, aa64_sve_i8mm, gen_gvec_ool_arg_zzxz, TRANS_FEAT(USDOT_zzxw_s, aa64_sve_i8mm, gen_gvec_ool_arg_zzxz, gen_helper_gvec_usdot_idx_b, a) -static bool do_sve2_zzz_data(DisasContext *s, int rd, int rn, int rm, int data, - gen_helper_gvec_3 *fn) -{ - if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - vsz, vsz, data, fn); - } - return true; -} - #define DO_SVE2_RRX(NAME, FUNC) \ - static bool NAME(DisasContext *s, arg_rrx_esz *a) \ - { return do_sve2_zzz_data(s, a->rd, a->rn, a->rm, a->index, FUNC); } + TRANS_FEAT(NAME, aa64_sve, gen_gvec_ool_zzz, FUNC, \ + a->rd, a->rn, a->rm, a->index) -DO_SVE2_RRX(trans_MUL_zzx_h, gen_helper_gvec_mul_idx_h) -DO_SVE2_RRX(trans_MUL_zzx_s, gen_helper_gvec_mul_idx_s) -DO_SVE2_RRX(trans_MUL_zzx_d, gen_helper_gvec_mul_idx_d) +DO_SVE2_RRX(MUL_zzx_h, gen_helper_gvec_mul_idx_h) +DO_SVE2_RRX(MUL_zzx_s, gen_helper_gvec_mul_idx_s) +DO_SVE2_RRX(MUL_zzx_d, gen_helper_gvec_mul_idx_d) -DO_SVE2_RRX(trans_SQDMULH_zzx_h, gen_helper_sve2_sqdmulh_idx_h) -DO_SVE2_RRX(trans_SQDMULH_zzx_s, gen_helper_sve2_sqdmulh_idx_s) -DO_SVE2_RRX(trans_SQDMULH_zzx_d, gen_helper_sve2_sqdmulh_idx_d) +DO_SVE2_RRX(SQDMULH_zzx_h, gen_helper_sve2_sqdmulh_idx_h) +DO_SVE2_RRX(SQDMULH_zzx_s, gen_helper_sve2_sqdmulh_idx_s) +DO_SVE2_RRX(SQDMULH_zzx_d, gen_helper_sve2_sqdmulh_idx_d) -DO_SVE2_RRX(trans_SQRDMULH_zzx_h, gen_helper_sve2_sqrdmulh_idx_h) -DO_SVE2_RRX(trans_SQRDMULH_zzx_s, gen_helper_sve2_sqrdmulh_idx_s) -DO_SVE2_RRX(trans_SQRDMULH_zzx_d, gen_helper_sve2_sqrdmulh_idx_d) +DO_SVE2_RRX(SQRDMULH_zzx_h, gen_helper_sve2_sqrdmulh_idx_h) +DO_SVE2_RRX(SQRDMULH_zzx_s, gen_helper_sve2_sqrdmulh_idx_s) +DO_SVE2_RRX(SQRDMULH_zzx_d, gen_helper_sve2_sqrdmulh_idx_d) #undef DO_SVE2_RRX #define DO_SVE2_RRX_TB(NAME, FUNC, TOP) \ - static bool NAME(DisasContext *s, arg_rrx_esz *a) \ - { \ - return do_sve2_zzz_data(s, a->rd, a->rn, a->rm, \ - (a->index << 1) | TOP, FUNC); \ - } + TRANS_FEAT(NAME, aa64_sve, gen_gvec_ool_zzz, FUNC, \ + a->rd, a->rn, a->rm, (a->index << 1) | TOP) -DO_SVE2_RRX_TB(trans_SQDMULLB_zzx_s, gen_helper_sve2_sqdmull_idx_s, false) -DO_SVE2_RRX_TB(trans_SQDMULLB_zzx_d, gen_helper_sve2_sqdmull_idx_d, false) -DO_SVE2_RRX_TB(trans_SQDMULLT_zzx_s, gen_helper_sve2_sqdmull_idx_s, true) -DO_SVE2_RRX_TB(trans_SQDMULLT_zzx_d, gen_helper_sve2_sqdmull_idx_d, true) +DO_SVE2_RRX_TB(SQDMULLB_zzx_s, gen_helper_sve2_sqdmull_idx_s, false) +DO_SVE2_RRX_TB(SQDMULLB_zzx_d, gen_helper_sve2_sqdmull_idx_d, false) +DO_SVE2_RRX_TB(SQDMULLT_zzx_s, gen_helper_sve2_sqdmull_idx_s, true) +DO_SVE2_RRX_TB(SQDMULLT_zzx_d, gen_helper_sve2_sqdmull_idx_d, true) -DO_SVE2_RRX_TB(trans_SMULLB_zzx_s, gen_helper_sve2_smull_idx_s, false) -DO_SVE2_RRX_TB(trans_SMULLB_zzx_d, gen_helper_sve2_smull_idx_d, false) -DO_SVE2_RRX_TB(trans_SMULLT_zzx_s, gen_helper_sve2_smull_idx_s, true) -DO_SVE2_RRX_TB(trans_SMULLT_zzx_d, gen_helper_sve2_smull_idx_d, true) +DO_SVE2_RRX_TB(SMULLB_zzx_s, gen_helper_sve2_smull_idx_s, false) +DO_SVE2_RRX_TB(SMULLB_zzx_d, gen_helper_sve2_smull_idx_d, false) +DO_SVE2_RRX_TB(SMULLT_zzx_s, gen_helper_sve2_smull_idx_s, true) +DO_SVE2_RRX_TB(SMULLT_zzx_d, gen_helper_sve2_smull_idx_d, true) -DO_SVE2_RRX_TB(trans_UMULLB_zzx_s, gen_helper_sve2_umull_idx_s, false) -DO_SVE2_RRX_TB(trans_UMULLB_zzx_d, gen_helper_sve2_umull_idx_d, false) -DO_SVE2_RRX_TB(trans_UMULLT_zzx_s, gen_helper_sve2_umull_idx_s, true) -DO_SVE2_RRX_TB(trans_UMULLT_zzx_d, gen_helper_sve2_umull_idx_d, true) +DO_SVE2_RRX_TB(UMULLB_zzx_s, gen_helper_sve2_umull_idx_s, false) +DO_SVE2_RRX_TB(UMULLB_zzx_d, gen_helper_sve2_umull_idx_d, false) +DO_SVE2_RRX_TB(UMULLT_zzx_s, gen_helper_sve2_umull_idx_s, true) +DO_SVE2_RRX_TB(UMULLT_zzx_d, gen_helper_sve2_umull_idx_d, true) #undef DO_SVE2_RRX_TB From patchwork Mon May 30 16:05:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577206 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp388582mag; Mon, 30 May 2022 09:27:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXLL3v6c2UGAABgDAb/lJ4J1rfwu4pOUtnhuEmuaKeEbbchU12uBt7h84fG2hWQLbLMgM8 X-Received: by 2002:a05:622a:3d0:b0:304:b6c5:dc26 with SMTP id k16-20020a05622a03d000b00304b6c5dc26mr1800273qtx.237.1653928049943; Mon, 30 May 2022 09:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928049; cv=none; d=google.com; s=arc-20160816; b=JZNNjEhFiaGUjNT71rZ5lQWuODBkUQeny1H7yTlBAxxM6l1SAGkW1x9R65HVnzSAx2 0aDEyrs8ZUuS23wAgVh/zlctSqi+MxCeQV9CZWg2fSOi8BLAEoTt4qGIYqDJo39ujrTk tGTsKunq0wzQkPQK3vZ0xe+BcDNnfhX5II41OCgFjCzVwKGKaJIiLgg2cfzlBt2HMLTL 0JyYos3JJbuMBjhoqDFCF5xyzdgU5hqsgLpSYcQZDDalJ7OpbbXzFS2SRG5ZAny28Ily Wm1pq+NwKZjK0n+pUgqezY/RwxKWTKWVZ0/yyx2kA5ZJYCrqPTGP3T7r7K0HuxP3cIv0 yxLQ== 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=4ZQsUZFIQn45fUAYCwuEeZCcMS3C2PBrUOch8zG/uoA=; b=B35oGYkTB4oU5CFK1rDoBePTUFgAR9ukdtY/7Jj3lZgq2GzbqR547ad7HFbNuYfksW iBOzOGI0O15BWKSnnFSmBPvjpN+1mdoCfRg9a5wMy1r3fUx2hr2gb46ar8tybyBdJacc mdm9bpmzBQRSrPOFhL4DolcwOQjm14O5r+Sdt2Qk4CEHjbP/t4ed98oDVe0h7hwMGeJO i0o82O6TgxS5n6Ij5YAf053HqiTMU8nod5ddDiPvWT4F6NIyNW72y7x28Z88W8HrU4nu dHQrBe4L6fVF/Tkn1Q8EwGOFnh+et130N6Gq4VxPzeCTV995mbuYmooxbkSL7zI79PcH dZQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cT2wGL1J; 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 t13-20020a05620a450d00b0069eaaf0d338si8215645qkp.331.2022.05.30.09.27.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:27:29 -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=cT2wGL1J; 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]:50004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviEr-0003op-1q for patch@linaro.org; Mon, 30 May 2022 12:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0002rd-OU for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:30 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:38833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvT-0007EZ-4O for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:29 -0400 Received: by mail-wm1-x330.google.com with SMTP id f23-20020a7bcc17000000b003972dda143eso8700133wmh.3 for ; Mon, 30 May 2022 09:07:26 -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=4ZQsUZFIQn45fUAYCwuEeZCcMS3C2PBrUOch8zG/uoA=; b=cT2wGL1J4I3G1jzlMYblg+Ls1XKLZqQzPM75oty88EBpTuo5Zm0XVt9rbEdyNqIxdr W89TOeyM8Ck6DY+mZNZ6OEUhjgmHeot5ZlEVLSZmtXCcbDAdNLglaUnzK/lhS+H50NtP OxgjPSx28zXa4Mxn8uzECONKJU0jx/pbY7z/qSs7p/liRhUAA6sPLXx3RHUsv0g3BPka OLynBtFmyARxjeCspQv1kTMOC6wE+8MmIx9j05/dThSxsSiwTXBNLGeSLprvHuG/l/XF C2J1tM86xF8L7FoBwzAMAEHBbBIHdGmJqQYxq0zv4bIQTNNOR+zNGpYX7IVLLUNUIaAC 9dwQ== 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=4ZQsUZFIQn45fUAYCwuEeZCcMS3C2PBrUOch8zG/uoA=; b=SNrq+cx25OLZ/ljXG3QvT+QYlY/llReXjviFg1HyZ5CbRElWqwFCP/T4ae5vlsTvCK CVVqB1UFEnfoFI1ItLt4eyK5f3zXtzlbCiaN3WB53XzG045zDeE+AGu+3eJvOf8TEREs PdwR6W1787MbZJR4AVx1RS3HOle8/0gDzjHaQgA2Qul4zs1Hg5/tD3WSy7y/5d/+B4zQ 3LkIuS7ihfa3mIFnpJIGXv1iG1SLBO8tjZyPe/ba2m7ImvZtI//O7H785d3hKSXoMadO gD6xT384COMnD8paB9yBKunJzX+54J9fsbjc5i2JIyhpf2fCM9yRcs4uTtG/nUFH4LJp oRdA== X-Gm-Message-State: AOAM530Rllzz92zZDLi0l3J0Uvg+ko8MGLK3Rhc35S2g+IPQmnNS9b8E R1556sjeHatK4Kj5GPpzh/WVgy0HrGIE+w== X-Received: by 2002:a05:600c:3d10:b0:397:835e:bf64 with SMTP id bh16-20020a05600c3d1000b00397835ebf64mr18207764wmb.167.1653926845644; Mon, 30 May 2022 09:07:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:25 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 019/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_data Date: Mon, 30 May 2022 17:05:30 +0100 Message-Id: <20220530160708.726466-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zzzz_data to use TRANS_FEAT and gen_gvec_ool_{zzzz,zzxz}. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-17-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 106 ++++++++++++++----------------------- 1 file changed, 41 insertions(+), 65 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ac76705da69..c345399ace9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3879,90 +3879,66 @@ DO_SVE2_RRX_TB(UMULLT_zzx_d, gen_helper_sve2_umull_idx_d, true) #undef DO_SVE2_RRX_TB -static bool do_sve2_zzzz_data(DisasContext *s, int rd, int rn, int rm, int ra, - int data, gen_helper_gvec_4 *fn) -{ - if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - vec_full_reg_offset(s, ra), - vsz, vsz, data, fn); - } - return true; -} - #define DO_SVE2_RRXR(NAME, FUNC) \ - static bool NAME(DisasContext *s, arg_rrxr_esz *a) \ - { return do_sve2_zzzz_data(s, a->rd, a->rn, a->rm, a->ra, a->index, FUNC); } + TRANS_FEAT(NAME, aa64_sve2, gen_gvec_ool_arg_zzxz, FUNC, a) -DO_SVE2_RRXR(trans_MLA_zzxz_h, gen_helper_gvec_mla_idx_h) -DO_SVE2_RRXR(trans_MLA_zzxz_s, gen_helper_gvec_mla_idx_s) -DO_SVE2_RRXR(trans_MLA_zzxz_d, gen_helper_gvec_mla_idx_d) +DO_SVE2_RRXR(MLA_zzxz_h, gen_helper_gvec_mla_idx_h) +DO_SVE2_RRXR(MLA_zzxz_s, gen_helper_gvec_mla_idx_s) +DO_SVE2_RRXR(MLA_zzxz_d, gen_helper_gvec_mla_idx_d) -DO_SVE2_RRXR(trans_MLS_zzxz_h, gen_helper_gvec_mls_idx_h) -DO_SVE2_RRXR(trans_MLS_zzxz_s, gen_helper_gvec_mls_idx_s) -DO_SVE2_RRXR(trans_MLS_zzxz_d, gen_helper_gvec_mls_idx_d) +DO_SVE2_RRXR(MLS_zzxz_h, gen_helper_gvec_mls_idx_h) +DO_SVE2_RRXR(MLS_zzxz_s, gen_helper_gvec_mls_idx_s) +DO_SVE2_RRXR(MLS_zzxz_d, gen_helper_gvec_mls_idx_d) -DO_SVE2_RRXR(trans_SQRDMLAH_zzxz_h, gen_helper_sve2_sqrdmlah_idx_h) -DO_SVE2_RRXR(trans_SQRDMLAH_zzxz_s, gen_helper_sve2_sqrdmlah_idx_s) -DO_SVE2_RRXR(trans_SQRDMLAH_zzxz_d, gen_helper_sve2_sqrdmlah_idx_d) +DO_SVE2_RRXR(SQRDMLAH_zzxz_h, gen_helper_sve2_sqrdmlah_idx_h) +DO_SVE2_RRXR(SQRDMLAH_zzxz_s, gen_helper_sve2_sqrdmlah_idx_s) +DO_SVE2_RRXR(SQRDMLAH_zzxz_d, gen_helper_sve2_sqrdmlah_idx_d) -DO_SVE2_RRXR(trans_SQRDMLSH_zzxz_h, gen_helper_sve2_sqrdmlsh_idx_h) -DO_SVE2_RRXR(trans_SQRDMLSH_zzxz_s, gen_helper_sve2_sqrdmlsh_idx_s) -DO_SVE2_RRXR(trans_SQRDMLSH_zzxz_d, gen_helper_sve2_sqrdmlsh_idx_d) +DO_SVE2_RRXR(SQRDMLSH_zzxz_h, gen_helper_sve2_sqrdmlsh_idx_h) +DO_SVE2_RRXR(SQRDMLSH_zzxz_s, gen_helper_sve2_sqrdmlsh_idx_s) +DO_SVE2_RRXR(SQRDMLSH_zzxz_d, gen_helper_sve2_sqrdmlsh_idx_d) #undef DO_SVE2_RRXR #define DO_SVE2_RRXR_TB(NAME, FUNC, TOP) \ - static bool NAME(DisasContext *s, arg_rrxr_esz *a) \ - { \ - return do_sve2_zzzz_data(s, a->rd, a->rn, a->rm, a->rd, \ - (a->index << 1) | TOP, FUNC); \ - } + TRANS_FEAT(NAME, aa64_sve2, gen_gvec_ool_zzzz, FUNC, \ + a->rd, a->rn, a->rm, a->ra, (a->index << 1) | TOP) -DO_SVE2_RRXR_TB(trans_SQDMLALB_zzxw_s, gen_helper_sve2_sqdmlal_idx_s, false) -DO_SVE2_RRXR_TB(trans_SQDMLALB_zzxw_d, gen_helper_sve2_sqdmlal_idx_d, false) -DO_SVE2_RRXR_TB(trans_SQDMLALT_zzxw_s, gen_helper_sve2_sqdmlal_idx_s, true) -DO_SVE2_RRXR_TB(trans_SQDMLALT_zzxw_d, gen_helper_sve2_sqdmlal_idx_d, true) +DO_SVE2_RRXR_TB(SQDMLALB_zzxw_s, gen_helper_sve2_sqdmlal_idx_s, false) +DO_SVE2_RRXR_TB(SQDMLALB_zzxw_d, gen_helper_sve2_sqdmlal_idx_d, false) +DO_SVE2_RRXR_TB(SQDMLALT_zzxw_s, gen_helper_sve2_sqdmlal_idx_s, true) +DO_SVE2_RRXR_TB(SQDMLALT_zzxw_d, gen_helper_sve2_sqdmlal_idx_d, true) -DO_SVE2_RRXR_TB(trans_SQDMLSLB_zzxw_s, gen_helper_sve2_sqdmlsl_idx_s, false) -DO_SVE2_RRXR_TB(trans_SQDMLSLB_zzxw_d, gen_helper_sve2_sqdmlsl_idx_d, false) -DO_SVE2_RRXR_TB(trans_SQDMLSLT_zzxw_s, gen_helper_sve2_sqdmlsl_idx_s, true) -DO_SVE2_RRXR_TB(trans_SQDMLSLT_zzxw_d, gen_helper_sve2_sqdmlsl_idx_d, true) +DO_SVE2_RRXR_TB(SQDMLSLB_zzxw_s, gen_helper_sve2_sqdmlsl_idx_s, false) +DO_SVE2_RRXR_TB(SQDMLSLB_zzxw_d, gen_helper_sve2_sqdmlsl_idx_d, false) +DO_SVE2_RRXR_TB(SQDMLSLT_zzxw_s, gen_helper_sve2_sqdmlsl_idx_s, true) +DO_SVE2_RRXR_TB(SQDMLSLT_zzxw_d, gen_helper_sve2_sqdmlsl_idx_d, true) -DO_SVE2_RRXR_TB(trans_SMLALB_zzxw_s, gen_helper_sve2_smlal_idx_s, false) -DO_SVE2_RRXR_TB(trans_SMLALB_zzxw_d, gen_helper_sve2_smlal_idx_d, false) -DO_SVE2_RRXR_TB(trans_SMLALT_zzxw_s, gen_helper_sve2_smlal_idx_s, true) -DO_SVE2_RRXR_TB(trans_SMLALT_zzxw_d, gen_helper_sve2_smlal_idx_d, true) +DO_SVE2_RRXR_TB(SMLALB_zzxw_s, gen_helper_sve2_smlal_idx_s, false) +DO_SVE2_RRXR_TB(SMLALB_zzxw_d, gen_helper_sve2_smlal_idx_d, false) +DO_SVE2_RRXR_TB(SMLALT_zzxw_s, gen_helper_sve2_smlal_idx_s, true) +DO_SVE2_RRXR_TB(SMLALT_zzxw_d, gen_helper_sve2_smlal_idx_d, true) -DO_SVE2_RRXR_TB(trans_UMLALB_zzxw_s, gen_helper_sve2_umlal_idx_s, false) -DO_SVE2_RRXR_TB(trans_UMLALB_zzxw_d, gen_helper_sve2_umlal_idx_d, false) -DO_SVE2_RRXR_TB(trans_UMLALT_zzxw_s, gen_helper_sve2_umlal_idx_s, true) -DO_SVE2_RRXR_TB(trans_UMLALT_zzxw_d, gen_helper_sve2_umlal_idx_d, true) +DO_SVE2_RRXR_TB(UMLALB_zzxw_s, gen_helper_sve2_umlal_idx_s, false) +DO_SVE2_RRXR_TB(UMLALB_zzxw_d, gen_helper_sve2_umlal_idx_d, false) +DO_SVE2_RRXR_TB(UMLALT_zzxw_s, gen_helper_sve2_umlal_idx_s, true) +DO_SVE2_RRXR_TB(UMLALT_zzxw_d, gen_helper_sve2_umlal_idx_d, true) -DO_SVE2_RRXR_TB(trans_SMLSLB_zzxw_s, gen_helper_sve2_smlsl_idx_s, false) -DO_SVE2_RRXR_TB(trans_SMLSLB_zzxw_d, gen_helper_sve2_smlsl_idx_d, false) -DO_SVE2_RRXR_TB(trans_SMLSLT_zzxw_s, gen_helper_sve2_smlsl_idx_s, true) -DO_SVE2_RRXR_TB(trans_SMLSLT_zzxw_d, gen_helper_sve2_smlsl_idx_d, true) +DO_SVE2_RRXR_TB(SMLSLB_zzxw_s, gen_helper_sve2_smlsl_idx_s, false) +DO_SVE2_RRXR_TB(SMLSLB_zzxw_d, gen_helper_sve2_smlsl_idx_d, false) +DO_SVE2_RRXR_TB(SMLSLT_zzxw_s, gen_helper_sve2_smlsl_idx_s, true) +DO_SVE2_RRXR_TB(SMLSLT_zzxw_d, gen_helper_sve2_smlsl_idx_d, true) -DO_SVE2_RRXR_TB(trans_UMLSLB_zzxw_s, gen_helper_sve2_umlsl_idx_s, false) -DO_SVE2_RRXR_TB(trans_UMLSLB_zzxw_d, gen_helper_sve2_umlsl_idx_d, false) -DO_SVE2_RRXR_TB(trans_UMLSLT_zzxw_s, gen_helper_sve2_umlsl_idx_s, true) -DO_SVE2_RRXR_TB(trans_UMLSLT_zzxw_d, gen_helper_sve2_umlsl_idx_d, true) +DO_SVE2_RRXR_TB(UMLSLB_zzxw_s, gen_helper_sve2_umlsl_idx_s, false) +DO_SVE2_RRXR_TB(UMLSLB_zzxw_d, gen_helper_sve2_umlsl_idx_d, false) +DO_SVE2_RRXR_TB(UMLSLT_zzxw_s, gen_helper_sve2_umlsl_idx_s, true) +DO_SVE2_RRXR_TB(UMLSLT_zzxw_d, gen_helper_sve2_umlsl_idx_d, true) #undef DO_SVE2_RRXR_TB #define DO_SVE2_RRXR_ROT(NAME, FUNC) \ - static bool trans_##NAME(DisasContext *s, arg_##NAME *a) \ - { \ - return do_sve2_zzzz_data(s, a->rd, a->rn, a->rm, a->ra, \ - (a->index << 2) | a->rot, FUNC); \ - } + TRANS_FEAT(NAME, aa64_sve2, gen_gvec_ool_zzzz, FUNC, \ + a->rd, a->rn, a->rm, a->ra, (a->index << 2) | a->rot) DO_SVE2_RRXR_ROT(CMLA_zzxz_h, gen_helper_sve2_cmla_idx_h) DO_SVE2_RRXR_ROT(CMLA_zzxz_s, gen_helper_sve2_cmla_idx_s) From patchwork Mon May 30 16:05:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577210 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp390805mag; Mon, 30 May 2022 09:30:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ/agzTxKWDKrEoskGJPX+4Q/taF5mHYA8WksjW6BmiTYqdYLP7P+BYAbajmWqOhvBSWuf X-Received: by 2002:a05:622a:110f:b0:2f3:c9f1:ada4 with SMTP id e15-20020a05622a110f00b002f3c9f1ada4mr44797249qty.197.1653928245416; Mon, 30 May 2022 09:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928245; cv=none; d=google.com; s=arc-20160816; b=iXKn2FQLlHARpKK/OAFEq9kpOUufbLMtQIpRpq048gmojURiU5rpMKOcdzd/8wfWFO N9PJLE0It3D1LmCilh1fDvZZ01qfahkxnZdgCdEY7cMDYXl6r6LlgmcUutP1wCoMJ92m ImPldnTeOE3lhLYMnxwolyOqd4jCDe+75wqA76xjHYut2xR6t8pWUXzU/oV8qrrVJ0m2 L7r4nqaY5+81THoFFeHKovY0X6EXKZoY1zl6iaM1zPXBOTViv4L2kydBkqnaFd+00U1g 4WCppi2T6bI89WD0iW6w5Ltu2oAk1rqqNVVcqyuD40xXjvfx1RDv6CHr4DsfLbciZilX 2lNw== 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=QkImHyEx6gI+wlg1HnsBHPkyBHw+SkdzfryZkr3IJ+w=; b=RG6Weg22xbAUYtJc+M6aPn0brRG1mnss8sot+ErwMjg8UlHvMRAginIr9R38bBKkH3 0wsL5xjM9sinvu5YzflwNoIG2Zot/NXZ6Uzn1blzjtny+rpypOpcwZMLe7X7WSCuTVaY tfioTWlfF6j3AS0PDy9iNDvI+ww2UvPnEu9slnwGbq0zEp367gH9KXsvx9Wo12NaEGVM jT3GG556OiB+WHU1cDcK7QHMG01ugrNNM92FhygGveTEDtKmRPK1jl/fqX+ZICWWwWxv HuEqpm98DqlA51OnZhKdiKj7YQqBmVuDzEWPryzB2zi7feECGh68IdnCAK/3Qe9NpZZI Rm5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=md1nM76+; 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 b17-20020a376711000000b006a051c84664si6248868qkc.409.2022.05.30.09.30.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:30:45 -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=md1nM76+; 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]:58400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviI0-0001Cr-Qy for patch@linaro.org; Mon, 30 May 2022 12:30:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0002xG-RK for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:45652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0007Ek-FC for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: by mail-wm1-x329.google.com with SMTP id n124-20020a1c2782000000b003972dfca96cso6701293wmn.4 for ; Mon, 30 May 2022 09:07:27 -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=QkImHyEx6gI+wlg1HnsBHPkyBHw+SkdzfryZkr3IJ+w=; b=md1nM76+L0JTaoVukpr6nLp1pieeZrmWrtw4JFN4/45CKEGSdQTyD6FonXRCLJKWJr r1T19IYvYUGOQl157Wl6YRQ12WQo6FktyYM7Q2vQg97yiEiI/qb59/b7qYRJvh+AaIbh QFhu90wk3JhnhhUZB/rIXtiqujZDunMSsPzYxWrJ8KMDaWzsic9RNTnnrm5mXJttr4iL EADbGTqZnDc9AoYywWZFIwb+mpf4HemjnPi6YI9fiINZjYFtP+C6gA2KfMw9/EF66qBk wxDkVmUorxD+3jxVuPXdqAzCYHKpDXZBJ7eV3IgkUi8na9YE7cLv6x2hppNBjX3a+U1O WiDQ== 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=QkImHyEx6gI+wlg1HnsBHPkyBHw+SkdzfryZkr3IJ+w=; b=I8wWpSbNgaJxltKnzaat5kzxIwzVjmy5xpm4+dqukKJV7P/sZffP+e3gh+KETOX8rF Os3jxyZTmngMyMHrKNZlTDApQeSgaKvhuW7RLGccAx8VByH0kuHzuq7SGItGl0Ewrq5R oJXdF5ZKytMway2bonr9lstFYY7kq4u4e5Qxgj+ARLFBr9vJn2tEYpU/omXz1mtt7khy CHx0pj2ubivISOpDdebLn/ks4/FlMaRHylI0nNaGkEaURb4yeb/drrNALplxn7c7pZlk u8h1Hy7+IDnXYL/zERum73wRy4eAvfSn3iUIEkzyz1zODvw46t4pIeV8X4EBhjXit8sA 8LYA== X-Gm-Message-State: AOAM532xMdgr0fgUk3qp3E0Z/7eYfjrT6LeXqQh3G+czRoDol+v4p9q9 5e4gbPwZAwc014NwHWcIFZz/EV5dpO+MRA== X-Received: by 2002:a1c:f405:0:b0:397:56ec:b8fb with SMTP id z5-20020a1cf405000000b0039756ecb8fbmr19344875wma.99.1653926846611; Mon, 30 May 2022 09:07:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 020/117] target/arm: Use TRANS_FEAT for do_sve2_zzw_data Date: Mon, 30 May 2022 17:05:31 +0100 Message-Id: <20220530160708.726466-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zzw_data to use TRANS_FEAT and gen_gvec_ool_arg_zzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-18-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 297 ++++++++++++++++++------------------- 1 file changed, 145 insertions(+), 152 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c345399ace9..2347b60d8ef 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6711,79 +6711,99 @@ DO_SVE2_ZPZZ(USQADD, usqadd) * SVE2 Widening Integer Arithmetic */ -static bool do_sve2_zzw_ool(DisasContext *s, arg_rrr_esz *a, - gen_helper_gvec_3 *fn, int data) -{ - if (fn == NULL || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, data, fn); - } - return true; -} +static gen_helper_gvec_3 * const saddl_fns[4] = { + NULL, gen_helper_sve2_saddl_h, + gen_helper_sve2_saddl_s, gen_helper_sve2_saddl_d, +}; +TRANS_FEAT(SADDLB, aa64_sve2, gen_gvec_ool_arg_zzz, + saddl_fns[a->esz], a, 0) +TRANS_FEAT(SADDLT, aa64_sve2, gen_gvec_ool_arg_zzz, + saddl_fns[a->esz], a, 3) +TRANS_FEAT(SADDLBT, aa64_sve2, gen_gvec_ool_arg_zzz, + saddl_fns[a->esz], a, 2) -#define DO_SVE2_ZZZ_TB(NAME, name, SEL1, SEL2) \ -static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ -{ \ - static gen_helper_gvec_3 * const fns[4] = { \ - NULL, gen_helper_sve2_##name##_h, \ - gen_helper_sve2_##name##_s, gen_helper_sve2_##name##_d, \ - }; \ - return do_sve2_zzw_ool(s, a, fns[a->esz], (SEL2 << 1) | SEL1); \ -} +static gen_helper_gvec_3 * const ssubl_fns[4] = { + NULL, gen_helper_sve2_ssubl_h, + gen_helper_sve2_ssubl_s, gen_helper_sve2_ssubl_d, +}; +TRANS_FEAT(SSUBLB, aa64_sve2, gen_gvec_ool_arg_zzz, + ssubl_fns[a->esz], a, 0) +TRANS_FEAT(SSUBLT, aa64_sve2, gen_gvec_ool_arg_zzz, + ssubl_fns[a->esz], a, 3) +TRANS_FEAT(SSUBLBT, aa64_sve2, gen_gvec_ool_arg_zzz, + ssubl_fns[a->esz], a, 2) +TRANS_FEAT(SSUBLTB, aa64_sve2, gen_gvec_ool_arg_zzz, + ssubl_fns[a->esz], a, 1) -DO_SVE2_ZZZ_TB(SADDLB, saddl, false, false) -DO_SVE2_ZZZ_TB(SSUBLB, ssubl, false, false) -DO_SVE2_ZZZ_TB(SABDLB, sabdl, false, false) +static gen_helper_gvec_3 * const sabdl_fns[4] = { + NULL, gen_helper_sve2_sabdl_h, + gen_helper_sve2_sabdl_s, gen_helper_sve2_sabdl_d, +}; +TRANS_FEAT(SABDLB, aa64_sve2, gen_gvec_ool_arg_zzz, + sabdl_fns[a->esz], a, 0) +TRANS_FEAT(SABDLT, aa64_sve2, gen_gvec_ool_arg_zzz, + sabdl_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(UADDLB, uaddl, false, false) -DO_SVE2_ZZZ_TB(USUBLB, usubl, false, false) -DO_SVE2_ZZZ_TB(UABDLB, uabdl, false, false) +static gen_helper_gvec_3 * const uaddl_fns[4] = { + NULL, gen_helper_sve2_uaddl_h, + gen_helper_sve2_uaddl_s, gen_helper_sve2_uaddl_d, +}; +TRANS_FEAT(UADDLB, aa64_sve2, gen_gvec_ool_arg_zzz, + uaddl_fns[a->esz], a, 0) +TRANS_FEAT(UADDLT, aa64_sve2, gen_gvec_ool_arg_zzz, + uaddl_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(SADDLT, saddl, true, true) -DO_SVE2_ZZZ_TB(SSUBLT, ssubl, true, true) -DO_SVE2_ZZZ_TB(SABDLT, sabdl, true, true) +static gen_helper_gvec_3 * const usubl_fns[4] = { + NULL, gen_helper_sve2_usubl_h, + gen_helper_sve2_usubl_s, gen_helper_sve2_usubl_d, +}; +TRANS_FEAT(USUBLB, aa64_sve2, gen_gvec_ool_arg_zzz, + usubl_fns[a->esz], a, 0) +TRANS_FEAT(USUBLT, aa64_sve2, gen_gvec_ool_arg_zzz, + usubl_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(UADDLT, uaddl, true, true) -DO_SVE2_ZZZ_TB(USUBLT, usubl, true, true) -DO_SVE2_ZZZ_TB(UABDLT, uabdl, true, true) +static gen_helper_gvec_3 * const uabdl_fns[4] = { + NULL, gen_helper_sve2_uabdl_h, + gen_helper_sve2_uabdl_s, gen_helper_sve2_uabdl_d, +}; +TRANS_FEAT(UABDLB, aa64_sve2, gen_gvec_ool_arg_zzz, + uabdl_fns[a->esz], a, 0) +TRANS_FEAT(UABDLT, aa64_sve2, gen_gvec_ool_arg_zzz, + uabdl_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(SADDLBT, saddl, false, true) -DO_SVE2_ZZZ_TB(SSUBLBT, ssubl, false, true) -DO_SVE2_ZZZ_TB(SSUBLTB, ssubl, true, false) +static gen_helper_gvec_3 * const sqdmull_fns[4] = { + NULL, gen_helper_sve2_sqdmull_zzz_h, + gen_helper_sve2_sqdmull_zzz_s, gen_helper_sve2_sqdmull_zzz_d, +}; +TRANS_FEAT(SQDMULLB_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + sqdmull_fns[a->esz], a, 0) +TRANS_FEAT(SQDMULLT_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + sqdmull_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(SQDMULLB_zzz, sqdmull_zzz, false, false) -DO_SVE2_ZZZ_TB(SQDMULLT_zzz, sqdmull_zzz, true, true) +static gen_helper_gvec_3 * const smull_fns[4] = { + NULL, gen_helper_sve2_smull_zzz_h, + gen_helper_sve2_smull_zzz_s, gen_helper_sve2_smull_zzz_d, +}; +TRANS_FEAT(SMULLB_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + smull_fns[a->esz], a, 0) +TRANS_FEAT(SMULLT_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + smull_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(SMULLB_zzz, smull_zzz, false, false) -DO_SVE2_ZZZ_TB(SMULLT_zzz, smull_zzz, true, true) +static gen_helper_gvec_3 * const umull_fns[4] = { + NULL, gen_helper_sve2_umull_zzz_h, + gen_helper_sve2_umull_zzz_s, gen_helper_sve2_umull_zzz_d, +}; +TRANS_FEAT(UMULLB_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + umull_fns[a->esz], a, 0) +TRANS_FEAT(UMULLT_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, + umull_fns[a->esz], a, 3) -DO_SVE2_ZZZ_TB(UMULLB_zzz, umull_zzz, false, false) -DO_SVE2_ZZZ_TB(UMULLT_zzz, umull_zzz, true, true) - -static bool do_eor_tb(DisasContext *s, arg_rrr_esz *a, bool sel1) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_eoril_b, gen_helper_sve2_eoril_h, - gen_helper_sve2_eoril_s, gen_helper_sve2_eoril_d, - }; - return do_sve2_zzw_ool(s, a, fns[a->esz], (!sel1 << 1) | sel1); -} - -static bool trans_EORBT(DisasContext *s, arg_rrr_esz *a) -{ - return do_eor_tb(s, a, false); -} - -static bool trans_EORTB(DisasContext *s, arg_rrr_esz *a) -{ - return do_eor_tb(s, a, true); -} +static gen_helper_gvec_3 * const eoril_fns[4] = { + gen_helper_sve2_eoril_b, gen_helper_sve2_eoril_h, + gen_helper_sve2_eoril_s, gen_helper_sve2_eoril_d, +}; +TRANS_FEAT(EORBT, aa64_sve2, gen_gvec_ool_arg_zzz, eoril_fns[a->esz], a, 2) +TRANS_FEAT(EORTB, aa64_sve2, gen_gvec_ool_arg_zzz, eoril_fns[a->esz], a, 1) static bool do_trans_pmull(DisasContext *s, arg_rrr_esz *a, bool sel) { @@ -6794,38 +6814,39 @@ static bool do_trans_pmull(DisasContext *s, arg_rrr_esz *a, bool sel) if (a->esz == 0 && !dc_isar_feature(aa64_sve2_pmull128, s)) { return false; } - return do_sve2_zzw_ool(s, a, fns[a->esz], sel); + return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, sel); } -static bool trans_PMULLB(DisasContext *s, arg_rrr_esz *a) -{ - return do_trans_pmull(s, a, false); -} +TRANS_FEAT(PMULLB, aa64_sve2, do_trans_pmull, a, false) +TRANS_FEAT(PMULLT, aa64_sve2, do_trans_pmull, a, true) -static bool trans_PMULLT(DisasContext *s, arg_rrr_esz *a) -{ - return do_trans_pmull(s, a, true); -} +static gen_helper_gvec_3 * const saddw_fns[4] = { + NULL, gen_helper_sve2_saddw_h, + gen_helper_sve2_saddw_s, gen_helper_sve2_saddw_d, +}; +TRANS_FEAT(SADDWB, aa64_sve2, gen_gvec_ool_arg_zzz, saddw_fns[a->esz], a, 0) +TRANS_FEAT(SADDWT, aa64_sve2, gen_gvec_ool_arg_zzz, saddw_fns[a->esz], a, 1) -#define DO_SVE2_ZZZ_WTB(NAME, name, SEL2) \ -static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ -{ \ - static gen_helper_gvec_3 * const fns[4] = { \ - NULL, gen_helper_sve2_##name##_h, \ - gen_helper_sve2_##name##_s, gen_helper_sve2_##name##_d, \ - }; \ - return do_sve2_zzw_ool(s, a, fns[a->esz], SEL2); \ -} +static gen_helper_gvec_3 * const ssubw_fns[4] = { + NULL, gen_helper_sve2_ssubw_h, + gen_helper_sve2_ssubw_s, gen_helper_sve2_ssubw_d, +}; +TRANS_FEAT(SSUBWB, aa64_sve2, gen_gvec_ool_arg_zzz, ssubw_fns[a->esz], a, 0) +TRANS_FEAT(SSUBWT, aa64_sve2, gen_gvec_ool_arg_zzz, ssubw_fns[a->esz], a, 1) -DO_SVE2_ZZZ_WTB(SADDWB, saddw, false) -DO_SVE2_ZZZ_WTB(SADDWT, saddw, true) -DO_SVE2_ZZZ_WTB(SSUBWB, ssubw, false) -DO_SVE2_ZZZ_WTB(SSUBWT, ssubw, true) +static gen_helper_gvec_3 * const uaddw_fns[4] = { + NULL, gen_helper_sve2_uaddw_h, + gen_helper_sve2_uaddw_s, gen_helper_sve2_uaddw_d, +}; +TRANS_FEAT(UADDWB, aa64_sve2, gen_gvec_ool_arg_zzz, uaddw_fns[a->esz], a, 0) +TRANS_FEAT(UADDWT, aa64_sve2, gen_gvec_ool_arg_zzz, uaddw_fns[a->esz], a, 1) -DO_SVE2_ZZZ_WTB(UADDWB, uaddw, false) -DO_SVE2_ZZZ_WTB(UADDWT, uaddw, true) -DO_SVE2_ZZZ_WTB(USUBWB, usubw, false) -DO_SVE2_ZZZ_WTB(USUBWT, usubw, true) +static gen_helper_gvec_3 * const usubw_fns[4] = { + NULL, gen_helper_sve2_usubw_h, + gen_helper_sve2_usubw_s, gen_helper_sve2_usubw_d, +}; +TRANS_FEAT(USUBWB, aa64_sve2, gen_gvec_ool_arg_zzz, usubw_fns[a->esz], a, 0) +TRANS_FEAT(USUBWT, aa64_sve2, gen_gvec_ool_arg_zzz, usubw_fns[a->esz], a, 1) static void gen_sshll_vec(unsigned vece, TCGv_vec d, TCGv_vec n, int64_t imm) { @@ -6986,72 +7007,44 @@ static bool trans_USHLLT(DisasContext *s, arg_rri_esz *a) return do_sve2_shll_tb(s, a, true, true); } -static bool trans_BEXT(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_bext_b, gen_helper_sve2_bext_h, - gen_helper_sve2_bext_s, gen_helper_sve2_bext_d, - }; - if (!dc_isar_feature(aa64_sve2_bitperm, s)) { - return false; - } - return do_sve2_zzw_ool(s, a, fns[a->esz], 0); -} +static gen_helper_gvec_3 * const bext_fns[4] = { + gen_helper_sve2_bext_b, gen_helper_sve2_bext_h, + gen_helper_sve2_bext_s, gen_helper_sve2_bext_d, +}; +TRANS_FEAT(BEXT, aa64_sve2_bitperm, gen_gvec_ool_arg_zzz, + bext_fns[a->esz], a, 0) -static bool trans_BDEP(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_bdep_b, gen_helper_sve2_bdep_h, - gen_helper_sve2_bdep_s, gen_helper_sve2_bdep_d, - }; - if (!dc_isar_feature(aa64_sve2_bitperm, s)) { - return false; - } - return do_sve2_zzw_ool(s, a, fns[a->esz], 0); -} +static gen_helper_gvec_3 * const bdep_fns[4] = { + gen_helper_sve2_bdep_b, gen_helper_sve2_bdep_h, + gen_helper_sve2_bdep_s, gen_helper_sve2_bdep_d, +}; +TRANS_FEAT(BDEP, aa64_sve2_bitperm, gen_gvec_ool_arg_zzz, + bdep_fns[a->esz], a, 0) -static bool trans_BGRP(DisasContext *s, arg_rrr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_bgrp_b, gen_helper_sve2_bgrp_h, - gen_helper_sve2_bgrp_s, gen_helper_sve2_bgrp_d, - }; - if (!dc_isar_feature(aa64_sve2_bitperm, s)) { - return false; - } - return do_sve2_zzw_ool(s, a, fns[a->esz], 0); -} +static gen_helper_gvec_3 * const bgrp_fns[4] = { + gen_helper_sve2_bgrp_b, gen_helper_sve2_bgrp_h, + gen_helper_sve2_bgrp_s, gen_helper_sve2_bgrp_d, +}; +TRANS_FEAT(BGRP, aa64_sve2_bitperm, gen_gvec_ool_arg_zzz, + bgrp_fns[a->esz], a, 0) -static bool do_cadd(DisasContext *s, arg_rrr_esz *a, bool sq, bool rot) -{ - static gen_helper_gvec_3 * const fns[2][4] = { - { gen_helper_sve2_cadd_b, gen_helper_sve2_cadd_h, - gen_helper_sve2_cadd_s, gen_helper_sve2_cadd_d }, - { gen_helper_sve2_sqcadd_b, gen_helper_sve2_sqcadd_h, - gen_helper_sve2_sqcadd_s, gen_helper_sve2_sqcadd_d }, - }; - return do_sve2_zzw_ool(s, a, fns[sq][a->esz], rot); -} +static gen_helper_gvec_3 * const cadd_fns[4] = { + gen_helper_sve2_cadd_b, gen_helper_sve2_cadd_h, + gen_helper_sve2_cadd_s, gen_helper_sve2_cadd_d, +}; +TRANS_FEAT(CADD_rot90, aa64_sve2, gen_gvec_ool_arg_zzz, + cadd_fns[a->esz], a, 0) +TRANS_FEAT(CADD_rot270, aa64_sve2, gen_gvec_ool_arg_zzz, + cadd_fns[a->esz], a, 1) -static bool trans_CADD_rot90(DisasContext *s, arg_rrr_esz *a) -{ - return do_cadd(s, a, false, false); -} - -static bool trans_CADD_rot270(DisasContext *s, arg_rrr_esz *a) -{ - return do_cadd(s, a, false, true); -} - -static bool trans_SQCADD_rot90(DisasContext *s, arg_rrr_esz *a) -{ - return do_cadd(s, a, true, false); -} - -static bool trans_SQCADD_rot270(DisasContext *s, arg_rrr_esz *a) -{ - return do_cadd(s, a, true, true); -} +static gen_helper_gvec_3 * const sqcadd_fns[4] = { + gen_helper_sve2_sqcadd_b, gen_helper_sve2_sqcadd_h, + gen_helper_sve2_sqcadd_s, gen_helper_sve2_sqcadd_d, +}; +TRANS_FEAT(SQCADD_rot90, aa64_sve2, gen_gvec_ool_arg_zzz, + sqcadd_fns[a->esz], a, 0) +TRANS_FEAT(SQCADD_rot270, aa64_sve2, gen_gvec_ool_arg_zzz, + sqcadd_fns[a->esz], a, 1) static gen_helper_gvec_4 * const sabal_fns[4] = { NULL, gen_helper_sve2_sabal_h, From patchwork Mon May 30 16:05:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577209 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp389939mag; Mon, 30 May 2022 09:29:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX1z+9pF41ZOc7XrAETtyE/22D/FAc1FltrroF0tiMdpDq+tnwlihOE/dC75qx1u9bLBSZ X-Received: by 2002:a05:6214:764:b0:462:35cf:a0f8 with SMTP id f4-20020a056214076400b0046235cfa0f8mr34419547qvz.55.1653928167558; Mon, 30 May 2022 09:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928167; cv=none; d=google.com; s=arc-20160816; b=NzUq9wat1MlbKD+yq6QIxwK+Xae+cLF2LpW1nugbarNNaDmktjrwPToNacfY2jwFMm MLwDcvfuHDD3S2NyHx80mSM3tsbIJjEIaVvapUUJSiNUHKoUXvDWu8b/82KeKPJjXFj4 f6GQ8O16EMTXFpXcGMgtuMWcVD0m0nUCzTKkt/nIUMMgY4DzpkIffEgsC8Hy0dn3giNI AOrozmM2/7ZvSuTdf6irX1/tuQFF5KAnBnxFiBQiucUB31ITjGz+zpdYEgvfOHGKqJzb EsfrJZOjNSMkfJsd1ltZ7oiXo8lCzodrctrwxjpYkl6RVAVyaS9mRenxvGGYHoej8IQS Va7Q== 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=3GsKWbkWl7P0FpvZQ2r5heVDC7ND9InpXtLxndHj4lw=; b=FoAaKmv00Bb18cK+vfKYafVj5Ls0llI6ya7wX8Wgk8ZZO4gToAsm3sfmVB3DZz2toG u7/6OcVXDP5eslvAWA2R/TjD7WU7mnh4dEF+bTdUuoLbMiNObOFFiBIT3L69wCABqfIj 9dUJB0TugMM7RkQAWGluIiSjqLeWZmKTMBzoq1QYZkZI+LtD8gJWsd49tBJGWsF0VDAm aSdzVMVfL3mwqF7wuEeIzuvVhjuygisBF1mYn0VAW1KegYjm0zwg6MN5X1+yK8QpPumk zLLrFIDREcAZbwvON2RFj9Li3m8viq+2sNWrKKJPIC55VzZvtpf2KvQoH/OMg2rszunm gMjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zdZN0xgp; 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 bm25-20020a05620a199900b006a367f636f6si8429532qkb.731.2022.05.30.09.29.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:29: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=zdZN0xgp; 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]:55862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviGl-0007sb-37 for patch@linaro.org; Mon, 30 May 2022 12:29:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0002vh-7l for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0007Aa-FC for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:31 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15256837wrg.12 for ; Mon, 30 May 2022 09:07:27 -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=3GsKWbkWl7P0FpvZQ2r5heVDC7ND9InpXtLxndHj4lw=; b=zdZN0xgpERuAmXqXnchxrozXtAOmPNU8crPK5BR8r0veqvKr3oR77j5XSPpIpP+H/X FsZ5ocyoVHgDalbWcWgkIM15m3ZeaxkIrzpyx0VyQEH1tTtv723NiC/CxdSNRaiq8A7+ JpC1qNtWxN4SV2yS9pqDsAvGFT6KOhAy7sTGWnIbarkGecBHTgxRrFomNc05cPFeZq9z vk2yqXXa1/zFOIXguHNzXdn5CjyHtvLThsYnBc+2ectOskpwRwlzkmTklnt7nv+5bbPE W5Jso4hQcSL0M8Qc2qJXYbYUz5mgeSG/wilMSVxqqF5PUVm3B2kS7jN9SsKE1m7nFiiy QSGQ== 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=3GsKWbkWl7P0FpvZQ2r5heVDC7ND9InpXtLxndHj4lw=; b=G/rtz3V/ARdFwBwR/ahyESOi33ksOLISNJLtuyo5DogmegbodxtvVnDmF6Tqmod2QI DvE1rhgpR/6TNc+SWdcqcihYRMJYnz54HPfls8Kfi2YbJ2A5VWlKoXYNOz1FzBl8lDw6 A35VfhEFBVfLWxEU+2qjB7vm0kipCc5+hNG4Sc5+nlXA5HUzk0O0QWZXlxE+Bm6EwcKv pWAi0W4p/fI+2vM5XycTz6vd+BZyk9WOnQjQfy5OPxdkzy1o/mYeaFoJfDselffxr/2f 7ZIH181RJiusfPfIK9DHnfw9rsa3gqclZkWsPXbsvDsZUAYP2omQWTzKiHkFYvLLmbAC H2ww== X-Gm-Message-State: AOAM530gZFxMMXP6on17m8y/u+732VI2qKYn7lLcFsh2DhCuNbuM7NUb Pf0w8RF2vLql6Z/pZjHuOh653Yh0KlwNnA== X-Received: by 2002:a5d:47a3:0:b0:20e:5c89:9da2 with SMTP id 3-20020a5d47a3000000b0020e5c899da2mr47913089wrb.277.1653926847292; Mon, 30 May 2022 09:07:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 021/117] target/arm: Use TRANS_FEAT for USDOT_zzzz Date: Mon, 30 May 2022 17:05:32 +0100 Message-Id: <20220530160708.726466-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 This is the last direct user of tcg_gen_gvec_4_ool. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-19-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 2347b60d8ef..b4307f062c3 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -8044,21 +8044,8 @@ static gen_helper_gvec_4 * const sqrdcmlah_fns[] = { TRANS_FEAT(SQRDCMLAH_zzzz, aa64_sve2, gen_gvec_ool_zzzz, sqrdcmlah_fns[a->esz], a->rd, a->rn, a->rm, a->ra, a->rot) -static bool trans_USDOT_zzzz(DisasContext *s, arg_USDOT_zzzz *a) -{ - if (a->esz != 2 || !dc_isar_feature(aa64_sve_i8mm, s)) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_4_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - vsz, vsz, 0, gen_helper_gvec_usdot_b); - } - return true; -} +TRANS_FEAT(USDOT_zzzz, aa64_sve_i8mm, gen_gvec_ool_arg_zzzz, + a->esz == 2 ? gen_helper_gvec_usdot_b : NULL, a, 0) TRANS_FEAT(AESMC, aa64_sve2_aes, gen_gvec_ool_zz, gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt) From patchwork Mon May 30 16: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: 577219 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp397399mag; Mon, 30 May 2022 09:39:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygv4Ggp5WMYO5+Uq32pbVj35L8AaUYiaIsNMmdtxqVHn15+TnKobOdg8K3szeWqWI9qXJI X-Received: by 2002:a05:6214:1d09:b0:461:e186:a67f with SMTP id e9-20020a0562141d0900b00461e186a67fmr47994628qvd.131.1653928758203; Mon, 30 May 2022 09:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928758; cv=none; d=google.com; s=arc-20160816; b=G2UbEupqqEiKAF4mTCNzmjV1bL84zCZkSRY3Jc2RqpmhKfbZkMkOpyqQYFSFYL0ZbU SMPbrqKV3TcDfmnhu0awz3LVTchNo54iGoto6O3oKZBjrj21JIiUtj2+YkfOEvhBFtYD maN7kZgwkQvvZY++pqHc/MuoU+xMRcJEcnXk+xelehLme4WdzNLwWkwHxPM50jEvuiDv 3EqNS7rBPMMrKl89DLmYl0jhLeDBao0wXpSf/yzz19OH1AIyGJZCC3Wp7F/HXTQiGU3D tv+L7GOABv4NRfRjCqkcAbTO4xEMw62VXCG0SO2Fuv4vTV9EyZjca0AGBm72D9qGT9nk v+SA== 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=GEuut8RGJ90gY/DGoHG5nlaxN0h7NG7w8e8WiIbpp7U=; b=03zHgwwWjk+OuySBaV1pBYlzyXTTOuZA9OkWkuN6un5KDkW2rBiXWJ6y6PS7uldiok QfZ1godHvXjMkMVUO1H2DeYWnFDlcOEy7tPgUHChhQK7paQHZIVZqMWPGrzI1NTN99rG LlpUGZYD9uJxWMaFchdLXUCBvz5Fa0/gdvO0rsXn4x72WaivY9GPCzZJ4dbEHdl7HSqF A0VZWjKY89hFPIefsesvMUmB4BdRj+hy4H4m0tfkhQsu6OP2kMeoWYRNjGQQlS2IOckq SEN+9EmAzqScmeYx9BnN0lQSUf5HMWMQY7F0d6eWrgQ2oLiv71uIKPm4JEQ6n6qs8AUH z2Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OMoMajYm; 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 a9-20020a056214062900b00461e61899f2si7663530qvx.208.2022.05.30.09.39.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:39:18 -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=OMoMajYm; 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]:50006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviQH-00079l-Lr for patch@linaro.org; Mon, 30 May 2022 12:39:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0002wA-FH for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:44824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0007DP-FN for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: by mail-wr1-x432.google.com with SMTP id e25so4650957wra.11 for ; Mon, 30 May 2022 09:07:28 -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=GEuut8RGJ90gY/DGoHG5nlaxN0h7NG7w8e8WiIbpp7U=; b=OMoMajYmRvc4203kR1fGiJS3qwnBYmkqni1jCIbYAMNGD9TOrovirDhpXDF5VaPPMi bsXCWP7dS1lc1243QDUlOPkWbrl492uIPcNhqXDtDXizCqFl4OHGIizsuMzMrSRO9zs/ JCDjqsSL3KDPC82a91XjEm1zcWN7gCUgSNPmNrNB6kR8zn16IF993XZssDsYpTso3zkB xIKaJONM/0lP9uhCkbIdCUqZfjfOKemFYcMXW4mHpXAjB2CHjGdGPzWhX1jf/OSrenKG X/Vse7//1f7AWWwPs9b2IGCV4uxq4vI06nm8dix5Z9vSvPwaudhqtIR9CsMVqmXgz79+ JoSA== 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=GEuut8RGJ90gY/DGoHG5nlaxN0h7NG7w8e8WiIbpp7U=; b=od4S2fzBf8pTiv3YPLdIRHoJfu0u23NbYn5nhR/v1bH7nEyb+FpOcQyADy4NTSi4gz ounRykni5O3eZK7lkRWuyWXUBjanFtfubHMUN82ce8tIYO8cJn1IV5eYVbQCaHO9/Vxu K8gzFRKxaOpCKBxWE0GZItDnikguYuMMmcVDjRE9oMXcmB2nogyRgGYKI1YHvykUGxew qrnJYPX+3Mai+iH4iKBBrNVoT/XGLEChYgFH47n0T53CQ2WHQYz051JCRvQ22yzLNb5m Y8c5TaUgzwYAUdD+4WNnVnkEPp5QVrKkKDsnFPpg+CuzoEMfI7GV9tRqS/G0/GIaJZFk vo6g== X-Gm-Message-State: AOAM5335RPO/SsL18Qxfze+i+Al8Jzr5t1g/t4AbTU3FoayuEjdg1XhX +4HxuCBFK97B44SP6RDqcbzcSfD0IkrzPg== X-Received: by 2002:a5d:47c5:0:b0:20e:73a0:79a0 with SMTP id o5-20020a5d47c5000000b0020e73a079a0mr43523196wrc.632.1653926848060; Mon, 30 May 2022 09:07:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:27 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 022/117] target/arm: Move null function and sve check into gen_gvec_ool_zzp Date: Mon, 30 May 2022 17:05:33 +0100 Message-Id: <20220530160708.726466-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-20-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b4307f062c3..e81c2de37f0 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -206,14 +206,20 @@ static bool gen_gvec_ool_arg_zzxz(DisasContext *s, gen_helper_gvec_4 *fn, } /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ -static void gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, +static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - pred_full_reg_offset(s, pg), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + pred_full_reg_offset(s, pg), + vsz, vsz, data, fn); + } + return true; } /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ @@ -801,13 +807,7 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn) { - if (fn == NULL) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0); - } - return true; + return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0); } #define DO_ZPZ(NAME, name) \ @@ -986,20 +986,13 @@ static bool do_movz_zpz(DisasContext *s, int rd, int rn, int pg, gen_helper_sve_movz_b, gen_helper_sve_movz_h, gen_helper_sve_movz_s, gen_helper_sve_movz_d, }; - - if (sve_access_check(s)) { - gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); - } - return true; + return gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); } static bool do_zpzi_ool(DisasContext *s, arg_rpri_esz *a, gen_helper_gvec_3 *fn) { - if (sve_access_check(s)) { - gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); - } - return true; + return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); } static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a) From patchwork Mon May 30 16:05:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577215 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp394439mag; Mon, 30 May 2022 09:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUuWjMW9tIistbgRVxrD6bGdiBTkNMCrmYoa8JBzfNECKJs9uLFnZX0jr9F6flHxmXSSec X-Received: by 2002:a05:6214:626:b0:462:34f8:8ef8 with SMTP id a6-20020a056214062600b0046234f88ef8mr34763832qvx.102.1653928553608; Mon, 30 May 2022 09:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928553; cv=none; d=google.com; s=arc-20160816; b=iD4/PvnSZOtfxi6twN3kb7oVjsuldfFqWwCPp/zcvX8akercsNe0eN9lwxuOod4J4d vWq97dQVqy7H9EXeEEq5gN3pux1estvpnLJSXfFXnu4+l9d6F2uTRhThG07i/dlG8hmV wMDATFapibWeYVpIMwVMgWMpz9LvSsCbvU2vVQyiCVRx1vr2r3UsN/W1rngaYUhotr1E L6xHC3gjrcJ2kf48Y429T6nbtEvKy9zAw/z2WFIe+M1JdY/zLGavnKCH7w74TerFMrcz JRiMU8/PyWrQDbsHSbsiTpeRAujIi65dxyu9n+5clNQSPlYgzNupqEmJ7bD99RZL6HNb FB8w== 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=41lJnygvy+J/py2l6M2rkfObr0Gi8yPksczak9lmeMw=; b=EuVO4fgUvTpSfPyfuF/FWp1GBIc061SZu+fJVSUeX9IYooW3922V83bhooLxcW9zq8 JNionVzHfCMrtCxUgrPow2C+p+ue9rTGck/vN0McEeXxXNZgZ9DcRZXvy8MROL1osdJQ o0fEzZsQ4GaQxU4lHT8YXuvNvK1xKUyb+KUZCZJ6sQs+mlYBIhp453qZV1+zI8Lflffz wVc1QLh4qFgL87zHE37LMStqBfcHpGWI2TdPnn2bDNYnWc4rLjdGLp7sSZcNADYQlsZJ bMFZAyDWVzIxCAfIj4PY27xUMrxBkM/mdJwe1LoGmP0JHXtSFtG4MWZuYWt0zpmkIFZm 9Vtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lkfsT3Cf; 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 h17-20020a05622a171100b002f1d71bae88si7375195qtk.642.2022.05.30.09.35.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:35:53 -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=lkfsT3Cf; 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]:41426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviMz-00015T-10 for patch@linaro.org; Mon, 30 May 2022 12:35:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0002xE-QZ for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0007Aw-FC for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:07:29 -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=41lJnygvy+J/py2l6M2rkfObr0Gi8yPksczak9lmeMw=; b=lkfsT3CfcwQf/nyl8EMORSTvVVxMHk5qL6CHH1GOPX/dtGcGngC6WPwa7oGPunp8Ix YrM4o+DE9KuFQlFwZWZmRnMOKMTKzGvkwcBXBfz6AQHchlmIZNHXf9J77PQ5pfzFT555 ZcpIwdbxDER5rYdFLYqJaow/PbZy4oVlWPJde3ynffKCu7okL4vMWjPDYrkGMniXnF3x bO6V8KsHbdVisbD/VIL+u6ykxo3ac79Ob2Yp1IkwLJ2PpkeBxUj3hTGxYylpM+lQQ97w 81GkIOgAIYvaKsB2mbs1Ba6Y9z80a3evsf6uFqYZDReE+pSUPcqxm4mB0zW/dvc6cUSn 9ajA== 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=41lJnygvy+J/py2l6M2rkfObr0Gi8yPksczak9lmeMw=; b=8FWk6cCH1nX+rrBz21hBcxsDuU9ZWkaVPrLcol2xppvyNWQpcaOVcWWeyajgbysVNQ /aExklrNXyzwxxM47x5Gn+YUbpPvZUKMblngMCmZSBaXQO0KVDsQlyfOBYYAcuEVEDJi wt5gevrZZKJlWZpT3uG0j2ZxADClhSzA2gqtF3N2OODK8zmyl/VJW2QAgOSkwt3Kehp1 OQ0+0itb/fmCxY0t0z9D1mhyrhz38juAMqXcmhwLLw9vhVeUqToHrj9z8Xpr9odduViQ /OzpoY3Qz3Nzq+8XXiqG3s+wIvu/LWxMyq9S7l7N+oEkRrJjb9TrqJGmIWfCzaKSrQdf o14A== X-Gm-Message-State: AOAM533MAe6QXuiIOjJPbrMimL3q6Cc9L8ybunijGadcHd/h/zXqH1m2 NuJ2myoGJw/dJpaJynIZ/WfP7+DtJ4dRQA== X-Received: by 2002:a5d:47a1:0:b0:20f:ecc4:7f6c with SMTP id 1-20020a5d47a1000000b0020fecc47f6cmr28370340wrb.236.1653926848881; Mon, 30 May 2022 09:07:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 023/117] target/arm: Introduce gen_gvec_ool_arg_zpz Date: Mon, 30 May 2022 17:05:34 +0100 Message-Id: <20220530160708.726466-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 gen_gvec_ool_arg_zpz instead of gen_gvec_ool_zzp when the arguments come from arg_rpr_esz. Replaces do_zpz_ool. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-21-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 45 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e81c2de37f0..be426db6a93 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -222,6 +222,13 @@ static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, return true; } +static bool gen_gvec_ool_arg_zpz(DisasContext *s, gen_helper_gvec_3 *fn, + arg_rpr_esz *a, int data) +{ + return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, data); +} + + /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ static void gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int pg, int data) @@ -805,11 +812,6 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) *** SVE Integer Arithmetic - Unary Predicated Group */ -static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn) -{ - return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0); -} - #define DO_ZPZ(NAME, name) \ static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \ { \ @@ -817,7 +819,7 @@ static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \ gen_helper_sve_##name##_b, gen_helper_sve_##name##_h, \ gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \ }; \ - return do_zpz_ool(s, a, fns[a->esz]); \ + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); \ } DO_ZPZ(CLS, cls) @@ -836,7 +838,7 @@ static bool trans_FABS(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_fabs_s, gen_helper_sve_fabs_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_FNEG(DisasContext *s, arg_rpr_esz *a) @@ -847,7 +849,7 @@ static bool trans_FNEG(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_fneg_s, gen_helper_sve_fneg_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_SXTB(DisasContext *s, arg_rpr_esz *a) @@ -858,7 +860,7 @@ static bool trans_SXTB(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_sxtb_s, gen_helper_sve_sxtb_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_UXTB(DisasContext *s, arg_rpr_esz *a) @@ -869,7 +871,7 @@ static bool trans_UXTB(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_uxtb_s, gen_helper_sve_uxtb_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_SXTH(DisasContext *s, arg_rpr_esz *a) @@ -879,7 +881,7 @@ static bool trans_SXTH(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_sxth_s, gen_helper_sve_sxth_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_UXTH(DisasContext *s, arg_rpr_esz *a) @@ -889,17 +891,19 @@ static bool trans_UXTH(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_uxth_s, gen_helper_sve_uxth_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_SXTW(DisasContext *s, arg_rpr_esz *a) { - return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_sxtw_d : NULL); + return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_sxtw_d + : NULL, a, 0); } static bool trans_UXTW(DisasContext *s, arg_rpr_esz *a) { - return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_uxtw_d : NULL); + return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_uxtw_d + : NULL, a, 0); } #undef DO_ZPZ @@ -2659,7 +2663,7 @@ static bool trans_COMPACT(DisasContext *s, arg_rpr_esz *a) static gen_helper_gvec_3 * const fns[4] = { NULL, NULL, gen_helper_sve_compact_s, gen_helper_sve_compact_d }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } /* Call the helper that computes the ARM LastActiveElement pseudocode @@ -3008,7 +3012,7 @@ static bool trans_REVB(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_revb_s, gen_helper_sve_revb_d, }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_REVH(DisasContext *s, arg_rpr_esz *a) @@ -3019,12 +3023,13 @@ static bool trans_REVH(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_revh_s, gen_helper_sve_revh_d, }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_REVW(DisasContext *s, arg_rpr_esz *a) { - return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_revw_d : NULL); + return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_revw_d + : NULL, a, 0); } static bool trans_RBIT(DisasContext *s, arg_rpr_esz *a) @@ -3035,7 +3040,7 @@ static bool trans_RBIT(DisasContext *s, arg_rpr_esz *a) gen_helper_sve_rbit_s, gen_helper_sve_rbit_d, }; - return do_zpz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); } static bool trans_SPLICE(DisasContext *s, arg_rprr_esz *a) @@ -6624,7 +6629,7 @@ static bool do_sve2_zpz_ool(DisasContext *s, arg_rpr_esz *a, if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpz_ool(s, a, fn); + return gen_gvec_ool_arg_zpz(s, fn, a, 0); } static bool trans_URECPE(DisasContext *s, arg_rpr_esz *a) From patchwork Mon May 30 16:05:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577223 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp401650mag; Mon, 30 May 2022 09:44:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxXxNOKHd36Nuyd3P+/4L54UEg4Cc6dAS4nx56jRvcx164IrUwt470gFwJmW4EIogqhQfP X-Received: by 2002:a05:622a:508:b0:2f9:1cc0:2d50 with SMTP id l8-20020a05622a050800b002f91cc02d50mr39953888qtx.66.1653929074014; Mon, 30 May 2022 09:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929074; cv=none; d=google.com; s=arc-20160816; b=aaErULwGGhJFg6RgC3f8G87Q92FsQSBCR2aqF8ZSdsD1AEeQntY+Y782diouAp3CW1 /cNd63zbrFPoMDp6bK7N+lQiDvjwKRbtssOQQN0DNiLFX13FOI9p8uWXBf1ZVEKvKhPv rVVhOnkQ6VKStQvpxc37DN6Y4fsIxLrHijzgBEIzRMfVfjHYlQ9S43vjGXHOUHWBIZ0y ySnZnpxCJiAxI4Tw+AdDtCU0BxQgGg288k5GqQyNAo9lB4lfv7j0ugAgDVk9bJU9nKU2 1mGIVyykro48nM3+X+u6BvVa+ctVyYIa5SgQsf7kXIgShlXCRCi6blRMxXcApiJxdywu 4lAA== 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=sjtv4t0my/dHWs1YdQ1YtuTu6O5BNB6/TiEmEWputiQ=; b=O5M8/wQtqWVLR7H0PChvn9iu9VlHSUnf0U2l1SrpAJZfSSXprXxKqTgw7iD8aaGlaZ ucOfPPfeJBzbWuHrmGHWff54QQISoGpSMIx7jpndX7HuHqrhd5f2urVEmG1M6fgfiWif eL91iISB1cCYdVIUZwnnU4ap2bHyHrMZ6fQMl3Z1KRdGhlpOff3c/BFkKCa86STiR3bO 57VhjVxt9/rk9Ezi2Mw/xfwCt/3oYsW2kWlfLc596sKTpWdW47pNxNSVJXvyrnYJ5lOg gbQdZTba0TKU3GJ33FwogGWba8Uz5MnEOcZcySzdhzMs5gwG8GioNU3GeykM+ivRymNW aCiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CCKNGbvz; 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 k22-20020ac85fd6000000b002fe9af62a2bsi211200qta.450.2022.05.30.09.44.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:44:33 -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=CCKNGbvz; 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]:58596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviVN-0004jI-HV for patch@linaro.org; Mon, 30 May 2022 12:44:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0002xH-S3 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0007Be-K9 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15257378wrg.12 for ; Mon, 30 May 2022 09:07:30 -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=sjtv4t0my/dHWs1YdQ1YtuTu6O5BNB6/TiEmEWputiQ=; b=CCKNGbvzDig9EMB1z/dpIqurM77on2ZuYPJznNDgeL/YtkGQtbPQ+Xa9WXGeQfrsgr TXRDEnfpJJg4iiyhVusu3A5rHWm4uiiItdyo/FgTWPHTHiRCB6x1wlI4mbn4296H4N/0 yIGCY5H9hJ/JQozhQBuZ7LaHcNZDQl8fdrTe0zS98yaCeHYeW0k7OEyeYB1okPas063u icuLEwLGlqyQjK3yWvthv7Xisu1S9Dcv1pNpcMOBhAOmPjbJBdBDNl6ClZuTM39UHKBF Y/UTPmTcIyAxXGOxhsmy0CU9vBkvT05dXnLIe10qjiI1fcMgY3MIesAZr/4S1N+B9nWC FKOw== 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=sjtv4t0my/dHWs1YdQ1YtuTu6O5BNB6/TiEmEWputiQ=; b=o7FdE6ypIyRf8xWmy/u1lJO2ktnVvhUKaf1dcjhlF1qyeSgXtisrTRK+BiZPl6giso UC/uyjAKAB+s+6NWhPd2xp7O8YDmXv0xmc1mT3mzxh9XC+45U5OGsfn2LmKcfUmQn+oM j/Nk91c4ANtxveJZxDC9iuhdB/15Yi1HxaoLuzPpJjuProd3qS14um3Itr/r/PMmbs4M oi+I9J5nAk/VVDp+/c8qaMOBWVezOZrJjvs1dJxCb7764KI0aT3XST7f4/8saliOPBrj p1WbVP0UqcDtEHdCi0rdOmpHlWpRejFvX5UTUbxiEHf3KkcOA7n5jT0Ec2r+FjqDSTHK GLng== X-Gm-Message-State: AOAM531fD/u8GWjk5+qvnjgz5kcV+tx7XNQ3kP7XC6CaYlD3uVkBZ8xk RCcrcKCy/kZSD+Z7wqnjczW6YdcRs/adyA== X-Received: by 2002:adf:f2cd:0:b0:20e:5bf9:8e32 with SMTP id d13-20020adff2cd000000b0020e5bf98e32mr46794850wrp.161.1653926849685; Mon, 30 May 2022 09:07:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:29 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 024/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz Date: Mon, 30 May 2022 17:05:35 +0100 Message-Id: <20220530160708.726466-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions directly using gen_gvec_ool_arg_zpz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-22-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 189 ++++++++++++------------------------- 1 file changed, 60 insertions(+), 129 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index be426db6a93..d5a09a60af4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -812,101 +812,60 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) *** SVE Integer Arithmetic - Unary Predicated Group */ -#define DO_ZPZ(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \ -{ \ - static gen_helper_gvec_3 * const fns[4] = { \ - gen_helper_sve_##name##_b, gen_helper_sve_##name##_h, \ - gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \ +#define DO_ZPZ(NAME, FEAT, name) \ + static gen_helper_gvec_3 * const name##_fns[4] = { \ + gen_helper_##name##_b, gen_helper_##name##_h, \ + gen_helper_##name##_s, gen_helper_##name##_d, \ }; \ - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); \ -} + TRANS_FEAT(NAME, FEAT, gen_gvec_ool_arg_zpz, name##_fns[a->esz], a, 0) -DO_ZPZ(CLS, cls) -DO_ZPZ(CLZ, clz) -DO_ZPZ(CNT_zpz, cnt_zpz) -DO_ZPZ(CNOT, cnot) -DO_ZPZ(NOT_zpz, not_zpz) -DO_ZPZ(ABS, abs) -DO_ZPZ(NEG, neg) +DO_ZPZ(CLS, aa64_sve, sve_cls) +DO_ZPZ(CLZ, aa64_sve, sve_clz) +DO_ZPZ(CNT_zpz, aa64_sve, sve_cnt_zpz) +DO_ZPZ(CNOT, aa64_sve, sve_cnot) +DO_ZPZ(NOT_zpz, aa64_sve, sve_not_zpz) +DO_ZPZ(ABS, aa64_sve, sve_abs) +DO_ZPZ(NEG, aa64_sve, sve_neg) +DO_ZPZ(RBIT, aa64_sve, sve_rbit) -static bool trans_FABS(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - gen_helper_sve_fabs_h, - gen_helper_sve_fabs_s, - gen_helper_sve_fabs_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const fabs_fns[4] = { + NULL, gen_helper_sve_fabs_h, + gen_helper_sve_fabs_s, gen_helper_sve_fabs_d, +}; +TRANS_FEAT(FABS, aa64_sve, gen_gvec_ool_arg_zpz, fabs_fns[a->esz], a, 0) -static bool trans_FNEG(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - gen_helper_sve_fneg_h, - gen_helper_sve_fneg_s, - gen_helper_sve_fneg_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const fneg_fns[4] = { + NULL, gen_helper_sve_fneg_h, + gen_helper_sve_fneg_s, gen_helper_sve_fneg_d, +}; +TRANS_FEAT(FNEG, aa64_sve, gen_gvec_ool_arg_zpz, fneg_fns[a->esz], a, 0) -static bool trans_SXTB(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - gen_helper_sve_sxtb_h, - gen_helper_sve_sxtb_s, - gen_helper_sve_sxtb_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const sxtb_fns[4] = { + NULL, gen_helper_sve_sxtb_h, + gen_helper_sve_sxtb_s, gen_helper_sve_sxtb_d, +}; +TRANS_FEAT(SXTB, aa64_sve, gen_gvec_ool_arg_zpz, sxtb_fns[a->esz], a, 0) -static bool trans_UXTB(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - gen_helper_sve_uxtb_h, - gen_helper_sve_uxtb_s, - gen_helper_sve_uxtb_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const uxtb_fns[4] = { + NULL, gen_helper_sve_uxtb_h, + gen_helper_sve_uxtb_s, gen_helper_sve_uxtb_d, +}; +TRANS_FEAT(UXTB, aa64_sve, gen_gvec_ool_arg_zpz, uxtb_fns[a->esz], a, 0) -static bool trans_SXTH(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, NULL, - gen_helper_sve_sxth_s, - gen_helper_sve_sxth_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const sxth_fns[4] = { + NULL, NULL, gen_helper_sve_sxth_s, gen_helper_sve_sxth_d +}; +TRANS_FEAT(SXTH, aa64_sve, gen_gvec_ool_arg_zpz, sxth_fns[a->esz], a, 0) -static bool trans_UXTH(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, NULL, - gen_helper_sve_uxth_s, - gen_helper_sve_uxth_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const uxth_fns[4] = { + NULL, NULL, gen_helper_sve_uxth_s, gen_helper_sve_uxth_d +}; +TRANS_FEAT(UXTH, aa64_sve, gen_gvec_ool_arg_zpz, uxth_fns[a->esz], a, 0) -static bool trans_SXTW(DisasContext *s, arg_rpr_esz *a) -{ - return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_sxtw_d - : NULL, a, 0); -} - -static bool trans_UXTW(DisasContext *s, arg_rpr_esz *a) -{ - return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_uxtw_d - : NULL, a, 0); -} - -#undef DO_ZPZ +TRANS_FEAT(SXTW, aa64_sve, gen_gvec_ool_arg_zpz, + a->esz == 3 ? gen_helper_sve_sxtw_d : NULL, a, 0) +TRANS_FEAT(UXTW, aa64_sve, gen_gvec_ool_arg_zpz, + a->esz == 3 ? gen_helper_sve_uxtw_d : NULL, a, 0) /* *** SVE Integer Reduction Group @@ -2658,13 +2617,10 @@ TRANS_FEAT(TRN2_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, *** SVE Permute Vector - Predicated Group */ -static bool trans_COMPACT(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, NULL, gen_helper_sve_compact_s, gen_helper_sve_compact_d - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const compact_fns[4] = { + NULL, NULL, gen_helper_sve_compact_s, gen_helper_sve_compact_d +}; +TRANS_FEAT(COMPACT, aa64_sve, gen_gvec_ool_arg_zpz, compact_fns[a->esz], a, 0) /* Call the helper that computes the ARM LastActiveElement pseudocode * function, scaled by the element size. This includes the not found @@ -3004,44 +2960,19 @@ static bool trans_CPY_m_v(DisasContext *s, arg_rpr_esz *a) return true; } -static bool trans_REVB(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - gen_helper_sve_revb_h, - gen_helper_sve_revb_s, - gen_helper_sve_revb_d, - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const revb_fns[4] = { + NULL, gen_helper_sve_revb_h, + gen_helper_sve_revb_s, gen_helper_sve_revb_d, +}; +TRANS_FEAT(REVB, aa64_sve, gen_gvec_ool_arg_zpz, revb_fns[a->esz], a, 0) -static bool trans_REVH(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - NULL, - NULL, - gen_helper_sve_revh_s, - gen_helper_sve_revh_d, - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_3 * const revh_fns[4] = { + NULL, NULL, gen_helper_sve_revh_s, gen_helper_sve_revh_d, +}; +TRANS_FEAT(REVH, aa64_sve, gen_gvec_ool_arg_zpz, revh_fns[a->esz], a, 0) -static bool trans_REVW(DisasContext *s, arg_rpr_esz *a) -{ - return gen_gvec_ool_arg_zpz(s, a->esz == 3 ? gen_helper_sve_revw_d - : NULL, a, 0); -} - -static bool trans_RBIT(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_rbit_b, - gen_helper_sve_rbit_h, - gen_helper_sve_rbit_s, - gen_helper_sve_rbit_d, - }; - return gen_gvec_ool_arg_zpz(s, fns[a->esz], a, 0); -} +TRANS_FEAT(REVW, aa64_sve, gen_gvec_ool_arg_zpz, + a->esz == 3 ? gen_helper_sve_revw_d : NULL, a, 0) static bool trans_SPLICE(DisasContext *s, arg_rprr_esz *a) { From patchwork Mon May 30 16:05:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577213 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp392948mag; Mon, 30 May 2022 09:33:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy03t9vHmuFk522RQSHiheec3UR0TpI/18C6lr3o2gWR9+CVG9zTILJec+MsEemOgWRZUfx X-Received: by 2002:a05:6214:da3:b0:464:36d1:501b with SMTP id h3-20020a0562140da300b0046436d1501bmr11172604qvh.102.1653928411354; Mon, 30 May 2022 09:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928411; cv=none; d=google.com; s=arc-20160816; b=te/Y0WU1OgdWtXGhF08cPHYKD4f9hUXY8jblv+pjX7mBp8L9J/mfD1uZ5Cm7jogIG8 dqvI5mHAJAO5zgI0VHFELozR1BSLhC8vMmiR0vi0v9e4KqFoBcjtHxE/Xdima8htMB3T gJpMJGTjiTMiiwoeLXV+MDEdn2M7XqhMQCGG8tnpkNBZHdrS2v11aGhWCXtaeNiOLAz9 LgDIY1LA9leaeH7uTPDF9f4gUZ6jZrtQTybTiLG7C6++rHkQu/7I/7iDs2tXJQaw0D6U ADmzh4HOKwIbWrzZDB68PokORV83V+oMF0vFjWxNLDMEv11XpU6/EPrj0vjIUS23VQFm guDA== 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=to1P/F8jtgSpqEU9S2Gk4KaraD3n0l9S4bHiRVQ6FPc=; b=vTumb1+ctzlNN66HYKpEEYRd8/g2l7orv7BDFJMpMU+1FXlcH4+ZTQGy9MnvrBcp5T ctTop06rnrnXfR0R12nOncEMzRhxIh9PgpiNwpwKl2Goe+eGVvURNJ0QAqcBB+gKlJqZ s1bEaEq5F5FAaY1Zr/nqQxfQq/osmwgsNG//xIYnKzvzuWumlybHw4rUzbjZFiQIkUoH 1+bvE0FIUPg2X99CjYzdO/Y4Mr8/Ts+fyFAfI4HR9jkQowJLvXxiuWO/Ft40Ebx9AyWC OmazbmTAAHiynyCRf2bcDDRXYuIMCeH+tpo0ZnX/WiIpursffVQrMSsvis+lKY+c4Vng MKjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tSGu7/Uw"; 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 b12-20020ac85bcc000000b002fb0eace504si8170147qtb.544.2022.05.30.09.33.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:33:31 -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="tSGu7/Uw"; 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]:36022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviKg-0005dG-Tm for patch@linaro.org; Mon, 30 May 2022 12:33:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvZ-0002zB-Nc for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:33 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:34549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvX-0007BE-Cr for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:33 -0400 Received: by mail-wr1-x436.google.com with SMTP id e2so15314806wrc.1 for ; Mon, 30 May 2022 09:07:30 -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=to1P/F8jtgSpqEU9S2Gk4KaraD3n0l9S4bHiRVQ6FPc=; b=tSGu7/Uwpbvbv1eEAZC1fkRivle4/davDH6s5FKDoa9GcezM7M0WOm0jt+dNO4ElLv 1D8zTqDUWrMTMtOYumS3S80PXqLAqdHzWo6BUH/fOw3Ivjgp5b2jm2mPV3qwIyImc6Fv NgDBS0d+0xPfrI76kHWtxLROvUol5Uhm2+A8cfwWw0i9Kv1/KyiQuysl0ojPI9DvtlDT wK6IiL0sSjaPEBVA9UKP1naTnVLuFOUAKpbmcZWbHEsg9696P5E2aAbrq+wsUWFSGs41 lEoyWVevzFskO9TzD2d5HOrqtzWdBCQdh94TvRIKkd51dg0Gn87Z7wlMUhbrZOWnz5ae QYUQ== 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=to1P/F8jtgSpqEU9S2Gk4KaraD3n0l9S4bHiRVQ6FPc=; b=jZsJwFiZfVD4BGJgAD5jfhY7nVYxRNL4Wwntv2mBBJInI6PbN6AytixkdkQNsOiOha qoECWDnbBfBzEvlqRKR4qWcNAIpIqw9Cm3BRjQxuPG3Z5RC5RUvn3PHsgKbE/l7jisOf U/HX32nKkCX3lwS0ckYs8cdIiQoUhJm+CKYDuPg7+f5hMx+ob9wWbXckLH2OuoMLaG9e WojKvu2mJVxVhL47065Udye8xz+EEUcEitFj4JuU/CpAbJeRo7nGlperpGfkj9hwUDtC OYENkIWW9Colht5qaJ9iWkExLPX+r6J1zkUNiPmpqGZUF8YiHxuS6jVoEEfRnGprj43C GMzQ== X-Gm-Message-State: AOAM530m7gUGA+IbALaBLDvKDCesngTnMC8IMR3LWOER/iz6NnKmjR6r GMeD4eUrh3VgrjtLzYqCnBlL/YXm49CVbQ== X-Received: by 2002:a5d:58c2:0:b0:210:2baa:52b8 with SMTP id o2-20020a5d58c2000000b002102baa52b8mr8196482wrf.20.1653926850408; Mon, 30 May 2022 09:07:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 025/117] target/arm: Use TRANS_FEAT for do_sve2_zpz_data Date: Mon, 30 May 2022 17:05:36 +0100 Message-Id: <20220530160708.726466-26-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zpz_data to use TRANS_FEAT and gen_gvec_ool_arg_zpz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-23-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 53 ++++++++++---------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index d5a09a60af4..fe11cfed6bb 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6554,48 +6554,23 @@ static bool trans_UADALP_zpzz(DisasContext *s, arg_rprr_esz *a) * SVE2 integer unary operations (predicated) */ -static bool do_sve2_zpz_ool(DisasContext *s, arg_rpr_esz *a, - gen_helper_gvec_3 *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpz(s, fn, a, 0); -} +TRANS_FEAT(URECPE, aa64_sve2, gen_gvec_ool_arg_zpz, + a->esz == 2 ? gen_helper_sve2_urecpe_s : NULL, a, 0) -static bool trans_URECPE(DisasContext *s, arg_rpr_esz *a) -{ - if (a->esz != 2) { - return false; - } - return do_sve2_zpz_ool(s, a, gen_helper_sve2_urecpe_s); -} +TRANS_FEAT(URSQRTE, aa64_sve2, gen_gvec_ool_arg_zpz, + a->esz == 2 ? gen_helper_sve2_ursqrte_s : NULL, a, 0) -static bool trans_URSQRTE(DisasContext *s, arg_rpr_esz *a) -{ - if (a->esz != 2) { - return false; - } - return do_sve2_zpz_ool(s, a, gen_helper_sve2_ursqrte_s); -} +static gen_helper_gvec_3 * const sqabs_fns[4] = { + gen_helper_sve2_sqabs_b, gen_helper_sve2_sqabs_h, + gen_helper_sve2_sqabs_s, gen_helper_sve2_sqabs_d, +}; +TRANS_FEAT(SQABS, aa64_sve2, gen_gvec_ool_arg_zpz, sqabs_fns[a->esz], a, 0) -static bool trans_SQABS(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_sqabs_b, gen_helper_sve2_sqabs_h, - gen_helper_sve2_sqabs_s, gen_helper_sve2_sqabs_d, - }; - return do_sve2_zpz_ool(s, a, fns[a->esz]); -} - -static bool trans_SQNEG(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_sqneg_b, gen_helper_sve2_sqneg_h, - gen_helper_sve2_sqneg_s, gen_helper_sve2_sqneg_d, - }; - return do_sve2_zpz_ool(s, a, fns[a->esz]); -} +static gen_helper_gvec_3 * const sqneg_fns[4] = { + gen_helper_sve2_sqneg_b, gen_helper_sve2_sqneg_h, + gen_helper_sve2_sqneg_s, gen_helper_sve2_sqneg_d, +}; +TRANS_FEAT(SQNEG, aa64_sve2, gen_gvec_ool_arg_zpz, sqneg_fns[a->esz], a, 0) #define DO_SVE2_ZPZZ(NAME, name) \ static bool trans_##NAME(DisasContext *s, arg_rprr_esz *a) \ From patchwork Mon May 30 16:05:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577214 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp393635mag; Mon, 30 May 2022 09:34:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfon7qre8Y2PpyGPp5RvhjGhCMwRm8tlnvLBq7CwM3gbP056626SWngo7SUae+ivtwzB2X X-Received: by 2002:ac8:4e89:0:b0:304:b5e5:60d7 with SMTP id 9-20020ac84e89000000b00304b5e560d7mr2211768qtp.518.1653928479745; Mon, 30 May 2022 09:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928479; cv=none; d=google.com; s=arc-20160816; b=EDvqrKpsJxG69J08GiWTP5QGfs3wnNfGbGObazPiQR5g7rVaVPa2tsYzUFXrVxLGmQ vyC/3saxqT8tvbmQuNYwwucKAOKfiFuZf1IOpqcj/J+edQPyp/ct7jJ2lSgWHV0k1FOC LW7zyBBJ48DGOfIMLUaE3YT1PbPqiVHuYcG/3JIqzk8eqNGb8n92hkhw141dYvFSd6gb YMmscbUpjP9HpWQgcSp/isg20QtzIS/c59T0uSPSFnOC6k/yi21kkA+QBd2xWK955ABw gvQqUV7ZNoeCi0CLiIYjQ8jSGaWRS2dWU4EmziPPxOpdZdupMiNKiEDdwANWq66qSsh2 Y3hw== 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=OvlhncWfyUe1412V5tz1P2lfzLWRV6R/S+GAWEJJo2c=; b=ER39yDwy9VES/1Gpnt8qXWdHRD9krEXWdJkiElOfAO5atLStWWH+HhbJZrop4v5oHz kgpKpVMBVzsSP1/Bzm9hxwy2FgEXOBxwGMqop+V5fk+//Lx2Xg7oVAh4nN98g2Ozyo5P JPBCAlzc0lT3iuUeqyYJ9dk4C/Nj6I1FZ6BI+ELmk+7jhQ/F7S6l6JTfXUPGC2xHMBiJ PffrGrO3HIzDxewjzY8VX1KxFRBmj1y1a+u04SmQcmNH573OOXbBawvFT2AD3tQDcqe2 oz/YxLY5258Qrf4tWOVl7KGFlYpeEPPlWGGasCtqXQN58dcEUYTn8MR6TMWAX1tfEvQK f2Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ztMA4B2t; 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 r11-20020a0562140c8b00b0045acc88fa7esi6056647qvr.419.2022.05.30.09.34.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:34:39 -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=ztMA4B2t; 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]:38526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviLn-0007Pp-8f for patch@linaro.org; Mon, 30 May 2022 12:34:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhva-000311-D5 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:34 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0007FZ-KI for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:34 -0400 Received: by mail-wr1-x42d.google.com with SMTP id s24so7955976wrb.10 for ; Mon, 30 May 2022 09:07:32 -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=OvlhncWfyUe1412V5tz1P2lfzLWRV6R/S+GAWEJJo2c=; b=ztMA4B2tLUSqgMMKemj4zeTJLmfVbJIUFjZNbowjw4EXo86c2SZnv6iER05vX2w7oj oM6QaRIuv6K7w5oO5wHg+HztIDTBOt0JM6hySXZiQaqZnJcG5no2kSHRqV+yQYEzElIn kzLhTVY6f1iuyRgCLJ+RjgKUdEQWTs2YdYDGrGB626tvkcGD6JobED9kgsszsdRtzm25 eaxXhEDPXmKVTAjJyEDzvLITQaTrL/E1Z41RFAVE/ElSbavcNFGjtDSDTACIK7kaqbqh K4R4PD4Jv7xF5d/PEjGKkJ0fUBegeQXAsLo1+7BNKM7oBz62e52Je87ArnmW7sxrpCdP 0gSA== 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=OvlhncWfyUe1412V5tz1P2lfzLWRV6R/S+GAWEJJo2c=; b=tMLB8lffZ2mw7b6ft/q47o797k5DrvRjLCp20sgPgQBF3WOMKdhd51Yb+TvP4aJ95E FB320xT5teXGHaKFl6YdQPRZgB2ndwCD88qH/96mwN3Bvse+MxKfG3sT9jSM6W88zfiI H4Ozx6fd7CiAZcmqBiuizFbIguQ5R8T2UWYd6wQj2/jVoaFZBjfTvbp0KvX7rDtP7xad oh17nm2+h6Nr6yidcvHX/NeA7m25K9LgJ4eVK2DSdXAsTUjqiZ67UaBJnDu2IGodJMAb srv68escRv99HMpbI0g3JR6rS2xX3B2NIJahpuDEk3nV7RPYmuYaga+DZzVVxgDQJMSr z3Pw== X-Gm-Message-State: AOAM5315IHHTkZSppnQCqAGw7Efu4+T6CAanRaG2FYlI4wRrlfV+ovuT 7D3OQABMSHlbDlAtjHcGb5NWugpySDbcfQ== X-Received: by 2002:adf:f80a:0:b0:210:32ed:35bf with SMTP id s10-20020adff80a000000b0021032ed35bfmr5342247wrp.51.1653926851251; Mon, 30 May 2022 09:07:31 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 026/117] target/arm: Rename do_zpzi_ool to gen_gvec_ool_arg_zpzi Date: Mon, 30 May 2022 17:05:37 +0100 Message-Id: <20220530160708.726466-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Rename the function to match gen_gvec_ool_arg_zpz, and move to be adjacent. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-24-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index fe11cfed6bb..86e87a20782 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -228,6 +228,11 @@ static bool gen_gvec_ool_arg_zpz(DisasContext *s, gen_helper_gvec_3 *fn, return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, data); } +static bool gen_gvec_ool_arg_zpzi(DisasContext *s, gen_helper_gvec_3 *fn, + arg_rpri_esz *a) +{ + return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); +} /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ static void gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, @@ -952,12 +957,6 @@ static bool do_movz_zpz(DisasContext *s, int rd, int rn, int pg, return gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); } -static bool do_zpzi_ool(DisasContext *s, arg_rpri_esz *a, - gen_helper_gvec_3 *fn) -{ - return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); -} - static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a) { static gen_helper_gvec_3 * const fns[4] = { @@ -971,7 +970,7 @@ static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a) /* Shift by element size is architecturally valid. For arithmetic right-shift, it's the same as by one less. */ a->imm = MIN(a->imm, (8 << a->esz) - 1); - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } static bool trans_LSR_zpzi(DisasContext *s, arg_rpri_esz *a) @@ -988,7 +987,7 @@ static bool trans_LSR_zpzi(DisasContext *s, arg_rpri_esz *a) if (a->imm >= (8 << a->esz)) { return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); } else { - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } } @@ -1006,7 +1005,7 @@ static bool trans_LSL_zpzi(DisasContext *s, arg_rpri_esz *a) if (a->imm >= (8 << a->esz)) { return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); } else { - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } } @@ -1024,7 +1023,7 @@ static bool trans_ASRD(DisasContext *s, arg_rpri_esz *a) if (a->imm >= (8 << a->esz)) { return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); } else { - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } } @@ -1037,7 +1036,7 @@ static bool trans_SQSHL_zpzi(DisasContext *s, arg_rpri_esz *a) if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } static bool trans_UQSHL_zpzi(DisasContext *s, arg_rpri_esz *a) @@ -1049,7 +1048,7 @@ static bool trans_UQSHL_zpzi(DisasContext *s, arg_rpri_esz *a) if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } static bool trans_SRSHR(DisasContext *s, arg_rpri_esz *a) @@ -1061,7 +1060,7 @@ static bool trans_SRSHR(DisasContext *s, arg_rpri_esz *a) if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } static bool trans_URSHR(DisasContext *s, arg_rpri_esz *a) @@ -1073,7 +1072,7 @@ static bool trans_URSHR(DisasContext *s, arg_rpri_esz *a) if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } static bool trans_SQSHLU(DisasContext *s, arg_rpri_esz *a) @@ -1085,7 +1084,7 @@ static bool trans_SQSHLU(DisasContext *s, arg_rpri_esz *a) if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzi_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } /* From patchwork Mon May 30 16:05:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577217 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp395701mag; Mon, 30 May 2022 09:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTE56n3yda1nGyEyFBQ3SFIqPiGu/c9Coj2XRk3CS7+iv+B+Q/rccE/V8f9UgzIJxiuPS9 X-Received: by 2002:ac8:5dcd:0:b0:304:b530:20a1 with SMTP id e13-20020ac85dcd000000b00304b53020a1mr2538166qtx.12.1653928642194; Mon, 30 May 2022 09:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928642; cv=none; d=google.com; s=arc-20160816; b=vdNYEoyHPH9b9XrCky9pa83S80cL9pUbP2uVltfHR5O7jycsdTMhSunzOiscoJk5Me WWaqegeG+shgzZhyIh25682edN5bZLcV4quWhNgjHu9zl1vZtVDHBj2oRi72gXVVj2vF qG7wCinwbbe2OSV01sBTYD6TTDKIcf3cIys3zc3ea2IDl8IlFjydeuP5maGZ7Xn+8Ap+ OLfQ7J4LeCFaAmDekEqGRdRFKbGMXSG9AtZxowMRryjaib5HeurBWf4Nbn5UkceTA2wY IiYss+ue3ZSXbZOLNVdC8nVBuspgyEKel1EHPiDusKlQKMldI8K4kdf985uXEKI350am xYEw== 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=7uldykxv7S0T2FlbHU4wXyJpwce8lN2A/Vg/FiWs0Qc=; b=jwAKgCjyS3oZDCXAhPe7iVZqEpFGMttRXfo95Fk7UCAXUuyqSw3WnZlDpHuqkuSuR3 cihvC+FANPVjbvRQqBQBC3K4cGO446nPbwciiyS8JW82dHhB59JuKm9aM8MVdxJpRSGf mJQKitEvPdfvyAmRbHVi0pElhNXz03mCf0KAAe4iUrqvdX66elsnHjgKQVCdNjWCw1TI fH+4OmQVdAz8cxSIL9+ppwdgFP89xvLTDUx+0IC3FPgPsKRhvHC+VSvSQsD0RiidHf8q tx1K05HS+jmCZgpu0ih5Tt6rYitUDwSGqdSW7dT7Cf5rBFeOHhXEDu78q9BvKLCPm/0F y+8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="R+J2/1ok"; 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 iy9-20020a0562140f6900b0046451276b73si2007287qvb.497.2022.05.30.09.37.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:37:22 -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="R+J2/1ok"; 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]:44452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviOP-0003GM-9e for patch@linaro.org; Mon, 30 May 2022 12:37:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvb-00033o-7E for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:36 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvZ-0007Ft-FD for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:34 -0400 Received: by mail-wr1-x42c.google.com with SMTP id x17so6211540wrg.6 for ; Mon, 30 May 2022 09:07:33 -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=7uldykxv7S0T2FlbHU4wXyJpwce8lN2A/Vg/FiWs0Qc=; b=R+J2/1okI4P8LM0BVnvak3WB2DtlYa3zSs+KmdWYXoUolDZcgLg1jNmPtcAEvdtQAf nHPzsgTwOahpirdC7TvDTJQXS6xrh36fc5+DbD1wHcLI2tLym9vTKGLfENYrXT8+7oma cbg6I4AtPMfG57aDc1GYXb4ih/glIFLXyhWN9RK0Mw/eq7sMWyKb+dou7DC2hpao3s+k cHnSN1+3w6/XB5Ll3hWtFjzLyQ00zRtwdKTS6AeOFhfFjJGAu1jjdeK2oQxi9JoJoGzY ZbIkZ0MBhDXFwTI59aJrWkZhPPFAki66+9SGHTua7NbCV+lviPBJ15wlO0sVZs2OlEEq 5Acw== 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=7uldykxv7S0T2FlbHU4wXyJpwce8lN2A/Vg/FiWs0Qc=; b=L4OJlI4+JljlqsMwOag3CXJnRA78IL428XJNldQxHIGP+u+V7Nl6v10AXX6viwYBUc DBawzdxy9/Z1Q7PtYS8fYdqpyUJOXCm2YKXufeSvfdvsFFnvcOalEkj1xhL3bRJgmTZ6 jFPgOE8GbFglzzyG82uJPqirZuz6ti3+wpw+78PdEFTtQQSSP5f15c+S1vL9GpG8/Otr DZjNvkFcYUrOadRYpzUsTTvien/phCOWihuOMsjN1no/7+/XAOwMpmpRARdvRJhnGcYJ 16cVtFfRl2avNn/p7NcEWa64uIRpNl/2xTpyK5g4lREQNlM6XuwE7xqUDmw/gOxItc8e q5Kw== X-Gm-Message-State: AOAM532YywWBxe2hDhhEc20Me7Yr3Ij86rYRODSMwfQk+O8oq8YcR8CJ Fl9tsV15abGGVWEBx9jWCfWVe3BMTE86Qw== X-Received: by 2002:adf:f68f:0:b0:210:2ef7:e801 with SMTP id v15-20020adff68f000000b002102ef7e801mr7010417wrp.318.1653926852039; Mon, 30 May 2022 09:07:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 027/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzi Date: Mon, 30 May 2022 17:05:38 +0100 Message-Id: <20220530160708.726466-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert some SVE translation functions using gen_gvec_ool_arg_zpzi to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-25-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 85 ++++++++++++++------------------------ 1 file changed, 30 insertions(+), 55 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 86e87a20782..10614bf9151 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1027,65 +1027,40 @@ static bool trans_ASRD(DisasContext *s, arg_rpri_esz *a) } } -static bool trans_SQSHL_zpzi(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_sqshl_zpzi_b, gen_helper_sve2_sqshl_zpzi_h, - gen_helper_sve2_sqshl_zpzi_s, gen_helper_sve2_sqshl_zpzi_d, - }; - if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); -} +static gen_helper_gvec_3 * const sqshl_zpzi_fns[4] = { + gen_helper_sve2_sqshl_zpzi_b, gen_helper_sve2_sqshl_zpzi_h, + gen_helper_sve2_sqshl_zpzi_s, gen_helper_sve2_sqshl_zpzi_d, +}; +TRANS_FEAT(SQSHL_zpzi, aa64_sve2, gen_gvec_ool_arg_zpzi, + a->esz < 0 ? NULL : sqshl_zpzi_fns[a->esz], a) -static bool trans_UQSHL_zpzi(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_uqshl_zpzi_b, gen_helper_sve2_uqshl_zpzi_h, - gen_helper_sve2_uqshl_zpzi_s, gen_helper_sve2_uqshl_zpzi_d, - }; - if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); -} +static gen_helper_gvec_3 * const uqshl_zpzi_fns[4] = { + gen_helper_sve2_uqshl_zpzi_b, gen_helper_sve2_uqshl_zpzi_h, + gen_helper_sve2_uqshl_zpzi_s, gen_helper_sve2_uqshl_zpzi_d, +}; +TRANS_FEAT(UQSHL_zpzi, aa64_sve2, gen_gvec_ool_arg_zpzi, + a->esz < 0 ? NULL : uqshl_zpzi_fns[a->esz], a) -static bool trans_SRSHR(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_srshr_b, gen_helper_sve2_srshr_h, - gen_helper_sve2_srshr_s, gen_helper_sve2_srshr_d, - }; - if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); -} +static gen_helper_gvec_3 * const srshr_fns[4] = { + gen_helper_sve2_srshr_b, gen_helper_sve2_srshr_h, + gen_helper_sve2_srshr_s, gen_helper_sve2_srshr_d, +}; +TRANS_FEAT(SRSHR, aa64_sve2, gen_gvec_ool_arg_zpzi, + a->esz < 0 ? NULL : srshr_fns[a->esz], a) -static bool trans_URSHR(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_urshr_b, gen_helper_sve2_urshr_h, - gen_helper_sve2_urshr_s, gen_helper_sve2_urshr_d, - }; - if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); -} +static gen_helper_gvec_3 * const urshr_fns[4] = { + gen_helper_sve2_urshr_b, gen_helper_sve2_urshr_h, + gen_helper_sve2_urshr_s, gen_helper_sve2_urshr_d, +}; +TRANS_FEAT(URSHR, aa64_sve2, gen_gvec_ool_arg_zpzi, + a->esz < 0 ? NULL : urshr_fns[a->esz], a) -static bool trans_SQSHLU(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve2_sqshlu_b, gen_helper_sve2_sqshlu_h, - gen_helper_sve2_sqshlu_s, gen_helper_sve2_sqshlu_d, - }; - if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); -} +static gen_helper_gvec_3 * const sqshlu_fns[4] = { + gen_helper_sve2_sqshlu_b, gen_helper_sve2_sqshlu_h, + gen_helper_sve2_sqshlu_s, gen_helper_sve2_sqshlu_d, +}; +TRANS_FEAT(SQSHLU, aa64_sve2, gen_gvec_ool_arg_zpzi, + a->esz < 0 ? NULL : sqshlu_fns[a->esz], a) /* *** SVE Bitwise Shift - Predicated Group From patchwork Mon May 30 16:05:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577221 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp398576mag; Mon, 30 May 2022 09:40:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu+AZHHPUu5ZnQkw6tJ/J+0DBbuuXAPW5JpRKyUsRkZUn7/zpeT1dm/+b6mcE7K/T3/div X-Received: by 2002:ac8:5fd5:0:b0:2f3:b475:a553 with SMTP id k21-20020ac85fd5000000b002f3b475a553mr44730536qta.195.1653928858432; Mon, 30 May 2022 09:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928858; cv=none; d=google.com; s=arc-20160816; b=qmQy+2CMWUIUURlLxrqiyYEpf4aEGqFPZQfLG4Ym8Bif1/onT7ZQx4jtF+T0zeCoib myEB1eWwdyDT6aAlvXIl+TnsIsdAkM/mzz0HjlXNpNkalszZdkKhUsuV9G/jVsSXa8Bd 0UOeUQIFOcVrnJ8rJk3jXkqmXURJe3xsJLTKrx7SNImfkIk42w9Pxnjf9xCIB4lMwPUt gc4/x6yH3liF8e1nG+alXLYP82GDnlKyDab/7LoXCf7UfVz2PL/0WCAqUsLgjT4WoUgJ ap3m56fvHAo+3egpQrvbnTPePHapIzUswoRs4ZB5bcaoUA3i06AqEUBOh/2lHi2n6D9h 43TA== 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=WmScn6J55PqHshyd6EK1XzZi7oxAl9RtRW83tljGoNA=; b=gkM28w7H5qk0NImO7pGmY+M754IR2rRPlRqxIBrUN3yePcrXpdLgxwDIhevkW2V5hk 5apqUZyrjtGlNhmJzNbaeFFy4BqOeFdgmtSSC/B5BkYEW3V/dh7Jg6heRwqzhPatw6LL 7NugXZeRqjKUIcfBi9i2lvkSZkmvZ45HgPYXWPGpoiKxbDWpA4prAVIG61agqsGYV16g gEE3rPZI9htsyNZn4XlOLvi2uXyDNq4lp8kDERkQ2v1++lWbjiU6wv4TmsgMRRo4Ex9V hcHo6QMHKn+Y2NMTgunpR3qm8F/lZBywBtqHh9/3eP3gP2790mJiaUg9oMck5DUDSXei sG3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TnL/7kaf"; 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 x17-20020a05622a001100b002f3a20634dcsi7247626qtw.670.2022.05.30.09.40.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:40:58 -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="TnL/7kaf"; 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]:53130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviRr-0000tD-UQ for patch@linaro.org; Mon, 30 May 2022 12:40:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvc-00036x-DF for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:36 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvZ-0007BN-Kw for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:35 -0400 Received: by mail-wr1-x42a.google.com with SMTP id t6so15296903wra.4 for ; Mon, 30 May 2022 09:07:33 -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=WmScn6J55PqHshyd6EK1XzZi7oxAl9RtRW83tljGoNA=; b=TnL/7kafEOGLEbmU8OJJw65DKCYFJVmjuu8M8EFKSyUuzE0n4n0AxKLpVMQKFthJYQ StAvgysLUKc0kZ3MRDhRWjf2EPcS9ArM3gGaM5pFxGbOtiqtjY8sM0BmDxgBRykG36wL H8Y3weAFmM+nQTOIxI5TLOaUDt+ZdhD2Wottxu1AQM/Ox8kFqzdGFyhQkpfJVIP9Duht 7XPo3sFdOM7+e80Dax/BytRFPa9zGpmFVez4Naz0d1V9sC/Q1n+jPwVus7a7RDLUwIqF vBN7U8b/VbIJwlHF4GjZxx17ZuP0b7b6aaAMtkFDef+TA/cWR59Tk4qWdtKDpsdWFqHP A7yw== 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=WmScn6J55PqHshyd6EK1XzZi7oxAl9RtRW83tljGoNA=; b=BqNGI7PZR0Y9mlgY4cVg851Maf1sYGA+45P/pvyIC3THPWG5PYpVPVeHuV7cDGv9nU zCOmCmHvbqOSon17+6Zus6rMGWTG9jkMurD9ZrI4qSS6k7G6dPumc4geAi7PWpYUSy97 5ocWILPB/XQsvm4LIrHbW0AbQhTNk/oLNIbaj3Qb0xHOYS0Tmert6q1JJnwMUq/5YsMW XdVjKvmVz3ncgP3EZx/g1FB3UU2j1YHMsozGvFv5Hg0Flgx0r07De2EcQp7FbVFe7Tzv A+CuT1OfnlVU7TvW7OmekPYeisoBd0iqUysMkmtpZhcEyNNZLhifnXifOxFKNBixFHgQ Z1Jw== X-Gm-Message-State: AOAM531QjzS9h/rDNVPXpLlv8dInH6BIIBBWdb56wd5C15IeZ5UNYx9+ 8diqR++UtKND+vkK2K+ukMNN6yQb8dT/QQ== X-Received: by 2002:a5d:6c66:0:b0:20f:86f3:ea05 with SMTP id r6-20020a5d6c66000000b0020f86f3ea05mr40692033wrz.154.1653926852739; Mon, 30 May 2022 09:07:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:32 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 028/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzp Date: Mon, 30 May 2022 17:05:39 +0100 Message-Id: <20220530160708.726466-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-26-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 42 ++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 10614bf9151..fea7164d729 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -235,15 +235,21 @@ static bool gen_gvec_ool_arg_zpzi(DisasContext *s, gen_helper_gvec_3 *fn, } /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ -static void gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, +static bool gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int pg, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - pred_full_reg_offset(s, pg), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_4_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + pred_full_reg_offset(s, pg), + vsz, vsz, data, fn); + } + return true; } /* Invoke a vector expander on two Zregs. */ @@ -733,13 +739,7 @@ static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz *a) static bool do_zpzz_ool(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_4 *fn) { - if (fn == NULL) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, 0); - } - return true; + return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, 0); } /* Select active elememnts from Zn and inactive elements from Zm, @@ -2950,11 +2950,8 @@ TRANS_FEAT(REVW, aa64_sve, gen_gvec_ool_arg_zpz, static bool trans_SPLICE(DisasContext *s, arg_rprr_esz *a) { - if (sve_access_check(s)) { - gen_gvec_ool_zzzp(s, gen_helper_sve_splice, - a->rd, a->rn, a->rm, a->pg, a->esz); - } - return true; + return gen_gvec_ool_zzzp(s, gen_helper_sve_splice, + a->rd, a->rn, a->rm, a->pg, a->esz); } static bool trans_SPLICE_sve2(DisasContext *s, arg_rpr_esz *a) @@ -2962,11 +2959,8 @@ static bool trans_SPLICE_sve2(DisasContext *s, arg_rpr_esz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zzzp(s, gen_helper_sve_splice, - a->rd, a->rn, (a->rn + 1) % 32, a->pg, a->esz); - } - return true; + return gen_gvec_ool_zzzp(s, gen_helper_sve_splice, + a->rd, a->rn, (a->rn + 1) % 32, a->pg, a->esz); } /* From patchwork Mon May 30 16:05:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577227 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp405703mag; Mon, 30 May 2022 09:49:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFVDiKbP9Huruc3pR7A3mF1b9St1T/QYp1uZDoVDkdrwhXlJje/+bPXKWPH5zbxZyccqsv X-Received: by 2002:a05:620a:e0f:b0:6a5:e7fb:5d74 with SMTP id y15-20020a05620a0e0f00b006a5e7fb5d74mr10679583qkm.46.1653929378831; Mon, 30 May 2022 09:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929378; cv=none; d=google.com; s=arc-20160816; b=xgPL8OkPhoJG05vBQ6curSc0StlxwWLrPZChlv5T2Zezn2oYpGk1FF49yVGbEpTVrT oS6DEuHIpXHVfjliOkB9vZ/ztneJHjvEWIg7ysABsr6jsUaEhso15F7nhMXpUUtCrv3y CRd4STbOglap1Vy5tPDtRWvZ9pprFyszVxByW1Hgk0KWGARnNXRZbctMM1jAHMrQXNXD VUhQ9iRDTq4Y1waOC4/DHX9Ys13xr0IpFBdtgPpHHOrqSBADPY/tnMGb3H4clSlDOYto o2UjYIbQHCqV7JMWJeFMs/ov3yU9V9U93dwzGvc5ANVscHBzrrnc/xXLhc1KseD4PwGM WTWA== 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=JYeZaqnsqx2R+Y9I8egSesqWI+mAXWiyeDSBtClE71Q=; b=LnHbCJ2cm+OWB0uO/1aOpLrmynEeVbMzG+lwhfjKMzFjsBcqDWR3aJX6uU7ZPKhslF lFM+P1QKq1dNnWM8kDpaoFRadO7AjUb1DkFdbMAf2eGV9847cmkmIdQk6MABqkDFxKN3 PG79rr6vGTWjr+Q+ZUob2ivIjKiheiiom7GSC0w2CjVd3Pv/X/KdH4Xsjujyg7kSDlpx fXKgPp7mTQsdZABUQw3OWcgdgXq5TZA5E3Bfu21gvofuGeimXxCPJ2faW4i/dEKeddT2 NOOw8977rQlkGKz0yoYzOgOteTmuglxiTk9/Udl8VBEFZIQfwqHFL/hVFE9SQMpcPwYd DKzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bNU38zGl; 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 s17-20020a05622a019100b002fb6f6814b5si7778565qtw.148.2022.05.30.09.49.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:49:38 -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=bNU38zGl; 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]:39044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviaI-0002H7-Br for patch@linaro.org; Mon, 30 May 2022 12:49:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvc-00036J-4H for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:36 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhva-0007Aa-Cr for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:35 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15256837wrg.12 for ; Mon, 30 May 2022 09:07:33 -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=JYeZaqnsqx2R+Y9I8egSesqWI+mAXWiyeDSBtClE71Q=; b=bNU38zGlYtb6inKfyHFXTBFt21QTeiY22Cdkwpv2XurKH7Bwq/9Lk4dp9krDfNFVhk pChiKW5ur0X6nElXhJ3yXfOVTxohpwSxmha946KLt8EPUlA0Pn2Z5YP6zZhs2NkWOmAY ow0V1hWFhS3jLDypZuEWfZoJ9itczKzNnaZICSsbNI0gWenWmdFkLP7GQDXvKfCocYbj aQjbRUKebd/OQAJG8mLWkpgVUXnCQIQ2K9WBljbDpnc0pTm2UDhCC6iaaa+UbSf3hjNf VdcnLzw7tPW+hOqDYa2151k2upinvNMMzl13ZbzDzdqevKIqakZpHNz+WRsV1oJunJh8 KypQ== 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=JYeZaqnsqx2R+Y9I8egSesqWI+mAXWiyeDSBtClE71Q=; b=O+vBHiFjsRHvnSqoSOLveGHYNFi1vmEuuWWN4WWcBdG8F39nZxD0VAeHiR7LsXlM7r oZyoQkdq7F/pkqEGNUWXBQMZ6t9zMScBiFfzcVgYz9CbDWpblUP/ZK9vON6VoemOGc7h 6jYyKlvJIvAa9KS/SH8SU2h/BZBTuves9YDmv4c3WsMiWb1WhOlALFwVJqhJbx4qFzDs +Dg3SoAzu83dmaJF9oWIz2LJYlthpxtzTxNDLHYoUJZsD4COqUwRP5Duu9Jl0TY4Kv9R zarehe3wI+jMsg9qeZsZ1OW68NA3HNPt25tbv16LmLA/A9869QSz/+fHAH6QfmpYg7Hh eLIQ== X-Gm-Message-State: AOAM533frGhapAqtVLQnzLQ8GwdnUZT1c7NZe4f3ApcSjnq1KzWAxmjw R+k4q3iXHIlbcpwQD7hydq98BI1v8sREIQ== X-Received: by 2002:a5d:52c7:0:b0:210:ac6:3956 with SMTP id r7-20020a5d52c7000000b002100ac63956mr18443710wrv.379.1653926853502; Mon, 30 May 2022 09:07:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 029/117] target/arm: Introduce gen_gvec_ool_arg_zpzz Date: Mon, 30 May 2022 17:05:40 +0100 Message-Id: <20220530160708.726466-30-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 gen_gvec_ool_arg_zpzz instead of gen_gvec_ool_zzzp when the arguments come from arg_rprr_esz. Replaces do_zpzz_ool. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-27-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index fea7164d729..d63099c5b7b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -252,6 +252,12 @@ static bool gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, return true; } +static bool gen_gvec_ool_arg_zpzz(DisasContext *s, gen_helper_gvec_4 *fn, + arg_rprr_esz *a, int data) +{ + return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, data); +} + /* Invoke a vector expander on two Zregs. */ static void gen_gvec_fn_zz(DisasContext *s, GVecGen2Fn *gvec_fn, int esz, int rd, int rn) @@ -737,11 +743,6 @@ static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz *a) *** SVE Integer Arithmetic - Binary Predicated Group */ -static bool do_zpzz_ool(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_4 *fn) -{ - return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, 0); -} - /* Select active elememnts from Zn and inactive elements from Zm, * storing the result in Zd. */ @@ -761,7 +762,7 @@ static bool trans_##NAME##_zpzz(DisasContext *s, arg_rprr_esz *a) \ gen_helper_sve_##name##_zpzz_b, gen_helper_sve_##name##_zpzz_h, \ gen_helper_sve_##name##_zpzz_s, gen_helper_sve_##name##_zpzz_d, \ }; \ - return do_zpzz_ool(s, a, fns[a->esz]); \ + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \ } DO_ZPZZ(AND, and) @@ -792,7 +793,7 @@ static bool trans_SDIV_zpzz(DisasContext *s, arg_rprr_esz *a) static gen_helper_gvec_4 * const fns[4] = { NULL, NULL, gen_helper_sve_sdiv_zpzz_s, gen_helper_sve_sdiv_zpzz_d }; - return do_zpzz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); } static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a) @@ -800,7 +801,7 @@ static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a) static gen_helper_gvec_4 * const fns[4] = { NULL, NULL, gen_helper_sve_udiv_zpzz_s, gen_helper_sve_udiv_zpzz_d }; - return do_zpzz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); } static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) @@ -1076,7 +1077,7 @@ static bool trans_##NAME##_zpzw(DisasContext *s, arg_rprr_esz *a) \ if (a->esz < 0 || a->esz >= 3) { \ return false; \ } \ - return do_zpzz_ool(s, a, fns[a->esz]); \ + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \ } DO_ZPZW(ASR, asr) @@ -6489,7 +6490,7 @@ static bool do_sve2_zpzz_ool(DisasContext *s, arg_rprr_esz *a, if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzz_ool(s, a, fn); + return gen_gvec_ool_arg_zpzz(s, fn, a, 0); } static bool trans_SADALP_zpzz(DisasContext *s, arg_rprr_esz *a) From patchwork Mon May 30 16:05:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577231 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp408407mag; Mon, 30 May 2022 09:53:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbsCpcG+3vi2jTcYnZIV/VkgIj6N6b+/g4WjQS4URgda5CMvmEO+n3nBiLxMzQzcJvYZpH X-Received: by 2002:a05:6214:20c5:b0:464:387c:e1bb with SMTP id 5-20020a05621420c500b00464387ce1bbmr10464119qve.57.1653929608043; Mon, 30 May 2022 09:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929608; cv=none; d=google.com; s=arc-20160816; b=BgT9KBrhE1y7SSO1stXiGXJmj/eFbGl3O3yVvgPk12BjGWqo9x4+R+JLcZ1hWrSN3o jnZ6wKq0VEQHqAOPcyNCj6jPu3N7bGqzMUO7fVaJ5hmWawpxJ8ygY61TgAwnNxpwdqgc YzPXeJtECyt3te3eAb/HexaOYOK1ogIznS/sjqSF5F2WCku54KSXpXf9XlbWivMipyPj MwYbicwu3ajxAsNKmpQ6bzwkhwUQKR9hZoAb+TRsC9E9K/7xdHU3QLVCqTdZgx0ErMTB TtmsvMUWzhHFjwvnS6m4eLHbuySu1CqfbHv4MSDSAgznoMMdgOhryLmX5H4E4yZGxgrv xWUg== 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=PCVJ1qTePM05IdkOS/bZ+gSR8RJ0xbTrczq1XWSujRA=; b=MES4WvXqs55q0MQfo+ka5ZeXJA7+jKBxgVl06MQ9ymIySdQHMdcP5/o8AGx5FQE/Iy Kd5YsMEnkRMmA6zgZsmfmorHO2cGld20T95pmzdboQnCa9ufk6vN/35+o3R/DJ4tBF3r kI7wDvqkKHaVcD6Rn84GfkQuWzzfcSvrMwRW3kzyegpmTR+oMfdQKJvvo8bXmDdKVtl6 lCVxy9lDclW6edo1ebdcS33gsmiOD0+UqY5CsZCykoKH+o5C3q+dLAFMMMHrQsLzr+Pl iIK3yDodz9GFSFFDQDuLMVdH2AqBbdjB22Ht7b9wjEqXsOrPUsoEG45F+JfvDEDallM3 sT6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WBpsiFlN; 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 m2-20020a05620a290200b0069ff8bf3094si9500476qkp.345.2022.05.30.09.53.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:53:28 -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=WBpsiFlN; 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]:47620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvidz-000899-LU for patch@linaro.org; Mon, 30 May 2022 12:53:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvd-0003C5-Ow for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:37 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:41903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvb-0007GW-Ra for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:37 -0400 Received: by mail-wm1-x333.google.com with SMTP id p5-20020a1c2905000000b003970dd5404dso6724791wmp.0 for ; Mon, 30 May 2022 09:07:35 -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=PCVJ1qTePM05IdkOS/bZ+gSR8RJ0xbTrczq1XWSujRA=; b=WBpsiFlNbS5Kq8d/IUwDxtuD5B8X6vpW5rGpWZOjVjZh8scLSxtr6ex5t+3CY1K+JN He5L4vUpibDfWlyiyqEAykY7k2gyFArAqclPeALMAJ3fnEHOMP0OT8k7keHMNVzUi8SU ZRbjPTfSSY8dtjZVapb53ltYIfwHFF1GEFuSIZ26eeqh1EinmxWqV1dslUj76z0BVfTL 5EdfwdI66TjkCjd5DUQ8cY5iF1KhONXfhUVMIVqhwbTorMMWk5pHm3Ku1OI5ylXDULNa zpTAFzysiVCccax1KyRALGEDeEDVsudZIVNyWz7JrfKNfARZVY3jKh4HTh5abuIZgV6y 8F6A== 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=PCVJ1qTePM05IdkOS/bZ+gSR8RJ0xbTrczq1XWSujRA=; b=EkN9T3JQU6JihTHnQ1iHlIh/kBAigSHseBjxIfT19CyvtD8MZwXerX2aknzBc+ympG JDew7hrtyyKbe5HnvVMBPiSZRp2HJAWT305mdmADokXonADymis0zn6lilivId1fZx3j DU+tkyAHBaQOP0lPhStqbYaP+BRGKwKkOA8jKfLrmbu0dEc5rPP5rkg2zn8B1PeVtkSC aVmtNWwPU+nDiKyNgPtfg61TapiRXO/S7zTvomXjKEy7Xh5uBPeMTlx727GB5hTruddJ mOoKuE2eKGUBWvhquSw9PMctFkzg1zfHtW4eQZsLrICLs0F8roAfGm+8NJibPuoD+r6B /wdQ== X-Gm-Message-State: AOAM532JLwuJPnB04afBqHtMkSsTvHKcUl4U4CJowT9m/jFn+8Zlivom ay5rIQiiwjoYOvtb0Qd3Ym4ruVwccE6hsw== X-Received: by 2002:a05:600c:209:b0:397:4a0f:7 with SMTP id 9-20020a05600c020900b003974a0f0007mr19439757wmi.91.1653926854301; Mon, 30 May 2022 09:07:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 030/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzz Date: Mon, 30 May 2022 17:05:41 +0100 Message-Id: <20220530160708.726466-31-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions directly using gen_gvec_ool_arg_zpzz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-28-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 85 ++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 49 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index d63099c5b7b..f8277eeb7c0 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -755,54 +755,46 @@ static void do_sel_z(DisasContext *s, int rd, int rn, int rm, int pg, int esz) gen_gvec_ool_zzzp(s, fns[esz], rd, rn, rm, pg, 0); } -#define DO_ZPZZ(NAME, name) \ -static bool trans_##NAME##_zpzz(DisasContext *s, arg_rprr_esz *a) \ -{ \ - static gen_helper_gvec_4 * const fns[4] = { \ - gen_helper_sve_##name##_zpzz_b, gen_helper_sve_##name##_zpzz_h, \ - gen_helper_sve_##name##_zpzz_s, gen_helper_sve_##name##_zpzz_d, \ +#define DO_ZPZZ(NAME, FEAT, name) \ + static gen_helper_gvec_4 * const name##_zpzz_fns[4] = { \ + gen_helper_##name##_zpzz_b, gen_helper_##name##_zpzz_h, \ + gen_helper_##name##_zpzz_s, gen_helper_##name##_zpzz_d, \ }; \ - return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \ -} + TRANS_FEAT(NAME, FEAT, gen_gvec_ool_arg_zpzz, \ + name##_zpzz_fns[a->esz], a, 0) -DO_ZPZZ(AND, and) -DO_ZPZZ(EOR, eor) -DO_ZPZZ(ORR, orr) -DO_ZPZZ(BIC, bic) +DO_ZPZZ(AND_zpzz, aa64_sve, sve_and) +DO_ZPZZ(EOR_zpzz, aa64_sve, sve_eor) +DO_ZPZZ(ORR_zpzz, aa64_sve, sve_orr) +DO_ZPZZ(BIC_zpzz, aa64_sve, sve_bic) -DO_ZPZZ(ADD, add) -DO_ZPZZ(SUB, sub) +DO_ZPZZ(ADD_zpzz, aa64_sve, sve_add) +DO_ZPZZ(SUB_zpzz, aa64_sve, sve_sub) -DO_ZPZZ(SMAX, smax) -DO_ZPZZ(UMAX, umax) -DO_ZPZZ(SMIN, smin) -DO_ZPZZ(UMIN, umin) -DO_ZPZZ(SABD, sabd) -DO_ZPZZ(UABD, uabd) +DO_ZPZZ(SMAX_zpzz, aa64_sve, sve_smax) +DO_ZPZZ(UMAX_zpzz, aa64_sve, sve_umax) +DO_ZPZZ(SMIN_zpzz, aa64_sve, sve_smin) +DO_ZPZZ(UMIN_zpzz, aa64_sve, sve_umin) +DO_ZPZZ(SABD_zpzz, aa64_sve, sve_sabd) +DO_ZPZZ(UABD_zpzz, aa64_sve, sve_uabd) -DO_ZPZZ(MUL, mul) -DO_ZPZZ(SMULH, smulh) -DO_ZPZZ(UMULH, umulh) +DO_ZPZZ(MUL_zpzz, aa64_sve, sve_mul) +DO_ZPZZ(SMULH_zpzz, aa64_sve, sve_smulh) +DO_ZPZZ(UMULH_zpzz, aa64_sve, sve_umulh) -DO_ZPZZ(ASR, asr) -DO_ZPZZ(LSR, lsr) -DO_ZPZZ(LSL, lsl) +DO_ZPZZ(ASR_zpzz, aa64_sve, sve_asr) +DO_ZPZZ(LSR_zpzz, aa64_sve, sve_lsr) +DO_ZPZZ(LSL_zpzz, aa64_sve, sve_lsl) -static bool trans_SDIV_zpzz(DisasContext *s, arg_rprr_esz *a) -{ - static gen_helper_gvec_4 * const fns[4] = { - NULL, NULL, gen_helper_sve_sdiv_zpzz_s, gen_helper_sve_sdiv_zpzz_d - }; - return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_4 * const sdiv_fns[4] = { + NULL, NULL, gen_helper_sve_sdiv_zpzz_s, gen_helper_sve_sdiv_zpzz_d +}; +TRANS_FEAT(SDIV_zpzz, aa64_sve, gen_gvec_ool_arg_zpzz, sdiv_fns[a->esz], a, 0) -static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a) -{ - static gen_helper_gvec_4 * const fns[4] = { - NULL, NULL, gen_helper_sve_udiv_zpzz_s, gen_helper_sve_udiv_zpzz_d - }; - return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); -} +static gen_helper_gvec_4 * const udiv_fns[4] = { + NULL, NULL, gen_helper_sve_udiv_zpzz_s, gen_helper_sve_udiv_zpzz_d +}; +TRANS_FEAT(UDIV_zpzz, aa64_sve, gen_gvec_ool_arg_zpzz, udiv_fns[a->esz], a, 0) static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) { @@ -1068,17 +1060,12 @@ TRANS_FEAT(SQSHLU, aa64_sve2, gen_gvec_ool_arg_zpzi, */ #define DO_ZPZW(NAME, name) \ -static bool trans_##NAME##_zpzw(DisasContext *s, arg_rprr_esz *a) \ -{ \ - static gen_helper_gvec_4 * const fns[3] = { \ + static gen_helper_gvec_4 * const name##_zpzw_fns[4] = { \ gen_helper_sve_##name##_zpzw_b, gen_helper_sve_##name##_zpzw_h, \ - gen_helper_sve_##name##_zpzw_s, \ + gen_helper_sve_##name##_zpzw_s, NULL \ }; \ - if (a->esz < 0 || a->esz >= 3) { \ - return false; \ - } \ - return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \ -} + TRANS_FEAT(NAME##_zpzw, aa64_sve, gen_gvec_ool_arg_zpzz, \ + a->esz < 0 ? NULL : name##_zpzw_fns[a->esz], a, 0) DO_ZPZW(ASR, asr) DO_ZPZW(LSR, lsr) From patchwork Mon May 30 16:05:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577218 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp396854mag; Mon, 30 May 2022 09:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp/PFwCZ5roYoHXUrvxs2ILoFwzzByRS/sfevO81DOGhi4/Puv168I4C2RaFAnFvCz/+Wb X-Received: by 2002:a05:6214:626:b0:462:34f8:8ef8 with SMTP id a6-20020a056214062600b0046234f88ef8mr34775258qvx.102.1653928726425; Mon, 30 May 2022 09:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928726; cv=none; d=google.com; s=arc-20160816; b=agjO5y1X/iIkTMeVyq/BZTOx25X38gGn3T/YGy89iUwtyju5e7ZOdPozIaprapcqZy bt92Imjn1+d0cpsFGjSaHOkfQREo/Wrz0cWY3QOnN0x/FawiDp/Yy9bW/eO+wVb70GUR BOf2UWJ/y0XSCIOoMEiOtzn/n6JLUZpyJN63imefyfuv98RmnIu6VnWe+MUiU2Ggj36W ynKfKP1BbmugE3wDb5xNZ4tuoRjdA1mE0WGdi234bWVfQ6RHmT0Lq8sx0Vmk3NajpINb 9VjNavfJwKfO4Z10q9LsajFN5PZbEl1h/+fk6yH2jSCfn2Tf6cUnymj35MCI8kds6L5r XH5Q== 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=jiu2iS/WADB4ynTS+4BR3XtSfweALFOZMF8Dtm2oFsk=; b=cczJQ8+uq6VKFSoggkUqnyhvrCK6dBAcpa3KmuV2JAI41x+d/wIOJNuheB4VLDErcX HbIMJdjsjj7llKMR3L7uvWKRjWJY9pgsJO6Dpme2nlQBda3C/OMFhVWuYPmhIrCuBu0Z eH4Lkaa5Njc8I9Mt9EP5+WKHQsC0N1mn2afb2L6aYgMmko5/CS/64dBkYrx8GeoaVFI8 xin35DWN9tnpSyRXQYQh8dLLuMerHAWuTILh2LuHsirbRmpPNHzo7Y/EwLm/Ek1Locgn jNJXwwyZCPPSK3KXgeA+ipDRULFQ7l3SKVwdTrfzZF32EC5DrN7qgSYs/ySGz4xLEVQl F+0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y6qAeV7X; 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 jm15-20020ad45ecf000000b0046441b55abesi3675213qvb.511.2022.05.30.09.38.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:38:46 -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=y6qAeV7X; 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]:47194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviPm-0005Aq-0X for patch@linaro.org; Mon, 30 May 2022 12:38:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvd-0003CQ-Q9 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:37 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:33600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvb-0007An-QX for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:37 -0400 Received: by mail-wr1-x430.google.com with SMTP id h5so7195481wrb.0 for ; Mon, 30 May 2022 09:07:35 -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=jiu2iS/WADB4ynTS+4BR3XtSfweALFOZMF8Dtm2oFsk=; b=y6qAeV7XxdrxqDvhz8bfuu+wfPN/uuTGrvpVYnctWkObxA3rv6evL8q9gwMhCImxMz EIlS8vBeogRKULDyMyx8k0zk4wWvgXxFytgAirHyUvGlgiWYHIET8Y8qemJPDudEXQL/ 1iO/2Os75nr9JcNFprl4THQPX8yGPfgzXHbQmtAevUvQbNUegnPfAboY6RCmGphzvccg GOs+G3Go5zW4YqjEmqTcGDhuFkV5Ip6GjWnxOoZhdaJT2dnou9nC4NgpNzFSHrClSlRb YkOUOe48Rr8iiae3XPhG7MtEreJhTGvk68kUs0NVCtnGo4Q3TZbgCG/qP8T4RvN/VZdY sdrQ== 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=jiu2iS/WADB4ynTS+4BR3XtSfweALFOZMF8Dtm2oFsk=; b=lrBBLbt/oCq3rlrpE466zJO9COyx15x7QvVG9dv380Mn03+LkLdLup8BLdIvbDOjD9 HQvkwHuaWxB4xEn9UQwUzJIay2hgapQs4p26VjbYW19WXEKtkEM9ZF22Syxp4TnF4viM QAiTb3H3piO7oLIbGHhw5vTSj9hNDjutwv1zvU9TdzMILxFVFqzFfBGOTUubM3VlVtGZ Ciy6NfXglh9qa+IFR+iZrMDiJxf41oVAJBRT81eCH8XNHgIQjhKXp/jxneJ3ZrEH+Pcd yqK+xe4ML3QnNOT8t1nOl45Kft01UhXvXuQ3aQPsteXdMKepAtlfNjuZDIQluKR8OVSD x0TA== X-Gm-Message-State: AOAM533XHOhd7iLvy4gJ+DwSuX4KIe0YAC+XcY812XwcA1+Cu0T7yrj6 PtFNDsu13Nqi4HrkeEqCnX7M0LBP17PAyQ== X-Received: by 2002:adf:ed49:0:b0:210:2b98:a539 with SMTP id u9-20020adfed49000000b002102b98a539mr8535384wro.118.1653926855135; Mon, 30 May 2022 09:07:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 031/117] target/arm: Use TRANS_FEAT for do_sve2_zpzz_ool Date: Mon, 30 May 2022 17:05:42 +0100 Message-Id: <20220530160708.726466-32-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zpzz_ool to use TRANS_FEAT and gen_gvec_ool_arg_zpzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-29-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 118 +++++++++++++------------------------ 1 file changed, 40 insertions(+), 78 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f8277eeb7c0..0a69a1ef65e 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -804,8 +804,6 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) return true; } -#undef DO_ZPZZ - /* *** SVE Integer Arithmetic - Unary Predicated Group */ @@ -6471,40 +6469,19 @@ TRANS_FEAT(SQRDMULH_zzz, aa64_sve2, gen_gvec_ool_arg_zzz, * SVE2 Integer - Predicated */ -static bool do_sve2_zpzz_ool(DisasContext *s, arg_rprr_esz *a, - gen_helper_gvec_4 *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_arg_zpzz(s, fn, a, 0); -} +static gen_helper_gvec_4 * const sadlp_fns[4] = { + NULL, gen_helper_sve2_sadalp_zpzz_h, + gen_helper_sve2_sadalp_zpzz_s, gen_helper_sve2_sadalp_zpzz_d, +}; +TRANS_FEAT(SADALP_zpzz, aa64_sve2, gen_gvec_ool_arg_zpzz, + sadlp_fns[a->esz], a, 0) -static bool trans_SADALP_zpzz(DisasContext *s, arg_rprr_esz *a) -{ - static gen_helper_gvec_4 * const fns[3] = { - gen_helper_sve2_sadalp_zpzz_h, - gen_helper_sve2_sadalp_zpzz_s, - gen_helper_sve2_sadalp_zpzz_d, - }; - if (a->esz == 0) { - return false; - } - return do_sve2_zpzz_ool(s, a, fns[a->esz - 1]); -} - -static bool trans_UADALP_zpzz(DisasContext *s, arg_rprr_esz *a) -{ - static gen_helper_gvec_4 * const fns[3] = { - gen_helper_sve2_uadalp_zpzz_h, - gen_helper_sve2_uadalp_zpzz_s, - gen_helper_sve2_uadalp_zpzz_d, - }; - if (a->esz == 0) { - return false; - } - return do_sve2_zpzz_ool(s, a, fns[a->esz - 1]); -} +static gen_helper_gvec_4 * const uadlp_fns[4] = { + NULL, gen_helper_sve2_uadalp_zpzz_h, + gen_helper_sve2_uadalp_zpzz_s, gen_helper_sve2_uadalp_zpzz_d, +}; +TRANS_FEAT(UADALP_zpzz, aa64_sve2, gen_gvec_ool_arg_zpzz, + uadlp_fns[a->esz], a, 0) /* * SVE2 integer unary operations (predicated) @@ -6528,44 +6505,34 @@ static gen_helper_gvec_3 * const sqneg_fns[4] = { }; TRANS_FEAT(SQNEG, aa64_sve2, gen_gvec_ool_arg_zpz, sqneg_fns[a->esz], a, 0) -#define DO_SVE2_ZPZZ(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rprr_esz *a) \ -{ \ - static gen_helper_gvec_4 * const fns[4] = { \ - gen_helper_sve2_##name##_zpzz_b, gen_helper_sve2_##name##_zpzz_h, \ - gen_helper_sve2_##name##_zpzz_s, gen_helper_sve2_##name##_zpzz_d, \ - }; \ - return do_sve2_zpzz_ool(s, a, fns[a->esz]); \ -} +DO_ZPZZ(SQSHL, aa64_sve2, sve2_sqshl) +DO_ZPZZ(SQRSHL, aa64_sve2, sve2_sqrshl) +DO_ZPZZ(SRSHL, aa64_sve2, sve2_srshl) -DO_SVE2_ZPZZ(SQSHL, sqshl) -DO_SVE2_ZPZZ(SQRSHL, sqrshl) -DO_SVE2_ZPZZ(SRSHL, srshl) +DO_ZPZZ(UQSHL, aa64_sve2, sve2_uqshl) +DO_ZPZZ(UQRSHL, aa64_sve2, sve2_uqrshl) +DO_ZPZZ(URSHL, aa64_sve2, sve2_urshl) -DO_SVE2_ZPZZ(UQSHL, uqshl) -DO_SVE2_ZPZZ(UQRSHL, uqrshl) -DO_SVE2_ZPZZ(URSHL, urshl) +DO_ZPZZ(SHADD, aa64_sve2, sve2_shadd) +DO_ZPZZ(SRHADD, aa64_sve2, sve2_srhadd) +DO_ZPZZ(SHSUB, aa64_sve2, sve2_shsub) -DO_SVE2_ZPZZ(SHADD, shadd) -DO_SVE2_ZPZZ(SRHADD, srhadd) -DO_SVE2_ZPZZ(SHSUB, shsub) +DO_ZPZZ(UHADD, aa64_sve2, sve2_uhadd) +DO_ZPZZ(URHADD, aa64_sve2, sve2_urhadd) +DO_ZPZZ(UHSUB, aa64_sve2, sve2_uhsub) -DO_SVE2_ZPZZ(UHADD, uhadd) -DO_SVE2_ZPZZ(URHADD, urhadd) -DO_SVE2_ZPZZ(UHSUB, uhsub) +DO_ZPZZ(ADDP, aa64_sve2, sve2_addp) +DO_ZPZZ(SMAXP, aa64_sve2, sve2_smaxp) +DO_ZPZZ(UMAXP, aa64_sve2, sve2_umaxp) +DO_ZPZZ(SMINP, aa64_sve2, sve2_sminp) +DO_ZPZZ(UMINP, aa64_sve2, sve2_uminp) -DO_SVE2_ZPZZ(ADDP, addp) -DO_SVE2_ZPZZ(SMAXP, smaxp) -DO_SVE2_ZPZZ(UMAXP, umaxp) -DO_SVE2_ZPZZ(SMINP, sminp) -DO_SVE2_ZPZZ(UMINP, uminp) - -DO_SVE2_ZPZZ(SQADD_zpzz, sqadd) -DO_SVE2_ZPZZ(UQADD_zpzz, uqadd) -DO_SVE2_ZPZZ(SQSUB_zpzz, sqsub) -DO_SVE2_ZPZZ(UQSUB_zpzz, uqsub) -DO_SVE2_ZPZZ(SUQADD, suqadd) -DO_SVE2_ZPZZ(USQADD, usqadd) +DO_ZPZZ(SQADD_zpzz, aa64_sve2, sve2_sqadd) +DO_ZPZZ(UQADD_zpzz, aa64_sve2, sve2_uqadd) +DO_ZPZZ(SQSUB_zpzz, aa64_sve2, sve2_sqsub) +DO_ZPZZ(UQSUB_zpzz, aa64_sve2, sve2_uqsub) +DO_ZPZZ(SUQADD, aa64_sve2, sve2_suqadd) +DO_ZPZZ(USQADD, aa64_sve2, sve2_usqadd) /* * SVE2 Widening Integer Arithmetic @@ -7735,16 +7702,11 @@ static bool trans_##NAME(DisasContext *s, arg_rprr_esz *a) \ DO_SVE2_PPZZ_MATCH(MATCH, match) DO_SVE2_PPZZ_MATCH(NMATCH, nmatch) -static bool trans_HISTCNT(DisasContext *s, arg_rprr_esz *a) -{ - static gen_helper_gvec_4 * const fns[2] = { - gen_helper_sve2_histcnt_s, gen_helper_sve2_histcnt_d - }; - if (a->esz < 2) { - return false; - } - return do_sve2_zpzz_ool(s, a, fns[a->esz - 2]); -} +static gen_helper_gvec_4 * const histcnt_fns[4] = { + NULL, NULL, gen_helper_sve2_histcnt_s, gen_helper_sve2_histcnt_d +}; +TRANS_FEAT(HISTCNT, aa64_sve2, gen_gvec_ool_arg_zpzz, + histcnt_fns[a->esz], a, 0) TRANS_FEAT(HISTSEG, aa64_sve2, gen_gvec_ool_arg_zzz, a->esz == 0 ? gen_helper_sve2_histseg : NULL, a, 0) From patchwork Mon May 30 16:05:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577222 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp400435mag; Mon, 30 May 2022 09:42:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3aBT4FyVlS1Z7bqlO5P+7/GcxP7i2C4l2+cCACF+mA3eMHktIPee21Wjcac16XvqI1Gdb X-Received: by 2002:a05:6214:29e6:b0:462:2307:c3cf with SMTP id jv6-20020a05621429e600b004622307c3cfmr37963132qvb.66.1653928978286; Mon, 30 May 2022 09:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928978; cv=none; d=google.com; s=arc-20160816; b=f+cF5BuXAJXAqEnl0Nk9chDcqa03orHxMARgwqUvT8z0umO7UGc8+pOXZ3ud6rLuT4 yNmAa6q/u0s0fP4lp6YWn+h7LL+JlAjr3QuDQqr/sGnw7fffK0Ay4XWBYAbnq6qhjpEI IbDZ4PGL8Yuedl6sRnEWBRIvynakwZE0yjCt/ei5tGGhx498GRdT9LB1SDOmohV1u421 FpykZCu91yJeZ9M25ia7DyaBeUbAHE3enEOJXIhhhHsd8njR/Ds96ud3MLbuC4rYMNq0 +gmct/8PbReCWLedNZ9W0A1F+ZOR6d0ZFq7GgA/3fLZcFrp4btEQ9xg9D8LIkeie49Fu FnbA== 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=aDFaadxJvzUJRVexXAXlncbRaDQ7Ch+GouHQCAMIfA4=; b=C2sje5UC6DB3KI5bKyd4VRYeSKvMTvt4sqDD0YVwQ52H68+itgtGpmZG6O6rh/gzUr Imajn94j8LPiFlbaGWq2MptFfuG/Kn7vHlAocdr8XM+bpZ6U5bZQ4bx44AcfcEDgZcq1 Od8XGdP/4I6FQ2hEzmF6rvMy+d1b3gUrtnKxddZJzhTw4TcSv/XSKcZH0uPMsNa13gi2 ghjdt5Z3+ESmwRA1SbZP0OK6cLVIG+nu81Wcxne7gHDB50IlvPaWMs+XFw+XGcLvoU0e sYnZsCKFXruJGaDczqJSdYu2q7jYzKdRqbz2bmfxESNZ0iH6yi37qGIihfb+tWUgTqg1 XjEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xs3C9nQC; 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 a15-20020a05620a438f00b006a62c4bc399si2149416qkp.478.2022.05.30.09.42.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:42:58 -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=Xs3C9nQC; 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]:55842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviTp-0002jY-S9 for patch@linaro.org; Mon, 30 May 2022 12:42:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvj-0003Ls-Ut for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:44 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:53799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvd-0007Gx-9n for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:41 -0400 Received: by mail-wm1-x330.google.com with SMTP id r129so1359848wmr.3 for ; Mon, 30 May 2022 09:07:36 -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=aDFaadxJvzUJRVexXAXlncbRaDQ7Ch+GouHQCAMIfA4=; b=Xs3C9nQCOSH9ekil5/fhNXNkFIvcXS5q7L77ULCYlLir+/N07ht3sOF/Fcd9ltfEI+ LocBg4pyxu8MQ/WN3z6c/GJM8EmX7o+P7ahg1Iq+6iPX/d0ga5LjqCHx1MxUkx0gBMEi uy+oy5AXq6wi0Ag0jBngw4fe+NS+q4EOF6V53yUEqZdm0g6L1XZ3lT+lD8pat8kp7po+ 80am8cLi0brASb5Cxo/eREvkKfkp2ZxFf2CXsy5MvhAm9YKTefFJhpeko9kPxDxjX7AA /Sn8Yv39ePtx6xZsYPdHTJJP8Ja8iypf7FUI3/6h9PkpG0x2Pf5b7tUra1lvcCAegj3b Z0qw== 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=aDFaadxJvzUJRVexXAXlncbRaDQ7Ch+GouHQCAMIfA4=; b=UAdzjY6Fz9VmzoefvnnEBojBilh97hPdYRHLjArp4WOIANqNah52YCw7tKanwq1nPt Fp89smOjadLdwsKVzUt2YtZ3ekAyzCgdn+k31NJq01WyuvtB0At/VfSsNnZS53F12oA5 LD4H92kzyvGp13WNbKyq5KYhJhSNie8NpT5SKjcBY69LQJnwOhFngbahP5uTGm4ZBZpO Rdk9hi5ZMCo8eydrktGY6LSyAhRrJcid3ymIJ6cljjRr5FizJMzy1KFxGx1MtR7MOGH6 TE1AgUz4X0Rb9oK7+uh9c1aLyERlbfcN60Q4oCZ1+/SeYloh6ptz1Udmvbpv7/EbvEz0 ATwQ== X-Gm-Message-State: AOAM532T78MjDAMRpoiF0EJjlDP0FAx9EVuBdHztGskOQ+6e5En1aoiH JvmdldDibiX2ymEPRrFXIstzFUUQlMGVwQ== X-Received: by 2002:a05:600c:2254:b0:397:581d:34fa with SMTP id a20-20020a05600c225400b00397581d34famr19879353wmm.181.1653926855836; Mon, 30 May 2022 09:07:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 032/117] target/arm: Merge gen_gvec_fn_zz into do_mov_z Date: Mon, 30 May 2022 17:05:43 +0100 Message-Id: <20220530160708.726466-33-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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 There is only one caller for gen_gvec_fn_zz; inline it. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-30-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 0a69a1ef65e..5ab9de46a71 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -258,15 +258,6 @@ static bool gen_gvec_ool_arg_zpzz(DisasContext *s, gen_helper_gvec_4 *fn, return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, data); } -/* Invoke a vector expander on two Zregs. */ -static void gen_gvec_fn_zz(DisasContext *s, GVecGen2Fn *gvec_fn, - int esz, int rd, int rn) -{ - unsigned vsz = vec_full_reg_size(s); - gvec_fn(esz, vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), vsz, vsz); -} - /* Invoke a vector expander on three Zregs. */ static void gen_gvec_fn_zzz(DisasContext *s, GVecGen3Fn *gvec_fn, int esz, int rd, int rn, int rm) @@ -292,7 +283,9 @@ static void gen_gvec_fn_zzzz(DisasContext *s, GVecGen4Fn *gvec_fn, static bool do_mov_z(DisasContext *s, int rd, int rn) { if (sve_access_check(s)) { - gen_gvec_fn_zz(s, tcg_gen_gvec_mov, MO_8, rd, rn); + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_mov(MO_8, vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), vsz, vsz); } return true; } From patchwork Mon May 30 16:05:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577224 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp403822mag; Mon, 30 May 2022 09:47:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyDWan6WzPOkjJlIadqfdt6K3QgEhT4A/wv87gT9/xV5iiE9tN4FxWZ8qseoqz5O3gBEcQ X-Received: by 2002:a05:622a:4ce:b0:304:b53b:fefd with SMTP id q14-20020a05622a04ce00b00304b53bfefdmr2519846qtx.156.1653929228642; Mon, 30 May 2022 09:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929228; cv=none; d=google.com; s=arc-20160816; b=JhyRSvBzZMJ1mGzdNNhDuEb2Tjkje/c15WsWw44UmaqcX9lKkQYULCl/WVlPF6H/jS kduENQJmOCbirGvkJEInTHq80qKTExNy0fEH7Kh8WIjJZTK5Uyqpp/skX1XRwAFbgBvL bdhAjHuI5rOqoUj4+sntnTlBeX40aBRMY5aoF+Fb5eGTSPtRxTIgmavzC3Rd5WD9lW2N Q+yh0bS6Wo3BIohyDjC70Cixes7lwSC+pB6h3VBYahYLr7DVO6XJHqkWE3Ndq0fb6je6 ARjZU7vj0l+cCA7j1Kn1YpJM4E4sMuuy/yQN0KK4DyI8u2ivNKQJjRszVhldRrcmyuns WsTg== 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=BCieSjS8+a/J7cWka53sN9O7+JxVvA/2MoUQVCW5Hmk=; b=Hrfuxja/Zf6iOhPGPuyF9l/Z97CGfGt3HA9MBR03JAMDags4YxXdeHYclWaZhK98jk TSo3S4orS1DZ2R+Z5WYBBpQXSFpHWDleoRf4c+4D8x2nnN7Vql1JX7bSBbjQXsZ9T+uU 2+zaGCWzZjbuFcLYe1NPp3lTrvxjXgH0Ak4zGaWX29WYfjc17kQwhkZjU5MTqYDkNATu 6vaxKt9hurszHY3tj7VWjxCtfvpd+5wOlgQ6SYDKK8kfRvU3h+0AjKHDG6o5wlpDXffH E6ZpYkqwFuSjKZQ+9cCnZJi54sVXl22Ds38MWQLt5AYpqlbgO5pC/bEF99xE21ykv+7T bgDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hzkjj20G; 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 v26-20020a05622a189a00b002f3c5ecd3a7si7841016qtc.23.2022.05.30.09.47.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:47:08 -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=Hzkjj20G; 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]:33292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviXs-0006hf-4i for patch@linaro.org; Mon, 30 May 2022 12:47:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvg-0003K9-S5 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:44 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:33601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhve-0007H9-7Q for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:39 -0400 Received: by mail-wr1-x42c.google.com with SMTP id h5so7196950wrb.0 for ; Mon, 30 May 2022 09:07:37 -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=BCieSjS8+a/J7cWka53sN9O7+JxVvA/2MoUQVCW5Hmk=; b=Hzkjj20GkvBgjmrseff1arTr5jUjBcMv/JUZMIPPuCMR5VTuoqd49lAvOe9X9xKPno 4ruADi0Si+CrqoptZ5X4F62OEjbS+mPNdROPe4ccFmVQfwSh1Uc8MCaAkfZNd5NENz4V rGKSiEyBbWtFV4lPWc3e2B4672tjPPalcfLPB6EQ1pHYm0TIN/5U9IlbwM7jphm6ppDo hPOU2YtWzwigiyN/p6IS3SdOiIyiAGNOnhvcswc13TGIbVJhOVtlfWM99wkgitOMxxNx A8/sePjpVEKD8KN9Ze93ewqEKCyxJuCANR7BZ9HX07UVjHyps14+yYE7RvBecG28y+9k LGbg== 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=BCieSjS8+a/J7cWka53sN9O7+JxVvA/2MoUQVCW5Hmk=; b=teyw18GjxVG69v9lDjW+PJkEWP5Lf3Iy16UMNf9KAjIRKGIFtSPlmdJKQ7GIrYPeq6 X+WLt5wvV5CtrDi7oeuhs0dnO80acwZayNJZkWJUrCAPwz+weqM6F4qe4OCZDNnU25Kt NRnG9iHsCTMzzbDv4BZQXx2YP27zU1ndmYDsuYj7s1X3A9PJkjfysZ7VqNhTaTQ4GOim AU7/GYuu1dp/PgrpYFB4JzY1LzCyljHe6YkT/MJyf5Hur3xzna5n/u3iWCbbmY/1x5e/ 28ZF6sJQqlQW5HtPU11kLafSaiVhpVHbOOCZz5/W4RLGQBChXIWxopSq3Vk6ElhoWEyX 3VCA== X-Gm-Message-State: AOAM532lUeGgxfiHG2I9iMOP7GzPh3zMVaecSWHytCRhGyeRnPspGTl/ V2f59hA46uS8k5VYMrkgJE+uODOpamoDQg== X-Received: by 2002:a5d:6487:0:b0:210:11c5:b10e with SMTP id o7-20020a5d6487000000b0021011c5b10emr17231552wri.657.1653926856761; Mon, 30 May 2022 09:07:36 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 033/117] target/arm: Move null function and sve check into gen_gvec_fn_zzz Date: Mon, 30 May 2022 17:05:44 +0100 Message-Id: <20220530160708.726466-34-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-31-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 5ab9de46a71..3af4626e58a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -259,13 +259,19 @@ static bool gen_gvec_ool_arg_zpzz(DisasContext *s, gen_helper_gvec_4 *fn, } /* Invoke a vector expander on three Zregs. */ -static void gen_gvec_fn_zzz(DisasContext *s, GVecGen3Fn *gvec_fn, +static bool gen_gvec_fn_zzz(DisasContext *s, GVecGen3Fn *gvec_fn, int esz, int rd, int rn, int rm) { - unsigned vsz = vec_full_reg_size(s); - gvec_fn(esz, vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), vsz, vsz); + if (gvec_fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + gvec_fn(esz, vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), vsz, vsz); + } + return true; } /* Invoke a vector expander on four Zregs. */ @@ -366,10 +372,7 @@ const uint64_t pred_esz_masks[4] = { static bool do_zzz_fn(DisasContext *s, arg_rrr_esz *a, GVecGen3Fn *gvec_fn) { - if (sve_access_check(s)) { - gen_gvec_fn_zzz(s, gvec_fn, a->esz, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_zzz(s, gvec_fn, a->esz, a->rd, a->rn, a->rm); } static bool trans_AND_zzz(DisasContext *s, arg_rrr_esz *a) @@ -6421,10 +6424,7 @@ static bool trans_MUL_zzz(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_fn_zzz(s, tcg_gen_gvec_mul, a->esz, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_zzz(s, tcg_gen_gvec_mul, a->esz, a->rd, a->rn, a->rm); } static gen_helper_gvec_3 * const smulh_zzz_fns[4] = { @@ -6945,10 +6945,7 @@ static bool do_sve2_fn_zzz(DisasContext *s, arg_rrr_esz *a, GVecGen3Fn *fn) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_fn_zzz(s, fn, a->esz, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_zzz(s, fn, a->esz, a->rd, a->rn, a->rm); } static bool trans_SABA(DisasContext *s, arg_rrr_esz *a) @@ -7880,10 +7877,7 @@ static bool trans_RAX1(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve2_sha3, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_fn_zzz(s, gen_gvec_rax1, MO_64, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_zzz(s, gen_gvec_rax1, MO_64, a->rd, a->rn, a->rm); } static bool trans_FCVTNT_sh(DisasContext *s, arg_rpr_esz *a) From patchwork Mon May 30 16:05:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577226 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp404738mag; Mon, 30 May 2022 09:48:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxdBalMH+FGstRkuCW0TAtLWYHOohNZ7DE+Ta2CiGXdDBJ3rlb/nMJq9zFcHyGsXyAEOTU X-Received: by 2002:a05:620a:46a5:b0:6a5:8dca:d2fb with SMTP id bq37-20020a05620a46a500b006a58dcad2fbmr20105417qkb.621.1653929306389; Mon, 30 May 2022 09:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929306; cv=none; d=google.com; s=arc-20160816; b=G1ACdKq9dhARJJE0Yr/JWTKdoaAGvA7Lk/KvcbRk31YrRDwu/QH0D/nLN5Rqkf7i5/ 9GbM6XKBKmzoVXcilcILM0cq4b6ZwO9tkvRiOcuTcUCf4OUUyQt2XTafr2z54bJJR0mr oUR4D+dRNjd6TWI69NORmtw9oo2bUYjSh6q4vZZgGsfYvAmPavVqqxiYeO7aqE0E8xDK mvZuaN+ckKuuilwh43dZ5ylAESJcvWRhx4+iXukOrRT5N+noXO7REtKQlG5tAzqJRyMt 5WGXCh/wPVwdShLcJvisDGrMwUX2bIW9Ml6nzZ7fD43jvahiljEDsMTz/FFO5GTOMOEb L7NA== 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=cpd7D4YK0XMRZCXxov+SnKlbCAxYBEy6m0qpqFZT8lo=; b=Y7ecYkxONjwZGi01d2wCU6IG36+ke2iAfsisDp/nYgbc1PQpOZ3sKl4tHgsdN8bwyu YGNqQ5b2n/7r9HBHI8+gItZbC5zQPFF6ufrDVXW59M3JpBvBZc0JLweEg2nawWtpX9fZ Wrr09ftaPZB2V4wGrACVR26TBYm7fOtOdP35ElUJoVtdzqIfEhBH3EgYzxI6u2d+gcWA aZ79a6V7aYr2EPAPq7Tod/+RzOLNqSu1sHBlfr+4KBu1RjBZTKhG2MOQ5BUmj9Y9KAEm zZ7lGOtnmdN2AQFRqrtZBTwgUQbxjal3EHDuhIQJiUGe60e3kXZPY8AOFmjF+T5qoz+9 FRzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LpV/oJUy"; 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 h8-20020ac85848000000b002f93473c71fsi7194187qth.201.2022.05.30.09.48.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:48:26 -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="LpV/oJUy"; 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]:36340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviZ7-0000SY-Tu for patch@linaro.org; Mon, 30 May 2022 12:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvj-0003Lt-Ut for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:44 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:55933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhve-0007HV-Vj for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:43 -0400 Received: by mail-wm1-x32e.google.com with SMTP id y24so6636157wmq.5 for ; Mon, 30 May 2022 09:07:38 -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=cpd7D4YK0XMRZCXxov+SnKlbCAxYBEy6m0qpqFZT8lo=; b=LpV/oJUyIjtUVBzTG+HxygkOTnTiUd1XRn2jlNLUFx+HzhuZ7oBhcQmqFlKQ4sMnuY 6Ym4Ca7cjGHcZekYBpMlSE5aO/KOXmHjYYrxkGyk2FFgh4BT2/taZzN4iqN3c9TzVAXV ib9MAW+dz3KM4+WWqSu+UPd7GguqLCIfKIEkEZ9EgGw0XJmk55MT7mhg7LCpEXF3Q7Xm e6Nl14GSO8k3lDcsN57SGRkGzIKJtAuKGEm/u1AWc2v/aLz8sVrg0kxZGFueyn7Y+AWn Lq6Rpk5qBqnP7eUb0WsmquXJO19AGZvlieB9MJkf0f7J1zpvNtEYjgBzQvocchqEtRvL EJxw== 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=cpd7D4YK0XMRZCXxov+SnKlbCAxYBEy6m0qpqFZT8lo=; b=NmodFmGXNmyHavkOf6FwpA6qw8rHBYiqI1t8Ptxky2poYXy3ID7n7u6q/4e/n4S8Kb WdPLFQMdSB0S/oq99idcvcKGDxn0cVLnloItxOP/TA/zjYN5yFdjPk+6OWyDTJCJrnSI 4l6euJmIxKFjRuHXnIdEAJKaCeN19iEUZ6V5p0TA7S5XCC/2fMZx/g1juxWhkLyVknaS lVo8mSbgYpMgfX97qF50IqflMTAwKOD0tb1CwKYV+fb2QKGVY5m1dI/tWihAQvDggiQR AL+KdnRBbcocVt3zGZehJsvbAx9GF2GfGNIx2A2+WmveByjM57Ik4Th6+rtl/TB6u2L2 Iz4A== X-Gm-Message-State: AOAM5310Nmk+d0WhbxFoYjsriFGE/R/M1R2PX1eSvTT7Z5IH3Id7WYFH 1amQl0DkGqz7vtIbKyUboaTgtbId0hLr9A== X-Received: by 2002:a05:600c:1d28:b0:397:65ab:4b3e with SMTP id l40-20020a05600c1d2800b0039765ab4b3emr19666934wms.137.1653926857460; Mon, 30 May 2022 09:07:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 034/117] target/arm: Rename do_zzz_fn to gen_gvec_fn_arg_zzz Date: Mon, 30 May 2022 17:05:45 +0100 Message-Id: <20220530160708.726466-35-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Rename the function to match gen_gvec_fn_zzz, and move to be adjacent. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-32-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 3af4626e58a..1b3afcc24cf 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -274,6 +274,12 @@ static bool gen_gvec_fn_zzz(DisasContext *s, GVecGen3Fn *gvec_fn, return true; } +static bool gen_gvec_fn_arg_zzz(DisasContext *s, GVecGen3Fn *fn, + arg_rrr_esz *a) +{ + return gen_gvec_fn_zzz(s, fn, a->esz, a->rd, a->rn, a->rm); +} + /* Invoke a vector expander on four Zregs. */ static void gen_gvec_fn_zzzz(DisasContext *s, GVecGen4Fn *gvec_fn, int esz, int rd, int rn, int rm, int ra) @@ -370,29 +376,24 @@ const uint64_t pred_esz_masks[4] = { *** SVE Logical - Unpredicated Group */ -static bool do_zzz_fn(DisasContext *s, arg_rrr_esz *a, GVecGen3Fn *gvec_fn) -{ - return gen_gvec_fn_zzz(s, gvec_fn, a->esz, a->rd, a->rn, a->rm); -} - static bool trans_AND_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_and); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_and, a); } static bool trans_ORR_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_or); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_or, a); } static bool trans_EOR_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_xor); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_xor, a); } static bool trans_BIC_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_andc); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_andc, a); } static void gen_xar8_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, int64_t sh) @@ -707,32 +708,32 @@ static bool trans_NBSL(DisasContext *s, arg_rrrr_esz *a) static bool trans_ADD_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_add); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_add, a); } static bool trans_SUB_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_sub); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_sub, a); } static bool trans_SQADD_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_ssadd); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_ssadd, a); } static bool trans_SQSUB_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_sssub); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_sssub, a); } static bool trans_UQADD_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_usadd); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_usadd, a); } static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz *a) { - return do_zzz_fn(s, a, tcg_gen_gvec_ussub); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_ussub, a); } /* From patchwork Mon May 30 16:05:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577236 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp411426mag; Mon, 30 May 2022 09:57:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcUksPk40kI0UpKy+JL8TadAPGQ6DCAx/lr3ckcO5eBBg4MTEiIboc4KcaKpSRNCXJtBm8 X-Received: by 2002:a37:a9d1:0:b0:6a3:736a:76d8 with SMTP id s200-20020a37a9d1000000b006a3736a76d8mr29229296qke.96.1653929867899; Mon, 30 May 2022 09:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929867; cv=none; d=google.com; s=arc-20160816; b=JybsXsTvUNJoQeXnJUFZes67vu5DrJyVEJFMi77kR73VqIOgLeal6ZS895FSavTwag 5PyvLy8vy2ZSjmsvSMqFAUqr4HA1pI5GOVv/5+WDeqijO/jg6RjWA1UljJJO7V8BvB/D dsGr23bwVT0IrGIIjR8Sifbr8syFCZzFiPIu5IzZievGzpGf7IV0zhIzentWArzZYPKs vF/RDQmW5dkqVmoZEKZPjd/0JARb1REJqSpnthHtd9DwxOuNU2lr6cWZ803CqecC89x3 SMH3GjEZ7lxr2oPVUG3kV0ixMazrtqpZYrPvegCUn+p1LeIz+lKhJFfpW8g3F/TnzPeV zzSA== 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=/rDIgsE7rTUWcnLfgoxn3YYJ/pGQAuzcGv/WQmbeVtY=; b=v0gH2zX8pvGEw71u02OaRIKZsp8SGG0ogwku6aMIWvfLZtR8giHXxoAor65iICuw04 vCya5UnQ/wWu+k9x5UmB25RfRaesH6quRchCW6IVe5UCXf7vZH1PsZ/4KM0HjH7Br+60 ivVU9sisZXqmkRncSnCrLL514NVBOasfnuw/ndZ5po+KMBKZS6QC9YSmxaKK91Du4Y+7 82jtwVn7DHz4UGdkFdhR5du4s0NZIHCqr12Khtaex8MJfyS+zeNla3lhbCrCppPqV2nm MHgjS4+ikxZFyymI5U4OdOoINQVs/DAThc2t/p0NudzgqIcOpQ6VURPfIYRDMDYZdKT4 5Zsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioCLUyrH; 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 1-20020a0562140d4100b004644d98afc2si2428630qvr.487.2022.05.30.09.57.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:57:47 -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=ioCLUyrH; 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]:59376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviiB-00087W-Fg for patch@linaro.org; Mon, 30 May 2022 12:57:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvk-0003MB-Iy for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:44 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:33972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvf-0007Ha-Kq for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:44 -0400 Received: by mail-wm1-x32b.google.com with SMTP id d5-20020a05600c34c500b0039776acee62so186885wmq.1 for ; Mon, 30 May 2022 09:07:39 -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=/rDIgsE7rTUWcnLfgoxn3YYJ/pGQAuzcGv/WQmbeVtY=; b=ioCLUyrHfeFGLopwk2Z0wCxZLUxMlLlVqSkElBTCgzzVwQSo7UBuPhRw4zQpNGgiaJ OsmWyMcReDo/kH4X6OTO2XuzR+3lzF4YCvFyK4BQ2GiTByDHSwMxOHel9zfMpCuEWj3d qnJ7ZygWpaMaQkCEXVHFreGw/Rt6UpO8El7jCFVcj79b8hyQ3r1Bs8iLiFDdfoE4MQbU brZq8KiWX7lFHjRyz8gI+XPMsD9b1cIYh+CrfwTF4qnrH0vHQCHI+usNw7/pQsWfK6mJ 7H9W4DegtL7mN+v6o2R5T6R1QK+KMlezu+y4jQuHNg2fepQ462cCEKXn18KZZuQiuQtN ApHg== 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=/rDIgsE7rTUWcnLfgoxn3YYJ/pGQAuzcGv/WQmbeVtY=; b=uyrNFEzpqpoEChVCrHkqYtxSZy23haGbFVmO8V92hfetRMOAPxBHnL9uPGlEamNLxo Xx3heAamAtOmvX4pPAsr18APdfy/z8tM3gnFlE7CrQ3rWUxwmP9gRMZUhTgXekkvDZXp t8+EzJvM9d1w8JT7FfzVD0jDDGioncXKs545qYScH5+Ey2uRqjt9Alvzo0lmYD/MVfAO mOYrapfpytYaZ3eSAekEVnWtB6blDgq3b9wepmb3T9Inka/m1nAzDN/LP4UWzEvGWNWx vn644w7wbL4vSCHwz4bLLxr24+I3w2Z/yJKCpmaBbmKC9gf17ZDvO8wbR3FB9qHr+jqS m+nA== X-Gm-Message-State: AOAM532LDTGafFOs02tik3GR8L+TQMv0gBwvUhpD4GfHAe6K+1zdN/5V AZtNetT0UvlMf/SapfVUuoyX4l1GZl0G3w== X-Received: by 2002:a05:600c:268a:b0:397:48d4:f6ad with SMTP id 10-20020a05600c268a00b0039748d4f6admr20222568wmt.134.1653926858208; Mon, 30 May 2022 09:07:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 035/117] target/arm: More use of gen_gvec_fn_arg_zzz Date: Mon, 30 May 2022 17:05:46 +0100 Message-Id: <20220530160708.726466-36-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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 Two uses of gen_gvec_fn_zzz can pass on arg_rrr_esz instead. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-33-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 1b3afcc24cf..2dbf2961283 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6425,7 +6425,7 @@ static bool trans_MUL_zzz(DisasContext *s, arg_rrr_esz *a) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return gen_gvec_fn_zzz(s, tcg_gen_gvec_mul, a->esz, a->rd, a->rn, a->rm); + return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_mul, a); } static gen_helper_gvec_3 * const smulh_zzz_fns[4] = { @@ -6946,7 +6946,7 @@ static bool do_sve2_fn_zzz(DisasContext *s, arg_rrr_esz *a, GVecGen3Fn *fn) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return gen_gvec_fn_zzz(s, fn, a->esz, a->rd, a->rn, a->rm); + return gen_gvec_fn_arg_zzz(s, fn, a); } static bool trans_SABA(DisasContext *s, arg_rrr_esz *a) From patchwork Mon May 30 16:05:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577230 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp407070mag; Mon, 30 May 2022 09:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoQNB81hx1UsTWpUglvLTZIsGQUtojMRpa98EcMTNvoYTOTXXiZ60HyX+2dmIACkhB3bIZ X-Received: by 2002:ad4:5965:0:b0:45b:a80f:c7e3 with SMTP id eq5-20020ad45965000000b0045ba80fc7e3mr47008334qvb.11.1653929491302; Mon, 30 May 2022 09:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929491; cv=none; d=google.com; s=arc-20160816; b=k/yMOCSQEFysb4ZRiDKLbWwYYXZ23QIM93LDZM+LtS/CNK4WA7w0LRFIUv9LdOLNkf 0XQjxs4N06fVG6hEnEIbrpMi5/ZrmixNQaOtBiu1NWwa87mJcAEFMXa2l54l6C23BDWp TayFwqHnxhxaC3j2CWvreYefo23sGP1GE0WXJYfMLB7qph1vxXxeSJARrAUFmjvupQ+r XBiqzzajbdwMaSlWIAVZiOwcgDXUITzr3/5JNngLdI7LsKokGZ2CYg4zr6kmrDDjXcS5 wr8XKxP2e+COeD4k2nizfAsBpFbJjLMKimaofeYz7NpSoFgMQJ84QJnoGexd6vOLyATy /DVw== 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=pIS9pWdjzE/HjRYIN1kdzWU0wWVjZc9Zg3HiRm8QkgY=; b=iO+GTNEnN8Np61JMdFecFIVaMYmQYWjrgfuQhEjCOCgS/klSx0swn9fzhYnhYeL2n8 Vy+jnFOVSD67yxohSSuga7Qov4wOmHtSFTmidMRWPwP2/SCEHrd95UUshqwzPCyddNzm CsTIuXMVgI/AJvNfIWmrPnVc97wpJ7caL/A9JRTOQlwmcpIJ4P1pB20tBQd8PUMVhtGP HahlsGjf06+nZ2a7Gh9/xzX4aowTs6sUQqLrdvnkAMOALFMg0BW7DvxlUfKTrMGFFQMw ++++3Op7LEi5eJ+YlYvqXMob0Nf8tRyI9ZvLEp6c/efncZ5Jne52EsHC75pWL409Gzhs fGag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3gqsXMm; 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 c17-20020ac87d91000000b002f78436e133si8255384qtd.56.2022.05.30.09.51.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:51:31 -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=o3gqsXMm; 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]:44834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvic6-0006Co-Rs for patch@linaro.org; Mon, 30 May 2022 12:51:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvl-0003P8-GU for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvj-0007Hl-M6 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: by mail-wr1-x42a.google.com with SMTP id d26so9674574wrb.13 for ; Mon, 30 May 2022 09:07:40 -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=pIS9pWdjzE/HjRYIN1kdzWU0wWVjZc9Zg3HiRm8QkgY=; b=o3gqsXMmr+9mE6LYj3DJ8KPLBGEmHcve1FkSTFFLiGeuxQXLOdpUV0ZACJAqd5D0KU sULO0Jp1on4hCV14UrqxlQ47SeRXJ76+IQeVNH8/jVVgfPtFG7XRLc9VdD6Bwi9yjOAF S3M9vTSajLK3w2E9lAoVbNEDpnImKbSYg4kmpg2MCVt/iDfixk4+jX9cks7OIfa1wfG9 LnYk71o9Cfxa8xBloLIWW0px6Q2/gEAakwzlAeSGI1+WIwtoEi91DvKvHJsg/lBERH0o kc+5FSQXpmjjuqqcwEIDYdld5l2AvLWerpS1antWeBVvBQUn6rZOLo2pOJB2m4hOI+e1 GZFw== 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=pIS9pWdjzE/HjRYIN1kdzWU0wWVjZc9Zg3HiRm8QkgY=; b=OO4AH+kmAKBP0+NK0UA0q2fusNQWzwQsHxqJuXZndNeC/eTLy0C+UPLjVb4LgWvpEz hP1lGdbUFMlFvSEi5ZT2EuD0AAS2TAS5aBSdcMzAc4/U6odXtTH4IG4RTILQExatDR7A 3iUCnN4+AAF4jKSM12WabCpAjVp9XcVOqbwLhUJ7Rl6NbtUYykzkQ0CLHQLrNOsjyy6x kL2r4PgQ3EZJEIV5eVXXspDLQ0s42ZRvXW6jnkSRvmw77M+O8c88ATPWOO5BHkFrGkog oGSwLNa0u8/qSvHQykiA19AAV5QC/HDJ7WeQNAcjpZamXQbdIkpXjPdXdL54p+zO00VH Hi6A== X-Gm-Message-State: AOAM530OI494hiOQGOtg7BDGW71YuCtxoCh8OBn7Sk7Fbr+0RVbDxYUe EXdxT8KTI5kR7A/nY4nEm9UtxbdatXFwkQ== X-Received: by 2002:a05:6000:1b8d:b0:20c:d372:f07c with SMTP id r13-20020a0560001b8d00b0020cd372f07cmr47051604wru.607.1653926859124; Mon, 30 May 2022 09:07:39 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 036/117] target/arm: Use TRANS_FEAT for gen_gvec_fn_arg_zzz Date: Mon, 30 May 2022 17:05:47 +0100 Message-Id: <20220530160708.726466-37-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions directly using gen_gvec_fn_arg_zzz to TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-34-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 66 +++++++------------------------------- 1 file changed, 11 insertions(+), 55 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 2dbf2961283..ddb34cad8e9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -376,25 +376,10 @@ const uint64_t pred_esz_masks[4] = { *** SVE Logical - Unpredicated Group */ -static bool trans_AND_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_and, a); -} - -static bool trans_ORR_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_or, a); -} - -static bool trans_EOR_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_xor, a); -} - -static bool trans_BIC_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_andc, a); -} +TRANS_FEAT(AND_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_and, a) +TRANS_FEAT(ORR_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_or, a) +TRANS_FEAT(EOR_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_xor, a) +TRANS_FEAT(BIC_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_andc, a) static void gen_xar8_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, int64_t sh) { @@ -706,35 +691,12 @@ static bool trans_NBSL(DisasContext *s, arg_rrrr_esz *a) *** SVE Integer Arithmetic - Unpredicated Group */ -static bool trans_ADD_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_add, a); -} - -static bool trans_SUB_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_sub, a); -} - -static bool trans_SQADD_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_ssadd, a); -} - -static bool trans_SQSUB_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_sssub, a); -} - -static bool trans_UQADD_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_usadd, a); -} - -static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz *a) -{ - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_ussub, a); -} +TRANS_FEAT(ADD_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_add, a) +TRANS_FEAT(SUB_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_sub, a) +TRANS_FEAT(SQADD_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_ssadd, a) +TRANS_FEAT(SQSUB_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_sssub, a) +TRANS_FEAT(UQADD_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_usadd, a) +TRANS_FEAT(UQSUB_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_ussub, a) /* *** SVE Integer Arithmetic - Binary Predicated Group @@ -6420,13 +6382,7 @@ static bool trans_MOVPRFX_z(DisasContext *s, arg_rpr_esz *a) * SVE2 Integer Multiply - Unpredicated */ -static bool trans_MUL_zzz(DisasContext *s, arg_rrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_fn_arg_zzz(s, tcg_gen_gvec_mul, a); -} +TRANS_FEAT(MUL_zzz, aa64_sve2, gen_gvec_fn_arg_zzz, tcg_gen_gvec_mul, a) static gen_helper_gvec_3 * const smulh_zzz_fns[4] = { gen_helper_gvec_smulh_b, gen_helper_gvec_smulh_h, From patchwork Mon May 30 16:05:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577251 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp421357mag; Mon, 30 May 2022 10:09:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh0rlu8ZkWDkB19/JdOktxeDoo9JUi7YVF20KRqPP/tM1KkN9+xqJe6vUVVQx1clKXZwIx X-Received: by 2002:ae9:e401:0:b0:6a3:5985:8f41 with SMTP id q1-20020ae9e401000000b006a359858f41mr32395381qkc.58.1653930594028; Mon, 30 May 2022 10:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930594; cv=none; d=google.com; s=arc-20160816; b=ri9A4ZQ8ZF2EuUd+fp5rFnNE1DSkLqE0fxN8HqNUbWOApNfexxCF4gdktiJNkeK3Zw Vsim43+iIPVdgOGM4IZFBBZuoy2I8POOeauzeOKKChHxO4u2MOW5yHgueIf/GKnpKlFC H2tgfGspwCIquqBNqDQIfaEMsavsCaPSoNFI5V/8glVRSbmP2IFI2v8hqzEjf+QPTKI1 6JfOjzHyZlyxAGIC9GxlwtdbIEqiYdV4M0QZAoQtKLD/s8/aWtrbqp8hU1G1FIsfH6iM j32RhsVYda0+JjORFss7PFhlNcTuVx0bUYcjEJ7udYNDu+y5wFSUgQYQ22rUIAieyDYE F6KQ== 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=VEIC8I1TyCPONODL7lkws/bVlUEyQgePU9miiwU3/CM=; b=0oPNQQkQZY/ggo1NFLNE6ke9AS4BYgrjmrKkiFpwnsrV2oyqBkubUnxruM3gM9cFo9 HwtYSx1x27//itu6Sjogm1XCQF10ngD3IV/oc7ScSYGaXZx+Ay7Af70xJiFltfM2XPKS R3lyBrLyRo+h/6i4FKMNbaj5YX3BzFKAgzZIZl+aMynraB53CoUJ/dyIcF5MkJ94xFy/ UUtjDj/PvpTVZjSBGFcQucE5ZFywzB0wvu7srcHzuDTgfXA7O2FwdlRuqdbm7lKfKOxK VpbezIikAZhJmW1GUgygicXoHCxrXryjZ7fpIgtk1moi4EJITrL0MpDTwGt4jPJ9e1u2 TF1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w09S4FNO; 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 ed4-20020ad44ea4000000b00461ccbd3589si7141661qvb.163.2022.05.30.10.09.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:09:54 -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=w09S4FNO; 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]:37158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvitt-0006Z2-Kr for patch@linaro.org; Mon, 30 May 2022 13:09:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvo-0003Yr-94 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:48 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:39929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvj-0007Ht-ML for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:47 -0400 Received: by mail-wm1-x332.google.com with SMTP id r9-20020a1c4409000000b00397345f2c6fso3118586wma.4 for ; Mon, 30 May 2022 09:07:40 -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=VEIC8I1TyCPONODL7lkws/bVlUEyQgePU9miiwU3/CM=; b=w09S4FNO8W+gHbCh19NwJdaFdSnHEMIAg/aYKB8W9Shi2E3NtEybuqVqcOfH4c9icw 1Qg7dLC8BXGMTyDCYVjc5Uf8DbJXdYHTIqsT/KOGkSP2lScRL+RNzSeOciz9ySUYilZB QmLHhuJ+/AP4GLPasGVlUHs3ZTCaK6iH7BU/KeUqBjXZMAGRxN+Y5xeeg8Kje0aVAZSx coYN0m+LxODZiGUMonJoSmkDa9ROF67TqxHyQXt9GNnfAWur1VXk3xf7yaEa7BoYDBij SHBlF0kL0rvtw2AjsEofq8Q0GrL26q3e8vmToK6IEzaniGXyeSjkJmU31kWwuyko3q6n D7WA== 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=VEIC8I1TyCPONODL7lkws/bVlUEyQgePU9miiwU3/CM=; b=epS5J+KzG3ZVbrV/cQ2D95vrV0PcOvgKQ4t4bURUAp0NYxPMJFAs0hMwokzweJg5N0 NPMe1fhf4UJCDnA36E1QkzON8lYGrkxOUyR3C07OjSQwJfvSsIRCwdxKi05mtnvPT7HM cW1E9KQ8uF3oXUwwMABBy2+Rk5W5XKtsgyrqwbBQCBArK7str+7vM5Lhn+fyDZO7Zy7m 6xkx2NP3+WfFLkY3YzcCkBGEcH6qLzFaagsUzM5141yAUhUqCt1Wwe91Nhx4ldo89572 3f49gFC4lqcSTpsScx/n7y4DfoG3JgqQQkIMGNQS5aQkdMFcQ9oU69JEOxdR92mpJFIP hgRg== X-Gm-Message-State: AOAM533WRqWeKj32SmtCyXVCvHDuj4Xfh5RKVQN0T2faLnQgzMsmIhIM DwhBtR2ilEIQ7DTBYwt7wr3pCFBmRX4rhQ== X-Received: by 2002:a7b:c1d8:0:b0:397:337a:b593 with SMTP id a24-20020a7bc1d8000000b00397337ab593mr19581583wmj.96.1653926859850; Mon, 30 May 2022 09:07:39 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 037/117] target/arm: Use TRANS_FEAT for do_sve2_fn_zzz Date: Mon, 30 May 2022 17:05:48 +0100 Message-Id: <20220530160708.726466-38-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_fn_zzz to use TRANS_FEAT and gen_gvec_fn_arg_zzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-35-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ddb34cad8e9..e92fef23041 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6897,23 +6897,8 @@ static bool trans_SLI(DisasContext *s, arg_rri_esz *a) return do_sve2_fn2i(s, a, gen_gvec_sli); } -static bool do_sve2_fn_zzz(DisasContext *s, arg_rrr_esz *a, GVecGen3Fn *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_fn_arg_zzz(s, fn, a); -} - -static bool trans_SABA(DisasContext *s, arg_rrr_esz *a) -{ - return do_sve2_fn_zzz(s, a, gen_gvec_saba); -} - -static bool trans_UABA(DisasContext *s, arg_rrr_esz *a) -{ - return do_sve2_fn_zzz(s, a, gen_gvec_uaba); -} +TRANS_FEAT(SABA, aa64_sve2, gen_gvec_fn_arg_zzz, gen_gvec_saba, a) +TRANS_FEAT(UABA, aa64_sve2, gen_gvec_fn_arg_zzz, gen_gvec_uaba, a) static bool do_sve2_narrow_extract(DisasContext *s, arg_rri_esz *a, const GVecGen2 ops[3]) From patchwork Mon May 30 16:05:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577234 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp409504mag; Mon, 30 May 2022 09:55:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX4KL2cM0tAI8gEwGVhVjHuewCKaQdbTACmh1GeTjgzzsd9Hk6p2xepfj0eQsQvFeiFnvj X-Received: by 2002:a05:620a:91b:b0:6a3:7c85:75f3 with SMTP id v27-20020a05620a091b00b006a37c8575f3mr28289601qkv.583.1653929704412; Mon, 30 May 2022 09:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929704; cv=none; d=google.com; s=arc-20160816; b=d9cL0LyYPsaELDrwgoBtCNlq9yIrSJujnGOHg6xKJTqwRZezgPHGVCcvjLtKChhojD Xo7d5nnvrn97B9wCdBK3RVGf5d6hrsbi+AjG+jN8Slm+97sY7CWEEDlq0ILTMqU17o52 Ss8f/2x7fpDXLVsimfJ+zKplPE7gJ0jeYRThrN5/ve7BdBhOCBc8HgwwB6+X1d5yRp9v F8TL+psT8Mgf40kDq5W9ElrF4uyHIfw0gAeEr7oAd6zBwKdCYOdbqxVBPiVLZ2aY3cuH jG5kUIWYio6HWcKTHQmiMMlKmVQ435/xqlUh+I3dipfAkS2yVZ7fh7lYTJaAyGxSOw79 tiYw== 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=r5qhhsn0mn03eMfaTsnMqO5VRQUM6D3Dyd4VEozedA8=; b=NjwbE+9usL+J+4h/EWw1S1bft7jNe0aeEPXnFH6HIfXNQX0fuD4MJ3YMgqh7Kwq8+H izUAlMZj87dZujTmY9Q2FR3Ik05g4sV3EWTSkL/eT+M2ycJBWBd9yBze7QED0ZsmsTve mlt9Ote0joMOm19H52ZXLM3Wo5ZGj5rLd+ACrH7fPPm5QylFKYRyHNMJ4AKr5xaJeRdj FHtFed5wwpEQodcSNvO7d8TTr/stso/6czkQ/Kbu7trzj2N9fyqD70BHn3NB1526HycQ Rc0uFw/KmWapzZhIEF3dFr72ZF4kMrr7GKtOoM6yZttuLHFmrpXDkpXrtvDwVNuPUGCH ruSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yi2uUxwy; 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 d20-20020a05622a05d400b00304b50c8e97si1270571qtb.364.2022.05.30.09.55.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:55:04 -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=Yi2uUxwy; 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]:53386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvifY-00047s-02 for patch@linaro.org; Mon, 30 May 2022 12:55:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvl-0003Pe-Pr for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvj-0007By-Mo for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: by mail-wr1-x42f.google.com with SMTP id e2so15315033wrc.1 for ; Mon, 30 May 2022 09:07:41 -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=r5qhhsn0mn03eMfaTsnMqO5VRQUM6D3Dyd4VEozedA8=; b=Yi2uUxwy9UrQNKP/Gcbnq1MAmUKXlQlPxbmU2IMT60bzNM+NXcXO4q8YP1t1ac6XGz oDM/NOhZGMhcHHSIw020SylhoU0Le9vI+DqqhKo9DfxkPBdchym5m15c8/Z171UqZX+C tzTKxgCpUIPVqCvClpVbab/AMvLa37D9Ly/o3TC6/03Y335lYsEIbae3to8pT3neGsjk Nv5WyeINGgiK4UaRrVqBiSSHNFB4so2b0aEvknqqR5T39eJ2ScyBBhdZa/gYUtAg2OtE bEIOt6S4wBIsfvCmlXyDSotK8k7Mb/kQbhnWq5Dmg8VNXJpYSpZIvV6bJLZWH3XfZgwY /fTw== 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=r5qhhsn0mn03eMfaTsnMqO5VRQUM6D3Dyd4VEozedA8=; b=6MS86CGUnLhInaWjX651PhqGLf794Axei78N3TFX+pvh8Uk0iPamAMDVBEnPOrzbW7 Pqs28MYqWSNHY8sKVGORgb2Tza1nRhn5mOKnCiVvwx2/x8Uyv7YyoCEEFRHay6LOtD4O hFbcmo/3BtVmeVw8ySG6iJFER6YDa9mbZm6rGb6oAepcwRXt1mBmoHONZgB5Je/j8xv+ Y0dSO2thlkZbWvzvSzFppF+hEm4Ao0cm3BlZnUrcEDrJPiT3OIIwJf/v6B+Xx7nQc/Kp WWNX7t0g6fSTFmRBnWoH22EN3+O/E8vLK5LWFUle+wuD66xg2YVna8dbD8HcynzQgsaX i/UA== X-Gm-Message-State: AOAM531Cjw16TjZjXA38IfweXdKHs44ShsW8ChfJj4vqVZSb4Mpoaqc4 pklChOLaVCjZ2Z3G6FR1c845VUGTaiMwog== X-Received: by 2002:a5d:4302:0:b0:210:824:48ee with SMTP id h2-20020a5d4302000000b00210082448eemr18896425wrq.471.1653926860552; Mon, 30 May 2022 09:07:40 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 038/117] target/arm: Use TRANS_FEAT for RAX1 Date: Mon, 30 May 2022 17:05:49 +0100 Message-Id: <20220530160708.726466-39-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 The decode for RAX1 sets esz to MO_8, because that's what we use by default for "no esz present". We changed that to MO_64 during translation because it is more logical for the operation. However, the esz argument to gen_gvec_rax1 is unused and forces MO_64 within that function, so there is no need to do it here as well. Simplify to use gen_gvec_fn_arg_zzz and TRANS_FEAT. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-36-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e92fef23041..36d739d7b2c 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7814,13 +7814,7 @@ TRANS_FEAT(SM4E, aa64_sve2_sm4, gen_gvec_ool_arg_zzz, TRANS_FEAT(SM4EKEY, aa64_sve2_sm4, gen_gvec_ool_arg_zzz, gen_helper_crypto_sm4ekey, a, 0) -static bool trans_RAX1(DisasContext *s, arg_rrr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2_sha3, s)) { - return false; - } - return gen_gvec_fn_zzz(s, gen_gvec_rax1, MO_64, a->rd, a->rn, a->rm); -} +TRANS_FEAT(RAX1, aa64_sve2_sha3, gen_gvec_fn_arg_zzz, gen_gvec_rax1, a) static bool trans_FCVTNT_sh(DisasContext *s, arg_rpr_esz *a) { From patchwork Mon May 30 16:05:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577225 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp403901mag; Mon, 30 May 2022 09:47:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCB+RkaLO2hgT1p3uTzIwXfyImP8ZW/kvaH1ZV2yvq5g0A+l3+qJb8ou2/pTwGdnxUKbas X-Received: by 2002:ac8:5c4d:0:b0:2f4:f4:1340 with SMTP id j13-20020ac85c4d000000b002f400f41340mr45391154qtj.75.1653929233686; Mon, 30 May 2022 09:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929233; cv=none; d=google.com; s=arc-20160816; b=oMyHoTQgkLD0PmB+F7eQUNv9TePeFzOHtZKCcLxc6DGDcWI5KfEQj33rjdF6wl0k1j e5RMnDiEXQ7ML6KGlWq4tO96RCsTYru/uxllgFs8Nqyde+VKysIIK6qcnPAnvTEJ4Neg UnUErwMLQe3OELKwVXumheIjyICFY3vHtAZ4VVgsOWRG5RuY/SU/hrbolr3VQNvW8cYy lPbim3Dw4qlDvFNX79A6/coAAkP4HIV/YqaTTaBpEbq+HdRLiMki55UNunao7VypE9aG RpUzmp3gbC5ic7Ljx2GFP8tRkInv3C9VwsBNvxwDrNkG8ev/jyw40fCf7pav/1vOwvoK FyRg== 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=avR2/pgwvkk2OR7g0STG26bwB5CQnXlwT2+SY4G/umw=; b=UGHEDJ64Ts4uQ7Cas0nHoJACN3aVnpLU8Xli0xcaoYF8WDQIGdpwC+qN/Cu885oSji Xjs/cfhWU2EC+eE4uSetHwG0ZFa9+Kjj5hdqsmdoSq7VpYViRPNIsKNjPuvyBV0lA0nr hOTVXGQbDMtU8OTAyHQFcZq7T6PIVUqSM0RqQqo02O0nKosNws9N8FCylYAEjXnPC8ho WAZUIb6/NBNp8/xPmE51Mgnn3iNO4pm2GNQ1Ct8zMqXGuJeuZ6jkVDyOFuii2UE7hi+3 kg3Eh5bZ4QnTwOMHh/+DjdxXnPOn0ZQcghG6YC73MMzakjngU4EGJ/CEHceOg2LBEixE SDtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jNSYFOeY; 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 br40-20020a05620a462800b006a33009158fsi7695003qkb.183.2022.05.30.09.47.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:47:13 -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=jNSYFOeY; 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]:33580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviXw-0006tz-F9 for patch@linaro.org; Mon, 30 May 2022 12:47:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvl-0003PI-Ms for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:42575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvj-0007I3-Mg for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: by mail-wr1-x430.google.com with SMTP id t13so15277690wrg.9 for ; Mon, 30 May 2022 09:07:42 -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=avR2/pgwvkk2OR7g0STG26bwB5CQnXlwT2+SY4G/umw=; b=jNSYFOeY0sTPr6T2ZEfOhCcySRXXQBW1EpLIQAkg6mHX4fp9r4/r6kOpK685jcLtOR pgvyWjuk6KN8lZwJXsOPn1Dusk45UEmMDAeXI03efMmtPwAmXOYoEzXH0dCaCxtbDD3C eorq7ZGXk6GWw7ovIsEalaaO8fnmJPr7IzOT3P7iyyhvtSgFWNARfXT2Kb7WIP/l2GKl m7mj4rU2+/QiZroSuyHOtfyr/Sou/B2eu7N34kUNMF0TPboWXla4QAMcdlnGvaNzFueP ae9RFJYiC9Sj+e9lTLE0NbMoJBTNa9gfOhiX3hjLBtilDJf3DL480lBBKmaee5vWtt5F 0p9Q== 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=avR2/pgwvkk2OR7g0STG26bwB5CQnXlwT2+SY4G/umw=; b=zZBmTP1YGzzLc2LGr6KUSZkwg8PkSbkf7YWifVpP0B9xyj0PnpzfScyQZSMJi5d1mQ 9O4B+YBhUMgzGV58fAbpXgxqZCtnX7nPWuAO5CyL7VnOnbY7CSd+GYkandIdqf4hFU6f 6m7QyYAOTzJ4N7au88mxcC/PIq23OPNHS3BOGFBkc6HEc+ZfSUxHU/iPOy2DnVMbr9yC yKR9y5p31hGlw+xST7hKnpO3o/sKz6y4eq/UBqUqmqe7S52B3OT1MZhLAvzmtjjnX1De heMManu9HsXJvD8o+LS+za9sQL5cXFC0XjPwU3S9b1YJg3EYb/5myFq2qjjJpLtNzPvA Xs2Q== X-Gm-Message-State: AOAM532DFrJCzaiakJqygdqH3SDz8zH6FeCi3JGYZbvg6UAGsuNYl1uh mAdhoQxLyu6bx2adGhLxhoX9JnT2VuLWNQ== X-Received: by 2002:a5d:428f:0:b0:210:30cd:3753 with SMTP id k15-20020a5d428f000000b0021030cd3753mr6029765wrq.549.1653926861351; Mon, 30 May 2022 09:07:41 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 039/117] target/arm: Introduce gen_gvec_fn_arg_zzzz Date: Mon, 30 May 2022 17:05:50 +0100 Message-Id: <20220530160708.726466-40-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Merge gen_gvec_fn_zzzz with the sve access check and the dereference of arg_rrrr_esz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-37-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 36d739d7b2c..e0b083f8615 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -281,14 +281,20 @@ static bool gen_gvec_fn_arg_zzz(DisasContext *s, GVecGen3Fn *fn, } /* Invoke a vector expander on four Zregs. */ -static void gen_gvec_fn_zzzz(DisasContext *s, GVecGen4Fn *gvec_fn, - int esz, int rd, int rn, int rm, int ra) +static bool gen_gvec_fn_arg_zzzz(DisasContext *s, GVecGen4Fn *gvec_fn, + arg_rrrr_esz *a) { - unsigned vsz = vec_full_reg_size(s); - gvec_fn(esz, vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - vec_full_reg_offset(s, ra), vsz, vsz); + if (gvec_fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + gvec_fn(a->esz, vec_full_reg_offset(s, a->rd), + vec_full_reg_offset(s, a->rn), + vec_full_reg_offset(s, a->rm), + vec_full_reg_offset(s, a->ra), vsz, vsz); + } + return true; } /* Invoke a vector move on two Zregs. */ @@ -490,10 +496,7 @@ static bool do_sve2_zzzz_fn(DisasContext *s, arg_rrrr_esz *a, GVecGen4Fn *fn) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_fn_zzzz(s, fn, a->esz, a->rd, a->rn, a->rm, a->ra); - } - return true; + return gen_gvec_fn_arg_zzzz(s, fn, a); } static void gen_eor3_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k) From patchwork Mon May 30 16:05:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577240 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp412778mag; Mon, 30 May 2022 10:00:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz470VD3kDdOdHPW9e/KsFpIVt+kUxXFN1DEmRLH5C4LnswO28RCNlvElxXVw6dWIpfr8tv X-Received: by 2002:a05:6214:20a1:b0:42d:6f51:46e2 with SMTP id 1-20020a05621420a100b0042d6f5146e2mr47030509qvd.67.1653930000717; Mon, 30 May 2022 10:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930000; cv=none; d=google.com; s=arc-20160816; b=V2uSYfstwSp3k6zbMo9LACDGOXDPxEVUgu1selyv0CCgEUAq65WznoeiB4U9ArEipx xemdkkTCHNfR1LPanV12U3yK7abcEufa1jt8LXiBHzLrUEbgqx4/2w07Cem1rDi5Q4XI pYW9SBpTaGEP70TMDZt2rF6o9N/O8T/tzt2Qq9uMAl0U2COfSiMhtgtcmZVqos/yqEYl 98GzZ5o77qVcCSEn1lojtTt9yqB2RxO3TFXGTG6mnVl1Pvyilegh11wx5xVdPorAlePg hYwjl/Rf1toyoYqbemgbtEc0ccB4mceeJaq8AGM1arhFUg3YqWX30t9JYBYDZDC3lqPM 2DLw== 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=vsA6bJy9SO81bRRIWZswEveByufekWoVyLicmZ9sRuw=; b=aSYGUIzD5JaqSp1FrvlPLgihcGuBKb6elvzqAMxWqz6ym7GoAGAv0aKYPDc7OgeJDR xdLWnh0HV/aEBKtTWNVvmVxIEnHLTRTFdGQivhHobXG8weSYFvEIYSbUEEX32mz6wvZb bsPsU3Q2zsc/+FacINFe5bt2p19I9JJGr7wt+SXRyg5xXLIhnF4PReNfJP1k1ITvrRis JMEkW/lXsHjEczORUxJeB2Z7wtgx/GbkZeu9r89j2yJAxfYEVpCYKEWf4YhJUh8mtshW hLAIhNrAdckP+mbw6z4+RqBlB8AJ5R409tB33bInij3m0aHC2oDRCOa32rdG3HklzAf8 tGjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gWtv760s; 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 h13-20020ac85e0d000000b002f90d8e4e97si7336854qtx.366.2022.05.30.10.00.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:00:00 -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=gWtv760s; 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]:39786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvikK-0005cN-9g for patch@linaro.org; Mon, 30 May 2022 13:00:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvl-0003QQ-VH for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:46 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:40473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvk-0007I7-7D for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:45 -0400 Received: by mail-wm1-x329.google.com with SMTP id v4-20020a1cac04000000b00397001398c0so8686855wme.5 for ; Mon, 30 May 2022 09:07:43 -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=vsA6bJy9SO81bRRIWZswEveByufekWoVyLicmZ9sRuw=; b=gWtv760s/f+hj5aONHdw/E+i56psOYBmYcngm/FtuGbmAZaDtuQ9Yn4RMUMgDMlhwn vAxGKoiXqURNVWuXoynmeX1YqJKjPCxwf6p9sayq6BtE8T98k8D0psT5YmX84aUwqaFO TJgkh+0Oh3b2tDe8LFxfJIDIf5IcLbvU13101TfkNsmDJSY4ABbI1KbKlM8A4vBRwxBi A1FNnnx5sHcwwUEr+tA+I4x/e8x6D1KOcRvGS3Jw0k3DxptGt+1q3NH7fDjxQBeuOphP JrlqvJEdL7L/xvRvxCUvHzBGdg/Obng/EAhgOllEJcrAAzD3MstwRsTa0SLeMp565Tog sJFg== 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=vsA6bJy9SO81bRRIWZswEveByufekWoVyLicmZ9sRuw=; b=dFLcy5sVpXig+7RMxtuz+AFfa1DmjEibkA9IXoWVlSWZ+ngZqqakKochgJ005B3Qxy Xv8m29JFE6wn5kYxVZkiNUx153BRYfBnLLeOrsCnkratMpK3Swlzm9MFxEIXSOCqVQj0 +FzqkM4L8mJAQiZv9/xk071cti7nruHrYS+koy62w8nokiOLNbjgC7ex8o0e1vjxhH/j mmzQqf6PAYdw15xKzmft9WqDkpl8SQKHidcKLj0wZDW92OrARzoN6hi/A7WboeHlZqsQ WwgFnpjSgmm11oSfslDIfC4py0IAR0wX7VEAU4CZRle5pXfoBbw2RHFhC2+/PYaudZsx Iu4w== X-Gm-Message-State: AOAM531qqVyc/Qcoc+c26NWTkEnh3r4s3xIWlcTFADknVjqwZwHt/DHA oQC3reOdQ2Ei0eRmpB+5vPmL+DAJAhIbSw== X-Received: by 2002:a7b:c20f:0:b0:39a:46fb:64eb with SMTP id x15-20020a7bc20f000000b0039a46fb64ebmr10218046wmi.151.1653926862288; Mon, 30 May 2022 09:07:42 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 040/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_fn Date: Mon, 30 May 2022 17:05:51 +0100 Message-Id: <20220530160708.726466-41-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_zzzz_fn to use TRANS_FEAT and gen_gvec_fn_arg_zzzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-38-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e0b083f8615..f89c78a23e9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -491,14 +491,6 @@ static bool trans_XAR(DisasContext *s, arg_rrri_esz *a) return true; } -static bool do_sve2_zzzz_fn(DisasContext *s, arg_rrrr_esz *a, GVecGen4Fn *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_fn_arg_zzzz(s, fn, a); -} - static void gen_eor3_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k) { tcg_gen_xor_i64(d, n, m); @@ -525,10 +517,7 @@ static void gen_eor3(unsigned vece, uint32_t d, uint32_t n, uint32_t m, tcg_gen_gvec_4(d, n, m, a, oprsz, maxsz, &op); } -static bool trans_EOR3(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sve2_zzzz_fn(s, a, gen_eor3); -} +TRANS_FEAT(EOR3, aa64_sve2, gen_gvec_fn_arg_zzzz, gen_eor3, a) static void gen_bcax_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k) { @@ -556,10 +545,7 @@ static void gen_bcax(unsigned vece, uint32_t d, uint32_t n, uint32_t m, tcg_gen_gvec_4(d, n, m, a, oprsz, maxsz, &op); } -static bool trans_BCAX(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sve2_zzzz_fn(s, a, gen_bcax); -} +TRANS_FEAT(BCAX, aa64_sve2, gen_gvec_fn_arg_zzzz, gen_bcax, a) static void gen_bsl(unsigned vece, uint32_t d, uint32_t n, uint32_t m, uint32_t a, uint32_t oprsz, uint32_t maxsz) @@ -568,10 +554,7 @@ static void gen_bsl(unsigned vece, uint32_t d, uint32_t n, uint32_t m, tcg_gen_gvec_bitsel(vece, d, a, n, m, oprsz, maxsz); } -static bool trans_BSL(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sve2_zzzz_fn(s, a, gen_bsl); -} +TRANS_FEAT(BSL, aa64_sve2, gen_gvec_fn_arg_zzzz, gen_bsl, a) static void gen_bsl1n_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k) { @@ -606,10 +589,7 @@ static void gen_bsl1n(unsigned vece, uint32_t d, uint32_t n, uint32_t m, tcg_gen_gvec_4(d, n, m, a, oprsz, maxsz, &op); } -static bool trans_BSL1N(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sve2_zzzz_fn(s, a, gen_bsl1n); -} +TRANS_FEAT(BSL1N, aa64_sve2, gen_gvec_fn_arg_zzzz, gen_bsl1n, a) static void gen_bsl2n_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k) { @@ -653,10 +633,7 @@ static void gen_bsl2n(unsigned vece, uint32_t d, uint32_t n, uint32_t m, tcg_gen_gvec_4(d, n, m, a, oprsz, maxsz, &op); } -static bool trans_BSL2N(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sve2_zzzz_fn(s, a, gen_bsl2n); -} +TRANS_FEAT(BSL2N, aa64_sve2, gen_gvec_fn_arg_zzzz, gen_bsl2n, a) static void gen_nbsl_i64(TCGv_i64 d, TCGv_i64 n, TCGv_i64 m, TCGv_i64 k) { @@ -685,10 +662,7 @@ static void gen_nbsl(unsigned vece, uint32_t d, uint32_t n, uint32_t m, tcg_gen_gvec_4(d, n, m, a, oprsz, maxsz, &op); } -static bool trans_NBSL(DisasContext *s, arg_rrrr_esz *a) -{ - return do_sve2_zzzz_fn(s, a, gen_nbsl); -} +TRANS_FEAT(NBSL, aa64_sve2, gen_gvec_fn_arg_zzzz, gen_nbsl, a) /* *** SVE Integer Arithmetic - Unpredicated Group From patchwork Mon May 30 16:05:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577238 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp411944mag; Mon, 30 May 2022 09:58:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7dfua0YlUX4YtWyZGhHWQgxaE2aEF17VCtH20/z5+cSkeN6cN3if3SaqMkwzwCjP6FQDR X-Received: by 2002:a05:620a:424e:b0:67e:4c1b:c214 with SMTP id w14-20020a05620a424e00b0067e4c1bc214mr38406994qko.651.1653929914514; Mon, 30 May 2022 09:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929914; cv=none; d=google.com; s=arc-20160816; b=Xd41QA6FQiz3FER9dBtNdSKOeabVJmaM63NNaVCGOv3eExZE6lLwZ7rUaBPL4G7gPm /GjQFqpyWjf3UlYcHDwJMHG/mdRBnYdXPnuZimrRdHskVvTMGSPcOh7d0MAX9jLZs6nH 8JzBgsYRXNb4GuWkINeHo5sXUC8O4nfhI9vN1MoVQ5bIA5bvPOAdQ2RLEd6WjmnFUayB RGvIGLVH3qumcpaR8hv9fBh4Y7wXDEmGVrfAp0pDRnKzwrFC61hOdco+0dlFhnpjDyq0 Da8UuNobTapnIeIoogSBaagaXxfBRYW/9kRZgGHQbrCs2uKkcBFuzl5fdR/8gJ1Yjeqa sqpA== 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=ZyrI2QMBHv62QhZYmNb9cec9jVeBnheABhiw1PfobaQ=; b=qP6gGbT9eGW08d93ERwQmvKgsAh5H7UULEf9PvHAm7H3n+5S4w2E/yDtkCd/ITx3Kc lQW1eHq6bPYNjouFkF90JlLJI+c7fLYEgTcJjR+Jk3aRMxODg3r8SlrlokGX1f2b3i+0 LshxGXkBSQOhRv3WDCQIojPR6yZnimqMHlq/DlerLlgbDbPMNh4Xe485WLGzr/dHAz3P UiyJzAuy8ROz81Pz4qzXRnQtzcyEltw2ceqeV1ubZn+qYBi+phV2Qq8Huhc7/rEkZncr lXGoDScAYCs0T9XB0TcgVPeZkW6YQyYJ/FOPc7NRHYyIxu4k0bpgDorTClxt174/KFvb 3BNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ctPirg6Y; 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 gs4-20020a056214226400b0046458a96f5asi1049756qvb.53.2022.05.30.09.58.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:58:34 -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=ctPirg6Y; 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]:33788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviiw-0001b6-4C for patch@linaro.org; Mon, 30 May 2022 12:58:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvm-0003U1-Sm for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:46 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvk-0007IB-Fi for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:46 -0400 Received: by mail-wm1-x329.google.com with SMTP id y24so6636363wmq.5 for ; Mon, 30 May 2022 09:07:44 -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=ZyrI2QMBHv62QhZYmNb9cec9jVeBnheABhiw1PfobaQ=; b=ctPirg6Y5/w4QhipPe+XvCMt5IYwnt48AUL3gtxTzAfyheJ12M/wz5vm1yvlOPvdSa SByv/g366T/hlltTnRQplCGtzzR+11mPZJnNG5QV45kobIyifQBoduTY2qigg0BmRgoy yueJM7A3wbishxGOy6e7WXIi85k+0id6KYiDnOtxtTcsBs0yTaqCJcOxAKWi8QwoSU1S nGxbEvRIQpQreC2o7BjLkLU5Q2KCJXfeH3dC33bbU6DY+v6TusvkL6t06nDq4U8Jnv7e nK+C+gaQfLSDGSyfAo4a8D1MkRW0FYgtjxblAHZOh0kgXhwTpbcHYjHNHMX3IRkyfEfb IS5Q== 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=ZyrI2QMBHv62QhZYmNb9cec9jVeBnheABhiw1PfobaQ=; b=GTXY3pj8B87EnmwiFcQ9O7NemOe7W7PYYqOB23eAjZi4wxm/TLZZT3Hs1VYGQPnnZc ajCiCbxmo87eUqu2vt+pClJIuQ8XCS3azeEin5sX94hxP29kDb43n73t/wvYf+1YxUi6 Bai/Eo7+TakHCyKmZpUfJe3EBMhFXrYeyKW2YlHqQd6KQ8dlUGMNz4TvVPUwx7LjH9J7 F+XW5+v0etfg0XrAVwLE030gFmrKIW/h0W9bP7ImOkSNuRmLQAbCfPvyvn6SyXv9FgTH UvuRKlZr7JAEU+G1PA8fRGNdBldZnd9BeZ+BcU8A8ECTnQ4qwGLgTEU22CGVgrdBMbLv oEeg== X-Gm-Message-State: AOAM531hA1pfVcjJam13PH8e3u0XWdfOdvVgHj/43jgjJjPrkgO2um02 uY9bS4QdP3h82UC4e2ZH7Uf+AYiT2BLONw== X-Received: by 2002:a05:600c:4f4d:b0:394:6ead:3523 with SMTP id m13-20020a05600c4f4d00b003946ead3523mr19561578wmq.109.1653926863040; Mon, 30 May 2022 09:07:43 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:42 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 041/117] target/arm: Introduce gen_gvec_fn_zzi Date: Mon, 30 May 2022 17:05:52 +0100 Message-Id: <20220530160708.726466-42-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 We have two places that perform this particular operation. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-39-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f89c78a23e9..7938c5393e0 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -258,6 +258,21 @@ static bool gen_gvec_ool_arg_zpzz(DisasContext *s, gen_helper_gvec_4 *fn, return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, data); } +/* Invoke a vector expander on two Zregs and an immediate. */ +static bool gen_gvec_fn_zzi(DisasContext *s, GVecGen2iFn *gvec_fn, + int esz, int rd, int rn, uint64_t imm) +{ + if (gvec_fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + gvec_fn(esz, vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), imm, vsz, vsz); + } + return true; +} + /* Invoke a vector expander on three Zregs. */ static bool gen_gvec_fn_zzz(DisasContext *s, GVecGen3Fn *gvec_fn, int esz, int rd, int rn, int rm) @@ -2028,12 +2043,7 @@ static bool do_zz_dbm(DisasContext *s, arg_rr_dbm *a, GVecGen2iFn *gvec_fn) extract32(a->dbm, 6, 6))) { return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - gvec_fn(MO_64, vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), imm, vsz, vsz); - } - return true; + return gen_gvec_fn_zzi(s, gvec_fn, MO_64, a->rd, a->rn, imm); } static bool trans_AND_zzi(DisasContext *s, arg_rr_dbm *a) @@ -6835,13 +6845,7 @@ static bool do_sve2_fn2i(DisasContext *s, arg_rri_esz *a, GVecGen2iFn *fn) if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - unsigned rd_ofs = vec_full_reg_offset(s, a->rd); - unsigned rn_ofs = vec_full_reg_offset(s, a->rn); - fn(a->esz, rd_ofs, rn_ofs, a->imm, vsz, vsz); - } - return true; + return gen_gvec_fn_zzi(s, fn, a->esz, a->rd, a->rn, a->imm); } static bool trans_SSRA(DisasContext *s, arg_rri_esz *a) From patchwork Mon May 30 16:05:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577245 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp415628mag; Mon, 30 May 2022 10:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBrvTlbHnUZ1400Hf8cKlXS0zCRhHU52h4UNqQ4gxMfIplXFdhUHjmuRyLk9gGtCk1K+HQ X-Received: by 2002:a05:6214:d0a:b0:464:485d:9b37 with SMTP id 10-20020a0562140d0a00b00464485d9b37mr6798934qvh.19.1653930200759; Mon, 30 May 2022 10:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930200; cv=none; d=google.com; s=arc-20160816; b=Ozk8IyMuh/wjVr0YCvSRjNCOvt8vUOgU1/nT0AQP1l63PjhuLPbfHbLULp33AWx9xV +eg6C43rplIvFZozI/62fRgjWQr14p6pfHOPMm4+TWSj+dreGXZd/GdYAzxDNCL/9yxX Bq9gt7k/wZ3kAMy6h8yNF9DdBdgWkbhGFaPsu7wC6QH6SdIua96snUWVB8XbYlCNhHtJ PYIm7LDpNXRdrdIQE64ZRICaVPNYsd/d8bKtwZqP3R3K2lWKA0BZRMgogc5l5dqOqlMJ 3SsCgZrtWajgSRjNT6qOkPHNK0xPDQ8oqFiPtIuUCIlngaw9dpVWAqdR9Ha4EmgJrmU/ Fuqg== 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=iYyYfgP/74hMPK21rmAvsetCqMTjCc79RqrNr1rz7p8=; b=tB5ExiEUklFFmK/xr+e9AHngnxQ3QTVaTHzU/Nr9qAsPoVH/Y6ZiniYkHzR8ZK4q7D Y2Z9LXP6pGog9mZdplslJ1eUOPPL71HDxmquzLqNVpXpP4wmwerdFcXdqkKGzvHxsm++ nRTAp2R4O1KdaOS5xtD92v2l6355P7l7DxY8T/wzrCWcGE3n9fThFOzIAMoEjGLy56wp ZKj8lSoJTHMcPOp3f7tRkHOuNfr/v1gdBDZfinuR9lxLD30YAcLigETpD+iFNzLR2X9c 0ys0NQ/7fycx5xj5ZOn9uNXB6Lg+8LaV9I1R6A0YaJ0Ir6KP8dgGAfrqF337WYAPB/Q2 y3Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="daH5/yzf"; 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 i6-20020a05620a27c600b006a609a8c413si3885048qkp.394.2022.05.30.10.03.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:03:20 -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="daH5/yzf"; 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]:48162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvinY-0002xv-Bz for patch@linaro.org; Mon, 30 May 2022 13:03:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvn-0003UR-08 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:47 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:52763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvl-0007IS-8q for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:46 -0400 Received: by mail-wm1-x332.google.com with SMTP id p19so6653014wmg.2 for ; Mon, 30 May 2022 09:07:44 -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=iYyYfgP/74hMPK21rmAvsetCqMTjCc79RqrNr1rz7p8=; b=daH5/yzfmaqFBakzttgrYZgLNqD9TmMTqf7bSkmvyAU96N576Rzv4pjZALUkrNat8U ne00U66j5+WamSNKINeXd7ZFSUKLkF1M9PwMBbTZ5QSXYKxabMkB5LlzveYOgr+OPkEb KMrwYOQu6m/S3GMnD5lkKqAKfnmNL2+pXCEo9w5iLfuKa7sHemP1xwp9HdNYkx67cXWB cZC+crGWgUi0L2kkqvp1w2loGxtK2BYmBEnlC62Yy7QQwsLJalytqI7mEQvkEVxZ5GYw SWsJC0Ii9efF9j/6/TVQN74BA3ZKYyL46lWxuzHLPKufWz5vaShDfDxN4RD1KKI34VXc rDXg== 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=iYyYfgP/74hMPK21rmAvsetCqMTjCc79RqrNr1rz7p8=; b=lOyu4eG/OcAYaJV/G9/jx657l8pAkIfrQ+FaWHbtSLZ0rwTW1Ulr3TUB45CMhJaeJT L9ehrspHefavYAvU+rJHvBdZlJP29UjbJ34DGKQcI+G7VuqLpNZHlWQLPdHa0iluSVcG sVi0Zn9+Nqtf8IG/9Rv5DOyFYe6hZLNz5Il+w/ICbxY61AtpjYZeh8NpILlZ48vNgS6T hvH7G2aY51Tv3jz9th+5oZPZ+/AnIcZcbQKcD0olhwyi8CcywAg/xjEjmH7IaBPDfYF4 7OMrBysA4yIgyPSI5mzpj9/dJlYveVZ/bVgfahXIUouFkP2DMbJvAJsJrPpcHFf4H/Os 3a2Q== X-Gm-Message-State: AOAM531HlaKwo9YPclYCe4j2Wp76/D0bS5PbwS+pEiF9ELhBCPf4rFWe w79gwuubbQ3FSrV/mobJ7Lvh4SwzWHbZ4Q== X-Received: by 2002:a05:600c:210a:b0:397:592f:6152 with SMTP id u10-20020a05600c210a00b00397592f6152mr19860126wml.99.1653926863749; Mon, 30 May 2022 09:07:43 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 042/117] target/arm: Use TRANS_FEAT for do_zz_dbm Date: Mon, 30 May 2022 17:05:53 +0100 Message-Id: <20220530160708.726466-43-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-40-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7938c5393e0..6fa721eca62 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2046,20 +2046,9 @@ static bool do_zz_dbm(DisasContext *s, arg_rr_dbm *a, GVecGen2iFn *gvec_fn) return gen_gvec_fn_zzi(s, gvec_fn, MO_64, a->rd, a->rn, imm); } -static bool trans_AND_zzi(DisasContext *s, arg_rr_dbm *a) -{ - return do_zz_dbm(s, a, tcg_gen_gvec_andi); -} - -static bool trans_ORR_zzi(DisasContext *s, arg_rr_dbm *a) -{ - return do_zz_dbm(s, a, tcg_gen_gvec_ori); -} - -static bool trans_EOR_zzi(DisasContext *s, arg_rr_dbm *a) -{ - return do_zz_dbm(s, a, tcg_gen_gvec_xori); -} +TRANS_FEAT(AND_zzi, aa64_sve, do_zz_dbm, a, tcg_gen_gvec_andi) +TRANS_FEAT(ORR_zzi, aa64_sve, do_zz_dbm, a, tcg_gen_gvec_ori) +TRANS_FEAT(EOR_zzi, aa64_sve, do_zz_dbm, a, tcg_gen_gvec_xori) static bool trans_DUPM(DisasContext *s, arg_DUPM *a) { From patchwork Mon May 30 16:05:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577247 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp419789mag; Mon, 30 May 2022 10:07:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfeATSzia2q0BSkownNtMlMTigrIESI3hC5ZegXrNDIL/ziEH04SNQooTBWkbGwX3N/fvZ X-Received: by 2002:a05:622a:15d0:b0:2f9:f31:1145 with SMTP id d16-20020a05622a15d000b002f90f311145mr43408454qty.316.1653930474662; Mon, 30 May 2022 10:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930474; cv=none; d=google.com; s=arc-20160816; b=Wi7FStFtHJsX/4FbINgSRTd/wiKB0IfyiT1aIP7CkAoXBVoDRRYJqMZSgOJ/5cC1Cd 8EpJ1/Hdr1+sjrWWs0/mGAnjhA0nd1FX4mXTh+hmXlT2gqQk3jEZ+XL1y90/s7Zi5t8T MPqxKpnWJaNav/QifF80jzIlPanePjeikmq9wlsyo78933ArJYEz5zxZ/nko/85b6vL+ qx8yzPWVvWeky1g2m8Xn/aUxN67pouQTFFJZSXRpN0SjSXo2U8crpm/p9SiZ0w6KyHjX OtgdKShXsGCww39E9cxnys1UKJcs4zOEOJZUOKgWtqfgTgbvtrwOQM1K0DIgmcLEyR38 hb2g== 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=1QczMceUhbOmMC6Z06ersGWW4O9X6WPEX2DvnlUzW2g=; b=I7TpcY+dvbI9+/3sdLvWHEXAVugtKY0tljcBdG3kx8ZMW36B46bI8EtUf8MwypAHZW exSEomHVmmspaRqRkfKnIAepjmnLppDtEtBSTevzGid3dllEG82nnKjs0E8+F9s7Y60l EwRaULzYqN/gRh4PRKXOnVAEiezg23w/yXzIQg1je9387iyo/Uk6OniordIdZGE0EjA0 RObQL4epPdiCIghBClgYqe1Vlquk9dcK/mejDEKV1icDwZRRHJKraBq6LZ+3amAkC/p1 L86rr5Tt3eJ7KmCGeGEOGaWxhgC84hbOSluHKALkeiAbz+uH7G4VAwdKS+nik7TQ797C WyEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iJndOhUc; 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 w15-20020a05622a190f00b002f39b8f677esi7444786qtc.537.2022.05.30.10.07.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:07:54 -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=iJndOhUc; 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]:56620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviry-0000Tq-6S for patch@linaro.org; Mon, 30 May 2022 13:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvn-0003Ul-2m for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:47 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:40672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvl-0007BB-EQ for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:46 -0400 Received: by mail-wr1-x42c.google.com with SMTP id k16so10940533wrg.7 for ; Mon, 30 May 2022 09:07:44 -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=1QczMceUhbOmMC6Z06ersGWW4O9X6WPEX2DvnlUzW2g=; b=iJndOhUcP1m1mub3QeEBGFWwgC7ixw0kdpA7P8e3uJYJwn9KoxQOsZWneWJsNZVvfC nAt5ztjgaySkeSBuVB1r6DN1j8KQeX4xu5g8IQILZeqeoZBXVcF6titIO5B+viy2AXPg 2PTU6RQj9/OWicGK4UIMTHpCul7IQkW6vz7zxwreHdUI//295eTypbNuSQwB7/EHO+BM vpIqKdETG/tEo1D3e96D3oYxFxmbp/LbgASnCXYPyLz9pZJ6mmk+SH21g3qA1BPkJvSZ 0UAQxH7pH1L9C47IYfE1YQhfF4M1g6hfq1jkmwSn9YVfAEX/lQpyW1MxExeZCfL8M1SA U6vQ== 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=1QczMceUhbOmMC6Z06ersGWW4O9X6WPEX2DvnlUzW2g=; b=uATiL0APhxBX+HAR4L9c68ScOCKN0ol1yD2nFTjEtohOq6FY4KAcSuuukDKPH3YyWD MzYf9g/dcGs6IcssgFgzk/8duAn2/tVsQZzGKEJ7/h2+DJ9LNLPxOrAXOM1Txoc/9cbh RctHpCFlbJvw6uLx7zSczuaDcz+YTgKmw3VY4Fqk1WzcB/vdtgXV1YXd7q02XG4gg9hg OduoOD8Le3Z6eD8yc0CzCmG/50Jrk9ll4mtKm39hUEo6rrqiUXPcmlXCsQv8nycZFry+ ru+GdEyMEcUX0gLmFj4bQwfUSQGLAj4Gnfmxezj6bR+Avc07CGAx+n0toOPmCfJn6kW9 EXBA== X-Gm-Message-State: AOAM5319rXZFDSqvkFp245ty5Us8nnubpi8Ivfut7RfTQSktunuwjPzS 7wAuLCAQ+NXtVyDTBxndPhVZ0HPjRsRx2w== X-Received: by 2002:a05:6000:16ca:b0:210:3d2:9bae with SMTP id h10-20020a05600016ca00b0021003d29baemr20315680wrf.311.1653926864501; Mon, 30 May 2022 09:07:44 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:44 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 043/117] target/arm: Hoist sve access check through do_sel_z Date: Mon, 30 May 2022 17:05:54 +0100 Message-Id: <20220530160708.726466-44-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 The check is already done in gen_gvec_ool_zzzp, which is called by do_sel_z; remove from callers. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-41-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6fa721eca62..62bfc6fe7c4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -697,13 +697,13 @@ TRANS_FEAT(UQSUB_zzz, aa64_sve, gen_gvec_fn_arg_zzz, tcg_gen_gvec_ussub, a) /* Select active elememnts from Zn and inactive elements from Zm, * storing the result in Zd. */ -static void do_sel_z(DisasContext *s, int rd, int rn, int rm, int pg, int esz) +static bool do_sel_z(DisasContext *s, int rd, int rn, int rm, int pg, int esz) { static gen_helper_gvec_4 * const fns[4] = { gen_helper_sve_sel_zpzz_b, gen_helper_sve_sel_zpzz_h, gen_helper_sve_sel_zpzz_s, gen_helper_sve_sel_zpzz_d }; - gen_gvec_ool_zzzp(s, fns[esz], rd, rn, rm, pg, 0); + return gen_gvec_ool_zzzp(s, fns[esz], rd, rn, rm, pg, 0); } #define DO_ZPZZ(NAME, FEAT, name) \ @@ -749,10 +749,7 @@ TRANS_FEAT(UDIV_zpzz, aa64_sve, gen_gvec_ool_arg_zpzz, udiv_fns[a->esz], a, 0) static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) { - if (sve_access_check(s)) { - do_sel_z(s, a->rd, a->rn, a->rm, a->pg, a->esz); - } - return true; + return do_sel_z(s, a->rd, a->rn, a->rm, a->pg, a->esz); } /* @@ -6343,10 +6340,7 @@ static bool trans_MOVPRFX(DisasContext *s, arg_MOVPRFX *a) static bool trans_MOVPRFX_m(DisasContext *s, arg_rpr_esz *a) { - if (sve_access_check(s)) { - do_sel_z(s, a->rd, a->rn, a->rd, a->pg, a->esz); - } - return true; + return do_sel_z(s, a->rd, a->rn, a->rd, a->pg, a->esz); } static bool trans_MOVPRFX_z(DisasContext *s, arg_rpr_esz *a) From patchwork Mon May 30 16:05:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577255 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp424653mag; Mon, 30 May 2022 10:14:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg4Y3mY8sOilL3G3ACuZrvYekXs4PYe9MT69s5abGo+FghKYPv2jf9x57k0Kcevt6FUBiV X-Received: by 2002:a37:9e0a:0:b0:6a3:299e:735e with SMTP id h10-20020a379e0a000000b006a3299e735emr38090872qke.388.1653930842504; Mon, 30 May 2022 10:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930842; cv=none; d=google.com; s=arc-20160816; b=mapX1/cWNufG1jsPuriBusJyfgjuBXSbtHmD+lvYA9kofAtszlABGmhnsI8zQTLptA zcm+QjoH/xMb/e+0vLLUZbeeQGF4ezK4x+eRaumPFRSdHWrBjb48oLuvmeWIRmfqTPlb 8LjgFWgD2YhFd8kiaITMpw7iqnbpzCbmh/7bobxaCUzbY1HWBDV9etvJh6lz1WF9ZzGG h4wtDBGdyV/C5hUfvA/LsomN4XtnW8bs3g/fit5M2V5KONcfq33mvghdEHoP9XLflCP0 mznl8AlqSIS2MG38i1NVd1FTMIfBTC4mIyH0XovY64CO4irjuhYqaUbavLRNxLEv87Ti 2gKw== 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=nnl0FxSy2lQGEXHLpuMztJtWf2ssR/52boz+nuGDoCs=; b=0PVgmsQFmBI3ohZxKfgNc16ChXyBRZtTGiNId/5APnYa3SFT8NBcDim85YpxwR4uRb h/xcjW2meQQ9b30J6dEdbFeYPGfnJ2eS7agBzQfmAS1W8p2fc+iNu8htRc4sNwRWPP7P Aoc31ckK9ZK+F0Th4CD2K9T8LYJ7dN0KW0MZUgfLE/MrGKDrSehzc29GJAWoRR5pK/J4 S3ek9fFkKHuk2ZWNWphc4b2s/58M8sHEGWv5/fRuAZred0ekpyA6Ex1nrJuPrR2zbVE2 U85bQR4Kf4r2grivzEcJjQ4w/I+Z/KDv0XC3DCdoELhKXDYQ5mQnhvaGRm2ndzrdtEI7 mAlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lT2G1r6H; 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 f1-20020a05622a1a0100b00301304e2e09si3764232qtb.435.2022.05.30.10.14.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:14:02 -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=lT2G1r6H; 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]:45682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvixt-0004RI-To for patch@linaro.org; Mon, 30 May 2022 13:14:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvo-0003ZJ-Cb for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:48 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:36677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvm-0007J3-OB for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:48 -0400 Received: by mail-wm1-x331.google.com with SMTP id h62-20020a1c2141000000b0039aa4d054e2so2622811wmh.1 for ; Mon, 30 May 2022 09:07:46 -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=nnl0FxSy2lQGEXHLpuMztJtWf2ssR/52boz+nuGDoCs=; b=lT2G1r6HBVzWOJQ1iTIDjvzdeTS60VLGqZsple6WNWaf2Q1VduhrV2J/jDFrjMdJUF 7nU9xDYLxLQ7mvZGO5gu9jN8n9Zgt5BPJ5RPMSJeCemsZ3Olm8/MRqP/Ov1NnPtvnETJ hN236fAjkAhjLh6ScZ6u4RumEECX/93ARl03wcbSJLtENcPSvZhQ9eJzfrJMuWa2Tli7 nfr2sQx/FjHKNaGAzzN6nnDD+x52t7p8SC+rm4o55UQhD9703UYWt1HP76bYqACUJSOO dDd9FfRHedGwqBglcQuCwfdsY8n97DKzFu5frGbBBY9pu21uMOOhw4HOKy14Xsw2cF4F YO3A== 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=nnl0FxSy2lQGEXHLpuMztJtWf2ssR/52boz+nuGDoCs=; b=A8XlPvreiq7Ydw0MQ9l6tVl4eSe/6olnDPR/lpnLdLHzcSZvY1nJ8NKATvg39eWuL8 i4/B29jG41Bei+zx/8SZ93NcWTx3p6KZtjv79Uw+q7VB8PvEMmM1zHPoGEhhKRFonYvk Y98CNJTcqrmsrCM/IdLm8VaJhpwEI0EvbJPiND+QT52mtmCu9vzj7p9JlTZdb2v7MQvH n4ZfdR2zKkc6UZaukbOKsE7+HXi1qs+mrRWfRXLePi0ShcTXwReTAmkMXfPHRlTY5Jh2 q3kBPtfuXMXA84I0eGZFHz/r000qafiBHEMCu13pKfVnelBwLIscQW9/Rc5YhWlUPuJW Ig2w== X-Gm-Message-State: AOAM533Bo0jqnsw9pG+ZuOGmEyyulTyZmVn0g3trVF1cnKuiffdHuWIx 12+wVHiCxB0s9A+L89X4iO4lnERUHnIO8Q== X-Received: by 2002:a05:600c:3510:b0:397:8454:991a with SMTP id h16-20020a05600c351000b003978454991amr17544203wmq.165.1653926865266; Mon, 30 May 2022 09:07:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:44 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 044/117] target/arm: Introduce gen_gvec_fn_arg_zzi Date: Mon, 30 May 2022 17:05:55 +0100 Message-Id: <20220530160708.726466-45-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 We have two places that perform this particular operation. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-42-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 62bfc6fe7c4..7a3b5f137ac 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -273,6 +273,16 @@ static bool gen_gvec_fn_zzi(DisasContext *s, GVecGen2iFn *gvec_fn, return true; } +static bool gen_gvec_fn_arg_zzi(DisasContext *s, GVecGen2iFn *gvec_fn, + arg_rri_esz *a) +{ + if (a->esz < 0) { + /* Invalid tsz encoding -- see tszimm_esz. */ + return false; + } + return gen_gvec_fn_zzi(s, gvec_fn, a->esz, a->rd, a->rn, a->imm); +} + /* Invoke a vector expander on three Zregs. */ static bool gen_gvec_fn_zzz(DisasContext *s, GVecGen3Fn *gvec_fn, int esz, int rd, int rn, int rm) @@ -3503,12 +3513,7 @@ static bool trans_ADD_zzi(DisasContext *s, arg_rri_esz *a) if (a->esz == 0 && extract32(s->insn, 13, 1)) { return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_addi(a->esz, vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), a->imm, vsz, vsz); - } - return true; + return gen_gvec_fn_arg_zzi(s, tcg_gen_gvec_addi, a); } static bool trans_SUB_zzi(DisasContext *s, arg_rri_esz *a) @@ -6825,10 +6830,10 @@ TRANS_FEAT(ADCLT, aa64_sve2, do_adcl, a, true) static bool do_sve2_fn2i(DisasContext *s, arg_rri_esz *a, GVecGen2iFn *fn) { - if (a->esz < 0 || !dc_isar_feature(aa64_sve2, s)) { + if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return gen_gvec_fn_zzi(s, fn, a->esz, a->rd, a->rn, a->imm); + return gen_gvec_fn_arg_zzi(s, fn, a); } static bool trans_SSRA(DisasContext *s, arg_rri_esz *a) From patchwork Mon May 30 16:05:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577242 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp414084mag; Mon, 30 May 2022 10:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzePJlgwqr7t/oENwka9EXQvuATZvgticzqg+QgN0TKwMU8JXkwih+rI4T7cG8yDCVC/ywb X-Received: by 2002:a05:622a:110b:b0:304:b800:7ca6 with SMTP id e11-20020a05622a110b00b00304b8007ca6mr687967qty.264.1653930108403; Mon, 30 May 2022 10:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930108; cv=none; d=google.com; s=arc-20160816; b=OnA/iaUGtUHtWFKII/pLrBBAQdmkAr75A2t1pLZe5p50kq0dC18qrI/8OoGC1S3WVz /0YTRP3naysOvaCeIorO6tXsyfC0EZNFL/LvlpPL+YSMhUMv+g8gEk+TvmhEdL5HHXiw l/fxLqX8fkXUu8l5zrpsjNFaaRSO7qc7oWiXO5KVJX8fHRZH85gDcWJT4jfUnSSPAxNh RxXXlWaa50WrSf0TLVuUkVX1RlvYxdddpupGG6eci0P5fG2pZFI9adgR45MGAMWuPbaf vonmFXT5vpgSyAOVetVZSLLKcI/83VMstfAGaAyHTxzteHCGL3CWo5pOwfD6vJycXBV5 9c+w== 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=l5jfhKqYMx6NiFtWtX7yMPyKDLs4b64TvAsGNIxHFfk=; b=JTDYaMOdF79Dmg+NdAK2dLdcgilisAKEMtMEOpvb131GKutcxhQ3+nTzAKgMIcfMMv 9J3qRlbYt+ttS68gKQKKDFL+dTZnU0CZmaIyJfrcACY3qpyBQq6lMjl4bL0wdUJ/UnSi Dyh99tlDCD9IEKTWeczicL1swOVV2G2i1zDFCm5TQ7Vrs3m5K0TYSikTyFW76fk/37U6 YI/QQr3DHGGbyvHvl7PV+O12cdd9kNcNgbW8aw8uAw5tkOBsNzhVEjM2LcnYL0Ak2Cb0 3/wrtu7Q7MwlY/t4bhbGeMO2Wh8EwYdOCvI241TzjQvfBo1N5AmK/yVDMYDACsPg5V4A NY4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PyktAQdG; 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 w13-20020a05622a190d00b002fc26474292si7602395qtc.244.2022.05.30.10.01.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:01:48 -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=PyktAQdG; 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]:42182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvim3-0007E8-R1 for patch@linaro.org; Mon, 30 May 2022 13:01:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvo-0003Zt-H6 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:48 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:33972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvm-0007Ha-Tx for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:48 -0400 Received: by mail-wm1-x32b.google.com with SMTP id d5-20020a05600c34c500b0039776acee62so186885wmq.1 for ; Mon, 30 May 2022 09:07:46 -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=l5jfhKqYMx6NiFtWtX7yMPyKDLs4b64TvAsGNIxHFfk=; b=PyktAQdG6u5ZqXioQOE/TtOVIuHY7IRNUiNviWe8eO7JbTtfPFh1KATwNankOuT/pq qSTYKnE2ehRuitU5NdTmQ6lSqWTAwz0Vddtb2UydsPzaCGy+P5OXf0vU5MCm4hU/0W18 /dapA8Q4/UPA+VtbBUikoNUkvEM0Yn0MLzMVM0kXr/Urfhw2epG2LWvbTZYpHUGAMb1Y kgesU1c6vo86ce9LYcze1bpAwz0wInbE21G5bJELtFPD0hCD2FVciKvpNY9grGS1aEmo d7xNzEaGXP7hzFUpn5CwJBFmj2btms26puDi5zLffxhPc87a/JAJ1uHckEdQGPY8jxQZ fFtA== 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=l5jfhKqYMx6NiFtWtX7yMPyKDLs4b64TvAsGNIxHFfk=; b=OxIcD647y2fR28jqOM6DNFmNe/IXUtO4x7ZfmdjJu1+0eVng23cyuIytnWIeeAXhf6 wKmKAHGly4mRQpsfTucFjSu3ctqVfoeCk8gXqYX1ImALO2Q6BaFjLdeJ0H0JqnvlxGx0 2jh+oArM6ed2+ez+4nxatv20Ii+ZE0pRx3FHkdYAExRBGrbcfEF1+288ZWRLgPRt1t8h 47L2kxgfQhMboKIm8Ixk2aO0yK/H6aOotF1RXaiUUMKjDLmju/TxcdK6146UZnRO+B/I LOkjrUqjaoZBX5k90IoANqCfrn9AN6IQR1vLqIiS8CWWsiXGEMdI52kj/P6zHjLzDkYs Jq2Q== X-Gm-Message-State: AOAM530Gd5iEgAwx/8XoGpBAuM4UkH+D6p+2pusReedeogJfuYJ8a24j UHX3eU4+Pkq3Gb09z/k4QwVOup9qtLwvDg== X-Received: by 2002:a7b:c00a:0:b0:397:475b:1ad7 with SMTP id c10-20020a7bc00a000000b00397475b1ad7mr20027601wmb.42.1653926866073; Mon, 30 May 2022 09:07:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 045/117] target/arm: Use TRANS_FEAT for do_sve2_fn2i Date: Mon, 30 May 2022 17:05:56 +0100 Message-Id: <20220530160708.726466-46-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_sve2_fn2i to use TRANS_FEAT and gen_gvec_fn_arg_zzi. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-43-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 43 ++++++-------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7a3b5f137ac..911d2e28bf4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6828,43 +6828,12 @@ static bool do_adcl(DisasContext *s, arg_rrrr_esz *a, bool sel) TRANS_FEAT(ADCLB, aa64_sve2, do_adcl, a, false) TRANS_FEAT(ADCLT, aa64_sve2, do_adcl, a, true) -static bool do_sve2_fn2i(DisasContext *s, arg_rri_esz *a, GVecGen2iFn *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_fn_arg_zzi(s, fn, a); -} - -static bool trans_SSRA(DisasContext *s, arg_rri_esz *a) -{ - return do_sve2_fn2i(s, a, gen_gvec_ssra); -} - -static bool trans_USRA(DisasContext *s, arg_rri_esz *a) -{ - return do_sve2_fn2i(s, a, gen_gvec_usra); -} - -static bool trans_SRSRA(DisasContext *s, arg_rri_esz *a) -{ - return do_sve2_fn2i(s, a, gen_gvec_srsra); -} - -static bool trans_URSRA(DisasContext *s, arg_rri_esz *a) -{ - return do_sve2_fn2i(s, a, gen_gvec_ursra); -} - -static bool trans_SRI(DisasContext *s, arg_rri_esz *a) -{ - return do_sve2_fn2i(s, a, gen_gvec_sri); -} - -static bool trans_SLI(DisasContext *s, arg_rri_esz *a) -{ - return do_sve2_fn2i(s, a, gen_gvec_sli); -} +TRANS_FEAT(SSRA, aa64_sve2, gen_gvec_fn_arg_zzi, gen_gvec_ssra, a) +TRANS_FEAT(USRA, aa64_sve2, gen_gvec_fn_arg_zzi, gen_gvec_usra, a) +TRANS_FEAT(SRSRA, aa64_sve2, gen_gvec_fn_arg_zzi, gen_gvec_srsra, a) +TRANS_FEAT(URSRA, aa64_sve2, gen_gvec_fn_arg_zzi, gen_gvec_ursra, a) +TRANS_FEAT(SRI, aa64_sve2, gen_gvec_fn_arg_zzi, gen_gvec_sri, a) +TRANS_FEAT(SLI, aa64_sve2, gen_gvec_fn_arg_zzi, gen_gvec_sli, a) TRANS_FEAT(SABA, aa64_sve2, gen_gvec_fn_arg_zzz, gen_gvec_saba, a) TRANS_FEAT(UABA, aa64_sve2, gen_gvec_fn_arg_zzz, gen_gvec_uaba, a) From patchwork Mon May 30 16:05:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577246 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp417844mag; Mon, 30 May 2022 10:05:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhq+0Be2zealVVhB640u49ISlQgGPRu4NQY3RXL37tJNikAzAhZa3HfILj5CxTlsMvlGlv X-Received: by 2002:ac8:5913:0:b0:2f3:a402:1054 with SMTP id 19-20020ac85913000000b002f3a4021054mr45058419qty.513.1653930337230; Mon, 30 May 2022 10:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930337; cv=none; d=google.com; s=arc-20160816; b=jzJr3D/KNBSzQEms5HzAWqblA5PzitYbyIT5AsTKtqYWUbZ/vOTpgSjAgpIcRFDyhg zNiPipkzGU0v+J66+RbQWxjP6NB8hu6ifvteNv0agtIiyBu8ByxV698rUndE8hA4NV8I 2B9EvbZeVu1ZFKHU6I/0/nx3+p8BlikNnJFzPFdOXH9dZtBkMN9RhM9mo9rNEIwBnWtS WfBZio+5FjSlM7aUzNDJbgvo475AmvDcLwbS6lehRm6+YBYnEvbrMLgVE54zjVZ9RiQC 1tyPe15eFtkwn+8atZUEO2tPlf/g81PVI0wgF06E/kzjHkR2m9fcrV+53NsJHcoWZHt4 FWvA== 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=z8wEWNOP2fHsbOK8M8A10RgrzTj1YykPIOPDZrlCou0=; b=QXZf3Gv0nNAwVEHAeb1/3JIm8LrBib8f4+uAeYOWfBL22srKUT8AMIlsLfMyi9mkxx FZpoqNzHfORwdWvWCWoNcGmPxMY40GpNcWKSOwFihqz+aZx3a+J8A6G+hhqF26rWewdC l/1Mk/UoH/vs0tAsMhh5rlsRL2RT9O+jA6dHBL2CEWab/N5VuTFC6UNHAvpp0Bw4sohj sxcUxec7Dt2jQ1ZijACngQLzT1ONIvM/9ENuVfmvrZGvh1r9SSP2/sAZJLyEuq45hVch e5VF9g2swGIL/UIgT0WeNQfriMFRIevDhPGHYbw6+TufbqGwjjpNBnuNoXL8yKh1gdAQ AsEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ctoFAmAQ; 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 j12-20020ac85c4c000000b002f3cd8c28e9si7938668qtj.22.2022.05.30.10.05.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:05:37 -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=ctoFAmAQ; 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]:50744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvipk-0004gX-HU for patch@linaro.org; Mon, 30 May 2022 13:05:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvp-0003cf-7I for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:49 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvn-0007Ft-Ke for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:48 -0400 Received: by mail-wr1-x42c.google.com with SMTP id x17so6211540wrg.6 for ; Mon, 30 May 2022 09:07:47 -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=z8wEWNOP2fHsbOK8M8A10RgrzTj1YykPIOPDZrlCou0=; b=ctoFAmAQkgcuTNSUdrExOZyBKPzyQdeKp/VPYZDurH1/+u/MFaTZ7V7VqPPUX+R03y gSmciD+ToH5s/04a6g4o77SESqPEB9F04FjOZMLNOsiy0X0Fy4EMK6odEa5unateUM+j V0i0DCBpSDmuT3DPDVvsF/yT+vWgEkZ2Ao2J4UYiSy0y9wJ2WrVdFGpbNWNtfm0EAk3b VnMpF2JkW7O8o2oWQJXzyg1/OIqnl08jpuZk6g6NODXPGCIeXDZRauKIrCNPR1HNKGmw rcTwdCU8uuQ+JguHYGT1wSoLlqgf0HDzfcq0pZOfiny1oS6caL8hC8LkqzOBrozehkzk AyUA== 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=z8wEWNOP2fHsbOK8M8A10RgrzTj1YykPIOPDZrlCou0=; b=yeiIrRvA7nxdaq2wZWA6g995raml/uy+ZJm0cYp1J4FNqZFBngkOenRdjRKucy8W8K JLVMNWbdeC5xrWQDDXbc9MFF3UgsX6Rbk1ZHQnB9lTnVRS08Xgs7iu9VnCFSqPkxLsdk yT++Oz0XpjywB3gaT3FaaKPKuE3myhx26RvP+ZLn0DBfZlUpQ1itOgRJfdxaWLkVNTqJ yTKEFCrQF3TfsgM0qITWTM/xZk5EIID6xZfFZl+rcwbvy0aVWcm5pZjwJEf+MWSwsDHz 3VFwpTdxVB2B0kF7FslKjxhVzDgAWZDAAqNGjZoJYFSFxyNlDNb2sY5SUix1IgwDUnxD ZqUg== X-Gm-Message-State: AOAM5319s8iFTB+JYPq3l3foBnGyMERBUdoK+zkTbDZOAnBGC42ThxeP GvYphWat/xxWGyoIMvZeNaOYG7E/bwS61A== X-Received: by 2002:a5d:5150:0:b0:210:1d71:3dcb with SMTP id u16-20020a5d5150000000b002101d713dcbmr13141742wrt.412.1653926866776; Mon, 30 May 2022 09:07:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 046/117] target/arm: Use TRANS_FEAT for do_vpz_ool Date: Mon, 30 May 2022 17:05:57 +0100 Message-Id: <20220530160708.726466-47-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-44-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 911d2e28bf4..6103bd7f1d4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -858,14 +858,11 @@ static bool do_vpz_ool(DisasContext *s, arg_rpr_esz *a, } #define DO_VPZ(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \ -{ \ - static gen_helper_gvec_reduc * const fns[4] = { \ + static gen_helper_gvec_reduc * const name##_fns[4] = { \ gen_helper_sve_##name##_b, gen_helper_sve_##name##_h, \ gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \ }; \ - return do_vpz_ool(s, a, fns[a->esz]); \ -} + TRANS_FEAT(NAME, aa64_sve, do_vpz_ool, a, name##_fns[a->esz]) DO_VPZ(ORV, orv) DO_VPZ(ANDV, andv) @@ -877,14 +874,11 @@ DO_VPZ(UMAXV, umaxv) DO_VPZ(SMINV, sminv) DO_VPZ(UMINV, uminv) -static bool trans_SADDV(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_reduc * const fns[4] = { - gen_helper_sve_saddv_b, gen_helper_sve_saddv_h, - gen_helper_sve_saddv_s, NULL - }; - return do_vpz_ool(s, a, fns[a->esz]); -} +static gen_helper_gvec_reduc * const saddv_fns[4] = { + gen_helper_sve_saddv_b, gen_helper_sve_saddv_h, + gen_helper_sve_saddv_s, NULL +}; +TRANS_FEAT(SADDV, aa64_sve, do_vpz_ool, a, saddv_fns[a->esz]) #undef DO_VPZ From patchwork Mon May 30 16:05:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577259 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp427479mag; Mon, 30 May 2022 10:17:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2fYmigD62OVmnfuxfshdHiYH8WN1JDGuKTfFnpC2Xm2taHDdzZsKuMLEFVdIEbuCQSMbt X-Received: by 2002:a05:6214:2387:b0:462:1026:b5bb with SMTP id fw7-20020a056214238700b004621026b5bbmr41868894qvb.38.1653931062450; Mon, 30 May 2022 10:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931062; cv=none; d=google.com; s=arc-20160816; b=t3EfsexXSTic44fy+Y+aZQyrZQGeYtyFwhg2sP72oqhXNjVQzLAr5vCYs+OqDc0dxA Dwo7KSVMV+qYSMPCVOF/aDSs8aZDnETq3rQmvVO3PMSgSZdObZh6yJFP8k2D7bQ8jPyQ 3B2Go1Qrcfb6akT3feeD6dGHeniPA8bn5Z/xVkGDAuERiOqe+ciMh0UlEHX0X3ON6/lT tixtYskx8D6zSYznTS+X2OZKiy4Kmv3npQbLXOJUQ7HCpX2cI1ebiOLKY7xJN0RhujMl MyJQAfW0GIfEBoD/Y2pnKEKC/6sxJJfEggTE87FYmGmSXyuROy13BcDzvwj59A6N18f9 h/Ng== 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=ABxa2liB5UmRZb7nAOaaoL+iM/4LSDSn4mCKTa5V6Kg=; b=NT06eUCJ+quo1Y1d8+hKVJAh4At98XZnAVWVG3D5tqnnWtR0YCJdj22YdqGYuvtF+3 UNhw6Y04MB74F/lRfUTot/KkP4hBF7TRldSlP1Y3ZehDeH9sEKa6RVDYq6X5X4bJa4VN 7HbzvYCHEZG37WCfBXN/cEjTvLPaR8jqDgX+/vFarlmHE9miAsxZCFfz4yBv5cygN6hj wFEt/wAtdQeF/jX0+nO/ONMY0D5aCp75pqu73oEGzBEGRXLXQoHZBGPaGLGagZywxjLj EZmtnSf95eoAR7QUknKC0G9lvHNkksj0lXwpBRKiYzuRvN9rbWUbOMzCoBoHWMx3efmQ YhKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r2Gm+f+3; 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 r27-20020a0cb29b000000b0045641f7637fsi6248242qve.105.2022.05.30.10.17.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:17:42 -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=r2Gm+f+3; 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]:54224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj1R-0001oT-W2 for patch@linaro.org; Mon, 30 May 2022 13:17:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvp-0003dv-Ri for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:56 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvo-0007BN-BH for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:49 -0400 Received: by mail-wr1-x42a.google.com with SMTP id t6so15296903wra.4 for ; Mon, 30 May 2022 09:07:47 -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=ABxa2liB5UmRZb7nAOaaoL+iM/4LSDSn4mCKTa5V6Kg=; b=r2Gm+f+3q6Dh0WNGF5a7E4c/ZAtSypvwWEH6HZP2MKgynpaexb3FgQIklvI/2UkqPB JW/NU9tkDRHe0rAnSYtnk5xwTVVOmaVNUNSp/8qj6leVqlsUxUK0pChqAejf31rGVUpK 0tW3ib/l1MX9caJn1TXyfHJK2loRwWaxQftb8qv7BLsYxPX6Oe1HnPa4WWOz1ZJPjALp GEhrkj4CZjb2+PqvCptLBEz+lQ8TlU9jRNILPW69jXg3TJuqgdsIxyxS5ka8Y0Na5lQO 2vHaKZU0JIQznwQXCPNiM84vAIsiE/NoOCbgztNh1zoVjhL4332ZV0m4z4KziIT14n43 mu1w== 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=ABxa2liB5UmRZb7nAOaaoL+iM/4LSDSn4mCKTa5V6Kg=; b=MgWhv5NKUGs6QRlwMqKubUc1bAp6jRci6r+Ura68di3YDPpDllDStJPNw/50P8iSfW E0cFz5hz6XdmooMC1Vu9iAo2fo/N2UUjFr111PPGqnhiRLSIcwYgVnicFLOnf7qdCNpe fWcoAKUM/mjD4zM+33CTKQXoT+epkDqSq5pvfpOj2OUg40EkBKiJp1rJznAep5TtWkDH XQPui86ZzHslCTOhFEbxNRgj8Bzi7NRbfq9cBTJFgPf+MSoOKBX2MiiNbBmJJnO+yNTT 3E+Ttzf3AyGZ6T/iFaNiyKqlqM25Dbt6JozMRbGJUSYMF94/zDl16clm8G13nWqyRtNj xNXQ== X-Gm-Message-State: AOAM531oVbHki6UG/atJGq3xtGsfUM6VIUxP2mOtOs7Yd4ZpmwObFnFq +FD4Am8jbkeGUfEEk5JgVA1i7LpIJZ5cag== X-Received: by 2002:a5d:6c66:0:b0:20f:86f3:ea05 with SMTP id r6-20020a5d6c66000000b0020f86f3ea05mr40692891wrz.154.1653926867474; Mon, 30 May 2022 09:07:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 047/117] target/arm: Use TRANS_FEAT for do_shift_imm Date: Mon, 30 May 2022 17:05:58 +0100 Message-Id: <20220530160708.726466-48-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-45-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6103bd7f1d4..f15e9a30b39 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1054,20 +1054,9 @@ static bool do_shift_imm(DisasContext *s, arg_rri_esz *a, bool asr, return true; } -static bool trans_ASR_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_shift_imm(s, a, true, tcg_gen_gvec_sari); -} - -static bool trans_LSR_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_shift_imm(s, a, false, tcg_gen_gvec_shri); -} - -static bool trans_LSL_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_shift_imm(s, a, false, tcg_gen_gvec_shli); -} +TRANS_FEAT(ASR_zzi, aa64_sve, do_shift_imm, a, true, tcg_gen_gvec_sari) +TRANS_FEAT(LSR_zzi, aa64_sve, do_shift_imm, a, false, tcg_gen_gvec_shri) +TRANS_FEAT(LSL_zzi, aa64_sve, do_shift_imm, a, false, tcg_gen_gvec_shli) #define DO_ZZW(NAME, name) \ static gen_helper_gvec_3 * const name##_zzw_fns[4] = { \ From patchwork Mon May 30 16:05:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577233 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp409202mag; Mon, 30 May 2022 09:54:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbqGA0nt1LMDoQvOI18W4OK/NypXK3QdyuG8/LXr8NpVdY7GkKoWY0e+c8+cHmRkG7TP0w X-Received: by 2002:a37:655:0:b0:6a5:e7f7:271c with SMTP id 82-20020a370655000000b006a5e7f7271cmr11015667qkg.473.1653929678563; Mon, 30 May 2022 09:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929678; cv=none; d=google.com; s=arc-20160816; b=TuxKR3eWL2nCuenHbrZHr21TZLSI68s/Qj8Z3whj06gbSzRPUneApZ0ZY8fvbumdLO 0x/6c85WgGY5/Ho2Lh23XXb2VzjO7UYpgWHMpdfQcbjABSlAxly8gxXht3BsgC/oesAO 5rW41f/A1o/kehsUUECFeK+zDxyT/YTBhWjCJaSVKKAy+i4gS4zsSmxcwzbc/D9f8Ywl tGnarrdUWGSusa/rj23RHPatXBWV7gBqkp5GuCe+jxvSG1Dqi6/TIH0PHMUXJZKBkDNx /8fgkkruvLZNYnllcuCIggAU6PXCKBbMTPy6eywteJCU9ww5uCHf5jMMFlGfYLr/AZE0 35wA== 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=UKXoP1U+BIwA0P27wZhDfy2XM5fzL0S3w/Fk9L/JDNI=; b=wIpcTQ9ZaNEDbnFE/2AAI66NbtyNUXJw4RynATa3IccyucTqJDZPX6CEn7joQJxsTS rEJGGqltwnodJdyXObwn8ouzfnZ5K0aNnBkxziAvmzdhwwXsYsCwaEktioZHWGqruvdL TRfM0gvyCrHC+08+N4JlmNFVWBwk3kTnd+Tx7P9sz9+IWHwLFOkS7EHUHrFeCCWw7Jc7 aOfXEgbvF/RJjT7rheY1o5AJD16f/yD6t8w/K73v4mSMbaRut90qvG1kX3camhcDdxdO qTpAzRa7rkwgubspDmqlYEz+TYjPV6EFXG1Tiu5QE/7BY9v5PUxu6qydhyv97QM/zh0t MzkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x4U1LnAQ; 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 a16-20020a05622a02d000b002f935e78950si7509812qtx.100.2022.05.30.09.54.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:54:38 -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=x4U1LnAQ; 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]:50970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvif8-0002Sa-4g for patch@linaro.org; Mon, 30 May 2022 12:54:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvr-0003dz-DJ for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:56 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:42544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvp-0007Ju-Ov for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:51 -0400 Received: by mail-wm1-x32e.google.com with SMTP id l188-20020a1c25c5000000b003978df8a1e2so4642191wml.1 for ; Mon, 30 May 2022 09:07:49 -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=UKXoP1U+BIwA0P27wZhDfy2XM5fzL0S3w/Fk9L/JDNI=; b=x4U1LnAQTAxc6uGISlvYQlio4GpSi1klsoAKd068EP9AOFtYtgFRjGjf2UEzKHg8Ed 2eKU8xIq2YhNAsHoW8wWG4Dt38xIwmCtAIIynPE2+7mQiUHP0CKT/paCxpk0tyFc6C/G +e9VxjM7cr+iY/c4oNflDSyKGh88keLV1LTG9LZyi7XjHr35DEg7XgsuKIVo87NSSSjx lcUdasG1QCtDpXT0f3dqb3KhJt9/wkW9vhFA4zPPC6T7x5sIyc+TUOGFk8Opj10fDnR7 LWvYez9JZGGT1Gymf69K4IFgtahH6sjampbdWIjFBT/Xl8Iv0lhUfzsnbaSUlKGwfsDu 6XpA== 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=UKXoP1U+BIwA0P27wZhDfy2XM5fzL0S3w/Fk9L/JDNI=; b=pINWBHw9My3d/YVbLMuPUfxTxjOMx00HMVwPdOVMc5odrmseDYkqA6WiqSFZ5CCXLA 94VfNzR7bnBOkSXP2jAcRWJ9E1HDthW3rCUtrQipMZRN1rccEZ5o0oEk5m5ebF7ocMAW UmQJJxaOKzJSy2zmF8VhcgebfT1hspJW6xI/pfdoYLS+HXGQG+XQNjmW4YJT4ZvjfEbV Rb3NUBDQm1d5QiSVwTeEOu1sH2jfkY8qEY8n5rg0f4rRygEV12+yalXUk9bg4yEbUjLc CT9AcPI6cCKQ0Sq9ISo2cuBkxu1eiWkvGpT+0/6edkdOVb8+kDvKik3EiSgKJ+HXMOlT 5qPg== X-Gm-Message-State: AOAM5332mZ1wsNgCb6gx5Uu1um740f6TiZd9wS/ihL5zKxcplbTjlRqy re5S1WzH7O/H3Su96n+A+kb6Vxmf6yYbQA== X-Received: by 2002:a7b:c2e8:0:b0:397:4a00:6955 with SMTP id e8-20020a7bc2e8000000b003974a006955mr19770618wmk.74.1653926868222; Mon, 30 May 2022 09:07:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 048/117] target/arm: Introduce do_shift_zpzi Date: Mon, 30 May 2022 17:05:59 +0100 Message-Id: <20220530160708.726466-49-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Share code between the various shifts using arg_rpri_esz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-46-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 68 +++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f15e9a30b39..c7c16863c0b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -900,20 +900,39 @@ static bool do_movz_zpz(DisasContext *s, int rd, int rn, int pg, return gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); } +static bool do_shift_zpzi(DisasContext *s, arg_rpri_esz *a, bool asr, + gen_helper_gvec_3 * const fns[4]) +{ + int max; + + if (a->esz < 0) { + /* Invalid tsz encoding -- see tszimm_esz. */ + return false; + } + + /* + * Shift by element size is architecturally valid. + * For arithmetic right-shift, it's the same as by one less. + * For logical shifts and ASRD, it is a zeroing operation. + */ + max = 8 << a->esz; + if (a->imm >= max) { + if (asr) { + a->imm = max - 1; + } else { + return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); + } + } + return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); +} + static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a) { static gen_helper_gvec_3 * const fns[4] = { gen_helper_sve_asr_zpzi_b, gen_helper_sve_asr_zpzi_h, gen_helper_sve_asr_zpzi_s, gen_helper_sve_asr_zpzi_d, }; - if (a->esz < 0) { - /* Invalid tsz encoding -- see tszimm_esz. */ - return false; - } - /* Shift by element size is architecturally valid. For - arithmetic right-shift, it's the same as by one less. */ - a->imm = MIN(a->imm, (8 << a->esz) - 1); - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); + return do_shift_zpzi(s, a, true, fns); } static bool trans_LSR_zpzi(DisasContext *s, arg_rpri_esz *a) @@ -922,16 +941,7 @@ static bool trans_LSR_zpzi(DisasContext *s, arg_rpri_esz *a) gen_helper_sve_lsr_zpzi_b, gen_helper_sve_lsr_zpzi_h, gen_helper_sve_lsr_zpzi_s, gen_helper_sve_lsr_zpzi_d, }; - if (a->esz < 0) { - return false; - } - /* Shift by element size is architecturally valid. - For logical shifts, it is a zeroing operation. */ - if (a->imm >= (8 << a->esz)) { - return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); - } else { - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); - } + return do_shift_zpzi(s, a, false, fns); } static bool trans_LSL_zpzi(DisasContext *s, arg_rpri_esz *a) @@ -940,16 +950,7 @@ static bool trans_LSL_zpzi(DisasContext *s, arg_rpri_esz *a) gen_helper_sve_lsl_zpzi_b, gen_helper_sve_lsl_zpzi_h, gen_helper_sve_lsl_zpzi_s, gen_helper_sve_lsl_zpzi_d, }; - if (a->esz < 0) { - return false; - } - /* Shift by element size is architecturally valid. - For logical shifts, it is a zeroing operation. */ - if (a->imm >= (8 << a->esz)) { - return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); - } else { - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); - } + return do_shift_zpzi(s, a, false, fns); } static bool trans_ASRD(DisasContext *s, arg_rpri_esz *a) @@ -958,16 +959,7 @@ static bool trans_ASRD(DisasContext *s, arg_rpri_esz *a) gen_helper_sve_asrd_b, gen_helper_sve_asrd_h, gen_helper_sve_asrd_s, gen_helper_sve_asrd_d, }; - if (a->esz < 0) { - return false; - } - /* Shift by element size is architecturally valid. For arithmetic - right shift for division, it is a zeroing operation. */ - if (a->imm >= (8 << a->esz)) { - return do_movz_zpz(s, a->rd, a->rd, a->pg, a->esz, true); - } else { - return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); - } + return do_shift_zpzi(s, a, false, fns); } static gen_helper_gvec_3 * const sqshl_zpzi_fns[4] = { From patchwork Mon May 30 16:06:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577229 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp406795mag; Mon, 30 May 2022 09:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm1LcNC9+SUpmMXxILW6MjUVTnsWXihVFB9nhQLZ+EMxTxlJ50UpRR2oJjzGr+Y5GNV0+M X-Received: by 2002:a05:620a:24d3:b0:6a6:498b:a1a3 with SMTP id m19-20020a05620a24d300b006a6498ba1a3mr1455811qkn.592.1653929462123; Mon, 30 May 2022 09:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929462; cv=none; d=google.com; s=arc-20160816; b=R7dpW4xxLoVqbS3UBeIhvQzSi9YkcAxDmpggEp1StyycD88VfpdOhSIgxPDqeZzvbj HoeIuhlm6frZ7NHBeuWIssRVTpuHRt4xRBpo3VYFS8KteyaVfYkRZyEV49VylLTf9tNB oBauaW+I6IYKRBSgOmm8GmwHTzqupOcA4L1F/Zye+cK8dCgs/IOl/k7VhWpIi8vJjOKz pSssGcsHK82dDnNmGkXA/C9EXAfBk+Zt4DAEo3Nkfpd/h7jKIvpzFnRAP7Og9RIg8VEP wnKi0Aas2CYWd5o3UgxfZ7Unb/w+8JF99RUGF+izXzptx5TpwCkjEywEU0+BvriEY6d/ gtXg== 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=yvlWfaRzgoo3c8jL+dg4FesDheVDvd0N84Inz3djlc8=; b=eN2DkqHDkrEOeay8z6VlcD+8Gf00NixVmosd/tE8AYCddDll/31DJA4zaEaBERitKm Zx2ODfjbm6+hXZsPL3UBfs0KC781MpZdXrkBGKoBoyh/aFrBBFH3ItKMi07xph2PGYnl IcAaHAV8i6zQiMdx7QN5sydwfGwcHIJ0goThVENDEEnF4B5qi02WJQEWSPv7hp+gzRCw fEwzl1aLIbH9a1SBFFeALX7REL5Z6z+C4HmCg5IhbzUbp3Xx8phDG4EXQDMCPhCxq+bo ogaBizntWh72WfB6+H6q2GhSsV/AB5s2Sfutp25/+e0871eDF23wkhq8Nhg5FuWwFI7X F0FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDRsHkcn; 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 gc3-20020a056214230300b00461e213b844si7112828qvb.197.2022.05.30.09.51.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:51:02 -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=YDRsHkcn; 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]:42410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvibd-0004W1-NS for patch@linaro.org; Mon, 30 May 2022 12:51:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvr-0003e0-HO for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:56 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvp-0007Aw-VI for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:51 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:07:49 -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=yvlWfaRzgoo3c8jL+dg4FesDheVDvd0N84Inz3djlc8=; b=YDRsHkcnqQ0XyhxNKitmi2kOJqdmD/qqWVgX/UlN7RuRcxwPuPOw+JnoORk9ctSwMR iCkxLg+s/2OJlxKkdZimO+9XXNTkDXKccfdAkH3X8ztIbij1OLzPaPw3uEjo9H4K6vh9 d4rJsCMpd+kQOkqVb2IHC1Z2U/fwFInCa/OYbDWTRuBUFE6ztA4im7BkTY0UFUkgS+VV 9y8O+CovkFktjGXN71lwjEm/orhBegNjO8oJAfHIhfJe+K30qadhZulGEPM4pdQCdvAh yfJv0twD/GinkXljrKHNYvpV45k1PQUit7bW2WfjZjdkVU+GZM5C12s0lZ8bLIODeRSv OlpQ== 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=yvlWfaRzgoo3c8jL+dg4FesDheVDvd0N84Inz3djlc8=; b=AtcWlhyFM+P4TfXbqFZ4IR+XtMu5Yee9HneP8+32EqW48nQmgWqoEhnrnvD9sDXjKd lJk+ib5Pql/sJ5X48h6UQKeV40w8Oqs5gM7O+PzdspC4TBVwokaair6dhsvJyGoHWBQ3 AL6biuBC/yV3nSYVbwMQNGScCXcYGnOdxHuBDPGLbI8OLIBlFz3GvNxB00Xo9oyWiTQc grBO72N35XAN51FYohRkmqp9ZYJvfOB5gi3VZv7Kqz+q1ZQqJMZ38LwodLd4bWav278y nHmRQirLVGyec/5I21cN1WW5JwaWT4AzBJXEvSxs5v+0h1dBoLU2B25Wu22XCH/BRGFw HC7A== X-Gm-Message-State: AOAM532RDE7PfPS82QHNJBVkjSr1YGkXRZGymfm+KFvLtu+bfGveJMwJ aDJbEPG128A5Rl/bgLJq+2XF/Trp4GDH9A== X-Received: by 2002:a5d:52c7:0:b0:210:ac6:3956 with SMTP id r7-20020a5d52c7000000b002100ac63956mr18444615wrv.379.1653926869064; Mon, 30 May 2022 09:07:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 049/117] target/arm: Use TRANS_FEAT for do_shift_zpzi Date: Mon, 30 May 2022 17:06:00 +0100 Message-Id: <20220530160708.726466-50-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-47-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 52 +++++++++++++++----------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c7c16863c0b..98f9cfa86c9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -926,41 +926,29 @@ static bool do_shift_zpzi(DisasContext *s, arg_rpri_esz *a, bool asr, return gen_gvec_ool_arg_zpzi(s, fns[a->esz], a); } -static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_asr_zpzi_b, gen_helper_sve_asr_zpzi_h, - gen_helper_sve_asr_zpzi_s, gen_helper_sve_asr_zpzi_d, - }; - return do_shift_zpzi(s, a, true, fns); -} +static gen_helper_gvec_3 * const asr_zpzi_fns[4] = { + gen_helper_sve_asr_zpzi_b, gen_helper_sve_asr_zpzi_h, + gen_helper_sve_asr_zpzi_s, gen_helper_sve_asr_zpzi_d, +}; +TRANS_FEAT(ASR_zpzi, aa64_sve, do_shift_zpzi, a, true, asr_zpzi_fns) -static bool trans_LSR_zpzi(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_lsr_zpzi_b, gen_helper_sve_lsr_zpzi_h, - gen_helper_sve_lsr_zpzi_s, gen_helper_sve_lsr_zpzi_d, - }; - return do_shift_zpzi(s, a, false, fns); -} +static gen_helper_gvec_3 * const lsr_zpzi_fns[4] = { + gen_helper_sve_lsr_zpzi_b, gen_helper_sve_lsr_zpzi_h, + gen_helper_sve_lsr_zpzi_s, gen_helper_sve_lsr_zpzi_d, +}; +TRANS_FEAT(LSR_zpzi, aa64_sve, do_shift_zpzi, a, false, lsr_zpzi_fns) -static bool trans_LSL_zpzi(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_lsl_zpzi_b, gen_helper_sve_lsl_zpzi_h, - gen_helper_sve_lsl_zpzi_s, gen_helper_sve_lsl_zpzi_d, - }; - return do_shift_zpzi(s, a, false, fns); -} +static gen_helper_gvec_3 * const lsl_zpzi_fns[4] = { + gen_helper_sve_lsl_zpzi_b, gen_helper_sve_lsl_zpzi_h, + gen_helper_sve_lsl_zpzi_s, gen_helper_sve_lsl_zpzi_d, +}; +TRANS_FEAT(LSL_zpzi, aa64_sve, do_shift_zpzi, a, false, lsl_zpzi_fns) -static bool trans_ASRD(DisasContext *s, arg_rpri_esz *a) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_asrd_b, gen_helper_sve_asrd_h, - gen_helper_sve_asrd_s, gen_helper_sve_asrd_d, - }; - return do_shift_zpzi(s, a, false, fns); -} +static gen_helper_gvec_3 * const asrd_fns[4] = { + gen_helper_sve_asrd_b, gen_helper_sve_asrd_h, + gen_helper_sve_asrd_s, gen_helper_sve_asrd_d, +}; +TRANS_FEAT(ASRD, aa64_sve, do_shift_zpzi, a, false, asrd_fns) static gen_helper_gvec_3 * const sqshl_zpzi_fns[4] = { gen_helper_sve2_sqshl_zpzi_b, gen_helper_sve2_sqshl_zpzi_h, From patchwork Mon May 30 16:06:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577264 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp429920mag; Mon, 30 May 2022 10:21:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynfFFHA/8VoDUhjYlV7i6rUyTVCY+epLFjLLHSxE24FF/eTkjJAAMh0Cu7sqiexeq8vYBN X-Received: by 2002:a05:622a:14c9:b0:2f3:c1e0:a898 with SMTP id u9-20020a05622a14c900b002f3c1e0a898mr46144729qtx.147.1653931273022; Mon, 30 May 2022 10:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931273; cv=none; d=google.com; s=arc-20160816; b=j+u0ze6dfncyLIpmCHXSPSOMX0/PL3JROmZXml5BaU9CVbT5Ex72Hl1VJwIOGh496o RHTZYQn9bnbZtcrfxsRpW5/1gKG/FV5brdlhzOToIp492oAkbXoUmhywKec8b9YYAabJ tf13bjhWXuWxDt6qTzJLuYgxnEiQ/xHaWTbKqHTuKsx903Dpkl+GXMXlkzRaPuLnTMiH 3CnmoL00Al0DBCsckCTNBYiwgsrRJ/oFFPD2E8MUxu27Hp1I18raxD0GNhTmuFZqWRsV NrU7+n8kgXl30gWzI7a97U0BahCNUqvRhOrJZqol+Xx1mj2zY7x3W/r3Hd8Gu6v7cUjb D5Cg== 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=fVKZfwcoeJPyXn1w5X+7uQCN+3aL75LkdQVHhPvOLoM=; b=BroL99Rt8Hc3e8eheNeaCVRxpi1MIXDpw3P9IHZOu0scXkKsUP8qh5P4MKQ3WqCFtN nSmfD0TrZ/Bq3GUyrtatez1+SnJQQ/FuyiXgi2L65HkPhcNYZijfbaVXVtvcQTCX51+s AA8C34OSOWCKfkEeDKq1NGGq4VG/THgqH2rmnvnRaglH+LldU+wtlmKgjMS0qquEsJ1g 0P8AaI3yr4qrJKVTuuz0oOMRmngI85xl/VqmQjKcdA8ARJpBLoKnoFFwkLiUmTQtqZo+ uslVvrVqQ0jAO2TFAEVknes+CGmUIEB9qBMLpv37DI+27XecYGtLSVef5LWITZfXMl+r 0low== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="niqIJi/9"; 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 eo9-20020ad45949000000b0045aefd28749si7384929qvb.280.2022.05.30.10.21.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:21:13 -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="niqIJi/9"; 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]:34606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj4q-00080P-Ix for patch@linaro.org; Mon, 30 May 2022 13:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvx-0003fY-83 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:57 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:35640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvs-0007KA-8q for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:56 -0400 Received: by mail-wm1-x336.google.com with SMTP id c5-20020a1c3505000000b0038e37907b5bso8727882wma.0 for ; Mon, 30 May 2022 09:07:51 -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=fVKZfwcoeJPyXn1w5X+7uQCN+3aL75LkdQVHhPvOLoM=; b=niqIJi/9U1cu6KXKuP/xPx+xrfqgAbdBFvdAotJJ8zh54VmcRpIk34887D/8MJM78C 5kshkY5VBXJHOeKKGaAqKp8m1acWhKuOZSN/BN0Vfok9EO9j2fv4peIy11APJDlnBb0T e4MYqHqAFkT3ofF+mMlXt4VY+EVE6UdYjN/+A+U8b9quGJEqJiy4aL/XI4FlZxKRvKLJ qy5ofwzuoaoDrbwouaGe4uR7AURLYWQ0yxbwZgpgM+xpMsyq2qs75DfhzMKELGewwPTk Aiv2O1gsU3ZDhJo5xZl3GkKserWiMuz66Qtc/B1cv06HcVuC91JoQbTcsm4uXmSgfnSn +xSg== 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=fVKZfwcoeJPyXn1w5X+7uQCN+3aL75LkdQVHhPvOLoM=; b=NpOMuEfgRE2Z9DvQLEu0V7tVHeN+3qa2I7AWWTbtGKbWtUU5aXcoa4bXR2e1OryMPZ OnKyIHgbK/E5l4alIZrIIU/rR8+PUHPxL6ATQPwSRVP5Wn++7JYxqk8mxMIQ1ak2eEvI dR4EPKUKwIloxQgHMvfpiJRKAfhVDxA0i630sdGIxqXcHF6kmy9Un4cqc5O6bXQraU1o VBPfr9x9EmZ+mZa34uHWu9DBE4n3UHUQ0489rfg1VKospnN19PEyP3UwwA4DyLHlS/zF XOxwEBc9rwGIaouumVnhcsLX1QpIusBrqDo6SDT6NtbFnF8qIwZrtAqT23iGN2DS9PxB NLcQ== X-Gm-Message-State: AOAM53324AgnKkBC/2Ubj+L4RHyToCjNK+CKWq0WVi5Skg7FrH0ENlL1 yXe28ccMV2EU+Qx/fka0mkMfQJjjsf24Fg== X-Received: by 2002:a05:600c:3d10:b0:397:835e:bf64 with SMTP id bh16-20020a05600c3d1000b00397835ebf64mr18209279wmb.167.1653926869953; Mon, 30 May 2022 09:07:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 050/117] target/arm: Use TRANS_FEAT for do_zpzzz_ool Date: Mon, 30 May 2022 17:06:01 +0100 Message-Id: <20220530160708.726466-51-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Remove the DO_ZPZZZ macro, as it had just the two uses. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-48-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 98f9cfa86c9..52bbd1a4faa 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1071,20 +1071,17 @@ static bool do_zpzzz_ool(DisasContext *s, arg_rprrr_esz *a, return true; } -#define DO_ZPZZZ(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rprrr_esz *a) \ -{ \ - static gen_helper_gvec_5 * const fns[4] = { \ - gen_helper_sve_##name##_b, gen_helper_sve_##name##_h, \ - gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \ - }; \ - return do_zpzzz_ool(s, a, fns[a->esz]); \ -} +static gen_helper_gvec_5 * const mla_fns[4] = { + gen_helper_sve_mla_b, gen_helper_sve_mla_h, + gen_helper_sve_mla_s, gen_helper_sve_mla_d, +}; +TRANS_FEAT(MLA, aa64_sve, do_zpzzz_ool, a, mla_fns[a->esz]) -DO_ZPZZZ(MLA, mla) -DO_ZPZZZ(MLS, mls) - -#undef DO_ZPZZZ +static gen_helper_gvec_5 * const mls_fns[4] = { + gen_helper_sve_mls_b, gen_helper_sve_mls_h, + gen_helper_sve_mls_s, gen_helper_sve_mls_d, +}; +TRANS_FEAT(MLS, aa64_sve, do_zpzzz_ool, a, mls_fns[a->esz]) /* *** SVE Index Generation Group From patchwork Mon May 30 16:06:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577281 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp444135mag; Mon, 30 May 2022 10:38:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0/qNMS4RZyd3ReY0hAfMx/l9E0EW3yLlVz4mZDFW2p8BnCuJv/Lv5KFmiMtM4nz6A54PC X-Received: by 2002:a05:6214:5097:b0:45a:cadc:af88 with SMTP id kk23-20020a056214509700b0045acadcaf88mr46606465qvb.129.1653932334094; Mon, 30 May 2022 10:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932334; cv=none; d=google.com; s=arc-20160816; b=S3qBwtognkScCYvgkCwhwYdYmnkviP4xA7pxc+an4u62F4KrksDWIV0HLx0/NbBwVQ WfsSqLaN1fm3xSZZA4emyP40pAmiaJCboxjtcZaCSh81goRDITYi/PeY54Lfczhf5A6L lwnx21kDPElJYwuTRJFOlDfDdoFPYdCtvhaoQfTm2O3bb9B1AJn0ZD9RkP2MBNVxcwGp 0t/XOPpXwQNRhFbRNsijreDS7FLtLlJ/tSEL6ekZDlrefuoBsnRvA3v/8+DGYEpUtQtU c63tx4345jiNFWzrYQB4Y7yhR/WWWxMlbJ09UsHi9i1qS9rB2V1oXDJcULrtKTqnM2nW dRaQ== 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=HtWHT2QceLlo70uOLMS5xYP71haF5rXQwIihn1cEbPM=; b=Utu5jFrNGbHP9nYy0DFV0s7j+9fuUUQXSvDa+qR97BBWV0e6UUzT4Mdj/0AnOe6AbM tbiDO1Jn0TeDy2Gy6MJfFCUA52VnayvH49ITHUsWMgC2cYRAMAmdoTZ45cTFr8nXZIRM I39/b1wWDjz4bXIion9poGTwW1QQE10p6ixf83TD5jAaGvp+GVbW1nkZl/4rnfc1Ho3U 7f9wgBRbHS+D9IXHXqZtJHvwi6Gmp8ZoRdwQPg8znW/SjXA+RzxnlZ5+/m/WKngZj/vk nfwAeNX88FlwrfazgYGGREsKHGhnLE4o0ewzTtbraaPeKBhAO5HUJZu26wYYAIm6RuQQ owRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VNmKFleT; 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 fv5-20020a056214240500b0046431c34f0bsi2344427qvb.592.2022.05.30.10.38.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:38:54 -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=VNmKFleT; 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]:51388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjLx-0005Pf-Mo for patch@linaro.org; Mon, 30 May 2022 13:38:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvx-0003fZ-HH for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvs-0007Be-8x for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:57 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15257378wrg.12 for ; Mon, 30 May 2022 09:07:51 -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=HtWHT2QceLlo70uOLMS5xYP71haF5rXQwIihn1cEbPM=; b=VNmKFleTB4XdSxku2YP4UjymrcIUjGbgJtj3xN3ry9SGTyuYymXq4QgQgqH0AuyOmZ Gl/LuJPYgG+U3mbu1YP0ziral88cYUFxRZ3wgZwlvekFwwF8AailMp2jmKg/Fv9kZ/// VGtAue6ir0RD1KxZ16kndnijSEPI/B95QVYD75t0jpw7YPitvz/zj0NDDd1F9sl31e9W enlc1e4RsLZPS7BQhW/uBqtslP6sUeRvZ16G8jrZ5Uv9dY1QQ1QK+Vl/W9pFnR9zCSRO pt8B/L/GIM3tU44Cs4t43ztAvGF4QQmRfpFK7tkbMvo63zaWIVFI0yqHRozzPtfUIwqc Utxg== 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=HtWHT2QceLlo70uOLMS5xYP71haF5rXQwIihn1cEbPM=; b=6cnnr9Vyn4jRieGunzfBx70dk2ttBvxV1nYn8Afkm9gBvyQ1Vr12x7iOL8hkEwA+ic 3g2ZAis+3CKe7sZQUubMVW1EgNGhNWDc2aw+2b+29Hz4iKwjY1xs8wDOIaBs/2FBHeux T76PgJuWBSugQR5+oHrUPWNWxgzej/jMGT34iegtbID6sv2bYPYuV+XDaF12L7TLNAlF MDlTMOjNn2cjvA3S+C7ElfV+N/qaWOwXe/BY5fmm4fATPiPI2l/QLme6Cxzyuj3TCUbE 6c/rT9xC8pMbYb/uIIA1fEbUrJ+ARGaEFNdC/5GeWzMXQ/u8RbP/E3eWz4ntKc4+m5Vz lwOQ== X-Gm-Message-State: AOAM531jmWBigVS4HP/z8H75LuINewncDfniCbpTEEbyjlv20Mweykla WYxTUtkHvftVCHLhBQj6xD9W9hcqeg/+hw== X-Received: by 2002:adf:ed49:0:b0:210:2b98:a539 with SMTP id u9-20020adfed49000000b002102b98a539mr8536292wro.118.1653926870791; Mon, 30 May 2022 09:07:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:50 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 051/117] target/arm: Move sve check into do_index Date: Mon, 30 May 2022 17:06:02 +0100 Message-Id: <20220530160708.726466-52-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-49-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 53 ++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 52bbd1a4faa..44c23429232 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1087,12 +1087,20 @@ TRANS_FEAT(MLS, aa64_sve, do_zpzzz_ool, a, mls_fns[a->esz]) *** SVE Index Generation Group */ -static void do_index(DisasContext *s, int esz, int rd, +static bool do_index(DisasContext *s, int esz, int rd, TCGv_i64 start, TCGv_i64 incr) { - unsigned vsz = vec_full_reg_size(s); - TCGv_i32 desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); - TCGv_ptr t_zd = tcg_temp_new_ptr(); + unsigned vsz; + TCGv_i32 desc; + TCGv_ptr t_zd; + + if (!sve_access_check(s)) { + return true; + } + + vsz = vec_full_reg_size(s); + desc = tcg_constant_i32(simd_desc(vsz, vsz, 0)); + t_zd = tcg_temp_new_ptr(); tcg_gen_addi_ptr(t_zd, cpu_env, vec_full_reg_offset(s, rd)); if (esz == 3) { @@ -1115,46 +1123,35 @@ static void do_index(DisasContext *s, int esz, int rd, tcg_temp_free_i32(i32); } tcg_temp_free_ptr(t_zd); + return true; } static bool trans_INDEX_ii(DisasContext *s, arg_INDEX_ii *a) { - if (sve_access_check(s)) { - TCGv_i64 start = tcg_constant_i64(a->imm1); - TCGv_i64 incr = tcg_constant_i64(a->imm2); - do_index(s, a->esz, a->rd, start, incr); - } - return true; + TCGv_i64 start = tcg_constant_i64(a->imm1); + TCGv_i64 incr = tcg_constant_i64(a->imm2); + return do_index(s, a->esz, a->rd, start, incr); } static bool trans_INDEX_ir(DisasContext *s, arg_INDEX_ir *a) { - if (sve_access_check(s)) { - TCGv_i64 start = tcg_constant_i64(a->imm); - TCGv_i64 incr = cpu_reg(s, a->rm); - do_index(s, a->esz, a->rd, start, incr); - } - return true; + TCGv_i64 start = tcg_constant_i64(a->imm); + TCGv_i64 incr = cpu_reg(s, a->rm); + return do_index(s, a->esz, a->rd, start, incr); } static bool trans_INDEX_ri(DisasContext *s, arg_INDEX_ri *a) { - if (sve_access_check(s)) { - TCGv_i64 start = cpu_reg(s, a->rn); - TCGv_i64 incr = tcg_constant_i64(a->imm); - do_index(s, a->esz, a->rd, start, incr); - } - return true; + TCGv_i64 start = cpu_reg(s, a->rn); + TCGv_i64 incr = tcg_constant_i64(a->imm); + return do_index(s, a->esz, a->rd, start, incr); } static bool trans_INDEX_rr(DisasContext *s, arg_INDEX_rr *a) { - if (sve_access_check(s)) { - TCGv_i64 start = cpu_reg(s, a->rn); - TCGv_i64 incr = cpu_reg(s, a->rm); - do_index(s, a->esz, a->rd, start, incr); - } - return true; + TCGv_i64 start = cpu_reg(s, a->rn); + TCGv_i64 incr = cpu_reg(s, a->rm); + return do_index(s, a->esz, a->rd, start, incr); } /* From patchwork Mon May 30 16:06:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577228 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp406737mag; Mon, 30 May 2022 09:50:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv2m5Krwws0yTxqxZfKANbbHex8J5UE4E11WuEBuMzfOK66lUI6RHMZUFnK4VwmPM9CGO2 X-Received: by 2002:ad4:5bc1:0:b0:42c:531c:ef12 with SMTP id t1-20020ad45bc1000000b0042c531cef12mr47674506qvt.15.1653929457632; Mon, 30 May 2022 09:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929457; cv=none; d=google.com; s=arc-20160816; b=X/HDubIHD8nTu04TZ7TSoDwwd0/8xwW2cztOLNy/g8vfSoCPdS0dXfODyeNnHnNeLU lN9+MRXWhRZsWMMZKySA1pn5NsQmbQqFCnqcJwnm0U8OhE9FTpvpCZpjeEQM/PulSdB1 SbWnNp6RZy7Pu0DGmkv8B7URSoFIdK01pAd6Ygzjo2grx900Q6fhGKr20VdE+5H2a8hF ZmruRb8nOR8pHAqkwcFHkPIMzvxmci8+hHnVB2dDjGTWMlHQEMSHy6awL0ztxHhU0I1A npTPpsx6jinRRXbAzNp+L/UUHZvm/tBJq4YU19Ib4Gw7E569cF96hfa7gSXyQ35IREWw 9VRg== 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=aP12OH8l+mHHRjmOLnxcEBe1h6XZ+QuRnUPcFQro5/w=; b=ScygfRRmirvQRRlav2XtwmF9mkD0CJaHc/VcKEVK8RXmPttj74KC47QCOVM2fO6JGe gllMj+X8tRxRPpdansXeqnoNd7lISWcZ/HVDu+IhtiOTrSssxtIIGrDDUV1QMueIJbKD A5yW4J0921Sl8VTkpKlF83b/dyIuMHIleTrgY2rc/qdlFKehdMNc6C6zGlASs013Y+pk TefcQHhFirAx1+gExRGlpu0ahQT7N3EgA6ZJSy1fJUPDjbYQs2F9lbVTwaX7nYR979Tb ebZ4/bowW9pywSMyuv9iEDPRkkxGmAVQQrYLWJcEHnSM4+JGrdFf6IaEgYimGEA9ebkM ljxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=je+hyHvS; 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 u22-20020a05622a011600b002f91cf62fb7si8088835qtw.724.2022.05.30.09.50.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:50:57 -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=je+hyHvS; 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]:42006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvibZ-0004GH-7f for patch@linaro.org; Mon, 30 May 2022 12:50:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvy-0003fc-Bc for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:44012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvv-0007KQ-NV for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: by mail-wm1-x335.google.com with SMTP id 67-20020a1c1946000000b00397382b44f4so6713288wmz.2 for ; Mon, 30 May 2022 09:07:52 -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=aP12OH8l+mHHRjmOLnxcEBe1h6XZ+QuRnUPcFQro5/w=; b=je+hyHvSaQ8MyHYVYhx9sVD8znlrsIimPy3HsouUcOdnBg9IQ7nz6vKFFfOITsOpAz 1+IBEwHnf4+7f8i/dcp6xixEMWLgHKXXH7Av9zKE3Jb0MMRNSwLzxrcr98Y7TitlqEM4 FnykuZb5Sxzx09OB9RdvYrtgyGExQal014rH0DxV6Uc0gUnUHL6YupBl1d1GLxOlppwz hvZtUOOkRjyi2qhpxS9bdZ3N3WHlIVQjloXqSOhl60YU/8cUikeBpGEFV3VjoJAqenn6 cDANpDnho/PAOjsFdoGkykhsbUfWCIH+YetXxHnDjSFooRXlGrwNuUlx1q0Eu+KBtxVH crWg== 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=aP12OH8l+mHHRjmOLnxcEBe1h6XZ+QuRnUPcFQro5/w=; b=fjLTPOzCTHyuE8raqczgRRAFMfI2tFqpCDZLqeDSrqXlZSnNVwrU9EMxLWds+qPZen Pi5mf2tJ/nHmERM2rvqsVk/DNImUwQxHl7XR7JQcFT/w5rZMpjkV++t1TQCqk0r3Vd28 Mbr5HkA5CEwOypEqvFmZByRYXCgi8wE+MiaEmC1EGeSm6yE96ccOs+e0EgWz1VKsYlhJ W4aE1LyrDCOPD7IVdNgMeLdxMCvzPaS5KmvZpMaXj7XeAEX4YEz+HITiVNwuMt2vYzFZ 0/v9dxpQd9sztT/Fan6HQLakPj3lEU8o1coFg6CB5NjQtFxaqs2Jlsa1iF52ZyXJEptz hNgg== X-Gm-Message-State: AOAM530cUcCAs7DKWYPyqAYoMiJODFziKlbj+3My9HnEsL8OT6W5EFMV q9LjyTHnj4EWUAMrzfoVq+NSvdZ/caHHqg== X-Received: by 2002:a7b:c1d9:0:b0:397:335d:4d9f with SMTP id a25-20020a7bc1d9000000b00397335d4d9fmr20041265wmj.55.1653926871635; Mon, 30 May 2022 09:07:51 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:51 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 052/117] target/arm: Use TRANS_FEAT for do_index Date: Mon, 30 May 2022 17:06:03 +0100 Message-Id: <20220530160708.726466-53-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-50-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 44c23429232..dac29749ce0 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1126,33 +1126,14 @@ static bool do_index(DisasContext *s, int esz, int rd, return true; } -static bool trans_INDEX_ii(DisasContext *s, arg_INDEX_ii *a) -{ - TCGv_i64 start = tcg_constant_i64(a->imm1); - TCGv_i64 incr = tcg_constant_i64(a->imm2); - return do_index(s, a->esz, a->rd, start, incr); -} - -static bool trans_INDEX_ir(DisasContext *s, arg_INDEX_ir *a) -{ - TCGv_i64 start = tcg_constant_i64(a->imm); - TCGv_i64 incr = cpu_reg(s, a->rm); - return do_index(s, a->esz, a->rd, start, incr); -} - -static bool trans_INDEX_ri(DisasContext *s, arg_INDEX_ri *a) -{ - TCGv_i64 start = cpu_reg(s, a->rn); - TCGv_i64 incr = tcg_constant_i64(a->imm); - return do_index(s, a->esz, a->rd, start, incr); -} - -static bool trans_INDEX_rr(DisasContext *s, arg_INDEX_rr *a) -{ - TCGv_i64 start = cpu_reg(s, a->rn); - TCGv_i64 incr = cpu_reg(s, a->rm); - return do_index(s, a->esz, a->rd, start, incr); -} +TRANS_FEAT(INDEX_ii, aa64_sve, do_index, a->esz, a->rd, + tcg_constant_i64(a->imm1), tcg_constant_i64(a->imm2)) +TRANS_FEAT(INDEX_ir, aa64_sve, do_index, a->esz, a->rd, + tcg_constant_i64(a->imm), cpu_reg(s, a->rm)) +TRANS_FEAT(INDEX_ri, aa64_sve, do_index, a->esz, a->rd, + cpu_reg(s, a->rn), tcg_constant_i64(a->imm)) +TRANS_FEAT(INDEX_rr, aa64_sve, do_index, a->esz, a->rd, + cpu_reg(s, a->rn), cpu_reg(s, a->rm)) /* *** SVE Stack Allocation Group From patchwork Mon May 30 16:06:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577237 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp411448mag; Mon, 30 May 2022 09:57:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw94BJwjSVmVM7eJ4Vp1XVuzVo7n3wnhalbpPbVJAQbnz9GMUU9BNwvmUQHX8zYS+CDkdV X-Received: by 2002:ac8:570f:0:b0:2fa:446a:995d with SMTP id 15-20020ac8570f000000b002fa446a995dmr24393696qtw.681.1653929869270; Mon, 30 May 2022 09:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929869; cv=none; d=google.com; s=arc-20160816; b=bFx8D1eoBuX1OJWMjEoXB5TcASYuHGJG+2KOO99sHnSegCfgJLMQa2ByxlgG+WpwiI 1P81v3ZdRc7CwEa0vpjJLKhGQc4aTqxvyqAr1hc35RKdZuuqqAw0SBnCbCW9rknXt9G6 JTTekYane12AnkIY0j6Pi9CvOhPZH5K5dBAH1YlOhHb29kOqZhf0+xfdTPO5xRc89zGX icgxidlt+2G3ZqdNM3HcDq+/DGq28vOsYMw8KYuISJrUiNFYBFocLB6YAKSytKmfaC4n 1PrEVr7SxZ+lWFcxjd2Kh6/y7J5r5JXN9Up65mLyKTiE8WCqclv6noDVt2I7/3PPwF6g RQwQ== 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=Fp8z/L9oNA2BFUFDrog2AzHevKjy6VYkrI1uW81LVOY=; b=AGmUEk1XuuA+b7o9XFxU4n7Y0Vz4qZKOGOL8kZrRM8vPG9blkwiW61kom08gWHDjzw W0WgJAF/2hId0GIJra7/hypCK+1GH4zbKaOTeiFcwJp4uNbuWWiaD4xgTLUzLPdadzQg LzoZMdbex4oz6qqIZbhZcrql19ZqrGP/RbEsZypu2EzU/L+hh+miYlBozJXK5UT17EhO JCGOAayzsY7xc6RAFL7mk06rt67iEnE1BMa5fLCs9+/h6m1KTPrwRTjC4tDhAsFAAGBT pODaiaBf6MZxBfFpm82v10f4NGvkWvAcC29B/XuXGpDsGmSG900ih0rdKLafP5Pk20uL 51Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ikv1ST/k"; 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 cw2-20020ad44dc2000000b0044632a7002esi1400843qvb.47.2022.05.30.09.57.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:57:49 -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="ikv1ST/k"; 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]:59556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviiC-0008F4-Pu for patch@linaro.org; Mon, 30 May 2022 12:57:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvy-0003fd-Dp for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:39929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvv-0007Ht-Ng for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: by mail-wm1-x332.google.com with SMTP id r9-20020a1c4409000000b00397345f2c6fso3118586wma.4 for ; Mon, 30 May 2022 09:07:52 -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=Fp8z/L9oNA2BFUFDrog2AzHevKjy6VYkrI1uW81LVOY=; b=ikv1ST/kLYzlCYDhWV3r51mPQCVEqpsD4gbhzrxbRhpDedsUXvid5NMktBLrZ9CA4z HLhRujnQlfQ+R5Q6xZhpgyWfTdEvUyL6HkdFDLxvD5kFT810gGvXkNSjfG3Fxef8Srqa 452Vd+Ghfk6bvxE+FWMckmX+XbwbjAiRkqZqotMPTi1z1N8UqBiLVkvL1KLa++LduJlC Xuse3ZLcPPDL44Do2ctlWe+ADkimJ5xL3mvizfx2Do3euofjs+QCdjRrl7sLdBKYPf33 jmeORVDvbgcj2cgIkjAJw2laBfcxUDjTVLP5i40VsCkdewKEZeddHTEZy/pFfy+5AUG6 BhBA== 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=Fp8z/L9oNA2BFUFDrog2AzHevKjy6VYkrI1uW81LVOY=; b=OCBQA6WisbSq0PvoQFJtQcZfGnv8rlnD1LTzo5QtVlv6WoBPW++eA+0ZfhiC+ZGHTU wStvksiaFY53WMYS6dUPjb549H1Kvf3q1QytUDZKezbDUnsyDEJRjC7UNITVmfX6nNk4 6dnX2gfec0QQhEDUtXHyh38sjka6MIgYWJByEFt4glQRKwSJVMfygdPi9M1nWEbZHJx1 4h78vTE1QZS7HWLtrUxnqjJCdyc6r4WwnirEd/Bb4ZwFfA2/10cQNczRBTOHgKoBph8a O3Of9U41noEIl652ZVAZ0v8lBhN/r0WyoDlokMiqaIoStq+lpZl2nMEyZgCuEPeTdquY 3BTQ== X-Gm-Message-State: AOAM5303/1tTz4HZoA4TlJbHtN4MecT7XvMieM8POjpkvVhD/+Y+Ys5m CIrFtAn6gz9rU8ncXCJQXIO7UZK6MsBhUg== X-Received: by 2002:a05:600c:20c6:b0:397:408f:effb with SMTP id y6-20020a05600c20c600b00397408feffbmr19793779wmm.1.1653926872419; Mon, 30 May 2022 09:07:52 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:52 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 053/117] target/arm: Use TRANS_FEAT for do_adr Date: Mon, 30 May 2022 17:06:04 +0100 Message-Id: <20220530160708.726466-54-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-51-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index dac29749ce0..c8eb2c684bd 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1177,25 +1177,10 @@ static bool do_adr(DisasContext *s, arg_rrri *a, gen_helper_gvec_3 *fn) return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, a->imm); } -static bool trans_ADR_p32(DisasContext *s, arg_rrri *a) -{ - return do_adr(s, a, gen_helper_sve_adr_p32); -} - -static bool trans_ADR_p64(DisasContext *s, arg_rrri *a) -{ - return do_adr(s, a, gen_helper_sve_adr_p64); -} - -static bool trans_ADR_s32(DisasContext *s, arg_rrri *a) -{ - return do_adr(s, a, gen_helper_sve_adr_s32); -} - -static bool trans_ADR_u32(DisasContext *s, arg_rrri *a) -{ - return do_adr(s, a, gen_helper_sve_adr_u32); -} +TRANS_FEAT(ADR_p32, aa64_sve, do_adr, a, gen_helper_sve_adr_p32) +TRANS_FEAT(ADR_p64, aa64_sve, do_adr, a, gen_helper_sve_adr_p64) +TRANS_FEAT(ADR_s32, aa64_sve, do_adr, a, gen_helper_sve_adr_s32) +TRANS_FEAT(ADR_u32, aa64_sve, do_adr, a, gen_helper_sve_adr_u32) /* *** SVE Integer Misc - Unpredicated Group From patchwork Mon May 30 16:06:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577271 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp434597mag; Mon, 30 May 2022 10:27:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi9ubTcG40HFAgX+Ko7GiwiNAG0RB6bOMameiNBmd/rqubucVNb74q/liVacxO6L2aeCix X-Received: by 2002:a05:622a:246:b0:2f3:d514:7ac with SMTP id c6-20020a05622a024600b002f3d51407acmr45001792qtx.688.1653931634330; Mon, 30 May 2022 10:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931634; cv=none; d=google.com; s=arc-20160816; b=pgD1TCYn+YY+q5VcUvYNolQbfPhAyw6zYgUTtk5CbKZvS2SFPg8J+lqqNedu+2BrJL 4Xi/nFFBawfgq3Cmy4wygenGTVlemLRtC9JiOVDniadNuLUTU0ui8BNJ3WZIc1Pk2qeo afQR4ccCwO1lsHjul1b4jkiT07BTXUuy1VGZj6rts4JN7mNllNeMbWyZzCjOSGMn6XI9 0EEIYWiJST3GUIzTjzd9OPYOdmAGi6gSUMTFbGYGUhwLWH02Ek5dH4u1otB/PMqgW8zX qf+fncm+VtmmvwUDw8FyCQ811LAU1xCMUrUm+GpkkMrzIk+BvIne5ABvDRVXJvb4q+pu 3dgQ== 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=F5sFyJYxSoybF4u7wHvAdhirQZdP27+3US2PhPTvM9Q=; b=fd3cPrM02K0u8NUVrFKzTFmIWKopiQPEtFHIyxkdXP4yLoPQ5nYr0afUTG3PIaEbFm 0Gx2TYPRBEd0irGarFdzrxxRFObCtht7Q8nW0VQj+FA4+L0U+jadQFMvfZGaYHesvIEU Tba08xAN8geOpZN/h3Izufr7tch018xCQf2hBGBsT5BGmFcC8JIAAD5cx29IVCaGR/3h agcm+7XdXHt+XTYZXexXWXhSYrUqO+UBuUoHr3wYcK/25avPUik7+qGKS1qk2hTRC99l DQCM1GSzpQRKWUdPeM8AJmwBWmVR/PNqLWjXoaBoj/H/wlo+tAbch21H1JYsUdd83Umo PBng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GoXkbn86; 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 z6-20020ac87f86000000b003017178afdcsi3785724qtj.444.2022.05.30.10.27.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:27:14 -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=GoXkbn86; 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]:51644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjAf-0002eQ-U6 for patch@linaro.org; Mon, 30 May 2022 13:27:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvy-0003fe-Gh for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvv-0007Aw-NX for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:07:53 -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=F5sFyJYxSoybF4u7wHvAdhirQZdP27+3US2PhPTvM9Q=; b=GoXkbn864AEhS9ftSIL4STh+GfwhQATsYJStbHzVD77/K1GrJNmzz7TJAaHOIjQT9V tiuHDviUigbg1BxI63ep/5f6iSGjZoT3qR76Bjjwo9u+q5JqUdiwRmB3yHBqGfqSJSDo IBTeYH0xFhp5IH9vLZ37bBOjrz4iWuYcp2NKJVwznwl6DGHzYiLakxAVMBIEQg51OEZX 4ZdOJWK3R2yC2OUoyaGA+ddvWgPmQmEJTkkgTe/iVB7T79546Qmc9mOX4yqeem/F2QwP 9p/6OvzGAQr9YggRxi2beCVDcytvjsD4z3Fid1MQyPOMPUY2sO3EWSu2Hxp7qdu6xN0Q vMIA== 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=F5sFyJYxSoybF4u7wHvAdhirQZdP27+3US2PhPTvM9Q=; b=lMYlyOzveUzD/NQPDSiih6EaHsCwg9685qQhERudINE3EtVguzdTCrhbXvYT5UtWd0 lehdbWNV4hId7AmNGBHOpq3/QnIrodEReco6VnCBhppXQuASGVd2Sutktt1TYkS41BOZ PJST40GeKatc4soSDN2xs/pTGpA6mb9QczWy+Y8PdysIDDkBhtJ/HiMC2HDyp8n1Nmx6 K2jC9fLgCTTeYQCqkdbS+VL9pV0uFyvU45z3BbEEY2weiM42E5RZ+BEl7EVzbivERQEr U+tdZl35C5mfHdlvPqBB5zBTTdRY9WiVn5kthYvrKvh2syPXjhQU4nHiaXPtXUxalWfb /8xg== X-Gm-Message-State: AOAM531Z3TsGZ+9gk0oC+szSLRRRPQSOHLQ4QsyMfcJyHYabCEE+6u5p RhtaQUzhY/h+lNxqdxgMTfT5j6ApqX2XqQ== X-Received: by 2002:a5d:6487:0:b0:210:11c5:b10e with SMTP id o7-20020a5d6487000000b0021011c5b10emr17232517wri.657.1653926873125; Mon, 30 May 2022 09:07:53 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:52 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 054/117] target/arm: Use TRANS_FEAT for do_predset Date: Mon, 30 May 2022 17:06:05 +0100 Message-Id: <20220530160708.726466-55-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-52-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c8eb2c684bd..ce6e000f6ff 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1616,22 +1616,13 @@ static bool do_predset(DisasContext *s, int esz, int rd, int pat, bool setflag) return true; } -static bool trans_PTRUE(DisasContext *s, arg_PTRUE *a) -{ - return do_predset(s, a->esz, a->rd, a->pat, a->s); -} +TRANS_FEAT(PTRUE, aa64_sve, do_predset, a->esz, a->rd, a->pat, a->s) -static bool trans_SETFFR(DisasContext *s, arg_SETFFR *a) -{ - /* Note pat == 31 is #all, to set all elements. */ - return do_predset(s, 0, FFR_PRED_NUM, 31, false); -} +/* Note pat == 31 is #all, to set all elements. */ +TRANS_FEAT(SETFFR, aa64_sve, do_predset, 0, FFR_PRED_NUM, 31, false) -static bool trans_PFALSE(DisasContext *s, arg_PFALSE *a) -{ - /* Note pat == 32 is #unimp, to set no elements. */ - return do_predset(s, 0, a->rd, 32, false); -} +/* Note pat == 32 is #unimp, to set no elements. */ +TRANS_FEAT(PFALSE, aa64_sve, do_predset, 0, a->rd, 32, false) static bool trans_RDFFR_p(DisasContext *s, arg_RDFFR_p *a) { From patchwork Mon May 30 16:06:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577267 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp431939mag; Mon, 30 May 2022 10:23:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGUnv7d2lJV4gRYKsc9sdbFvcpjJ0UZn7BTdOQ0V+0WaKFoh3GihJM3Nnf3nYlDWfFwQyM X-Received: by 2002:a05:6214:1c8a:b0:45d:dc87:660b with SMTP id ib10-20020a0562141c8a00b0045ddc87660bmr46427410qvb.88.1653931436170; Mon, 30 May 2022 10:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931436; cv=none; d=google.com; s=arc-20160816; b=bsFt3g4SlcYMl7pm3H2zqlFpldmdahKtVHpBzMmoXOVWLNsqDRPyJ+GkrdmlqZ19eb DH967hTEH3b+KP8VJYtVdmCc8/NtmUZC5lSY0TNLMmEroqSWjVNE3W78tHzCT1S5dstn BT3CEMI+meN8BFFSP0+eg6FpGmt4W+uvyrs2FFYh6kAvedZhkTFhI+LffKNPYS3O4Zct ZJi5nd9yxquKpusmNWhNXua+y+Wa3Yfo6JI/cl/hhwDt/7K4Q2Yl8qZyVFYqfnwECmGp eVUJCUDECmFCnu+xQX6V24vXzflsajq8W+pD1hHv3a4QDh5hM2mspK9nDUwNydv103l1 ObBg== 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=aaYX10+l5LPXqOGE0Zl5DnPyS5jtgtfY1En8cg5a698=; b=0FSfaeb/dnJmMIpRzm1WeYX2ABvjnWGpwsCvVULp99cXClcBkQkKSj5FuX8f5SYk0a eu7vB2SWiu9u46GgemWyEOHzIrJfDMJ+xDeBc/Auc7vnzBYNiAVWOw45xVi1DQBcsG0p NQuTr+wK1KHgu/hdltQIcAaXGguzWLp7SZEAV4xgQy3Fci2oVLig3CuZxolW8hcg0ab3 wYHu/ioXMRrGKyfhvvz2lkXQDW+OJLO+ZWar6Uic7cqN6t3NuI+5KJKqx2f03f09YRnB X/hbQ9UR1ShEdIYNT5tN5sZS7L5r+2h0ORuqzghuuPdvE0T0vUCo2agP1IGpvO/XMq+3 GN8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qlg/xqvw"; 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 i13-20020a05620a248d00b006a649831e4asi886005qkn.50.2022.05.30.10.23.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:23:56 -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="Qlg/xqvw"; 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]:43056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj7T-0005HZ-OA for patch@linaro.org; Mon, 30 May 2022 13:23:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvy-0003ff-Hy for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvw-0007FZ-P1 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:58 -0400 Received: by mail-wr1-x42d.google.com with SMTP id s24so7955976wrb.10 for ; Mon, 30 May 2022 09:07:54 -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=aaYX10+l5LPXqOGE0Zl5DnPyS5jtgtfY1En8cg5a698=; b=Qlg/xqvwTbj1EotN+BkvPBtV/gm6H7XVZNnqd8NTOHVm+6znR7uqUDCKQMpRF9SNmu RmAOM7g+x8rkD8FJNxQOt3H2q15+F7aJE8Lvuw+9VCCFxDjcJuQRtObUpehm1vyFhi4c rkjrNtSdBeTBuxr3kSG/g8V/LaPzSQgu32E/jNxmETs2x87fkxTGy4v83ULRnRBxW+nM UTV1g5c4+PsfBMDaaNY2H7mb03hSGH6L7qQ0BqnY4JMq4C3RKTkVM8Oau3bNF+LQL7DN wvPNn4zB0kQG142MYE4f3ypyPqvwsZbrq/L8OV9kOfqa5DqiUtrCw32JgGqXSph8tR7R P5YQ== 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=aaYX10+l5LPXqOGE0Zl5DnPyS5jtgtfY1En8cg5a698=; b=7jw8/NBVo3zmvfgKFbF9Czn56zq8Vscl9BhU5NwRqwC7nWasWp1y5Yp3ucm+Nwbtj8 ubx2K1kGsAXZ9eT0zwJp8IMrIOggeHSYQ7Irry6eUNzDXbSpOgI0QRcWa/Fk5Z4c2Pd0 SCl8Viez7TMtx8Rs33/lCIu8Q4gyzAKrDdrC/OGYRfcTPxN4STRCYDIgh/QSMR12otdz 7qMNlB26LgF9avgoIsmvyMJ4yO1ma8cN7OwpZ5ilEyBsMPHXd3hpd37ATjrsyHmEnbwc HMrQGG5dfK9/S1WqUFOaVG9KVNu+Q2dXorqNjZOyvmThX5OQ+MsPBTW3V7P2/y1vWfFt Kqlg== X-Gm-Message-State: AOAM530Kj8ZpWHxfRTvTpkUlspvUAd00fOZjPHJEn42LSn4kmM/F5xp0 PBdw3d4zIs9J8xexppUdx3rVmSWA1zulag== X-Received: by 2002:a5d:5847:0:b0:20f:dc2d:d6c8 with SMTP id i7-20020a5d5847000000b0020fdc2dd6c8mr32474963wrf.644.1653926874136; Mon, 30 May 2022 09:07:54 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:53 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 055/117] target/arm: Use TRANS_FEAT for RDFFR, WRFFR Date: Mon, 30 May 2022 17:06:06 +0100 Message-Id: <20220530160708.726466-56-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-53-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ce6e000f6ff..6fd9a42ef90 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1636,15 +1636,8 @@ static bool trans_RDFFR_p(DisasContext *s, arg_RDFFR_p *a) return trans_AND_pppp(s, &alt_a); } -static bool trans_RDFFR(DisasContext *s, arg_RDFFR *a) -{ - return do_mov_p(s, a->rd, FFR_PRED_NUM); -} - -static bool trans_WRFFR(DisasContext *s, arg_WRFFR *a) -{ - return do_mov_p(s, FFR_PRED_NUM, a->rn); -} +TRANS_FEAT(RDFFR, aa64_sve, do_mov_p, a->rd, FFR_PRED_NUM) +TRANS_FEAT(WRFFR, aa64_sve, do_mov_p, FFR_PRED_NUM, a->rn) static bool do_pfirst_pnext(DisasContext *s, arg_rr_esz *a, void (*gen_fn)(TCGv_i32, TCGv_ptr, From patchwork Mon May 30 16:06:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577250 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp420231mag; Mon, 30 May 2022 10:08:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfGKvpXjfsmhhYHAIopSuyy2CovAyV71XUydtIxCPzzyBk1KARHrjclEXO5yTqoI1JhPGf X-Received: by 2002:ad4:4eef:0:b0:464:4c03:9fe8 with SMTP id dv15-20020ad44eef000000b004644c039fe8mr6058611qvb.44.1653930508158; Mon, 30 May 2022 10:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930508; cv=none; d=google.com; s=arc-20160816; b=K5yduz0zv+uvVRRWkq9PSvlEAx2cMlLhc8VsC4srtTaX/I2h+5lfvd1n7lJtraOx7G vumy7cw1i/XGa/huU8ibmTGNu5VW2hQcvhs1HcN20dImjfV1DQQ1O8VxOiPT+9goEiZY SWa4u/REaFuxFwgtLnLopbbKYJkGGHn+rfQT6tEdcqCviHbEn0TiixGPiAesNAhvb4xv yz8+LQH3KzGZXJQ2Zm6wYPnVsmFmwTmWA/5JfAZ8Vs4FxQM8nvOwNK+5ubHy9+LY/9j/ 3Pmm0BVCSNEnqFZ/EbRbLcmNmkge1UQD1z1V0r9XD1COZepmFChHyW7NHA1/JkELsy3d M8bA== 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=mBCQ8VOuTu67ySWwL88mPqlQI5eIol5JrywRePlpthY=; b=sodOjTEujZrlnJTl4lurL4AwSRRYZCXIF+MjpKAbI5In5Bm6ervdVptafSzTz6VNc/ ZJfnbCY/g90uqy/xWS3Y12i7wnzChD/rSB5Zgy3O1fmldwB1L0qqZzEB2InKDpFzh6oK JW5SocWajrn35SUMPK5lyMJLGhFiCkpw5XBWlz1o4iIcq+1LkJtcTSWS6ifKnLOzGq8z 7ukyt3lRurAQ8Pzmfntp3MfiSwqCjg8tSh4J4sUOlEGVGGYXXfzpeHhJcftkL0rcE122 3v+tx8CFlA9krpSJI/hGfEntijueIAiVCXOLUG4j5eXfIDjQEbrd1GJdhKEewSTMZDON DiOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qBzKBe+M; 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 g14-20020a0562141cce00b004623d130695si7495372qvd.446.2022.05.30.10.08.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:08:28 -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=qBzKBe+M; 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]:59448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvisV-0002P9-OG for patch@linaro.org; Mon, 30 May 2022 13:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhw0-0003gy-6p for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:00 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvy-0007Aj-PQ for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:59 -0400 Received: by mail-wr1-x42b.google.com with SMTP id e2so15314489wrc.1 for ; Mon, 30 May 2022 09:07:58 -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=mBCQ8VOuTu67ySWwL88mPqlQI5eIol5JrywRePlpthY=; b=qBzKBe+M/FEh+HXOP0asp9+3C3Q/unv2BV4qNh9k3FgWOLOkHfD4OuCPM5TgJtbKoi NAVMK9l5F0LI7VMO9x0mVRk8XoJn3pCIaLTRlzmmjoXjcRi/Z5h/jqKXYWnVcdFNUG0v y0j4BO2T8rAG//S5G0CofTMhG7M12bUSfBFSnA4IfZMe6nxdzIPST4hLoin6aeDNXxbe pLx58mKC1Gz4iMtV1kXQVIVCdQMIC1BpyVUbrqu4B6nNVx0ZuzeFBM/PHWvEc0ZOK7bl lbwbT6oeiCUnT/DgW3p0ExYoz/0peFu+XqBmG+JnHCOZN1l5ZFCPaynXdLCh50UrLoRD oQAw== 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=mBCQ8VOuTu67ySWwL88mPqlQI5eIol5JrywRePlpthY=; b=KTHDWNunRvxkk7zDdI8jV44EtHa0pxm+k4sodcJNsfH6zLYrWt2h1wBkvfn6lQhWOm 7eiHX2Hp1l05/ukfEnucBI7MRBQi3sjndqZsbeN5DDAlpaV9iT+4Cn9ylPeMx5DdqBfM c7Ic1/GIC9Ye+5EVwjv074TBz9q1cMMbt4/tkhc4C8dG4k+vZZckjTOiBc/d1guC0QKc Kd3sB6h40Ubf++qA20IjlHqJBBF04eSHlR0Ul+/VWx3BFJ6/DpJ1NAjkIEj2cH0lBGvQ 3mtisMWtDGPksgnKttW+X17ExhmHcXa278qbPEkNcX7C4bGBacbJq5JBa52Ng73t2D/K D7uA== X-Gm-Message-State: AOAM533YUw2wuFAN7sJyXrJYp0APbc0t435OfnMgJxXhwQLA5fCzhC55 KhAfafskgrn8IfZdiBOhgN2vLKBK7ZfjLQ== X-Received: by 2002:a5d:4302:0:b0:210:824:48ee with SMTP id h2-20020a5d4302000000b00210082448eemr18897414wrq.471.1653926877850; Mon, 30 May 2022 09:07:57 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:57 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 056/117] target/arm: Use TRANS_FEAT for do_pfirst_pnext Date: Mon, 30 May 2022 17:06:07 +0100 Message-Id: <20220530160708.726466-57-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-54-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6fd9a42ef90..abb5433ee56 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1668,15 +1668,8 @@ static bool do_pfirst_pnext(DisasContext *s, arg_rr_esz *a, return true; } -static bool trans_PFIRST(DisasContext *s, arg_rr_esz *a) -{ - return do_pfirst_pnext(s, a, gen_helper_sve_pfirst); -} - -static bool trans_PNEXT(DisasContext *s, arg_rr_esz *a) -{ - return do_pfirst_pnext(s, a, gen_helper_sve_pnext); -} +TRANS_FEAT(PFIRST, aa64_sve, do_pfirst_pnext, a, gen_helper_sve_pfirst) +TRANS_FEAT(PNEXT, aa64_sve, do_pfirst_pnext, a, gen_helper_sve_pnext) /* *** SVE Element Count Group From patchwork Mon May 30 16:06:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577254 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp423144mag; Mon, 30 May 2022 10:12:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUphR7P31KOUIq9+jfc1EDe1zMD2TxSSvayFZwa56zBTL+YqhUh48dx+jshOETF5vaRX/j X-Received: by 2002:a37:6358:0:b0:6a3:4549:e37e with SMTP id x85-20020a376358000000b006a34549e37emr35248496qkb.660.1653930722582; Mon, 30 May 2022 10:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930722; cv=none; d=google.com; s=arc-20160816; b=a0OvyWy52I8JrycoiEXrMDSOlY/4KClsiYw3WyGVi27XrsEkInOTpa0Xqy73ppTaAy 1DGwZ+HH+Ss38C4iUoEpwsSjhZArl48WOWxLT36/KQ3g08wQLvpklfI/WISJdXBLZ09w DPHkx4vgbr0UJYBFXxcDWFeWUOi5MniPEOmGCmpdca9NIWCd7i1sIZFQ1EjaUWBqKV+x VIa7XS0iIa97r+zdUksJ78g/cKZJiwkHbT0pDJQ49KRY/6w9nDnhTw9QVViwIubJ8rMj aIKFi89M3CGZEdD5Vm09QUD0Xt7/8eWPpFHYSFDtRbv1YzbZ8YUalpmqIVmtZbI+V0p+ WDNA== 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=ma4AFn/fK0BaWeH2Apz0ZU471NqOd3SDrk8MtIJ6sBo=; b=rYqpu4a9V2g8zNW/UsjRphVa2xOG4ZqWBuiJ99QMUtFJgLIuv0kbQsFbrlhlZMn/vo 0RYMiltLefrTB6FXhQKwiNamZml0CruZWPdDr7CMENcX/dkWGKI2Lum8yRLf4cjmCIpb ksgA0ZqYyVaa/vgJitIxJXPtsK+j4ld/XUgMFgVO6hY7XWNZanipGFM4pNW8NVEh6KRB 964DZ4X9YEy+dToRJK4EuK9p2Y1d9wz9aXT4kn4zUJyblhbTm9sDlzbTt42qfX0edSRJ cQ2Q3BjfrsZD7FtdeNCV5K4QpcfaGwuGcz4vPLhgiwb078OBdZYZ5aNgDkIO25zY/lkL JtHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R6xBaoNR; 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 i17-20020ac85e51000000b002f3e174ca23si7637308qtx.158.2022.05.30.10.12.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:12:02 -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=R6xBaoNR; 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]:40066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvivx-0000Ee-UC for patch@linaro.org; Mon, 30 May 2022 13:12:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhw7-0003jH-3v for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:07 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhw4-0007Hl-Fm for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:06 -0400 Received: by mail-wr1-x42a.google.com with SMTP id d26so9674574wrb.13 for ; Mon, 30 May 2022 09:08:00 -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=ma4AFn/fK0BaWeH2Apz0ZU471NqOd3SDrk8MtIJ6sBo=; b=R6xBaoNRDf06NtZi9h1xOPig+4eJP8xtvnEioW3GdFnzHzqQzWOrhVZ/KE2DdUcwGu zsawpj1n2pTmm31ldCJhxwEKayJSf934Bpol2DT+/wzOUONs8GSWJFa1I3EJPfAa6Oxv Jw/xydcIeY78fVj3SKvBNRHWCsWJX4gWT4lydPf/w3UKA7eeoQpawQJp7otTJiZ9R9EY UslKSquMjPAmFJAjKlb6IZYT8nQFVRlvtUuZDbBgSWJcL6q91hCZAMEG7zJ+R6oKQz3W 4S0jhBSJFsBkt5EwLjpkPaZ/NHEeM59y+lMFAfzVilqPy7G/SAu2ilQdzAvD5SWHq+61 ikwQ== 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=ma4AFn/fK0BaWeH2Apz0ZU471NqOd3SDrk8MtIJ6sBo=; b=on9LzyUYyMDsngYqDzwM+JKU1QRzirPXCK6mq2Hykfa1PSzyAjaKkVD2CLOJ/WKV8f jfujfyWQaigUDDYfd5Ha856N7b4vbbigwLekjdnioizAdJ5nZvjZMv20/GduHW/tIdKX YMxI837Md93+0YEEW0uqHQKC4m8jO3U+zn7VawJhmyRfv7X6Qyj8Gt3M24dzhyGTLELB 5MMQocmyd58IYlUOTQRT7VWoeSDeRr4gFZ/ifE/9HG1ptMZOwx+Ri5v630vbhCnQxvQS z12srmQRd4rbqnejwD5rsL7OZuxTbzhC5iEpTAkFhZn1h5TzZa2xRtHyDMe5wtfXe4Xo CxrA== X-Gm-Message-State: AOAM532NEHWrJGLuCt+Zj1wx+Di6rHTR4HF9LvkewkMQjF+5eKAjKo9t 4taBviIiPyvk+ScqAWAp/m7KblaKIHfAhA== X-Received: by 2002:a5d:47a3:0:b0:20e:5c89:9da2 with SMTP id 3-20020a5d47a3000000b0020e5c899da2mr47914971wrb.277.1653926880067; Mon, 30 May 2022 09:08:00 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:59 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 057/117] target/arm: Use TRANS_FEAT for do_EXT Date: Mon, 30 May 2022 17:06:08 +0100 Message-Id: <20220530160708.726466-58-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-55-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index abb5433ee56..7139e6c0b04 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2081,18 +2081,8 @@ static bool do_EXT(DisasContext *s, int rd, int rn, int rm, int imm) return true; } -static bool trans_EXT(DisasContext *s, arg_EXT *a) -{ - return do_EXT(s, a->rd, a->rn, a->rm, a->imm); -} - -static bool trans_EXT_sve2(DisasContext *s, arg_rri *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_EXT(s, a->rd, a->rn, (a->rn + 1) % 32, a->imm); -} +TRANS_FEAT(EXT, aa64_sve, do_EXT, a->rd, a->rn, a->rm, a->imm) +TRANS_FEAT(EXT_sve2, aa64_sve2, do_EXT, a->rd, a->rn, (a->rn + 1) % 32, a->imm) /* *** SVE Permute - Unpredicated Group From patchwork Mon May 30 16:06:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577232 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp409140mag; Mon, 30 May 2022 09:54:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqJFw28/7ZBxstfGKTj40a6E1FyiR+3LlXMuUEIGkCOTjTWiMu/cftv4zlGzURXk1MR7H1 X-Received: by 2002:a05:6214:e44:b0:462:2f48:d3d0 with SMTP id o4-20020a0562140e4400b004622f48d3d0mr35429726qvc.2.1653929674333; Mon, 30 May 2022 09:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929674; cv=none; d=google.com; s=arc-20160816; b=fdfNlNvILsCGTsqdWamuBYfCUeSXC1hsMjTHXs6PbHSpET2yEeQsz/n0xm5wnfqLGi 26YUO36QJnv67A9Vw57YE1I7BL2SeBDFS1tkcUIYd0rIFSopGu9ckt9CVubwLcrSQKr8 LPjPW1TU2TqMKDmaNphEhKVUtnQ9FYbiXfyn8215Ci0sAgGji7NqAeH6OEfZF7BMm06N ZhkMa/o0x2lPsT/lPA/pveh45/WoXUFkg38QO1voFvnq7i1HoDOv87aLk2mNbOmSddqn nqajjqJj1C7wj091mGL7FWHjyHsPQSOAFgrMQ8KOaIBAoXYKm+MmY6AaTOKaI6O5uFKA L9Ow== 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=SRTvm860Uf5hUyhBk4byQQKpwYL1ZUioAQoIL6c3PLU=; b=C3T1h4ZB7dFFqxRVO+AHAWSpEwwBKm5oDUNIufN+/ihiHrMHry/TpMNGFYpQvIqWLY VrQjTWQIQpJKegopGo35cI3xGRnTHfU1NVNxYvlmT09U2WXZWe5WKKgh5Sv5bbldEc/4 +Bv41/kE2Mmbyu0nCj0EQbOgG9jFmPMp+p7GU5GEt51Fm74Ak5UJ9iXzp9/PYutFr45L mgu/4pG+JskQK7fezACrfdr9utNb+PQN22/P7mT0fqmpIgCz/XdKQT1sxNBWtW1X7Loq muMxCudjZPmTbZLpwYkCEZNfRL2KGPIbSyXZ/Gj9ok5dTbfZXt7MasJ+WHkAFLHxTZyN KZhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aoBPZoZE; 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 ey11-20020a0562140b6b00b0044656c198e5si1832924qvb.20.2022.05.30.09.54.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:54:34 -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=aoBPZoZE; 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]:50532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvif3-0002Ar-TF for patch@linaro.org; Mon, 30 May 2022 12:54:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhw8-0003l7-7r for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:08 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:32840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhw5-0007Lc-Hz for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:07 -0400 Received: by mail-wm1-x331.google.com with SMTP id o29-20020a05600c511d00b00397697f172dso202732wms.0 for ; Mon, 30 May 2022 09:08:03 -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=SRTvm860Uf5hUyhBk4byQQKpwYL1ZUioAQoIL6c3PLU=; b=aoBPZoZEfPJy69/YOtI3hldGCqwMO/txf6bGeDDhG3vXIZC9aYlgNooJNBdf/IofWw lt4Rx3pWm7C0J40ehmimrfZHJY3L6/Idmktf9qarUplhmfp0v/jSgui0Baaa4qg00MM2 gRe905kCUNn0TFyKj4xiZ4v9bi3Xw/q/iUhe3gwEdvRzIOSwTHNNgHPPjHx8rZmY3CyS nLMC9EwO6dcZXU38lmYnE9s/gXa3yQL+mmoY95lHRksNnqHm0VbWFLNTXDW1z8ltg1Ab V2JkSVsImC82wUjnr9uofTkw/YApD/wVNZOHE7/N8sWFFLCzROnF26OSfkJuh+6BUdwi 3aDw== 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=SRTvm860Uf5hUyhBk4byQQKpwYL1ZUioAQoIL6c3PLU=; b=dULLRLsxVqGP7E3DNF3S7gzxKnBL6Ra1AVIYYMhtfus96rRzjGCjkHJyVgr7ALjnoG wFVOpQ/7J2Vwah+W9/jqZs2iS9kewK/xE2bWuekVb7OQYXYi0rRQqFu5Bhow7XRVLcJH XgdaD3fGc9T92K2V+t7NuJ+QcgTCEi8ErPFhsD/xJ+i3YUCW5Fs+1vMUaeGseNwCmaXo /3u10BRgoPa8ixc46M/R5KhtTBGAff42CO/Q+ti9m3tyumPaOInMp2inUOj8q4SXAf5p 1pjLTRBRB+7u0F9pC2TESCvKBIX6QBAWjYr+bcqSxF9HZdf/f0kDvul+YN0ohK2xyMzZ Mjkg== X-Gm-Message-State: AOAM530hNN1+JUxNQUukpNvcD9RK6qHS8JP7jMMooyn9qxrnfDZgTSw2 bY1MajXGYsI30dnc57MrrtcwA1PBLeelfA== X-Received: by 2002:a05:600c:20c:b0:397:344f:326f with SMTP id 12-20020a05600c020c00b00397344f326fmr19798815wmi.31.1653926882748; Mon, 30 May 2022 09:08:02 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:02 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 058/117] target/arm: Use TRANS_FEAT for do_perm_pred3 Date: Mon, 30 May 2022 17:06:09 +0100 Message-Id: <20220530160708.726466-59-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-56-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7139e6c0b04..413e89b19ca 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2272,35 +2272,12 @@ static bool do_perm_pred2(DisasContext *s, arg_rr_esz *a, bool high_odd, return true; } -static bool trans_ZIP1_p(DisasContext *s, arg_rrr_esz *a) -{ - return do_perm_pred3(s, a, 0, gen_helper_sve_zip_p); -} - -static bool trans_ZIP2_p(DisasContext *s, arg_rrr_esz *a) -{ - return do_perm_pred3(s, a, 1, gen_helper_sve_zip_p); -} - -static bool trans_UZP1_p(DisasContext *s, arg_rrr_esz *a) -{ - return do_perm_pred3(s, a, 0, gen_helper_sve_uzp_p); -} - -static bool trans_UZP2_p(DisasContext *s, arg_rrr_esz *a) -{ - return do_perm_pred3(s, a, 1, gen_helper_sve_uzp_p); -} - -static bool trans_TRN1_p(DisasContext *s, arg_rrr_esz *a) -{ - return do_perm_pred3(s, a, 0, gen_helper_sve_trn_p); -} - -static bool trans_TRN2_p(DisasContext *s, arg_rrr_esz *a) -{ - return do_perm_pred3(s, a, 1, gen_helper_sve_trn_p); -} +TRANS_FEAT(ZIP1_p, aa64_sve, do_perm_pred3, a, 0, gen_helper_sve_zip_p) +TRANS_FEAT(ZIP2_p, aa64_sve, do_perm_pred3, a, 1, gen_helper_sve_zip_p) +TRANS_FEAT(UZP1_p, aa64_sve, do_perm_pred3, a, 0, gen_helper_sve_uzp_p) +TRANS_FEAT(UZP2_p, aa64_sve, do_perm_pred3, a, 1, gen_helper_sve_uzp_p) +TRANS_FEAT(TRN1_p, aa64_sve, do_perm_pred3, a, 0, gen_helper_sve_trn_p) +TRANS_FEAT(TRN2_p, aa64_sve, do_perm_pred3, a, 1, gen_helper_sve_trn_p) static bool trans_REV_p(DisasContext *s, arg_rr_esz *a) { From patchwork Mon May 30 16:06:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577241 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp412791mag; Mon, 30 May 2022 10:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLV5qzK9SBrqBOlaI7zwczz0z9ol70ZbuDMVwhOoFXkFwrKzpX4LbGrdKwZDrC9e8lBf7e X-Received: by 2002:a37:ac0e:0:b0:6a3:7c0e:ef33 with SMTP id e14-20020a37ac0e000000b006a37c0eef33mr28038127qkm.659.1653930001404; Mon, 30 May 2022 10:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930001; cv=none; d=google.com; s=arc-20160816; b=u8kl1kPAfYExQ06h11KxsrlVMNz+RaKAacKmjMmq7YDQl9eJK8JhnX0l79c1O7SvRH 8mscah5JLHNeLN07Eg0/ZsRvQ3lFHqEI2ko4Roq0BAUyGThXfNKOxcKzYUImfcBeLIrK iUaKb3xhGjwZKVfzFogh95vT626oXdTcaaHTXNUOokmbxfh6a/T6+PazmkJLDelfy38O FG25i3qsnAL2tkCL5mj8EbVivfRn9ZX4KGPfEv/ZOqnFeyGBkbjvvmHKOLqLDFDdf0xD eUDKgyXxnpJE1PrZXVtBqlK2fCTxLJlqyL4QRAZY8VAkpRtI/u2y8YQKg0t48oKol6H4 cAVg== 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=UpkCncvF3viMOSK4g05HRN7WhcCCIxoydNjSvVSWc/I=; b=PorRJ9E5+zhofjYAcW3DkUkEXSbRzdOIvWlordYcrGQPW9SWj9CbQNm+0Z3ZBjGE5+ rNErlmU5Sl56ksuCrwJruSzZ/oDdWd4NbAXDvhVc7/DbpXoschoyCWPzZuGhTaJpuhjW MwFWtpCY+ZGXmQ9twSEp1mBGYuRd0zy+NvcODKYHW4h34DfA66EQa6OVfnDcOOdyzHQ9 bou8Q7pmqWSPua6YARFeO8judhX/HALza4V8JRAhDUe77tR9qdkle7msNsE1MbHmweJr twXywR0wjWVQm2qhxp5Hdxra+ViSM9MUEix2ZacT3b8mrvxE3U1w2T/1kX9dE0DhOXzN 3Ngg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Eq786jaT; 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 m64-20020a375843000000b006a5e2f41ca5si4869253qkb.285.2022.05.30.10.00.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:00:01 -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=Eq786jaT; 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]:39800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvikK-0005ci-VO for patch@linaro.org; Mon, 30 May 2022 13:00:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhw8-0003nx-UC for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:09 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:41903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhw6-0007GW-Jp for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:08 -0400 Received: by mail-wm1-x333.google.com with SMTP id p5-20020a1c2905000000b003970dd5404dso6724791wmp.0 for ; Mon, 30 May 2022 09:08:05 -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=UpkCncvF3viMOSK4g05HRN7WhcCCIxoydNjSvVSWc/I=; b=Eq786jaTND5JQsWSL8cu7jvUPKzuQ0QYuv0od2N7KY33cKJVp/IGDWPEq7HmIV/7bx 331VZyYwcJ+FYbz8LM0EHE+oqATR0bAyfdkhG3dixvKTdW1BPB/75fh+oBHyFXRDsq1X /T0IiyUpFomG/V18rQ+8Rrd7wSiTmLkcuqshPEuvoVcc0u2RTMj9X0h8AXLpoffYmNBr jIEqKblQugqCVY8mF0E67dTUSTMF7DiAd5sAg1URA/PI3P3/gnLU5QiwyoS1Ki29DgV0 dnWbIc7WNZuDaqS7FeFfPai71Ut7K7IfjkW1aOyzLH7FdDmMAZe54B9gersoyGXL+BXO naqQ== 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=UpkCncvF3viMOSK4g05HRN7WhcCCIxoydNjSvVSWc/I=; b=efg9AoSdplP3OY556Wab0nJqtDBWgT1jRBAcesyWRTING1h8C4iKtF+0mQ12DTYka+ akxYnOkGOz1z15rHpA7XjtBJ8RCOCPj/uqYbr0gsl5bcwQo2GeP5hE1xzfuw2xewzM99 wcfWWszX2umST1SwY96ywFZZrKNGW29MznXDC+hbyMJOwi6v0wIQYKdGawzSVmcJj7Fu js1DcwK6v/ZYORbPWjIz3EwYsSrZ15CpGktjEVHSoFIJs5b4NoJj+tQFCcPPmE8SeLgo RRuYQOoVqAzww62vMs2MUVL26SRsOXGZxDICRtKfR+Yl1oW2a0EiCCLRzJmEz++rpkWC IlJQ== X-Gm-Message-State: AOAM532VCdfoEcheN3bc4mCrKNjLVLzPv2TAJ2Y+1UZtCduoL4fVIz0B J/OLfta8JuKZwc2rXdM9g/3fIWCn0Gyb1w== X-Received: by 2002:a7b:c1d8:0:b0:397:337a:b593 with SMTP id a24-20020a7bc1d8000000b00397337ab593mr19583075wmj.96.1653926885143; Mon, 30 May 2022 09:08:05 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 059/117] target/arm: Use TRANS_FEAT for do_perm_pred2 Date: Mon, 30 May 2022 17:06:10 +0100 Message-Id: <20220530160708.726466-60-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-57-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 413e89b19ca..1e6bcedb9df 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2279,20 +2279,9 @@ TRANS_FEAT(UZP2_p, aa64_sve, do_perm_pred3, a, 1, gen_helper_sve_uzp_p) TRANS_FEAT(TRN1_p, aa64_sve, do_perm_pred3, a, 0, gen_helper_sve_trn_p) TRANS_FEAT(TRN2_p, aa64_sve, do_perm_pred3, a, 1, gen_helper_sve_trn_p) -static bool trans_REV_p(DisasContext *s, arg_rr_esz *a) -{ - return do_perm_pred2(s, a, 0, gen_helper_sve_rev_p); -} - -static bool trans_PUNPKLO(DisasContext *s, arg_PUNPKLO *a) -{ - return do_perm_pred2(s, a, 0, gen_helper_sve_punpk_p); -} - -static bool trans_PUNPKHI(DisasContext *s, arg_PUNPKHI *a) -{ - return do_perm_pred2(s, a, 1, gen_helper_sve_punpk_p); -} +TRANS_FEAT(REV_p, aa64_sve, do_perm_pred2, a, 0, gen_helper_sve_rev_p) +TRANS_FEAT(PUNPKLO, aa64_sve, do_perm_pred2, a, 0, gen_helper_sve_punpk_p) +TRANS_FEAT(PUNPKHI, aa64_sve, do_perm_pred2, a, 1, gen_helper_sve_punpk_p) /* *** SVE Permute - Interleaving Group From patchwork Mon May 30 16:06:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577258 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp425099mag; Mon, 30 May 2022 10:14:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2jH+hQatWVGM+cQ6tJyKzoL5teWPo380iCgbuQLOgsGIb3vOnKQhGkcsmr3eLYXpEBkwj X-Received: by 2002:a37:8d46:0:b0:6a6:48c7:8632 with SMTP id p67-20020a378d46000000b006a648c78632mr1790426qkd.633.1653930882326; Mon, 30 May 2022 10:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930882; cv=none; d=google.com; s=arc-20160816; b=sxxMP5LXiKkWU/l0qgDzM9CBO5lJcd3sPRB0AuV5BcvzpduU80LNctGHIw5yTfP565 +pzgNRz5WBVuCckio8YVGfsvIqQHAYZsmECgcwgQ5syCSopy83F4La+ncUoRW3zeVojU ZxL2sB3hIkPGdQ65FRqyhb/DQKaYLU0Uif9YRqJrMpKTicC7hRnWOKf/AHWWDKSLL8rO B0IpZR6mkwojeuZ8TyeSBELtU61AsU38aMlzMcUn/pl+VKhAMr3uDoWPGTj3XGD1mpFF xp/lhOn0gQrXK81NpJuhho7ZjRq1zuVqOe9Me33En+/tqfgcjtEInuEz7gbRl+H6dXWI hexQ== 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=JqrBxr5VDjo33u7pbXWCf2yzBi5cLxpeHqYjbCwf5Qs=; b=UAl9LM/xp46t2wX85FU0rTAE0ueIk3QtVqn0atjmNPuANOjwGEBd+zWT5a4yCZ4RJv DpaeNGk6jdUN9gTm5TfkVM7FBMdgqiCGKHchapxQMhdxXhdaverWUC9z/h2HBp6O08mx v4njgfNxxJCZIiunqvQy1fipZP6649PMrGUM9PjEyH78/Fd+fNpREZjNuuotGzNsINhe ipp3OlEYJZx+8/qoClowQSxgol4ELIASyI2ZOQbBv3zRmjQmqp3zm1ssoC1xoAb1BBX1 Y5afQmj3auPB0nzgVUoGyzmbVW0iJs/7Q7Pm8MNi5zfTIH8GKhzZHjKXu6G29MMhXI64 TuzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=el81m7M9; 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 9-20020a05621420e900b00462374301d2si7349202qvk.329.2022.05.30.10.14.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:14:42 -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=el81m7M9; 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]:48608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviyX-0006Oe-RC for patch@linaro.org; Mon, 30 May 2022 13:14:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwA-0003qm-Ut for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhw9-0007By-9z for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:10 -0400 Received: by mail-wr1-x42f.google.com with SMTP id e2so15315033wrc.1 for ; Mon, 30 May 2022 09:08:08 -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=JqrBxr5VDjo33u7pbXWCf2yzBi5cLxpeHqYjbCwf5Qs=; b=el81m7M9ZstZiy3VRCJJb0V3Jnffelym7PXRiboHbw5yjtQOu/vnR4Ts0u/9cSdRQD 93BIKhQ9BNTEhXo0e+hvlwSEL77B870PxdbWAGtwXoZGaqJ1h8geZ+zV7plg3a/oJXG3 uhrMmjmSA5JSEp3zfgAyI7EsVeoETCSfN7i+JuJ6mD5ga69ivz/IUBO5qptzN7cgz2TL yuJfsOqWCZUL6ztYUVEaLXeemgYP2anCxbCrvPADKkazSdVnuIZFCdNRUuurtMx+KAvW uBqqUiwDAUNGA4igPmboxhdgWogivxnrqPOTIPFUKo17CqYcyn2fJ1r8Z/Va191I343S iIZw== 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=JqrBxr5VDjo33u7pbXWCf2yzBi5cLxpeHqYjbCwf5Qs=; b=JvwgmUyKIiSUDOqcGLtXmkwCerAyyLMBMYlTY2GxRTvuGBQGB7kgU1lBFEUspx/D9C NUdmYe5eYVBmZsUR429Y5Y4cOjcdUYaCQo6ND642PeMdlwY1byUbrPnsUKIjB1XOO5Y+ YNUGSPFU2JR7Q5pRDNdR6ohDhHOVbJdPe/f4nhGniVKsCh198QcbIeykaSs/gzy98lV/ 87ylcY8V1V8DLx2KZKvcmUus9Q61hAXZPC5osUbA4s5OtYn4E5yLe2F1gQR3mhKVgAov tTyYoCdZFigmJfq1641GsemNz+Xowbj7FQAqWWLdVh6JQPTGt9vnED/T+/xdfpIQByvj 9GEw== X-Gm-Message-State: AOAM533Ae1gfdyEytW9gIKqgOjMS8wAPvPllJ8wNh6iDeV1DFKbWS5ML kSNGsUf0M0BtewDfgVwj3a7FygWDDZeM9Q== X-Received: by 2002:adf:f68f:0:b0:210:2ef7:e801 with SMTP id v15-20020adff68f000000b002102ef7e801mr7012477wrp.318.1653926888115; Mon, 30 May 2022 09:08:08 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:07 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 060/117] target/arm: Move sve zip high_ofs into simd_data Date: Mon, 30 May 2022 17:06:11 +0100 Message-Id: <20220530160708.726466-61-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 This is in line with how we treat uzp, and will eliminate the special case code during translation. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-58-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/sve_helper.c | 6 ++++-- target/arm/translate-sve.c | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index e0f9aa9983c..3bdcd4ce9d0 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -3382,6 +3382,7 @@ void HELPER(sve_punpk_p)(void *vd, void *vn, uint32_t pred_desc) void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ { \ intptr_t oprsz = simd_oprsz(desc); \ + intptr_t odd_ofs = simd_data(desc); \ intptr_t i, oprsz_2 = oprsz / 2; \ ARMVectorReg tmp_n, tmp_m; \ /* We produce output faster than we consume input. \ @@ -3393,8 +3394,9 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ vm = memcpy(&tmp_m, vm, oprsz_2); \ } \ for (i = 0; i < oprsz_2; i += sizeof(TYPE)) { \ - *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + H(i)); \ - *(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = *(TYPE *)(vm + H(i)); \ + *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + odd_ofs + H(i)); \ + *(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = \ + *(TYPE *)(vm + odd_ofs + H(i)); \ } \ if (sizeof(TYPE) == 16 && unlikely(oprsz & 16)) { \ memset(vd + oprsz - 16, 0, 16); \ diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 1e6bcedb9df..c2ced3e2bb1 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2298,9 +2298,9 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high) unsigned vsz = vec_full_reg_size(s); unsigned high_ofs = high ? vsz / 2 : 0; tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn) + high_ofs, - vec_full_reg_offset(s, a->rm) + high_ofs, - vsz, vsz, 0, fns[a->esz]); + vec_full_reg_offset(s, a->rn), + vec_full_reg_offset(s, a->rm), + vsz, vsz, high_ofs, fns[a->esz]); } return true; } @@ -2324,9 +2324,9 @@ static bool do_zip_q(DisasContext *s, arg_rrr_esz *a, bool high) unsigned vsz = vec_full_reg_size(s); unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0; tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn) + high_ofs, - vec_full_reg_offset(s, a->rm) + high_ofs, - vsz, vsz, 0, gen_helper_sve2_zip_q); + vec_full_reg_offset(s, a->rn), + vec_full_reg_offset(s, a->rm), + vsz, vsz, high_ofs, gen_helper_sve2_zip_q); } return true; } From patchwork Mon May 30 16:06:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577262 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp428190mag; Mon, 30 May 2022 10:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRnm1oyzr/5FZu/S5ESi2sfia6YSFbCBzD0ESGgc8HEssnHRgRUhOZj/+5oLxkxaWXR2Dc X-Received: by 2002:a37:a102:0:b0:6a3:5d5e:2706 with SMTP id k2-20020a37a102000000b006a35d5e2706mr32279138qke.251.1653931122947; Mon, 30 May 2022 10:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931122; cv=none; d=google.com; s=arc-20160816; b=uB6JG3wVjtwf34qJBAKapV68QdF2DQo3Xwi6V9577ul5pG86TMe1J0MhkiUCpLCnpl H7EDTb3aMFU8A6eyFNGEWzHGEQgC9dx/y/qr4bzyXwKddXHp5A2tIaxH+Xyf4M4oWEu1 d3HKdXd1lfVQ08xbmlLYs5Nbagg6J2Pov+fDZHRblT48c1GO9C4WadnDdCTEFaia8udm eY/ikuaSasPEwxtvGS31Pxs3AB3qMThd3CV/+2Y2Osa9A8ACP+ls5kTViqpG5+AiqbxI 2q1kpZ1zgWzocZjCeBgj5Baob3j8hBkbcmecmwZsZVxvmPNpgk68rfRZPG1PWxHqf/lZ nxXg== 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=SRfsh9/+yXCD5jUQIGsKMcU3hZ/ekrvMQwtiv+KkcFk=; b=YikIMm8sQkLNe4aYuRHfM2/VqFg3mg7AzUoHRNmZe0wdOjKfPKTrvwgHI+vVsXaBKk tl5z3UW29Mf3mulOqC7VZC6qeU7jZ9SjRMzhaMoGbG1pE7m5yroqK/Di0zKsUdU5Bkkw Wi2/RHkAj+8UVdsyRYxl9mOzYMgeAU7gLBXY+dtLf4NcuAaRifZ83gFulM0qNqCMecZz FM5kF7gIL98ESrL8+SBxRk7oYNIJQwBTKEXh7iqDYPMnh3IRcQYbiPy6MW93CQK8CGyP q3USNc2Gpt9cq7Kgy8RUAuEjahbo+QRkbDpX/uMTL2lmbAVD6w1DsRfgO8B6F+WaRA1c FT6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujQCyAmi; 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 if1-20020a0562141c4100b00461f562df24si8207350qvb.358.2022.05.30.10.18.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:18:42 -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=ujQCyAmi; 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]:57030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj2Q-0003q0-H5 for patch@linaro.org; Mon, 30 May 2022 13:18:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwF-0003qo-CY for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwA-0007MD-RS for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:12 -0400 Received: by mail-wr1-x434.google.com with SMTP id q21so4089541wra.2 for ; Mon, 30 May 2022 09:08:10 -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=SRfsh9/+yXCD5jUQIGsKMcU3hZ/ekrvMQwtiv+KkcFk=; b=ujQCyAmi4fJVD4dJIP+ZMLXpesCmkk0totjYTb3kKum22CNSwQkX6jnVaxVLmGTBkx pavztesEPWQ2g0tRGkT6twoQLfjiJSwustwfwp6//w7GcKPG1/dWZD6s56ZmWW2FbDfl T7AA/spjxwv2RTmcj0EU4nq2+UX38cJSjzO7IUsePZZql0/RtDF7XCPErNZzohYajaUU D75MA+VrMpF+vBLbLtj+0nAqqOxUwgHRVBoS4n6xzbwhZLNp80YfJgJ6m125QJUpGU1b 8oJMG5y3jvd6uN5hiPOze2qgyFkSlisopf9qEaLowp/ZkAS94Py7RRrXziXLa0iw44I5 +OqA== 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=SRfsh9/+yXCD5jUQIGsKMcU3hZ/ekrvMQwtiv+KkcFk=; b=MqwhUT8QEmR+UcouShKmKDwr7gY3KVxXL8fcBt8ajb8bHo5oAKIbMyQbJydKjiSyqi WRQ3CLHWqJrYiEsQa6thF3jh1Lq0sBsxy5Q7hVKZohMQQFjxKpjbR4Bk2j8/5aL7AwyJ xEqc2deAoBPI6D04q11hDpyMl6vVtYcoCMnQtkapm4AwLrGrVcRI+4NrLSkHiQNO0xRO NV5PTVv4E+zStjtb3Sgg5GS8I7RBT7GiJwZeu25gF41Yj9Y8u/XPVzfbqEstxf0Lopzs Vrr55R3FjoTr1jLroTdOdnIkF9quHhUMfbEu31NkWtn/8Sjl/2jNzc/0TO0pj7hDq/GE q01w== X-Gm-Message-State: AOAM5309q3pgrFaq2+WG5eMNdMnD8ZihJmbfZo9Q1UkM7+0TRujx+Fa8 f9l27IyMnDMHKC+VtlvVwH7t/fxeDTTw/Q== X-Received: by 2002:adf:e0c3:0:b0:20c:5672:9577 with SMTP id m3-20020adfe0c3000000b0020c56729577mr45681556wri.466.1653926889475; Mon, 30 May 2022 09:08:09 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 061/117] target/arm: Use gen_gvec_ool_arg_zzz for do_zip, do_zip_q Date: Mon, 30 May 2022 17:06:12 +0100 Message-Id: <20220530160708.726466-62-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-59-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c2ced3e2bb1..75c52d8ce1e 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2293,16 +2293,10 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high) gen_helper_sve_zip_b, gen_helper_sve_zip_h, gen_helper_sve_zip_s, gen_helper_sve_zip_d, }; + unsigned vsz = vec_full_reg_size(s); + unsigned high_ofs = high ? vsz / 2 : 0; - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - unsigned high_ofs = high ? vsz / 2 : 0; - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, high_ofs, fns[a->esz]); - } - return true; + return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, high_ofs); } static bool trans_ZIP1_z(DisasContext *s, arg_rrr_esz *a) @@ -2317,18 +2311,13 @@ static bool trans_ZIP2_z(DisasContext *s, arg_rrr_esz *a) static bool do_zip_q(DisasContext *s, arg_rrr_esz *a, bool high) { + unsigned vsz = vec_full_reg_size(s); + unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0; + if (!dc_isar_feature(aa64_sve_f64mm, s)) { return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0; - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, high_ofs, gen_helper_sve2_zip_q); - } - return true; + return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_zip_q, a, high_ofs); } static bool trans_ZIP1_q(DisasContext *s, arg_rrr_esz *a) From patchwork Mon May 30 16:06:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577274 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp437921mag; Mon, 30 May 2022 10:31:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdljaMZcPkIt1qD4EXBcoGTA7qVR33d2cKZArRyJ/241ovjZUy7eZEYMQ9PrYbYhaJ/eEJ X-Received: by 2002:ac8:5ad0:0:b0:2f3:e37a:e768 with SMTP id d16-20020ac85ad0000000b002f3e37ae768mr44054620qtd.592.1653931872458; Mon, 30 May 2022 10:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931872; cv=none; d=google.com; s=arc-20160816; b=fuCYbYc/EHSimq2sfwcmt3r/zp2+VG9VYaM/B4zC912GuvKKc/5aB3nhYGeX2n76/q hYYFZHv0qL6SFPxxFBdcSem5ruwpL/pxcBXRUx4UY8K5+/6/LhsjhU/MMjBzTunN7qso cYVUvvOA/Cl5+f7W7WnXFVU5qDXqVpNJG9P5xrS77uYuoctRSbsmwTJc+CCxmsOQdnK6 swuMDLNf1vA5YFhVm8nroQReHTDj11boHtVVaAg7cFTa7p9EUVVzXIdAyiJwC6BEzoLL KheQor/e1mAgCcciqWt4hgA8fxvqkADQU0fQbq0qtjHa6s0eY6jgYQnzv1a/WbFSP6Dl T/Lw== 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=Eb1liHNMAWKwhqUeBid/UlGEz6S97F/+Fydx9EWhKYI=; b=FLLzcW3sfyY1TAXhuw7jslTZji/Mjf7UPZqh2xfumDMvrHWIIzXrXJpYYcYoi7RPPn aivA4qy9NAHpqZAaFd40Fgx5+EgaVAqQ3FVG04Y381Ky4Wn+m/Ce706wWGNINtayru0r foC30ZvgpBZ3PgFN2O5dqn9692u112lOK3It6fDWRErYDC0rqOz3B8aAvQot9TSvk0Kx rMhW8VGdihsEKgSf9b64zUBkNAQpVNHE82A4g6GLrHlfRu7x2qxHNREP7HjBeBHXcuHY hgU+fVQ96FDdZecKZzUrwsBB8uxEx25Ibdhx8By+J0VUlkSwuAbwK08triqFJkwX4Pq6 AoPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUU2O71Q; 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 iw15-20020a0562140f2f00b0045645825998si7403168qvb.212.2022.05.30.10.31.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:31:12 -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=kUU2O71Q; 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]:60184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjEV-0008Uz-VH for patch@linaro.org; Mon, 30 May 2022 13:31:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0003r9-Em for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:36780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwC-0007MM-9k for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:17 -0400 Received: by mail-wr1-x42d.google.com with SMTP id u3so15272110wrg.3 for ; Mon, 30 May 2022 09:08:11 -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=Eb1liHNMAWKwhqUeBid/UlGEz6S97F/+Fydx9EWhKYI=; b=kUU2O71QXH3mhvWa1KUr6cz4zQKIzY+gVXOE2o70+yQNWzCkvlAw0DxbVhPntHQktD KJqYfqH9u85mIot4fw0xNH26dqLqxQPxBAnUyBG5tViGbAXHOd3hzAdsZEit7v38x6Fr cAWcbP320EDg6a3VaHo86aJAxlN6EV+Tgta6jKmD168asEOzd8UshhxB/7dPLBHaK4I3 xncFPc1YVsasnZ8EoUF5ro3ULZFD+lSc1uEx+cdvJA1+NBs0v5CkcCnS37md1oCZ5IRB ZoloZDatz7TUzhoqiqFyn7igbxAQotimGYii6Yjqnw5fTws3rGLbIXGLo4cAZLOJPeUk kYeQ== 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=Eb1liHNMAWKwhqUeBid/UlGEz6S97F/+Fydx9EWhKYI=; b=jajR7anAhWB8J7tbZF/DxujSwAYbZJx9TbhBz6PtfbhTnN2idfuzRAXAtrYxG1k1n0 wuzBA1T0aJ7SP1NBlMzk+yX27aKEnHv5okmr70wen20iOWisk5iK5VLgPEkImJfsVbMW 2sHYRZpzV3Jp0QZUAGPH9C0RGaJHjKpRVzkREZzRF9BntKG4xRV9ovYfvgiS9FM+voCR GHnV4H+QLGcTY78OrswVDd6PIyKYBG85WjNkaPBhNRExEUNCbCPEd79pagZvko4IfbJR 1e+fXRMF+ovAStLENxC1eb5j0+2HPLG0GWgE5Qk6jMWl2AcVNPoFdKCem7Jb3AWsLvlG TGSA== X-Gm-Message-State: AOAM530CNSfqq8lV8ZCDZIgQu1XWXr+DyiASZBxAcTj83R0S+MBJvUg4 R8CZScOmSjC6IkGWa6mxF/Cs+w3vEthjQA== X-Received: by 2002:a5d:5847:0:b0:20f:dc2d:d6c8 with SMTP id i7-20020a5d5847000000b0020fdc2dd6c8mr32475893wrf.644.1653926890250; Mon, 30 May 2022 09:08:10 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 062/117] target/arm: Use TRANS_FEAT for do_zip, do_zip_q Date: Mon, 30 May 2022 17:06:13 +0100 Message-Id: <20220530160708.726466-63-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Convert SVE translation functions using do_zip* to use TRANS_FEAT and gen_gvec_ool_arg_zzz. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-60-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 54 +++++++++----------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 75c52d8ce1e..7c9deb267fa 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2287,48 +2287,20 @@ TRANS_FEAT(PUNPKHI, aa64_sve, do_perm_pred2, a, 1, gen_helper_sve_punpk_p) *** SVE Permute - Interleaving Group */ -static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high) -{ - static gen_helper_gvec_3 * const fns[4] = { - gen_helper_sve_zip_b, gen_helper_sve_zip_h, - gen_helper_sve_zip_s, gen_helper_sve_zip_d, - }; - unsigned vsz = vec_full_reg_size(s); - unsigned high_ofs = high ? vsz / 2 : 0; +static gen_helper_gvec_3 * const zip_fns[4] = { + gen_helper_sve_zip_b, gen_helper_sve_zip_h, + gen_helper_sve_zip_s, gen_helper_sve_zip_d, +}; +TRANS_FEAT(ZIP1_z, aa64_sve, gen_gvec_ool_arg_zzz, + zip_fns[a->esz], a, 0) +TRANS_FEAT(ZIP2_z, aa64_sve, gen_gvec_ool_arg_zzz, + zip_fns[a->esz], a, vec_full_reg_size(s) / 2) - return gen_gvec_ool_arg_zzz(s, fns[a->esz], a, high_ofs); -} - -static bool trans_ZIP1_z(DisasContext *s, arg_rrr_esz *a) -{ - return do_zip(s, a, false); -} - -static bool trans_ZIP2_z(DisasContext *s, arg_rrr_esz *a) -{ - return do_zip(s, a, true); -} - -static bool do_zip_q(DisasContext *s, arg_rrr_esz *a, bool high) -{ - unsigned vsz = vec_full_reg_size(s); - unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0; - - if (!dc_isar_feature(aa64_sve_f64mm, s)) { - return false; - } - return gen_gvec_ool_arg_zzz(s, gen_helper_sve2_zip_q, a, high_ofs); -} - -static bool trans_ZIP1_q(DisasContext *s, arg_rrr_esz *a) -{ - return do_zip_q(s, a, false); -} - -static bool trans_ZIP2_q(DisasContext *s, arg_rrr_esz *a) -{ - return do_zip_q(s, a, true); -} +TRANS_FEAT(ZIP1_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, + gen_helper_sve2_zip_q, a, 0) +TRANS_FEAT(ZIP2_q, aa64_sve_f64mm, gen_gvec_ool_arg_zzz, + gen_helper_sve2_zip_q, a, + QEMU_ALIGN_DOWN(vec_full_reg_size(s), 32) / 2) static gen_helper_gvec_3 * const uzp_fns[4] = { gen_helper_sve_uzp_b, gen_helper_sve_uzp_h, From patchwork Mon May 30 16:06:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577266 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp430583mag; Mon, 30 May 2022 10:22:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE1mpZNjhClsC/iyMzcVlS4W4UdiF23ES6wXaG7+19mpFQDgoaSOT1UJXevF5Gk/LEDVQU X-Received: by 2002:ad4:574b:0:b0:464:34f6:57cd with SMTP id q11-20020ad4574b000000b0046434f657cdmr12687101qvx.118.1653931327585; Mon, 30 May 2022 10:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931327; cv=none; d=google.com; s=arc-20160816; b=wx3l9PxDn/fuDuolN+Cx2mzo6oTlEzb0mpU8Z/lUIQWAGpOCiy7C3EiuNLpOAacYUJ zxui6UCssdG5uaHk6ht85NzuWWqjvtdTF+XWcFJWi5o+Vzo/wbprLqrca0M/JesFt0qj UaCkVughrqwOvhHbbhtuOhtf9W08oB8YgwfXAk1H/W4XXqCml8qfehoq1bD2zYKuQQEB GnZ9DSazlMfIaDAVmefE2LcyUGvqg9XVCRIl9w+plkV2yYsHTSjqhi5haGT8D9Gb+mqR 3IDIhp4GQ+tmsYJ5S9Mld4vVTMSc09malfbsP2NIrMPwRqju5Ff7DWF3KIOiVnCiZB4L wWKg== 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=yFMd59Snn9i/SI22nQsnQ//y31NfaU+pmwjMbQTtNXE=; b=N+KKY4aIOKOvT1h2OY2EfQ3kOpaJvYwru9cwp2DOFLb0Uvb5T6IakxoSZ8pj5EFliJ xxTxkGFGGKuGc+ldiACaQgaLeseT/JZ8Ocmf3UKW+OlLsIKN5av2XlN79FyWvRRwrwyD elODUZCM4sFsjYio9U4wEMzT4f5GQKQwAWfIPSxkrtAD6J6dRgEsLFPUgk6YCIVkddDF ccSCOJl5thlWzg3gE0LwXck42mey6dq7NnFUOW3xcniGpMyH7a2mBZAFHPOw+i7xauSj xqkNaw7DdmnjsQLpFhj1wwBwHoBePurnBzEAxGI0dvbxaRqgtBkjuiw/r73QRiKX1HFx jjgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EGFQ0feJ; 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 h20-20020ac85e14000000b002fc962f8924si7889405qtx.468.2022.05.30.10.22.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:22:07 -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=EGFQ0feJ; 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]:37382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj5i-0001Wd-IZ for patch@linaro.org; Mon, 30 May 2022 13:22:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0003rF-Uh for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwF-0007BN-4Y for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:18 -0400 Received: by mail-wr1-x42a.google.com with SMTP id t6so15296903wra.4 for ; Mon, 30 May 2022 09:08:11 -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=yFMd59Snn9i/SI22nQsnQ//y31NfaU+pmwjMbQTtNXE=; b=EGFQ0feJozjvOC7bJ/cMYjwSO+Ixet8387ROzdv3e/jveHY8VOJAZkZEsOxjaNtq+e U49KQVc3ICUM3hmgdpuTzX1GuabUPGWnHvr1+AciDAUBD3RmQ1AbdGQ8KoxZdF3P0Mmk XUahGlK4eqddrJnuovconuqE7sb4ER7RkYAFdg7vHtqQaDs0UjbPoF1Fz+m8rRBlX6Mp eRGr+aiU6ZBbkeko9jbdPzviEnsRYOe6+agmlIUVvm6vptL5+Ow6E/HxzyfUDqWBGnBc FaaC9/jpN7Z3t9vyyZEHZceWysHKlf+6LRfzXbFkUl/iFV1EPCQiEfKnhGg+S8lfupjl Tmjg== 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=yFMd59Snn9i/SI22nQsnQ//y31NfaU+pmwjMbQTtNXE=; b=7FMCkGljP4m4i138VSpUJ24gUEOkCV6a8ZmPOj/Opcmfi1/VO/79774Zc38NG9kiuU CL17X8rJxBIaVgBp1Lm/u6D/dyS8JbXks6gL3FTNTeX2gem72jrMh5QtwOiaqSmQK1JZ 7Yc0PSFstYG/qQMw7wLtDwnCwI1ap+54yjKfsh9ArRT/IAtI6Su4gI17ditfBqjuY9C1 Vyxv85TXl/OW0mKtu8xAY3nMvGF6EESoQVPk8iZ05km1sPegO2nSJcCj6KDID7kQ7G7u AARbAONzVJFH/ZcPGbz/jtrgXdPYG3tpbKu0XSQ0H7CA0V5cfyKdKY+cr9zYkMoTwMxS 8fYQ== X-Gm-Message-State: AOAM532ZlrDaGkaShJiFFgDLOLYJ3lYyv6E+XatqrPqip8k7+XgspR68 eQsY6v+la8vBd8DaeGjUIpjls+hJ7J4g8g== X-Received: by 2002:a05:6000:1d83:b0:20c:d508:f55a with SMTP id bk3-20020a0560001d8300b0020cd508f55amr46892214wrb.217.1653926891105; Mon, 30 May 2022 09:08:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:10 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 063/117] target/arm: Use TRANS_FEAT for do_clast_vector Date: Mon, 30 May 2022 17:06:14 +0100 Message-Id: <20220530160708.726466-64-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-61-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 7c9deb267fa..51358667984 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2492,15 +2492,8 @@ static bool do_clast_vector(DisasContext *s, arg_rprr_esz *a, bool before) return true; } -static bool trans_CLASTA_z(DisasContext *s, arg_rprr_esz *a) -{ - return do_clast_vector(s, a, false); -} - -static bool trans_CLASTB_z(DisasContext *s, arg_rprr_esz *a) -{ - return do_clast_vector(s, a, true); -} +TRANS_FEAT(CLASTA_z, aa64_sve, do_clast_vector, a, false) +TRANS_FEAT(CLASTB_z, aa64_sve, do_clast_vector, a, true) /* Compute CLAST for a scalar. */ static void do_clast_scalar(DisasContext *s, int esz, int pg, int rm, From patchwork Mon May 30 16:06:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577286 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp453232mag; Mon, 30 May 2022 10:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2CNP4tw2U1KkFluC2V/FLShiS1+U3gRluEKNTOpeUEFSab1tpvenqONNs2chyZeJDkY4r X-Received: by 2002:a05:620a:4084:b0:6a0:4561:399f with SMTP id f4-20020a05620a408400b006a04561399fmr38467547qko.569.1653933139300; Mon, 30 May 2022 10:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933139; cv=none; d=google.com; s=arc-20160816; b=ijbmAWZGGZWw5x+tWHGg3T+XfTDSNBuSxekmTj3YwuUIiVjsAjQuISRkKEzskpxwSm EVfnoPyckj5rSnFlrEv5thqLjJNvURxzAtOh2i+d1fmL4egERDLwRe6B1lyh6wfphInx MWjN9SKOFLM5EFbNfIV/W8f7yg+iVpEL9n3tA1Ql2/IzCNm+VCb9TcS7mHI1qnFcL+a/ 0EsLqjgd1EUYB0CyNiYeHVd+jzyRmbLw3QJV5O2LyKIuJx+2LOeezCreEvYwl7VgvtbJ zx2Qn6stBjj2bdYVt1fkzDxmyJ2R7pgQsN4/8EhqUDC2QPC/UfLGiEYsnTRqx3Y3xD6d fRAw== 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=ki54UcxWl0FdreHIfC41FultY1F0rbDsTYQ4JxUZVYw=; b=hMxE7bVGIeCW9Mhje5NhmXATz0dYfSJ1Hh7RpqYIgPwwdt0KUk0KpXS8j56dPTYCsv chnoD/NduxSdwbuSzh1Z4f8JqSsftdodHhnwfnZKg8GBc4Fb0hR90UR/0+ImoYyZbpsZ +AqS85Geet/pkFzF3cQQnuZ16D2RBuz8wUbCH8BCO17CQhPHmA08eXMHgqf7MohTvSjC DUSS27MWvJnTISB+rB1oFA3kd7ACA3y3zuAxlxvr57H4Oqx0xClb3tJyrgj6JLWKkpbf jkzt/zU00g7IkRKocyJokAgDy6fQwkAw0KRoP2qvaUES7bNpAMmf1/3cYwp9qiB4L1/U I3bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CyPUSUDo; 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 p9-20020ad45f49000000b004645b2f7de0si636002qvg.561.2022.05.30.10.52.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:52:19 -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=CyPUSUDo; 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]:39910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjYw-0000K2-US for patch@linaro.org; Mon, 30 May 2022 13:52:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0003tg-Qt for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:27 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwF-0007FZ-54 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:25 -0400 Received: by mail-wr1-x42d.google.com with SMTP id s24so7955976wrb.10 for ; Mon, 30 May 2022 09:08:12 -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=ki54UcxWl0FdreHIfC41FultY1F0rbDsTYQ4JxUZVYw=; b=CyPUSUDorbwlXv5oQTHgEEzskO3rSBH0xMNrLEisYxzvQkeRkqhVyhtBmsk9TTtLxf KLt5QQyM0FhNjnrMJ4Lx5TlZ2FKfCr/dv0CxEN6R0hPujflf8k2ceyCZXVHT5Tv49neD vIs6lSRDtpY+cMIXLo/RlDsVAaS5jCTciKkBP/anRe5EDKOezSDgVMEX43+jiDnzUVya 6fDsbhHZIovvIxOFlVTxk3nO+Ev6hmGUGhaSwDQ1v0KGuDdhnBfZ9HjzAGRAkwJVK0Eq L+f7T1/RDWfRO5AjHIlUH31tuKIhLYr3s5OApnekGuLckZDfFdiRKxugRG69EFHbhCdV 85eQ== 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=ki54UcxWl0FdreHIfC41FultY1F0rbDsTYQ4JxUZVYw=; b=5NoivULg6iLkRk+gmHJmhKd/3GhgPJdkuoBtH7DnPhlX42ledsOnbZCj38P9M0BUjt 0PYTtl/K7gYxOhOZWpw80Ri1/Vwcyjaw9W0PvgFBb03rLY73s1Z/SEQgCr2ZtvbkPwEN voA+w0QyMX1flvXhTdhaHnS6Fex5Nw6QRsd4/Jh7q/kwLuAT2ci7hDxrJBPAiMmvfRoq b3e8k/itF7FXlUum+sFrBqrz0Z7r+gw7AzZAPWIYYxEnISyzIMD1yVGfMjX4HNmsAYeX OJ8lwrV9fcwS77E/E5bjZp7d2IzWdIJCjuE8YzOZ1EL7AfFTdwjQhWhxtcl7RUP2ISwP +0CQ== X-Gm-Message-State: AOAM531SU0VuUH3/tn0TWJQ+ELOrI3actGDw/kbkpZVIJSIPBDK+9rdM qDwYeb/U/076xW+RczliMlPMXaBLN1ajAA== X-Received: by 2002:a5d:47a3:0:b0:20e:5c89:9da2 with SMTP id 3-20020a5d47a3000000b0020e5c899da2mr47915657wrb.277.1653926891846; Mon, 30 May 2022 09:08:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 064/117] target/arm: Use TRANS_FEAT for do_clast_fp Date: Mon, 30 May 2022 17:06:15 +0100 Message-Id: <20220530160708.726466-65-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-62-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 51358667984..21c2bd099d4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2542,15 +2542,8 @@ static bool do_clast_fp(DisasContext *s, arg_rpr_esz *a, bool before) return true; } -static bool trans_CLASTA_v(DisasContext *s, arg_rpr_esz *a) -{ - return do_clast_fp(s, a, false); -} - -static bool trans_CLASTB_v(DisasContext *s, arg_rpr_esz *a) -{ - return do_clast_fp(s, a, true); -} +TRANS_FEAT(CLASTA_v, aa64_sve, do_clast_fp, a, false) +TRANS_FEAT(CLASTB_v, aa64_sve, do_clast_fp, a, true) /* Compute CLAST for a Xreg. */ static bool do_clast_general(DisasContext *s, arg_rpr_esz *a, bool before) From patchwork Mon May 30 16:06:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577261 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp427562mag; Mon, 30 May 2022 10:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7MIoao128qtge4y++spcyWCbsFMswTPFiwXrB/O/pEQTRGGrz8d0nOzyIBHkG5PTZPAMm X-Received: by 2002:a05:622a:44b:b0:2f9:3af4:d451 with SMTP id o11-20020a05622a044b00b002f93af4d451mr30400217qtx.587.1653931068550; Mon, 30 May 2022 10:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931068; cv=none; d=google.com; s=arc-20160816; b=f0/kb71oGdThbW33/3S5K9u1/z/h7MTDyH4vFkduIoExy7JWbuXJ5Fp48Y0gpIvIic vbeoC7dvkWzJFajOLqH2WSY8lCGDx8JfHfml05fKGuoV2JXJD3/KkNsjXXOD4qMI0pSU 5f2bnSn2zkQOiF+Lfxtc260YY3FQTJ7XMiVdtJSc8Ok5hfVQ6KruPaj/hnaRUb2++Afj mttKIiRg38bbhZCgXbKW8NPDCpDDXra6jADU8KX9qtRds66A4U4kpcO3YQ8+0vd9PMy3 xgR3dhyvoRWe/9ty3UhQJQBz4FpADfIe4qfhSBMduO3NKePZtgBy6XwNBBM6odHYunHf 1XYw== 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=+UENaNdgRePKc8yIYGkxEQgJhGdyFoR6NwVFah5q864=; b=BM+mogLNDipURCzAD8q98nzWhh4KoRfTtDT6YOWjOi2+rriJRwGRo1J6KfjuyOyjE+ GfoC357YUgbKnngpUuMy+y0VIuLzbIt+/WHPE6rkOJGgSRBmd3ECFtNt6P/jAK+m4jSS ckXRFihbh8ywwxFHOjSmxEB3tx81N9U7rIiG0rzr98Bz6AVwmgXPKcaANUpibpPBlaSv M9AsdN+KVR1JY5u+3+DICfmDRknyo8U5h1RV5XSMifdxWZ80GsVreRYxI8CZNmMTafSD fo6JbwEqJVyJ1lIrTrtg9n8bHscqMEJwfpaONAs8YE+ephrbRWoGry42pklVIlP8KOi7 KV3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mleU72Xv; 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 s15-20020a05622a1a8f00b00303fd24eb9csi2672417qtc.418.2022.05.30.10.17.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:17:48 -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=mleU72Xv; 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]:54714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj1Y-0002Cn-3q for patch@linaro.org; Mon, 30 May 2022 13:17:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwV-0003yw-SM for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:32 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:42575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwF-0007I3-5S for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:31 -0400 Received: by mail-wr1-x430.google.com with SMTP id t13so15277690wrg.9 for ; Mon, 30 May 2022 09:08:13 -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=+UENaNdgRePKc8yIYGkxEQgJhGdyFoR6NwVFah5q864=; b=mleU72Xv9g31tZCOuI5Nohsc8ADFO69T/+U7JJgKmC2G19kCgRivsudqz0T1o0I1Gc S8NEZ7Pmxcy9w4mWw6aekwyeGuytHZvA3Kwk7fjWJgLcGJm/vKrpHXa8kXGCdBgXVRTR b2PR3VTKniUJUioVF/Jtazu5tiZ9LHlQhUnaRpoS+AhQCcsoIWLyIr4J85TzouGlA2Mu GAY/dw66N572nT8UK1+BuOEnQLqVkJ72xvziQgZYKMDglRcJXNpUIyjmOD6isMgEWzpX Y4jUHD/umNZW6Tqo/SfxcGKhUyEq+5tHikFQdoc9oZ2rpDH9SmbK/tFNZgz5rhn/dSSb iCpg== 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=+UENaNdgRePKc8yIYGkxEQgJhGdyFoR6NwVFah5q864=; b=b1j3D1AW+6n3c7hkWldgl393v/0lCHPH6hEFWxFuYR5L57A87k+/mkFbjicRZJBipu ERrCg3gE6Q5Msv7PFIcGKXrddkUoth1sag1hGp+IaEuey4zwJnaKuOvH7DOzxtzhTySz w0ZUc4ukgIZq0m2fr/5lXZYuStab5ogEHYpUIebzfwSA2l9AJgu3d/FlF1iOH1YRF/wC QVHqeXQkDlX+xmeOivGE6pFcelEcJzDXJcE/KHqygoLx/ffFbyoLeqbKR0bbUoreuU8N ES+rVDYRftq4KmxReQ7Ir4Z7guMgUCoqoTSWw6NkSl4PrJZCPzO4OP9cx+7WMvmPy7hx mvUQ== X-Gm-Message-State: AOAM531RmmCXcGcI7kJR21K5yoSBq6y9kQqN0ZiGNmCYS4jvdm2silV8 J22Vvc41BwTe22lG1/vy836KI5Pb3+voyw== X-Received: by 2002:a5d:47c5:0:b0:20e:73a0:79a0 with SMTP id o5-20020a5d47c5000000b0020e73a079a0mr43525665wrc.632.1653926892571; Mon, 30 May 2022 09:08:12 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 065/117] target/arm: Use TRANS_FEAT for do_clast_general Date: Mon, 30 May 2022 17:06:16 +0100 Message-Id: <20220530160708.726466-66-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-63-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 21c2bd099d4..f5453e99e15 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2575,15 +2575,8 @@ static bool do_clast_general(DisasContext *s, arg_rpr_esz *a, bool before) return true; } -static bool trans_CLASTA_r(DisasContext *s, arg_rpr_esz *a) -{ - return do_clast_general(s, a, false); -} - -static bool trans_CLASTB_r(DisasContext *s, arg_rpr_esz *a) -{ - return do_clast_general(s, a, true); -} +TRANS_FEAT(CLASTA_r, aa64_sve, do_clast_general, a, false) +TRANS_FEAT(CLASTB_r, aa64_sve, do_clast_general, a, true) /* Compute LAST for a scalar. */ static TCGv_i64 do_last_scalar(DisasContext *s, int esz, From patchwork Mon May 30 16:06:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577284 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp449816mag; Mon, 30 May 2022 10:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8UJhN0sBoIl2aL9Q2zig8Cv5EZqtFMNRSwUUQMdhOJwVdIjn6aG7W9CFXjZ472wPj6jys X-Received: by 2002:a37:aad4:0:b0:6a6:22b9:c400 with SMTP id t203-20020a37aad4000000b006a622b9c400mr5136180qke.706.1653932830455; Mon, 30 May 2022 10:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932830; cv=none; d=google.com; s=arc-20160816; b=ZJcINBqlw+QfJOIeyQUQWQ1/G68rvkp0myo8Dtb9JslM1T+6lGJsKB2IKfvrdsTv19 9IPe1YJaI78Db753njO7X2qrNUOIQT4Bx5ubIimlI5buoE3pmlkc9UJGaloeLcmgI1Bh YM3xy/Z4wi1rF+1hPyMkp++l9APqqu7UW22rm6g4ymS8ZUeYdh2i/Ms+uTWUrFW3FqAM UyjTwWrXtQGv2h0cJ7Pb32uO311kZi0cEno6KzeiOHvlfHaIEKDfdvXt5GkC/0Zo7oiW 7fWBjOUh5pMckU47KOgBdq/gc41rv9yMEwII96BeXSH/lnnh1otIcHvHjere2UNBvvUT 3ymQ== 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=CmEzCmuZbHlYMfmNK9AR6WHdmSkHcgr1OmRx30bZjTo=; b=K31oKAXoVjL49jm4AL5xVruLd7PTEFKtLzITaVrjHQ8UkiEiZeHeO/k3pQlZIwpH7D ksfzAEd67gYo1kDF6t6rzwZtPP56dNoi50LCFb44XtjAvlx1UvM0OFolCHmxQdgdKb2p W6cbBmbP8EY/Q8wnKKSDbMFbQ804jVokzhwMy+wZuIGu51cKDJwE8wO8tpf2/NOzjqNz GIXG7DBA+z8r2LA/EY35YlHRuI6wf+2LazJy2zqD/zK5ajaB5zQGdefUhQJJ3aNYQU0P mEWos4Nh6031j0jZsn9/d9AqU47Ao80/hdEKBpWfUxY+SzFqwz9YxT9ADxuR0g6O5fY3 RVEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pksst2fc; 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 e9-20020ac85dc9000000b002f93eddaa6fsi7282302qtx.197.2022.05.30.10.47.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:47:10 -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=Pksst2fc; 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]:59812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjTx-000314-EC for patch@linaro.org; Mon, 30 May 2022 13:47:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0003rB-EJ for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:42584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwF-0007Mg-Va for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:17 -0400 Received: by mail-wr1-x434.google.com with SMTP id t13so15279904wrg.9 for ; Mon, 30 May 2022 09:08:14 -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=CmEzCmuZbHlYMfmNK9AR6WHdmSkHcgr1OmRx30bZjTo=; b=Pksst2fcFAhzqXWZM6jgvpM7nkkZCmocRrmnxPvNllt6bOkC4G5Ptti3Q3Gnm/QoPo 0++MFmQPUhFgTWDPTHQp+FWKlM57kvPQYZYDWWQWTDPyV3IZ/WrNkHDxX+crXOuYq8CH +WyZ8Uq+tH3tkMXbzBunwK6AGS+r/VoMiiCI6Mf7HygVsY4NaLnRwSo/Y06uSt1tdciO dD9VcWcNDfEHd5cYeHMKXffrdPz2AlATAmfLiTl9Kx1mGRf3cbdVYXgHe5HaH09C3AdS jso4IOekRJa5rmOTttwOmWGL7FG42i1PrBOk4rEB0tiwv8fw88BHszL8E6z9sR3QpBe+ UHxw== 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=CmEzCmuZbHlYMfmNK9AR6WHdmSkHcgr1OmRx30bZjTo=; b=AUAXKkvUW3puhqA/am+D1Q/lLbzVn0otZ4m2S/isX3rN8wMd6S4pKaFXsm3yK3DVt+ NoPnkx3LkvJzgpqc3WPNCUoII+snongW/5NHwz+o53RLuMTH9evNBiomL+NuOHy5T5C8 kHDKGEgi5hdkvsXtJ59txFQMh8+1QnehZado/PzoorGa569BOp0JSMhlLdh8yWN/+r2r kZxpKxFWdE7JvalZ1a9g+hYUd7IKw5w6N5I+R0/ECR+0lNcl5jroKHUmftcHKoQYojYb gSwFXDjyvG4mAJaRs5bFt4rvOYhjh5RCiLByvbQQStayADDBmRgkX5bJlRdJmIqUzN4c Gong== X-Gm-Message-State: AOAM530nyvtI/4y4/o1aH+pxnxJUBK0ZM/3gciOXWBfXb8hvrnSq9/1n RFYzd4DEDj+tTRDXsCjdojwoNpWXyW2FXA== X-Received: by 2002:a5d:64ab:0:b0:20f:ef37:a9d1 with SMTP id m11-20020a5d64ab000000b0020fef37a9d1mr26046539wrp.197.1653926893305; Mon, 30 May 2022 09:08:13 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 066/117] target/arm: Use TRANS_FEAT for do_last_fp Date: Mon, 30 May 2022 17:06:17 +0100 Message-Id: <20220530160708.726466-67-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-64-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f5453e99e15..841c1b56449 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2608,15 +2608,8 @@ static bool do_last_fp(DisasContext *s, arg_rpr_esz *a, bool before) return true; } -static bool trans_LASTA_v(DisasContext *s, arg_rpr_esz *a) -{ - return do_last_fp(s, a, false); -} - -static bool trans_LASTB_v(DisasContext *s, arg_rpr_esz *a) -{ - return do_last_fp(s, a, true); -} +TRANS_FEAT(LASTA_v, aa64_sve, do_last_fp, a, false) +TRANS_FEAT(LASTB_v, aa64_sve, do_last_fp, a, true) /* Compute LAST for a Xreg. */ static bool do_last_general(DisasContext *s, arg_rpr_esz *a, bool before) From patchwork Mon May 30 16:06:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577243 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp415595mag; Mon, 30 May 2022 10:03:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjPP/9swNd89us0ipIjW7Sp2Q0Kmn6MSLkQCRV1RiTVdWD+s0y8K5QDAJYLorUrbqt3veD X-Received: by 2002:a05:622a:1a29:b0:2f9:32e4:52e with SMTP id f41-20020a05622a1a2900b002f932e4052emr34283972qtb.689.1653930199150; Mon, 30 May 2022 10:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930199; cv=none; d=google.com; s=arc-20160816; b=QpSSc4UJENDXZXb645EyoUNM+ncyga1EPJBKdX/qUzoD65mxzVaO1RGF7OmWYcwglT R59KVPE/pgE8aS34a4Y2qY1Wv40BLwSQfZ91M835NP4VitqwuJDZZC8+ZRsOAyapikXq 5zgh/H9BfVuLq9+9cvFL6rIQu7Dph81MpCn76gPkm+NqIrtlLravOj0S38+vyQilK7kx l8nlq5vZ82laBqQmyoQV3x8ZFm2nU9UBcUJUu8MEwh1l4zF+ePaOAPetqYuWFzZOmwiP E8JSQwRwkhrVfeQ9dGEGit6GiGt/dpbVXo+lDwOnvq6j1F+hrWXTYDu88tp2gkTRKVmD cKzw== 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=c+q5vO24GGsa56q9xbT6G/615HUPExTOfoQ1VCUsGhU=; b=iWgC24W2bo1FSbZE7wZSxfgKCtecG2yBDkqjBQMnQxJiVAGiSF2WGKZyhIsEgZLA6H 2sWlDaCl5F0sBEFkdJ2CA+E2SGJWS30q/Y27T2hJ4qkGm0CHC90IwBM+KoR6G6j5NSsm uKY3bUJ1yujvzIbr+CpDnWZKsOJgInuS9IWBfGD4t7rTRGzzwpffzCYQSH4hY5YhlFCA 7wPQ4xkoo8eJEKAZZWaXPitJvjiJuDNCWjF3GIdRxD1vDdpBmsFZGix0YPt+thmHKVVQ uETDFeThzOWJrTeCQG0ZpNnf4gYU8e+9q4ZMuhYGfj2Gcrl5BdlIkYnNIGuimakBehpb VfGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wXMMv4/3"; 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 kd30-20020a056214401e00b0046229c316a3si6981582qvb.284.2022.05.30.10.03.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:03:19 -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="wXMMv4/3"; 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]:48192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvinW-0002ys-L0 for patch@linaro.org; Mon, 30 May 2022 13:03:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0003rA-Ee for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:43834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwF-0007Mm-Vz for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:17 -0400 Received: by mail-wr1-x429.google.com with SMTP id s24so7958985wrb.10 for ; Mon, 30 May 2022 09:08:15 -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=c+q5vO24GGsa56q9xbT6G/615HUPExTOfoQ1VCUsGhU=; b=wXMMv4/3WPLVS+THfCbHxuYsykQhG1N1Ou0p5mMjHvKrV4GU831NnnVlGuB70pXdA9 djvH0Kmp+Qnnn83Dp0SUEC3y+I66g0Ry++efrpoMQjKL2D2EqklyHwwJvp6AJOPt2j4v PdsBskuIYJ9pZ2GqF/YgkxlfbHA4Pr1DAR48ErU+ltim39VTVD13riTxjzGYCHUA44AC wgk61Dbi1bY4kGQU70KNVNZJOkZeDi7CQukTzZUUge3XYIhL8oQ3HOlnPfOxfP/1lSOp 6TlBsOGW8v6+SaoPhH3ZYnPlNix6iSmgG//WCmPu8gB5USPtMDAc30Wes6AnzjRw6JEc gKPQ== 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=c+q5vO24GGsa56q9xbT6G/615HUPExTOfoQ1VCUsGhU=; b=Stt7RvVQhR0XutVbUrVfTpgnkToluN0YomSTguc+DHV1iRIS0/1iUjBcWJtVwrNzJo Uhzxb+x0TSPqpA2zc9wCoUPooMNObAeiZas/Ktri2EM8zyiOhbVem2TZrT0RmxJXWW7x +J8IqyUFjjP9amE/q0JdHmFMRYQe3lGGmSemP5/GedEckAoxtDe6N7nO2mDTEanWQTHO 49MSsCz9gpwaXJQPJ8M6YFepqrfeCIzS0JI2G6pCGRyBV6A+ZpBH4QVJrajLgwOrWtJp HEuwSsTYiCZ4OBP2Lgfx6UUmivBwrkWWQc4dTn0GXXxkhoUE3+uavWXhm3EuOBQOjeE+ qavQ== X-Gm-Message-State: AOAM530bhtBi3AQjj9kMZSLsu+9cSDdjaofTXvxS+8reR7EP8+UosXWM LKmsBpvD7olP7/IkLKX4kFrRhLoJferRIw== X-Received: by 2002:a5d:58c2:0:b0:210:2baa:52b8 with SMTP id o2-20020a5d58c2000000b002102baa52b8mr8198900wrf.20.1653926894038; Mon, 30 May 2022 09:08:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 067/117] target/arm: Use TRANS_FEAT for do_last_general Date: Mon, 30 May 2022 17:06:18 +0100 Message-Id: <20220530160708.726466-68-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-65-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 841c1b56449..caa587506c4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2622,15 +2622,8 @@ static bool do_last_general(DisasContext *s, arg_rpr_esz *a, bool before) return true; } -static bool trans_LASTA_r(DisasContext *s, arg_rpr_esz *a) -{ - return do_last_general(s, a, false); -} - -static bool trans_LASTB_r(DisasContext *s, arg_rpr_esz *a) -{ - return do_last_general(s, a, true); -} +TRANS_FEAT(LASTA_r, aa64_sve, do_last_general, a, false) +TRANS_FEAT(LASTB_r, aa64_sve, do_last_general, a, true) static bool trans_CPY_m_r(DisasContext *s, arg_rpr_esz *a) { From patchwork Mon May 30 16:06:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577235 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp411415mag; Mon, 30 May 2022 09:57:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO21UXdfJ3a1hReJmKcw3ANNW2c8wc6WjwyOYdgRam1UgD8oha8DND2R6NXzC5y/qS+heB X-Received: by 2002:a05:620a:746:b0:6a3:8939:b82b with SMTP id i6-20020a05620a074600b006a38939b82bmr26920345qki.319.1653929867056; Mon, 30 May 2022 09:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929867; cv=none; d=google.com; s=arc-20160816; b=vJaiK3a+O9pxnoLrl3mm/JyEd0ApRzctT1xE902CP1uNq1qjPSAaoLVqxfJzgR+lSK /gzVdzA/PhXWSax1mx/Z+wV34ISe+hGIHyWjS3iwwMB1J0cW4ZAR+tCRtNwhwllajImN YAmlq1uWLmPYF01DhXZYepY9ybwnol0YZpNM82NcczFrAfJhvNV+Iq0buJfeCZ6XWJzL tDSfbK9uf+4+ctmaQ5RxHTvfSJfTRrmjtpSH5WNWXn8D3rsLtX/8WW7hxlSn53GXsJz7 dhI0SRf39Ns5ggErPW2O8nX6E0YX9oBsw3yp8x4rv609pyaCluu4A17g2FDB6iGYebhP FYiA== 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=N2EMzwUbSz2wYg9OsvTZrafs2t7/0p40URA47hEKcmo=; b=dIjL++xbO5q759hKmlo+GY3tJ/f7aPVSzBpEUTC5mpWdF8kooL4rmWy4OulnaTafRt NvSdLGa0GKPBFfXkBnyyIgYMsxZD75rcpIwTZqHKganfQX8y0Qg6caTE8Zyd65FUb5j3 06PX6nTSFAo9J7TH30RfZ9yoZLEhUqmvE5QO/9Js4T/GvOQHq9C/ntGNYyCDHtAPu9j/ CXDqIqhQOhqMRYG+bFl+meR4unIRwxeV1Tfa5oz+tCi3Ub0qhNBknNZIre1ow/eDei7X CDOOnSgsoc/785Ce2GQzH4nrN9aPNWJRc6qb026zYq/e/raXyJctMExRQOjbx4F5pPha 9tJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eW+1Wpaf; 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 a6-20020a056214062600b0046241f4b2a5si7635473qvx.542.2022.05.30.09.57.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:57:47 -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=eW+1Wpaf; 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]:59298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviiA-00084E-Kd for patch@linaro.org; Mon, 30 May 2022 12:57:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwJ-0003rG-Pq for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwH-0007Mu-9B for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:19 -0400 Received: by mail-wr1-x42d.google.com with SMTP id s24so7959037wrb.10 for ; Mon, 30 May 2022 09:08:15 -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=N2EMzwUbSz2wYg9OsvTZrafs2t7/0p40URA47hEKcmo=; b=eW+1Wpaf6f9p7tvcr5cMmtWcMDy4KX/ATxUW8CfLP/4QDnHTw0qUeE1XUv4yDIIEvF y6GJ2BLGubS47SCYYCsDtTf+DGYgmmozJR5Dct16W4rujKZmoExhOHnHDEZIZZseX3eY OAzTarT3jpXkzOU8c/Zo3ZcCXEbNfYczklR+P+gpImlzy/FubLjrJ9Qi2T5MemGYhBp3 NfuI14kikBlVc2SSEOhJI7iwbwJlt7J9Ofb8CuahTy6X65Gh69zhQFT0heTU5srUVNvd 3zzvD6HENBStGxNn+/E7ukvnoyNYwU2ZKdO6ejUuEMcEVvyMZXqX7vnC/PCUpSegFl9T lk9w== 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=N2EMzwUbSz2wYg9OsvTZrafs2t7/0p40URA47hEKcmo=; b=XaD15/XPGmkwvMUAZmDbKbHD7QM4XhnOwlctDyNX7Iz165MxHNE8SMok5EUR79/CCC mhbNTo4LJehRTepnappMHU4BCr+K+xUfnkWiqBTvsi1ZZsNReMaUEc2JxoPlj/jPUFCW Lp0XxSK7kBgzgh2ZqhV+34FShoavVkdtzp6bFPxTXb3dt2EUZVDIWG58YUYhf/FsuHKp aOGCMN4Ko8DoldZ3oHzIHybAEu5jkg3S2PR+vU4r02vC27/N5MYuBq586EytCA/Z3yVg 2WGm0Re3SyDtsedgzd5nI9O88scqNh0kMwcOCCytR6gCt95S+71elwlz+Le56GrzCbQ2 TdMw== X-Gm-Message-State: AOAM532oyAsV5/P+P2p5ERy14Ktb51EVO7ntX0waJ6EQY+t+Nw2x1xO0 nWsBQi9vxpiGlT/Zuo9MUYnzD8uEnS7YIg== X-Received: by 2002:a5d:5150:0:b0:210:1d71:3dcb with SMTP id u16-20020a5d5150000000b002101d713dcbmr13143281wrt.412.1653926894758; Mon, 30 May 2022 09:08:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 068/117] target/arm: Use TRANS_FEAT for SPLICE Date: Mon, 30 May 2022 17:06:19 +0100 Message-Id: <20220530160708.726466-69-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-66-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index caa587506c4..8eb70fd56f3 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2658,20 +2658,11 @@ TRANS_FEAT(REVH, aa64_sve, gen_gvec_ool_arg_zpz, revh_fns[a->esz], a, 0) TRANS_FEAT(REVW, aa64_sve, gen_gvec_ool_arg_zpz, a->esz == 3 ? gen_helper_sve_revw_d : NULL, a, 0) -static bool trans_SPLICE(DisasContext *s, arg_rprr_esz *a) -{ - return gen_gvec_ool_zzzp(s, gen_helper_sve_splice, - a->rd, a->rn, a->rm, a->pg, a->esz); -} +TRANS_FEAT(SPLICE, aa64_sve, gen_gvec_ool_arg_zpzz, + gen_helper_sve_splice, a, a->esz) -static bool trans_SPLICE_sve2(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return gen_gvec_ool_zzzp(s, gen_helper_sve_splice, - a->rd, a->rn, (a->rn + 1) % 32, a->pg, a->esz); -} +TRANS_FEAT(SPLICE_sve2, aa64_sve2, gen_gvec_ool_zzzp, gen_helper_sve_splice, + a->rd, a->rn, (a->rn + 1) % 32, a->pg, a->esz) /* *** SVE Integer Compare - Vectors Group From patchwork Mon May 30 16:06:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577249 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp419801mag; Mon, 30 May 2022 10:07:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9jkPaqTRlfVPTe/8iUbRvRROmQ3/upsZ3kwn9aa0wiSx/791PkEPYKppZjiYjO/gKspcX X-Received: by 2002:ad4:5aec:0:b0:462:178f:b800 with SMTP id c12-20020ad45aec000000b00462178fb800mr40102405qvh.61.1653930475375; Mon, 30 May 2022 10:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930475; cv=none; d=google.com; s=arc-20160816; b=JZLcx7mZjQ9AHzOgitxHHLrimHvPmFFAdh+0yFGM+CeHHcd7oJqAKw5KpvzzWLtkk7 NvjkflOlt4bMSe7axtG3KiIQjrhOLBJcwDG+xnoJK4fhVNPfKrttlL37a4EDZVxYfsPz hNKFug4IH3IFlp6RNAX6mCujUi24KnA3J97dPLhSZqm+PJ+yIhb9Vc9ZIjZzb03II3Qr /+nmOkxhtbNfvpmyOe74rXJdJYvvBXCcuLTKJdM/UyAihrPq2y9FJLsH8bdphNYFgZIo VaAZmr8QQ7nf5NJzrcTKUsQGA6qsy14uOZLEuvUc7CTHnppAlaLZI7IjcovO9sH5iPxF vWeA== 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=jX1VY9irDKukPw2ECyFXaYeY/8d01HGtejc7usmp6pQ=; b=Ec5xGjf8H65fLH8brqONfF6JY2jXFMrz6tIbES/Y2saGVxk58iN65tgqNuLh4uu5sh wuK9f3h4Ng2NQVcXNWCeYIu4wTi+1210ym6vhIsN3PSG5eDHXlsiEWgZo5o0eqHFFvSt 6v4b3gK0K9bkRMyfdpbjbyNe22AIl8ZPNFK2AoMo3Qmty+SXd8PLbu1qW17GWe3lO5tn Lx8KKMkKJs3AiVyepySFN0pgBNfy9B0gtkK2XPhe0JpvQo/KNlZTbUWf81BBNNZMUTEv Cl2zF8UW4XZZgm2xFptKWdRmz05h0aqXelzFln3UhdZ2xphNvDVtW3/A5uFj3MnAcVIg tn3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g51UPmF8; 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 kl14-20020a056214518e00b004565180db45si7204206qvb.586.2022.05.30.10.07.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:07:55 -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=g51UPmF8; 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]:56744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviry-0000Yq-OU for patch@linaro.org; Mon, 30 May 2022 13:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwK-0003rI-47 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0007Mz-2P for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:19 -0400 Received: by mail-wr1-x433.google.com with SMTP id s24so7959084wrb.10 for ; Mon, 30 May 2022 09:08:16 -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=jX1VY9irDKukPw2ECyFXaYeY/8d01HGtejc7usmp6pQ=; b=g51UPmF8j8ul83kQrNHNfiW5w+PaDj4DFD6AHafvA7sQvUyinFCAjjeSnNNuQCrFSL oXyXS1oAKaIAzj1ahnnjkxg08OaRnxgDdz9K3vRc4diRj0FPNMv5YpuYdqt5uiAgMiLK 8zPBcgtEbhiiZ3aWHf0I+wUnqGCHqPlCtsLfTBUqtKodfI/SBRrG8V2E7gZz1pIxNNk/ xyFcIkns8tcHsKiHIZvrWWqVGkYmNusmtN0l1gA0FGbKOG2IqLV/r68EzvUIJ3tQXaap x5gR+GL62IldrBpzlwJ475wwj/83vzYGnUdGKspEfLWfMpCuPlma+dQOR4eaOlxHLtM6 Fkow== 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=jX1VY9irDKukPw2ECyFXaYeY/8d01HGtejc7usmp6pQ=; b=ZC3iU5EryjSWnREvJJxYQhnf6ya4snE5ErIUG8JJjCiivEXhzNqYkVa+UpuQQplS1y ZHjx/W9nC65dt/4yl+arNqtJ6jnCxAagDtxbnHHzGvzDsgKVzuVRyuTr4lK/XKcKxecp qL3XpC5JASix9GZNp+jHM43YDMzp00s7t9Gt16fYVjF4LmwIvoDnSN4MuKLByMDyVcnD M8fCib9kHYiI1CXrM5m8M/krwEEMpLopygRq0HJ5la34pqNi5j9ujnqob1Gea3AbMAyt Cw4Zq0bQwBlUz1+J4hPKKpGZ4w4fPbcKzfjlEhuPq5yG1iemjXTsCSgUVZlr36xZOc1s V/8Q== X-Gm-Message-State: AOAM533f4NXkYMN3US7foznrWU6QneueyCwfS2Lek0iwYQfmJFiZc9oD 298mxI6W0vhkt6B8yx7dNQYtIrXJ+YAjew== X-Received: by 2002:a5d:6c66:0:b0:20f:86f3:ea05 with SMTP id r6-20020a5d6c66000000b0020f86f3ea05mr40694488wrz.154.1653926895434; Mon, 30 May 2022 09:08:15 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 069/117] target/arm: Use TRANS_FEAT for do_ppzz_flags Date: Mon, 30 May 2022 17:06:20 +0100 Message-Id: <20220530160708.726466-70-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-67-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 8eb70fd56f3..73b5b67c250 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2708,14 +2708,12 @@ static bool do_ppzz_flags(DisasContext *s, arg_rprr_esz *a, } #define DO_PPZZ(NAME, name) \ -static bool trans_##NAME##_ppzz(DisasContext *s, arg_rprr_esz *a) \ -{ \ - static gen_helper_gvec_flags_4 * const fns[4] = { \ - gen_helper_sve_##name##_ppzz_b, gen_helper_sve_##name##_ppzz_h, \ - gen_helper_sve_##name##_ppzz_s, gen_helper_sve_##name##_ppzz_d, \ - }; \ - return do_ppzz_flags(s, a, fns[a->esz]); \ -} + static gen_helper_gvec_flags_4 * const name##_ppzz_fns[4] = { \ + gen_helper_sve_##name##_ppzz_b, gen_helper_sve_##name##_ppzz_h, \ + gen_helper_sve_##name##_ppzz_s, gen_helper_sve_##name##_ppzz_d, \ + }; \ + TRANS_FEAT(NAME##_ppzz, aa64_sve, do_ppzz_flags, \ + a, name##_ppzz_fns[a->esz]) DO_PPZZ(CMPEQ, cmpeq) DO_PPZZ(CMPNE, cmpne) @@ -2727,14 +2725,12 @@ DO_PPZZ(CMPHS, cmphs) #undef DO_PPZZ #define DO_PPZW(NAME, name) \ -static bool trans_##NAME##_ppzw(DisasContext *s, arg_rprr_esz *a) \ -{ \ - static gen_helper_gvec_flags_4 * const fns[4] = { \ - gen_helper_sve_##name##_ppzw_b, gen_helper_sve_##name##_ppzw_h, \ - gen_helper_sve_##name##_ppzw_s, NULL \ - }; \ - return do_ppzz_flags(s, a, fns[a->esz]); \ -} + static gen_helper_gvec_flags_4 * const name##_ppzw_fns[4] = { \ + gen_helper_sve_##name##_ppzw_b, gen_helper_sve_##name##_ppzw_h, \ + gen_helper_sve_##name##_ppzw_s, NULL \ + }; \ + TRANS_FEAT(NAME##_ppzw, aa64_sve, do_ppzz_flags, \ + a, name##_ppzw_fns[a->esz]) DO_PPZW(CMPEQ, cmpeq) DO_PPZW(CMPNE, cmpne) From patchwork Mon May 30 16:06:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577239 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp412740mag; Mon, 30 May 2022 09:59:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9AGVBcaO1Q0pJpmGY3th5rYQn3zZ71L1gnEh/SZnWCtZgYogAlYuvtMa4os7FBuIjPB5W X-Received: by 2002:a05:620a:2081:b0:6a5:b92e:9c with SMTP id e1-20020a05620a208100b006a5b92e009cmr15006948qka.730.1653929997574; Mon, 30 May 2022 09:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653929997; cv=none; d=google.com; s=arc-20160816; b=A5uCstW3Ukf4b3mEvwyS9Vxh/AbmF6BUFbj8wyq2p0JNFvJdKBCtiW2N/lupE019Yk EAcNOcWu+g6B9slKPnQP8luoe4JjamAiCVmkVqFz3CQEkghuxhN0Z2V0uRyFhABH3niS phRiLrJ20WdngR5e8Z0FItxp8vMLoayTiRZjrp197RJKE/Q13WCniIHyLcmZXg/WChVy dbyPQNo4/+i9FEvbIs9K4fT2WSz30Hn8gor5X8DlKDSjVQ+lU/M72tsB0e5caPdzuM2A xlvbFnwaozHV8jUB5mx1pQ38u62tGLBamAM5AJlFJ4OkvBN92YBmeX7d//w1EAHcTP4c selA== 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=DZMI81NOXIQjNm/3uSsk7ZYE64V08May20hDceafsJk=; b=mKpRRPX3azD7qyqj6fVbPOTf0ObfmixV40N7blLAG5NgZnUPaXHqu8kYGWiQpfJJk9 0L0iy3ydssnEArP1rhb5xytP+PBgX3yNosDIcswL1e73erWwKSKZ9SN8MQJ5Zs8Nm90L AQfpMvcRg7LZ/vpGR8oTIdsrNGfJWYSlAJ78/UIdmfjw14pPav5U0VddzjMoZkvAs58F MEzKezoSVtrHLSZAuCWEBBFso2mardyF5dGqr6Kcc9PUS24V6QWci/ckDTxYkDhPbvwM q2wLFzUeEYSK/ISi8J0lZMmTzIx/jITcfBcNDqvyMMG8An0ITY5gtCpvwH3cWxQoz6w8 eYiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P4o/Che9"; 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 h22-20020ac87d56000000b002f9357a3a52si7945084qtb.122.2022.05.30.09.59.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:59:57 -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="P4o/Che9"; 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]:39596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvikH-0005Uv-65 for patch@linaro.org; Mon, 30 May 2022 12:59:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwJ-0003rH-Pv for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:33613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0007NQ-0c for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:19 -0400 Received: by mail-wr1-x432.google.com with SMTP id h5so7199563wrb.0 for ; Mon, 30 May 2022 09:08:17 -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=DZMI81NOXIQjNm/3uSsk7ZYE64V08May20hDceafsJk=; b=P4o/Che92Af98wfndsa/NGKrSSxRLlpE3iTaSJDSMdZhOhhhytbQYe6NrfNi1e1Lkh u1sGiAQBKddpGrurSHfVXGFHAzWqfR4GV+EeSvpni3WMWGqKrMEQA2Ko/S3H/vG5l8Tp KPrSn4bWr1/WdGo9iGNVM7Gm+X9KA0WVd+yIec8crciKuyUgjNrI+n4Eu7QeTn6zpdVy H6+TyrBvSbN49YXXD9K8GZnMsodSeTXr5xRli3WfBduxreUpunt+bBz1uW+eb4z/BohF VoQ2GtogU8MVB2W0hEEBge9PaglZeAYglccMvYQiWqS82/HKAuqv0cCDl01Ebwr4J3fG lgEA== 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=DZMI81NOXIQjNm/3uSsk7ZYE64V08May20hDceafsJk=; b=OQ0Anf82E8inYCS9wqvNu3xZEKnBmCCaqfIQ2DaoJFuEL39Aw+U0LHZCTMZPupfWXZ RNXHOmK9yzDBTj23jWPkNz/Gf04/m5khHmyFOzITTxD0fcii0H8yHjmTNl7pV2lviFNn 6Luw6YR/1hP/VR77KNJq6ESOsyLzvUmwSZR+aw5rd0/NyM14FhMtA8AeODWn+YOKdwk8 Czh5jW475ZrKBu6UaiPZW8WLWNW0qiHOYYC0+goGI4ByuaRAn1hZ9tSfpVkVW3bttm9J IbyKAx4XP1GsL5Xqo/y/aHVsfQUY4JTG/e9skijRkotN8MVauVYAeuSM3Ey0TAkzF7QH my2g== X-Gm-Message-State: AOAM5337H4Q4UDey/yDAljD0eGrPRyRL45Oz3j2LPYSoPZMU777wKUjR 4/kcp8UYOST2FsM7mg8j9gfjMqIMpj0tEQ== X-Received: by 2002:adf:fc01:0:b0:20c:ff9a:2c53 with SMTP id i1-20020adffc01000000b0020cff9a2c53mr45898215wrr.142.1653926896226; Mon, 30 May 2022 09:08:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 070/117] target/arm: Use TRANS_FEAT for do_sve2_ppzz_flags Date: Mon, 30 May 2022 17:06:21 +0100 Message-Id: <20220530160708.726466-71-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-68-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 73b5b67c250..22acd5ead0b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7319,27 +7319,15 @@ DO_SVE2_ZZZ_NARROW(SUBHNT, subhnt) DO_SVE2_ZZZ_NARROW(RSUBHNB, rsubhnb) DO_SVE2_ZZZ_NARROW(RSUBHNT, rsubhnt) -static bool do_sve2_ppzz_flags(DisasContext *s, arg_rprr_esz *a, - gen_helper_gvec_flags_4 *fn) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_ppzz_flags(s, a, fn); -} +static gen_helper_gvec_flags_4 * const match_fns[4] = { + gen_helper_sve2_match_ppzz_b, gen_helper_sve2_match_ppzz_h, NULL, NULL +}; +TRANS_FEAT(MATCH, aa64_sve2, do_ppzz_flags, a, match_fns[a->esz]) -#define DO_SVE2_PPZZ_MATCH(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rprr_esz *a) \ -{ \ - static gen_helper_gvec_flags_4 * const fns[4] = { \ - gen_helper_sve2_##name##_ppzz_b, gen_helper_sve2_##name##_ppzz_h, \ - NULL, NULL \ - }; \ - return do_sve2_ppzz_flags(s, a, fns[a->esz]); \ -} - -DO_SVE2_PPZZ_MATCH(MATCH, match) -DO_SVE2_PPZZ_MATCH(NMATCH, nmatch) +static gen_helper_gvec_flags_4 * const nmatch_fns[4] = { + gen_helper_sve2_nmatch_ppzz_b, gen_helper_sve2_nmatch_ppzz_h, NULL, NULL +}; +TRANS_FEAT(NMATCH, aa64_sve2, do_ppzz_flags, a, nmatch_fns[a->esz]) static gen_helper_gvec_4 * const histcnt_fns[4] = { NULL, NULL, gen_helper_sve2_histcnt_s, gen_helper_sve2_histcnt_d From patchwork Mon May 30 16:06:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577252 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp421388mag; Mon, 30 May 2022 10:09:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5HMYmxMSkl5v+3jV1jmRAj/pQlJDcZZqyOn6x9UEmEohYe95xsA+BSPKGyKiq155Ou60Z X-Received: by 2002:a37:c401:0:b0:6a3:7eb5:6e28 with SMTP id d1-20020a37c401000000b006a37eb56e28mr27346649qki.268.1653930595679; Mon, 30 May 2022 10:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930595; cv=none; d=google.com; s=arc-20160816; b=Qd4DumQJiGmnwn+RBB56iMxtw+NC50X1QRqzJ3ht+O0RT8436qmUlBzOBj3nQknsSe VIA8ErFE9skN5FY/8lSoG6uN+A/phHU2PeDIxAGDYLvx1yKIdiOatObiJA7Ks9yWoSqT bhmTjc7kSsYpxTd1uT5zDi+TzP7dd624xw/X/QrP1WVWAv8kTfS2Ek3en9ZNyuxxw+fR ADz5DyGxGTVyXm4EOhga0yGPhBcXKNEayHoCAWtYpGK+UGVAHDvuOnC8HOJgy3AWKsK3 wWgCFiv4EBG8hWHvIaGqXn0qTIfG7/uBDnr6+9ownbsV+v/7CoPCygnoGe4OJX2MNfch oNwA== 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=SUtgIze0+HvN9rl3kbD3qtV3ubzIDRzI+lj/3xuXdno=; b=UcjlGvjp43MIolDaNhVfRN2r5SFTmwfO9bIoNMY6SQVARC218CuSP5mmfk0lqwZAaX +LAHPxhn4/mL8W5VTuinPDPHk12LAbkgtw2J1VJGVSQgdBaqyiqrRzILsKDmED9nMl9i ZsInaKAnx02ynMIW4sJKIJ9lMCKoCiZII23UOMab02btHUrLjtKHB2fFU4vycq/yhglO ifKMkDoV9J0d1s8LQ7RntY/N3GT8N0z1sPeqVuhkZpWYTOMJorHQhNfG7x/Gpv/UxleB do5bG7PEzcwn22qmRIK1i/ExcE4Rwv1KN8XmQRwB5HNtlHc97utRe8yU8q17XYGeF13n NJsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dcpLbIa+; 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 15-20020ad45b8f000000b004644af759b2si2691400qvp.576.2022.05.30.10.09.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:09:55 -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=dcpLbIa+; 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]:37090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvitv-0006WR-18 for patch@linaro.org; Mon, 30 May 2022 13:09:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwL-0003rO-Di for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwI-0007Be-6H for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:20 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15257378wrg.12 for ; Mon, 30 May 2022 09:08:17 -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=SUtgIze0+HvN9rl3kbD3qtV3ubzIDRzI+lj/3xuXdno=; b=dcpLbIa+IB0mHYrMVxmIqNbJchmwSK5NjxNksvjmgppgAAj1oj4jSMc8N6k+n8lgnZ q7V/X7FUUpbnK/g/VMCHTJ8fmfPbs7W4W7lNLcxycssmIJwTGY7rfT/WDRwtXImHsydW 9w9JCb8mDYiILbgvTw8U7yMmE5RTGTXwSWBf1B6cJ8FJyLgxlfsl8fJElqXYyCD/V6x5 6pNkqS0xBjpm5B5PPSBNR8F9w+RHrBPwcKXuBwDKDywBOIBAXGdFGQo2b2Zoj0nDsuFj RUUZQiBJ8TSb0EKMJOELNl3VSrXGSGUrYoXapu+1511TmKJdTju5+/yB8ZELDMMBlqGW xIvQ== 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=SUtgIze0+HvN9rl3kbD3qtV3ubzIDRzI+lj/3xuXdno=; b=Ew0zfUXWVdGvEgNA+Nk9ouvbX7W9vL47+J/rtWXAyIspwAhq4NSa3ixN9SZmU4gQ7t Md1xNa8BFOLKjlHRBai960wJ+Qu7bI5g2MyjmYzdJTI1IfQnDq7ijhRWkxTV5Ho/jLxG pOLx/QllpMHcEvoM2e8WhTXiRG5tzVV3A7Y2cEepKcZcmuCo+PEuR72uJW62lB5RuhGZ k/XhPP21fezEjgr5OeyICDMzjCRYOsYKbEla6Dgaiq8Nq+cLiCEjuq3F+A8y8ECcNk/M 0VB2F1D5O2jS8tUxzGROCsGwNRuPerFU0Rc5p1padgFgWu2ZXFooh+NxId+cnoJgsRkj aNHQ== X-Gm-Message-State: AOAM532lqkkXyeQD1+zYrFjwaJ0q/PINVp/e3haM92fYbQaqoZglhgwS YdfTa5nEMEqULtVw42kh5bvc9Om7L043KQ== X-Received: by 2002:a5d:5847:0:b0:20f:dc2d:d6c8 with SMTP id i7-20020a5d5847000000b0020fdc2dd6c8mr32476296wrf.644.1653926897318; Mon, 30 May 2022 09:08:17 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 071/117] target/arm: Use TRANS_FEAT for do_ppzi_flags Date: Mon, 30 May 2022 17:06:22 +0100 Message-Id: <20220530160708.726466-72-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-69-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 22acd5ead0b..03b2eddd8b4 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2786,14 +2786,12 @@ static bool do_ppzi_flags(DisasContext *s, arg_rpri_esz *a, } #define DO_PPZI(NAME, name) \ -static bool trans_##NAME##_ppzi(DisasContext *s, arg_rpri_esz *a) \ -{ \ - static gen_helper_gvec_flags_3 * const fns[4] = { \ + static gen_helper_gvec_flags_3 * const name##_ppzi_fns[4] = { \ gen_helper_sve_##name##_ppzi_b, gen_helper_sve_##name##_ppzi_h, \ gen_helper_sve_##name##_ppzi_s, gen_helper_sve_##name##_ppzi_d, \ }; \ - return do_ppzi_flags(s, a, fns[a->esz]); \ -} + TRANS_FEAT(NAME##_ppzi, aa64_sve, do_ppzi_flags, a, \ + name##_ppzi_fns[a->esz]) DO_PPZI(CMPEQ, cmpeq) DO_PPZI(CMPNE, cmpne) From patchwork Mon May 30 16:06:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577244 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp415618mag; Mon, 30 May 2022 10:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlVakMeUdqW7afll9ptf3EkTs0UCsxHZs/FgNuqtUBljIgdzO8p5/qzc09aObyzVrinHZZ X-Received: by 2002:a0c:fa81:0:b0:461:e391:820b with SMTP id o1-20020a0cfa81000000b00461e391820bmr46665032qvn.6.1653930200251; Mon, 30 May 2022 10:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930200; cv=none; d=google.com; s=arc-20160816; b=0E1Tix7Co82DVUrQaMTjUJK4NVlNIzr+MtwyLiGA+oQd4Dlbm+4/KkHQ9AsIII7DYa ezM7PKng43qwANTZJwvlWBShhvyxW+GHJjt6xXCMYMjPWq6ANNbFUQzxtT7A4VEozkSr niA9M30hrPnnxnPTP1+HTLji4PFTrn1mW1FLPEhH+k6Yog8dFlev7W3mIzOl6PEv/0Gk Xza2U8bLmVBBcNzBJewrsYATz1V7CDRqtdHVTlH6zfTeFomgONY8eSUzMvXJWb3uXy9S rEbNNzPIVJHtGlKZIr10zcU/ovA12sffEniPU2QOj9+bJ9IoFQ0VS7uWxtBdGXmx4jp9 +54Q== 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=b2+9IpbEIMpachdLXp76ixemTS7BOkj9nnjCImRfs9o=; b=M4JgE5Sr35ex3bq7wuSBEwy+ZihVy8mmC5F0IxpyBQe94bEbtoKtk9mYcsDIU4SfhV YSnqv8ELY7EuLFU8mrQIueGgNqWsDUqDzGGdfOnMFrx0H/DfekxLXkxPfXX+juh1eB+/ u9yvBg2pYAwjlU/5e+UYX0m5VkUiywBXl13OMHfijsF7rOkWKXfDtPqgQLooKOXpDRSS +PSCUd/2k6+Na0NRupUjNJaHOI9mdnObWNc+wgt3vmaZgyBmZNETTEE5mk2HuzYaOlrC xR/176FoAVsKGc52Ny4pDP2b/DHRPNDmEEJD79WGzFvhwR+sUCLLxiHNAJPnrZhdZal1 SYxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zskzloON; 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 dv15-20020ad44eef000000b004645c2949f3si380135qvb.114.2022.05.30.10.03.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:03:20 -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=zskzloON; 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]:48154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvinX-0002xc-QC for patch@linaro.org; Mon, 30 May 2022 13:03:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwL-0003rP-H2 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:55251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwJ-0007OA-Sp for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:21 -0400 Received: by mail-wm1-x32a.google.com with SMTP id bg25so6643089wmb.4 for ; Mon, 30 May 2022 09:08:19 -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=b2+9IpbEIMpachdLXp76ixemTS7BOkj9nnjCImRfs9o=; b=zskzloONbSeYWDofVc8yq6PWlIL8ublK+Md2VTV22TyOSNwdekcq5seUSpNcmg9Mpu 8AdQcCkXpfKyVD1fHk1BByho2pW/ok+icTccfYxPrLZO0YezsLTN59TxVrHJgG7gWUN8 wXwwwVzaWoWin5g/NrSp1Tm+NfGwL3xjbUo/A9pA1j7q2IpAE9VycfVXmpNLOqbUaS5j V5L0wbLpCgBRdHNfJRLp365Y5rxKYzfzIp29A/E0Q+hQtkGAM8Kx9NdPWfgcHRBbfUvN zw7r/JrCMZw92Ji2b07JtUBEPVmX8cZdAStXVWHISJE+2raKtDYo0Gg5WQGehnxl5oVB 6LPg== 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=b2+9IpbEIMpachdLXp76ixemTS7BOkj9nnjCImRfs9o=; b=Xz9PkWkhOGNo+LDYqGIY/71i2w+yPPVrE531pzURja0AuuYjHIjU7Mb4o/+h+FlKN8 viG/OGoxU2jA+IJltA/6BBD9QPSPscvAb8v8zSrd81uOk1IcPvu+d/9ySA/s95QmsVkd fpBU37iqshXZMUWyI9rZPAV55P4rqreoR9dwzHHL6QUcpANKMuFCwBDT9bMZ7d7MtRDY NbPRw46KnKCYAQwfaJtKktTCorIL8FzHef/clRFaQiFu003PKaxp43DpabDUbHC6CQU8 DkNxNUVfFoOtzbHFPd06L0r67pbhoLrumB1PRpbeP49CJmsGbmkt9zJeU1FyWKb2HcTb xnQQ== X-Gm-Message-State: AOAM532EbtxMIPkD7x7lVBKm5kpR7eGixhfnqO4I7ZZB9QlMcAH7EaFh RKlafIWnnF4JN/O3Ci2djQHNjJBVOMI7NA== X-Received: by 2002:a05:600c:210a:b0:397:592f:6152 with SMTP id u10-20020a05600c210a00b00397592f6152mr19862194wml.99.1653926898074; Mon, 30 May 2022 09:08:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:17 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 072/117] target/arm: Use TRANS_FEAT for do_brk2, do_brk3 Date: Mon, 30 May 2022 17:06:23 +0100 Message-Id: <20220530160708.726466-73-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-70-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 45 ++++++++++++-------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 03b2eddd8b4..d44b24e9883 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2879,40 +2879,23 @@ static bool do_brk2(DisasContext *s, arg_rpr_s *a, return true; } -static bool trans_BRKPA(DisasContext *s, arg_rprr_s *a) -{ - return do_brk3(s, a, gen_helper_sve_brkpa, gen_helper_sve_brkpas); -} +TRANS_FEAT(BRKPA, aa64_sve, do_brk3, a, + gen_helper_sve_brkpa, gen_helper_sve_brkpas) +TRANS_FEAT(BRKPB, aa64_sve, do_brk3, a, + gen_helper_sve_brkpb, gen_helper_sve_brkpbs) -static bool trans_BRKPB(DisasContext *s, arg_rprr_s *a) -{ - return do_brk3(s, a, gen_helper_sve_brkpb, gen_helper_sve_brkpbs); -} +TRANS_FEAT(BRKA_m, aa64_sve, do_brk2, a, + gen_helper_sve_brka_m, gen_helper_sve_brkas_m) +TRANS_FEAT(BRKB_m, aa64_sve, do_brk2, a, + gen_helper_sve_brkb_m, gen_helper_sve_brkbs_m) -static bool trans_BRKA_m(DisasContext *s, arg_rpr_s *a) -{ - return do_brk2(s, a, gen_helper_sve_brka_m, gen_helper_sve_brkas_m); -} +TRANS_FEAT(BRKA_z, aa64_sve, do_brk2, a, + gen_helper_sve_brka_z, gen_helper_sve_brkas_z) +TRANS_FEAT(BRKB_z, aa64_sve, do_brk2, a, + gen_helper_sve_brkb_z, gen_helper_sve_brkbs_z) -static bool trans_BRKB_m(DisasContext *s, arg_rpr_s *a) -{ - return do_brk2(s, a, gen_helper_sve_brkb_m, gen_helper_sve_brkbs_m); -} - -static bool trans_BRKA_z(DisasContext *s, arg_rpr_s *a) -{ - return do_brk2(s, a, gen_helper_sve_brka_z, gen_helper_sve_brkas_z); -} - -static bool trans_BRKB_z(DisasContext *s, arg_rpr_s *a) -{ - return do_brk2(s, a, gen_helper_sve_brkb_z, gen_helper_sve_brkbs_z); -} - -static bool trans_BRKN(DisasContext *s, arg_rpr_s *a) -{ - return do_brk2(s, a, gen_helper_sve_brkn, gen_helper_sve_brkns); -} +TRANS_FEAT(BRKN, aa64_sve, do_brk2, a, + gen_helper_sve_brkn, gen_helper_sve_brkns) /* *** SVE Predicate Count Group From patchwork Mon May 30 16:06:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577269 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp432588mag; Mon, 30 May 2022 10:24:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSGE1yR2o0m+FPxz1NLPzQCNlMYBscfl8UYmL/EDfuGac8aFxWNP7ZKBs5Dqje7Lb0tB4j X-Received: by 2002:a05:622a:44a:b0:2f3:b5b5:d42c with SMTP id o10-20020a05622a044a00b002f3b5b5d42cmr44855667qtx.30.1653931493466; Mon, 30 May 2022 10:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931493; cv=none; d=google.com; s=arc-20160816; b=d7agNmXNiSzE0txyTFr2HHXTdY0NFfouvZr8dBo2LzIC1U8Uj8a06ItrlyzDs+Tfr+ vpXyRdz0r84rhv66ceb5fhC+QN+CxgTDVyGTSS7gmo4ROOLt2wpocLnmtqNFVFIdUqZg sMYl0M9uowIPhk6uKJm1AdDnrTGel26EvOZ1SbVlE5M2cIi/hdDWK/eZEVI7mF4ae67p VuzN64fvQYhu3BV3P8wQh35XjfOSmTLqbeK24p5Lt9WlDCW+jdSG4fktYn7B0SSmLTvL fK7ZxG2hvtoZeFfNF+FiBL7APKr8LLPN727YOSqKefZr22GdfhrSHb7Z1PIzFz5BfoHR OUSQ== 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=8nm+8ZFSOz64F3cWg9zKHDC26u7Z4EtE93jv1/4bHi0=; b=wbcDEc1WsTrCTJqC6GKRB2H3bIYpQOPsHuApVDyizrtabFga/hWxbEuwHvRozWLKll f/GHtlyVdeDa8epo7mL1rsBoI5H+aGGeBQ+OlJBMcb84gVmPBDGAcOe2e4EYKaYuBFTP OSrVhOF2mubFSoq0IaT09gospY0dCjae2v2q9UEOoX6M+EQFt2qn0K5kHOOJmBy/3Umy QG3sUCfyfCmPkkF5siOMIzabMSSIZVM+tWqaD3vBi+KzoCOUJuE+QCQJDhKVDtNB+8lv NajJitIXYWXNKgFsA5DReMW2O0wG4fQpaHNEd0UU34K0W5AjPkoAUndS5GsoQ6AkxTMj BKkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zwY5lba/"; 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 u10-20020a05620a454a00b006a332b3be0esi9362246qkp.175.2022.05.30.10.24.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:24:53 -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="zwY5lba/"; 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]:45938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj8O-0007D1-Vr for patch@linaro.org; Mon, 30 May 2022 13:24:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwM-0003si-3Q for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:26 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:45714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwK-0007OM-35 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:21 -0400 Received: by mail-wr1-x432.google.com with SMTP id p10so15261513wrg.12 for ; Mon, 30 May 2022 09:08:19 -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=8nm+8ZFSOz64F3cWg9zKHDC26u7Z4EtE93jv1/4bHi0=; b=zwY5lba/EgHvno0es818QCTP/EjmeIHEhnW3DiUEJBk3Zdeff39myA9WtvaFEOxyxn 97ErqL9cpKkbKIMXSRWqiqM/1r/vKaUZaR6lDXnV0E0vTcLgsSZyc7ovxN8LnCamP3hs GUBnMqLXnff61wqRVK0ZcYAmPigf584GtiND1PIh3RKotMTCcSD9YLZnnKm6nbcK136I Kr3qmdY0tVzp1z1nsTB2UYwSL/P8fiSftKLdz6wwbtlhZA2prieptgGIyt3WiOjIl70b SaTQRqBRTJ7tVl09KmBF7TaZGz0CY95GSgIChiOwfrgeDrf4C1cCz4RN8uQp7FFT+Cpb 6T8Q== 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=8nm+8ZFSOz64F3cWg9zKHDC26u7Z4EtE93jv1/4bHi0=; b=Qt6FofgwrPQuOjJweVprEWu/XvZTDYg94GT0fF2iwphoW4foAKaI/ErBfLSTOB0l80 IgOFfO6C+S0ZlnAB0Ht8uAA6VEQqG0YmOh80QIo2rh1Mowk8ViALRgqHB7CbcF/rklPE CI+Dcgm+DUS6e62Ebo8yVD8aL+O91HA72X3wXN6c+UHGLOuy32nP/9ugf2EGKbdFtew/ X8sCqQyke41f7VpFOGa4VbrnKc5KtPHZ0EWFz2VzGIKLfl3jl79TGsYneHorWeWCtqrd LTrVJAX49oyGQvkxDw9YBxCkE3RVnPO/tUhYMn+zI0ptz3p5c0rTCvr6RdON6JYsZ5DH RbzQ== X-Gm-Message-State: AOAM5317WY9QeYHRFXHF4pLQ3QJBjjSxdCZ7ifzCQJKNDXc62NL6meL5 GkuWZM3AarAHVpzDlA7FrmUbDcOCidQmRg== X-Received: by 2002:a05:6000:1d83:b0:20c:d508:f55a with SMTP id bk3-20020a0560001d8300b0020cd508f55amr46892664wrb.217.1653926898811; Mon, 30 May 2022 09:08:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 073/117] target/arm: Use TRANS_FEAT for MUL_zzi Date: Mon, 30 May 2022 17:06:24 +0100 Message-Id: <20220530160708.726466-74-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-71-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index d44b24e9883..c0781ecf601 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3315,15 +3315,7 @@ static bool trans_SUBR_zzi(DisasContext *s, arg_rri_esz *a) return true; } -static bool trans_MUL_zzi(DisasContext *s, arg_rri_esz *a) -{ - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_muli(a->esz, vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), a->imm, vsz, vsz); - } - return true; -} +TRANS_FEAT(MUL_zzi, aa64_sve, gen_gvec_fn_arg_zzi, tcg_gen_gvec_muli, a) static bool do_zzi_sat(DisasContext *s, arg_rri_esz *a, bool u, bool d) { From patchwork Mon May 30 16:06:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577256 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp424733mag; Mon, 30 May 2022 10:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUe7u35bhO42JfcX2EvA9C0x1lOlxzY/ROPeTL934guIBc5h5qG71UyDKdjSQLgVtNLCpL X-Received: by 2002:a05:620a:404d:b0:6a4:f5b0:d8ca with SMTP id i13-20020a05620a404d00b006a4f5b0d8camr24231018qko.506.1653930848636; Mon, 30 May 2022 10:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930848; cv=none; d=google.com; s=arc-20160816; b=YxxVa/Q9wlqPKiWXacopWTCxNJDZWxonQb+rmqUHt4xVol8NPzJri5nKSutJ4ysZzu 4xzZQw6c3jS2/uSbQr4K9tsulwrP1ClvcqLKf47B6M8xNFSYyNCPT17yPc8E82Bh2kNu kb/IWCLd1orzNX0pIjaPvjKh5aM0TdgKgEn28UD89jlGLUOv8GeLpgGiP/d3/kWxsDr2 w7fZ435mJWL/HMJOZPHvK+SGfqPD9djVfTFUg5vJJzD4aPf1jlHpOi8ojSZEdauxDxiW ztztAfw8mrGZ1SgH6Y9sjFfr+RzzmM4gzASvXUzbMFafg0g2W+W5FcRv5BqL831KBuBC rvyA== 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=4gTS1bWEJsIqym+/C3vEStpf2vM3YV4EhLGnvt8Rclo=; b=SCeEkKQ7BJOQ30Uyg6aeqtu91Qq0QXB61AyXWyq5Ux4kUAeBJQRyaNqOoFyEGzAEBz l9sYXJDMar4+z81sFva3tRxH/F7p1kQPZ3iRw3yAXXiN2jNSkBDC4koD0i1oSadLiBcH D++kg0Ir0fhKy5e2dXwOdP12G+o3k6HTm6mtJ6UVhhVu/rQtv6ATPbB1V04J2nToSXua kjJzie/u7zLiFttfCQXNHYHMiFq3O3/6Fq0Iwko4CkSrWbySznED5QJ7PGb7ZMHc+83W pM9rfsItcuCp+6t1LR8QEvzD0VvsVgIBnCTv5uRyN8fFsXmi0gLilftKppDoHM/ZygLt xZ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OQDYSOWS; 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 g20-20020a05620a40d400b006a5eb748412si6869180qko.20.2022.05.30.10.14.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:14:08 -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=OQDYSOWS; 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]:45790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviy0-0004VN-8j for patch@linaro.org; Mon, 30 May 2022 13:14:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0003tb-Q3 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:27 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:32840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwL-0007Lc-5F for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:22 -0400 Received: by mail-wm1-x331.google.com with SMTP id o29-20020a05600c511d00b00397697f172dso202732wms.0 for ; Mon, 30 May 2022 09:08:20 -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=4gTS1bWEJsIqym+/C3vEStpf2vM3YV4EhLGnvt8Rclo=; b=OQDYSOWS5wl8hIS9U3T1Wr1bTSsMHPqeY9nkZvlc23w9wFOgXr3JniNDqVzMICBqeD VXNkMqbKpdjbY+YtQGtrx/fJsfxu7UvFnyZbQMBYBqmgCJ9+BUNCJT3o2GZzsmtwDp2M Rj2XzI2XDYlkP9hkwtoMs+/oZU9jkbxAr82hoQsU30XBd+mFTRY01v4sZKu6uZoiufly bO/tD58AakKDH0KiUzcwgeyMAgUAv/rlVTYA5xz0/W5G2ZcQectHl/X/Yhkf5EqNh34x Elr13FDgqYCKeXRSbfLzuoipvcKtbFjfuYWu8wDLVhQPHM0NOhDTSXhrs4KWh8FqoGeD NgOQ== 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=4gTS1bWEJsIqym+/C3vEStpf2vM3YV4EhLGnvt8Rclo=; b=rbNLfbiGqva1+1FnUcRpMO174sA2Qhfs9ffduX8smx2cR3w2DsiogI+5M1QiPViSPE DFs260VP60EzPdF1WJ5j7ndEZJ3D3o/U8qoz/CLvpAX1sr5hyrgD4AMGRMLMv3KqAMKo kIlMoUTjevK1cK/q5b8UIgFQLXh9EhQSDne6eaBnrkJ2A8mQkQgzgnXiSFUoXcznB9uf Ir6fJyB2Dyp1NUfJRdnCkl4Fe4AiSt6GC7SlquW7knzorz3/ZLTR7HGBXeUqn7TjgAMR mqDKW0DgddM27bbOWqiEOr0C6vcBaJ8zaw8WpIi0fDtyhhshqytOK7t9uPv+i2PXRi34 oXAA== X-Gm-Message-State: AOAM531pYgRKJ2qMbOX1o1CwYfFtFYDiwSYEoKqK13Y2Ea79A9pRYhKn meJHuo2pOGD/64nTTLTVNXuqUoXWv93fGQ== X-Received: by 2002:a7b:c00a:0:b0:397:475b:1ad7 with SMTP id c10-20020a7bc00a000000b00397475b1ad7mr20029604wmb.42.1653926899597; Mon, 30 May 2022 09:08:19 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:19 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 074/117] target/arm: Reject dup_i w/ shifted byte early Date: Mon, 30 May 2022 17:06:25 +0100 Message-Id: <20220530160708.726466-75-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Remove the unparsed extraction in trans_DUP_i, which is intended to reject an 8-bit shift of an 8-bit constant for 8-bit element. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-72-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/sve.decode | 5 ++++- target/arm/translate-sve.c | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 0388cce3bd9..c02da0a0829 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -787,7 +787,10 @@ WHILE_ptr 00100101 esz:2 1 rm:5 001 100 rn:5 rw:1 rd:4 FDUP 00100101 esz:2 111 00 1110 imm:8 rd:5 # SVE broadcast integer immediate (unpredicated) -DUP_i 00100101 esz:2 111 00 011 . ........ rd:5 imm=%sh8_i8s +{ + INVALID 00100101 00 111 00 011 1 -------- ----- + DUP_i 00100101 esz:2 111 00 011 . ........ rd:5 imm=%sh8_i8s +} # SVE integer add/subtract immediate (unpredicated) ADD_zzi 00100101 .. 100 000 11 . ........ ..... @rdn_sh_i8u diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index c0781ecf601..14faef05641 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -403,6 +403,12 @@ const uint64_t pred_esz_masks[4] = { 0x1111111111111111ull, 0x0101010101010101ull }; +static bool trans_INVALID(DisasContext *s, arg_INVALID *a) +{ + unallocated_encoding(s); + return true; +} + /* *** SVE Logical - Unpredicated Group */ @@ -3246,13 +3252,9 @@ static bool trans_FDUP(DisasContext *s, arg_FDUP *a) static bool trans_DUP_i(DisasContext *s, arg_DUP_i *a) { - if (a->esz == 0 && extract32(s->insn, 13, 1)) { - return false; - } if (sve_access_check(s)) { unsigned vsz = vec_full_reg_size(s); int dofs = vec_full_reg_offset(s, a->rd); - tcg_gen_gvec_dup_imm(a->esz, dofs, vsz, vsz, a->imm); } return true; From patchwork Mon May 30 16:06:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577288 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp455706mag; Mon, 30 May 2022 10:56:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5LxWztTDYspYbqYHsk8oH/PRuiQiDH6Tyc3UNIwkIyE1FnLZ6qLBpEPTHoeI461Y3mNN+ X-Received: by 2002:a05:620a:b4e:b0:6a5:9b54:2d91 with SMTP id x14-20020a05620a0b4e00b006a59b542d91mr18581433qkg.586.1653933377847; Mon, 30 May 2022 10:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933377; cv=none; d=google.com; s=arc-20160816; b=DZ8znZsnp7PNxlSqsWY91LpA0bWX9g+wBxxcBBxIfrbY0CYDMcK2z3KyTa9RCjYGV0 CrXGJFK0hCaho41z6aw2ALrBXZGdKA0cG6QWzUnJ5NL2BKM9v9YMKeL7TIjSzS4GTM9w rcaO9y7aourUHQY7FGAc5i1rkT0tKHN7/c5jkR2RlLBB9pS+uNS29ERxzlX2nkk/XN3w 917+2Kl1dAOr3qaqpGT5pg/43OSmj4QW4c0t7pw+Az8AAynirdADf2MMR7rh63H66jk7 XHPSPLon1aVRHzrfF8ggrHMIHbEDmd6UESjW+dHuLKs5+QxOmuwr8jATtxnOTyCxHZj1 xp7g== 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=8H0O7WP3fZTtNdQhbGwYgO4FNCF8NZfiJ1G4q6YMIBY=; b=IOMR+Jugl9dll52BrnRwCI69rC7i3J0q0d4IbVvxPI/FkBJn2TKrKn7xMIqts97IKm CO47+YX+3MmrT08xsThCiN8iCs4rFcNuB0ACaG+x8Akwggs2tP8FMMzetcorCXd5mR06 b7KZ6M6RDSueZa9k4k61sxZRKeqLh3uvhWQveww7Y4DAOCYb12RaKjJ45mehNribzkWb wTDaJ74NQrR2wbYJuTqAaGbKs9UswzIuswFeA74EENbnG9Bt5ikrmNPqzcWdZE9bpwg4 B93ITAj/9PAB7S7wNBZu/k6loF7h9X6jEKt1bl0DZF/imsbBovesgps6rnD7EI/PtQ8G kprA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ejgy9Odk; 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 c7-20020a05620a134700b0069eca9611eesi6950605qkl.596.2022.05.30.10.56.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:56:17 -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=Ejgy9Odk; 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]:48380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjcn-0006Ky-Et for patch@linaro.org; Mon, 30 May 2022 13:56:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0003tf-Ql for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:27 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwL-0007Hl-91 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:22 -0400 Received: by mail-wr1-x42a.google.com with SMTP id d26so9674574wrb.13 for ; Mon, 30 May 2022 09:08:20 -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=8H0O7WP3fZTtNdQhbGwYgO4FNCF8NZfiJ1G4q6YMIBY=; b=Ejgy9Odk7RQgM+lYdey81GLfLI6jByNCStGlV0JycTj+aBFEmfwziTnP7DmSft2T3m VBQ81/7/ezeCs4C7k4YNjrwtCNuK4QNerI5WBlz335E6ULpbyR9Uk35fyfdX2OrNX2Vl cnfcnXfskNOYfNHlgjYsIto9tMQd9Q5euAY6aX0TSx19d/qTvhFze8JvQucjPGAHF5JE DXy71C0fmgk2U68MBz7Z7DYpgFPJVLLQuzmUa6yUJLLAE3KWgG/zJcXkVh4CvCVoD20z 8c2TSNLVagQiQzKXW/RXENeIa2QYdcyKnL0S1qV3IairgNb4JZ7Jaa8nbVnC8UGtZS8l U9EA== 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=8H0O7WP3fZTtNdQhbGwYgO4FNCF8NZfiJ1G4q6YMIBY=; b=P3Blvjs105SuAs86/PajHoGU3qXraLAi9hUxwWuXXB2Oka2q9so3vdcuNdeqGW2S3i B2fUCyEzNJoW5Nn9DwwEu5eQZvNa7dmCfyorkVPOak0h6tY9bz67J3GtxnH1rULMJIzY PI7nSO/glLTUOjdPzlwJgrJl4imui5OaO4lorlmGp+KgtYNjpPdgeLvrZMsEx/oQ7gnk 8lsKeLNHKlYZVAio9kbU1bO+wMEIHC7aM4UOy0k4vQreWy9X0DqvbKQyp236vXp2zicN pKPq2nwTT8n9FJfq3GAxSwRMaE8vexo20HTEXitO+1m1g63cU5dhJpyMfmRgtBkAPqPQ 0n5g== X-Gm-Message-State: AOAM533aj2g5x5sJEJ0MbOR/WJzvIIVMwB1li4z6jd3qi6aJJOIybksk D68aoYqI8GKHe2E1wMgevqCOkQNP4Z9H/A== X-Received: by 2002:a5d:6847:0:b0:20f:c0b6:d783 with SMTP id o7-20020a5d6847000000b0020fc0b6d783mr40465321wrw.101.1653926900397; Mon, 30 May 2022 09:08:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 075/117] target/arm: Reject add/sub w/ shifted byte early Date: Mon, 30 May 2022 17:06:26 +0100 Message-Id: <20220530160708.726466-76-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Remove the unparsed extractions in trans_ADD_zzi, trans_SUBR_zzi, and do_zzi_sat which are intended to reject an 8-bit shift of an 8-bit constant for 8-bit element. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-73-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/sve.decode | 35 ++++++++++++++++++++++++++++------- target/arm/translate-sve.c | 9 --------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/target/arm/sve.decode b/target/arm/sve.decode index c02da0a0829..8cff63cf257 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -793,13 +793,34 @@ FDUP 00100101 esz:2 111 00 1110 imm:8 rd:5 } # SVE integer add/subtract immediate (unpredicated) -ADD_zzi 00100101 .. 100 000 11 . ........ ..... @rdn_sh_i8u -SUB_zzi 00100101 .. 100 001 11 . ........ ..... @rdn_sh_i8u -SUBR_zzi 00100101 .. 100 011 11 . ........ ..... @rdn_sh_i8u -SQADD_zzi 00100101 .. 100 100 11 . ........ ..... @rdn_sh_i8u -UQADD_zzi 00100101 .. 100 101 11 . ........ ..... @rdn_sh_i8u -SQSUB_zzi 00100101 .. 100 110 11 . ........ ..... @rdn_sh_i8u -UQSUB_zzi 00100101 .. 100 111 11 . ........ ..... @rdn_sh_i8u +{ + INVALID 00100101 00 100 000 11 1 -------- ----- + ADD_zzi 00100101 .. 100 000 11 . ........ ..... @rdn_sh_i8u +} +{ + INVALID 00100101 00 100 001 11 1 -------- ----- + SUB_zzi 00100101 .. 100 001 11 . ........ ..... @rdn_sh_i8u +} +{ + INVALID 00100101 00 100 011 11 1 -------- ----- + SUBR_zzi 00100101 .. 100 011 11 . ........ ..... @rdn_sh_i8u +} +{ + INVALID 00100101 00 100 100 11 1 -------- ----- + SQADD_zzi 00100101 .. 100 100 11 . ........ ..... @rdn_sh_i8u +} +{ + INVALID 00100101 00 100 101 11 1 -------- ----- + UQADD_zzi 00100101 .. 100 101 11 . ........ ..... @rdn_sh_i8u +} +{ + INVALID 00100101 00 100 110 11 1 -------- ----- + SQSUB_zzi 00100101 .. 100 110 11 . ........ ..... @rdn_sh_i8u +} +{ + INVALID 00100101 00 100 111 11 1 -------- ----- + UQSUB_zzi 00100101 .. 100 111 11 . ........ ..... @rdn_sh_i8u +} # SVE integer min/max immediate (unpredicated) SMAX_zzi 00100101 .. 101 000 110 ........ ..... @rdn_i8s diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 14faef05641..bf988cab3eb 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3262,9 +3262,6 @@ static bool trans_DUP_i(DisasContext *s, arg_DUP_i *a) static bool trans_ADD_zzi(DisasContext *s, arg_rri_esz *a) { - if (a->esz == 0 && extract32(s->insn, 13, 1)) { - return false; - } return gen_gvec_fn_arg_zzi(s, tcg_gen_gvec_addi, a); } @@ -3305,9 +3302,6 @@ static bool trans_SUBR_zzi(DisasContext *s, arg_rri_esz *a) .scalar_first = true } }; - if (a->esz == 0 && extract32(s->insn, 13, 1)) { - return false; - } if (sve_access_check(s)) { unsigned vsz = vec_full_reg_size(s); tcg_gen_gvec_2s(vec_full_reg_offset(s, a->rd), @@ -3321,9 +3315,6 @@ TRANS_FEAT(MUL_zzi, aa64_sve, gen_gvec_fn_arg_zzi, tcg_gen_gvec_muli, a) static bool do_zzi_sat(DisasContext *s, arg_rri_esz *a, bool u, bool d) { - if (a->esz == 0 && extract32(s->insn, 13, 1)) { - return false; - } if (sve_access_check(s)) { do_sat_addsub_vec(s, a->esz, a->rd, a->rn, tcg_constant_i64(a->imm), u, d); From patchwork Mon May 30 16:06:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577289 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp457564mag; Mon, 30 May 2022 10:59:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXqztLQ77sMM4fVwr+tdI6XUAlLuSlOx68tCHs8CXYZHNcNWvAgIWyWgORaCMKYBwsdTLA X-Received: by 2002:a05:620a:98a:b0:6a3:840f:96d1 with SMTP id x10-20020a05620a098a00b006a3840f96d1mr27891790qkx.286.1653933547765; Mon, 30 May 2022 10:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933547; cv=none; d=google.com; s=arc-20160816; b=HVUEIY9VGl2YGNcL0FI9mK4dN453VJkQRfHM79NQh9OoDIl5rbMnKhPBnJ+FyFhtJ8 kj2o/fRGjsIxfVlgskpBUYqHukD9WeTI1lNulzJd7NND9gAwGrQVKCxAO7kj+VFvSAiF bWvMaJpYMpQl5QGz9sq0moVtzYrxxG2L9wqLy4GOhU0TA/cIiMS6vPabfJ/HV6EqRGEt CrZBlZl6fpQ8OE5buGBWsA9ui7aX4/9Cl3rXmdX7Eo0vWAhKr64KcKR0ll+lbUBt4a81 PkSrzMRU9mvhrSPRYndAtC6ru877JY4KAylNlmCW4vgyOSbbq8J3mxLXG93rVa2IyGRs 5Pfw== 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=DdWcBdfKkOMkgAvfhlhQLbGKNqFirJCaLZypma6j4Gk=; b=V65pItuwAMMN0JMQmbm2Sm1ovV8HQDBXDEt8Z0ZVF8BJzeaU83b/KEayUeg6T7F7qQ OMNKOaHsRnfpLPUVFhcEBng5G/16Jw4LuV5UbZM3AuXUc28uzuJpri6HcBoV+TQY7Fdl YVdFqJotERPVHoO94s0BRjwsbdhFndfqp1ucIWWfhc6Z/FGRMthB38k2UXPKllOQ1fL2 R0yZAsqMaDgkQj3G0o/tpr1DepN4iMTO/TZqkXTJhJNxFnnLSJV+xTPgdXyWdibK/ooN hUmN5aH+RmX1WQ85SvlLy77yVhdPHHuuZqs79r/xpKQAfcZnfQEa3wM9M5IC35Ju0D0+ b/fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Djbrtjz4; 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 197-20020a3703ce000000b006a3ac249342si6559348qkd.120.2022.05.30.10.59.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:59:07 -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=Djbrtjz4; 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]:56596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjfX-0003VL-Cw for patch@linaro.org; Mon, 30 May 2022 13:59:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwS-0003w9-AD for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:29 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:43834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwL-0007Mm-VE for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:27 -0400 Received: by mail-wr1-x429.google.com with SMTP id s24so7958985wrb.10 for ; Mon, 30 May 2022 09:08:21 -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=DdWcBdfKkOMkgAvfhlhQLbGKNqFirJCaLZypma6j4Gk=; b=Djbrtjz4DMgmMjY7iEZUXFzOidibZWrHOw0QYnV978yFrosWA4SP8FuRLQ4rPYhvpn qnyGXatUy+mXY+EeNzBBSzshvRgIf9gzKoV4yD6s0kdcklKR1L/YvEC3duME1MO1z5t/ E/Vz0IXtAVesg0WSArKVdaJ0dc93kC6OAtK2JQ4sJ2CnSF3L1uCoPGNtFb4NQuqNhPIr RaY46mphmDOPqWlskIfG5O885BnPGLEhA/zYTW4j+vzDOP88QYIOQnLwLQEZNM6TlwMt tr+m+MxoBXWwSLA5j4pBmiGGdaaRkZrKJl+g4jPAG0xcWAGDKyA616k+WRl36+f3Vh9b 29gQ== 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=DdWcBdfKkOMkgAvfhlhQLbGKNqFirJCaLZypma6j4Gk=; b=4w3vvBKClu2xbkOgt/Y7ESdvetcWVQJ8fG5ArbcUgUOiq5yTDZBXnDupisjgaooiJd W4qscCe8N7QE2V6YH0J6eBJlwKFkTeiXmxpApiwyS5eSohWNI3OREYisKREm1e37Bl0E RRP2Jtaut/vAZewb/J1LWB7enjVj0bVj3d2v7w7L6zFADZTmIhw/8ZmWeIkh+rQ3U0Xw KngaKu0a21kuuQGUbFEqKaj403f5+rZkeh/y/M3025pSvZLt5+zMCZbpzMLtfkwdwd18 WhW4ix0cuwrGec1pikVQfmlPGfDbyN8BFiQcwfYmEKmxTqwp5pFM0jZNara4cwxgeB+P Ca7A== X-Gm-Message-State: AOAM530FMzoQYOegrCwOH/GTGLjNxuW+wvff+wp+Hv48cFpSzg+k4knt LW/gizWeEYspgJR1VNFMPmNgTCBYBGZPJQ== X-Received: by 2002:adf:ea04:0:b0:210:134:4398 with SMTP id q4-20020adfea04000000b0021001344398mr21244402wrm.356.1653926901105; Mon, 30 May 2022 09:08:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 076/117] target/arm: Reject copy w/ shifted byte early Date: Mon, 30 May 2022 17:06:27 +0100 Message-Id: <20220530160708.726466-77-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Remove the unparsed extractions in trans_CPY_{m,z}_i which are intended to reject an 8-bit shift of an 8-bit constant for 8-bit element. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-74-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/sve.decode | 10 ++++++++-- target/arm/translate-sve.c | 6 ------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 8cff63cf257..7e79198f5ba 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -528,8 +528,14 @@ DUPM 00000101 11 0000 dbm:13 rd:5 FCPY 00000101 .. 01 .... 110 imm:8 ..... @rdn_pg4 # SVE copy integer immediate (predicated) -CPY_m_i 00000101 .. 01 .... 01 . ........ ..... @rdn_pg4 imm=%sh8_i8s -CPY_z_i 00000101 .. 01 .... 00 . ........ ..... @rdn_pg4 imm=%sh8_i8s +{ + INVALID 00000101 00 01 ---- 01 1 -------- ----- + CPY_m_i 00000101 .. 01 .... 01 . ........ ..... @rdn_pg4 imm=%sh8_i8s +} +{ + INVALID 00000101 00 01 ---- 00 1 -------- ----- + CPY_z_i 00000101 .. 01 .... 00 . ........ ..... @rdn_pg4 imm=%sh8_i8s +} ### SVE Permute - Extract Group diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index bf988cab3eb..83980f5ee6b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2024,9 +2024,6 @@ static bool trans_FCPY(DisasContext *s, arg_FCPY *a) static bool trans_CPY_m_i(DisasContext *s, arg_rpri_esz *a) { - if (a->esz == 0 && extract32(s->insn, 13, 1)) { - return false; - } if (sve_access_check(s)) { do_cpy_m(s, a->esz, a->rd, a->rn, a->pg, tcg_constant_i64(a->imm)); } @@ -2040,9 +2037,6 @@ static bool trans_CPY_z_i(DisasContext *s, arg_CPY_z_i *a) gen_helper_sve_cpy_z_s, gen_helper_sve_cpy_z_d, }; - if (a->esz == 0 && extract32(s->insn, 13, 1)) { - return false; - } if (sve_access_check(s)) { unsigned vsz = vec_full_reg_size(s); tcg_gen_gvec_2i_ool(vec_full_reg_offset(s, a->rd), From patchwork Mon May 30 16:06:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577260 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp427485mag; Mon, 30 May 2022 10:17:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKq0dw+sqsDO0NHW5Hhcu/SFywuxeAovZ8v7i6hcNzlr3vrGxYBrhn4i2jnNphmaJaiIUT X-Received: by 2002:ac8:5c85:0:b0:304:b5ca:fc47 with SMTP id r5-20020ac85c85000000b00304b5cafc47mr2430792qta.9.1653931062603; Mon, 30 May 2022 10:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931062; cv=none; d=google.com; s=arc-20160816; b=rHKijFKYMCsDSImTv1R4KtwFwieH3l5xRc9OKnU4k3Ta/vPyWBP4MnYgG2pNYTwe01 hsd6svlqphjT1s8BT/0vwMwuD4xQpL90L5MfSjrkLsXp/d/U7lKUlhbYRAP5VAHiYFSz z3QWUuOoik0TYucvJ2aEgVJDmDBX+FTsu31IGKYpZ1zLyotTrFQWT7zuOuFiQjCf2C0F kZoaX87Q/d1DAZ851WCtEze3DcUooU20LW/Wi421sKnchYdD/5psIfHpHgZvXFRAOmV1 YK/Kocd6MRWWcIozqwmKt06FiwB/qEXlNzvXua29X3aLU560OuhPLO4DGw35urU8vZO1 /qJA== 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=qKmMP3ntWm8SMPbCv9q+yK+oS7ObuX4ggX/H2tpCZds=; b=wmnJYwKekBL4SmmgaV7ZmoFIjEH25DiH+v0a1soUceaRJdmSZkV7/U4HpHl2yVTTyU UkcSwY+Vays8q7T+jdARv2gWKtJa0OPhNZw+ih/yWNfabi/IbVzLKJ7WRV6DwVhKM95k LZuB4MVCeTjOzz6LLjS9gk8k6gBbQYM0Hsn5hJDbTJlEeK3uL9WMZYh+w9DlhwCSALIo U/vdHkBKx2CDsQh6cssxTYQRN6a61HbVpZbQecQ3Seq6eoawBZWJ5/lpvzMuA13gk1TR 7g9hm+k2mcezE3HzWG18Y1Sx9nuAERGbLygcD9NW/bcKYZKbyZHMee6N1zSqRBOJ0txY Dg/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HvDcFVUc; 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 y195-20020a3764cc000000b006a03e39acadsi7047866qkb.443.2022.05.30.10.17.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:17:42 -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=HvDcFVUc; 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]:54354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj1S-0001v4-5o for patch@linaro.org; Mon, 30 May 2022 13:17:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwS-0003w8-9k for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:28 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:42544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwP-0007Ju-NR for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:27 -0400 Received: by mail-wm1-x32e.google.com with SMTP id l188-20020a1c25c5000000b003978df8a1e2so4642191wml.1 for ; Mon, 30 May 2022 09:08:22 -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=qKmMP3ntWm8SMPbCv9q+yK+oS7ObuX4ggX/H2tpCZds=; b=HvDcFVUcMoTCfk+bQZfN9v0SczcVQw7FFa+SppuhqNo7U4eEkDeUShvJmtUZvONhf4 BqW2FI2OCbLD0izFCq/DrJJU09W9+VgLsaowruqWFY1BUwwzF0xcD+EDqeDJ5Wc3YT6E v98LhhuuFis5gRsxX0f+YJGTR3pyGQPH76Xaok0YztcRdR9EmoKngtumh6PLuKurCWLD DAj+UOBdUeI+7g7+Do24psCxAJ+m2CQQfmi3/JNJjOTfZuR4Q17/cDKv5x0MLFfG3ngn 5Av6seykhWUGRVGWd+dr4MxjahrSVBVDXoMSlwkidtD/5BS+NlTN21xmhwMlvS2eG3hx tocw== 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=qKmMP3ntWm8SMPbCv9q+yK+oS7ObuX4ggX/H2tpCZds=; b=hQFweYN1mK/6lc0nmhpKx4fiGagX6HjIpS4OJRTJmAZrGAHKRkZSDRTpLz9VYgXc4K EwnlSYHSoRG2AzC2aSNCJIFZfEos56+9y8022herSHUkWiSJFBvSLvOLJJJjzxcffhwb AW6SgVqDX/uo0cw6Iqb+82osKFIn16EVG3Yopq18m6R2NeoTW15XjtMtFWrEcOqtnb5L nCtIfq2z1kobjy0iidCklS8ZFSipp4acYKoah5w+8UrUuGFLeTos1t1loiqq1wxB/YL8 DVlN0pwCRNubV5KbUoByIZLSG7l5PrAHqVKuQSElqQlL42VjnjZxMqUCqtr26DjWUsbh CauA== X-Gm-Message-State: AOAM5309dvVZTINGsM2UzkyGxYzRrf925bnQfei2V21x0fY4FvfaJfeL tvMO2zQFg5pMpGl08MNPSy7F+VwpY9oKyA== X-Received: by 2002:a05:600c:257:b0:397:4106:5150 with SMTP id 23-20020a05600c025700b0039741065150mr19560335wmj.163.1653926901835; Mon, 30 May 2022 09:08:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 077/117] target/arm: Use TRANS_FEAT for ADD_zzi Date: Mon, 30 May 2022 17:06:28 +0100 Message-Id: <20220530160708.726466-78-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-75-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 83980f5ee6b..6b2f235e4a7 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3254,10 +3254,7 @@ static bool trans_DUP_i(DisasContext *s, arg_DUP_i *a) return true; } -static bool trans_ADD_zzi(DisasContext *s, arg_rri_esz *a) -{ - return gen_gvec_fn_arg_zzi(s, tcg_gen_gvec_addi, a); -} +TRANS_FEAT(ADD_zzi, aa64_sve, gen_gvec_fn_arg_zzi, tcg_gen_gvec_addi, a) static bool trans_SUB_zzi(DisasContext *s, arg_rri_esz *a) { From patchwork Mon May 30 16:06:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577270 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp432595mag; Mon, 30 May 2022 10:24:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/0g+coP99h9QNqf0SYlaGRFHaRD7pCt8+tgqiQXWg1SUFHa9j+Xib6i1dgUjZDHj0hsRO X-Received: by 2002:a05:622a:30e:b0:2f3:cfab:77a4 with SMTP id q14-20020a05622a030e00b002f3cfab77a4mr44595166qtw.326.1653931494106; Mon, 30 May 2022 10:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931494; cv=none; d=google.com; s=arc-20160816; b=W8wF+PUOfbRD+9/Nwa5qymWWB4L9Vmxi2CPGqYPQ/CGedocq6L1d/sM+86jiV7Sm2l l0/Ong2DygPxhj10DHZKTafKYTReX7hYSt+CnoJqt99O7eGMkCHsNFK97/sJYsnqnBkE q5qVyUOfSHnurz/uxJiwB9NQlpQJw+HV2x+k3fQVvJjHe4QcGKuEUVB4HFSMLfxVxw8N W3+oMSoU7Ob0yohiRPNaLM82Kng4oPjm7CV8GfthxR7WXqfbqfaogjMfmJV+uZ59fl9H LaelWH7cbA4oFqjjetSOEip9ieE6GH1nyhiFu9UKx5K6ugOiAl/kIivo/1J94rRjLpvJ zNZA== 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=yOfBGJsQ6kG2clBgPZOWH9zA3Hm2JWOzez0eyAwJGf8=; b=TaMul3v5xKlFiIDqDy9sp9wi+S+D0oPT8NfAjqArF7HgWFj9sSESCLPm4ttwg6fySp ltP8Se3/M25gsBwZxt5fuGcBGpnOq8PaYif4zcXYGm6i4dVxrefPhTDOFyLFqeehR6ls pzXnD4u21YUxGsR0JOGw9HNGtN9LtFpnEyKGMuhAdV6JawA6PS5uyTNOXcY6bO1Uxvc2 q6OEgUG7m0NYgfdTWqLLkyszzXAWr4q7utfFAAB6e2p0VSyDHrqwtCcppuVkyNxGm9Q7 JZoqe4YMbS9uRjOwDbhWrM/G3eA2b80LlxWMTpJYvDkdtAMifBld5SeY0UCVYLsaSS/m Cneg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IL1Qp3TL; 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 v9-20020a05622a130900b002f3b4aa7030si8683762qtk.27.2022.05.30.10.24.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:24:54 -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=IL1Qp3TL; 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]:45884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj8P-0007B3-M2 for patch@linaro.org; Mon, 30 May 2022 13:24:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwU-0003xV-Hg for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:31 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:44833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007QN-In for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:30 -0400 Received: by mail-wr1-x430.google.com with SMTP id e25so4655035wra.11 for ; Mon, 30 May 2022 09:08:23 -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=yOfBGJsQ6kG2clBgPZOWH9zA3Hm2JWOzez0eyAwJGf8=; b=IL1Qp3TLKwuiClquIE4GIraSqF7RykopY7alnQF9JfkkWfWlyDm8QYi4wz9demdM7W uxpwDtnFGBoTdoVHuhuBJMi1aNrj/NO9x2U7dRg5ax6lKPH+UI1hr6x4ilP3NalDEC1c C1N4VmMoh52XRGcfSRmoUPocqfhPpkqpJdIThvBAMRHzB5yZLBauf66R+WmMYzXzstwD wsWP1B2IoNi+6R+BHN3HFrFNSKfc2nHvdzr2Vo7EP/2YoZlmJ+EDiUje6gbDwD8Dcr4/ lUt6ewaI+VLAPUCXnlxwFEvqfTZdzLATuUy70uuU4gJMj82zoxvnxlVHrVGrUhRh48D+ Qb3A== 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=yOfBGJsQ6kG2clBgPZOWH9zA3Hm2JWOzez0eyAwJGf8=; b=D3YJM8Hn6hFO3ZE1VaVUcbxz+DPcPfNSyxcnula5lO9tFcTEe35kbDjjyqgLURqGqU cUFiP1p/wjeJuwnnpfWqZzTmWvnxWZTd6xEvJ12Bu6dAuSGkOip/kmu/pweA3ougWH2r Oy5GEnnZDaoM3lG/RSzxJ+RGtEzQ6mOMIQuqfe9RKPQLlcV1HTHXXdkkf0H3C06zvj26 nJmRpGGSKKNpbCb2mfbg5V3A6bCBzmnd8aIQvrEQydd3LrcyQiv/yR0EjfeGrZa4l4on bJ//KCIRQInWr8UAq8xgSQu0l/PiwtYFZE5/6TlQI2VvF6AqShu+9txtp3fS7jCu7rkq lYgQ== X-Gm-Message-State: AOAM531WDUfOd4HM+56J7Mm2cC0f/U3sFbEQ+pEbyQjxtH/xSu4467U/ UPp2n9lxt/vvZ6Z9jIjnEKlWHWeOZWEYFQ== X-Received: by 2002:a5d:47c5:0:b0:20e:73a0:79a0 with SMTP id o5-20020a5d47c5000000b0020e73a079a0mr43526239wrc.632.1653926902538; Mon, 30 May 2022 09:08:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 078/117] target/arm: Use TRANS_FEAT for do_zzi_sat Date: Mon, 30 May 2022 17:06:29 +0100 Message-Id: <20220530160708.726466-79-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-76-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6b2f235e4a7..e6434589f46 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3313,25 +3313,10 @@ static bool do_zzi_sat(DisasContext *s, arg_rri_esz *a, bool u, bool d) return true; } -static bool trans_SQADD_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_zzi_sat(s, a, false, false); -} - -static bool trans_UQADD_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_zzi_sat(s, a, true, false); -} - -static bool trans_SQSUB_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_zzi_sat(s, a, false, true); -} - -static bool trans_UQSUB_zzi(DisasContext *s, arg_rri_esz *a) -{ - return do_zzi_sat(s, a, true, true); -} +TRANS_FEAT(SQADD_zzi, aa64_sve, do_zzi_sat, a, false, false) +TRANS_FEAT(UQADD_zzi, aa64_sve, do_zzi_sat, a, true, false) +TRANS_FEAT(SQSUB_zzi, aa64_sve, do_zzi_sat, a, false, true) +TRANS_FEAT(UQSUB_zzi, aa64_sve, do_zzi_sat, a, true, true) static bool do_zzi_ool(DisasContext *s, arg_rri_esz *a, gen_helper_gvec_2i *fn) { From patchwork Mon May 30 16:06:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577263 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp429889mag; Mon, 30 May 2022 10:21:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOzj/nEpEMhOzdsDat3FOk1BQqIFRJJsZPIeY7Acfd+ugJbkrA1t7KK+BVfAPzKRfu4Pzu X-Received: by 2002:ac8:5a43:0:b0:304:b751:a17f with SMTP id o3-20020ac85a43000000b00304b751a17fmr1467285qta.371.1653931270779; Mon, 30 May 2022 10:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931270; cv=none; d=google.com; s=arc-20160816; b=R878yVDBzzfP5oz40kF67NeXqaj9pze1VUfygTD6Gbdn2EIY+m5291ooyOjNVbOaCq i2b8XHySeNqyzuNgdk7oX2Ev4jbu+zj6XReu5x/IONMd/NGz4badLLF0n24xcRuKd+4/ LDUEyDsTt2mOMGqENJJWu3K1My4PVYK2/yB5bUNW0J8oAEiIkr/oYzVtIU9bd6K2cwMJ lgMlMsEFodlo+QtbihcycKGMMpEiO/tx8e3k+Msml8wluViB4PrziiZ3wRU86ngLALxi FtkdwJGq9JVsZyod5n77txCfF+erXpJprEmJBZ/Cf46Suu/Kd+cfRWMqT8Ppd2mCveiO daeQ== 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=gpFeOP5hFHQHN7rmmvGomwQ+EZc/H5uDtVH+BHzCxlI=; b=WXqjUcb2eWkuSY4xZjxkQVMG7SUeMHOCTuzOtvVDe+JsXskKPyN7bsEjDzmsxnQ2Nc aoYTOYDaKrqzoNE2XQZLF0iCi0iXjlJ4zHoxKFlL3k2IasRKKWdysLV1ots0DT+dUkWy wMbJum0MHgU+xyRzTTvIiLj0c6cnaQeLwxZjoOayzzL7M3Up+VjmcNnEkYFMxPEC7/bX Flw+MNvpoHr0QhR+4j33vSiCc5+AOToF1SgGezHB8iApQ226H5Rnkj/8fkNA1zmGQkG1 w8gy8j7slVhPKH3SqlMIN5kMKPguJOgR8XLD4KO7u7W4YUMJRuok9wThhYPuaaYuUJMa dfaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o6MiJ15V; 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 iu10-20020ad45cca000000b0046435854368si5688301qvb.93.2022.05.30.10.21.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:21:10 -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=o6MiJ15V; 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]:34608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj4o-00080W-BN for patch@linaro.org; Mon, 30 May 2022 13:21:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwT-0003wl-Ie for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:29 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007Be-Ib for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:29 -0400 Received: by mail-wr1-x430.google.com with SMTP id p10so15257378wrg.12 for ; Mon, 30 May 2022 09:08:23 -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=gpFeOP5hFHQHN7rmmvGomwQ+EZc/H5uDtVH+BHzCxlI=; b=o6MiJ15V9Sdr57L5kxxxZ4hpd6r3/nhNuloTITs4FHywu8xxRbjPspgqnmeq+c76l1 ZRPJOmqk0C7rnmNig4VEQc68rHbwFFPe62IDD1lDzBxznAqo2zbb6FdAupz9CjmvPoGz LuBNJdp0ilqbe9NzZaIJKAUzMuhJX+du+CCfTNV65i8JVDni8SpJ7Saoyl5cKAbxSXq2 2H9U5z/iKoFuKtinzTRvP4Nbo+44cfMEcVgVhueLPgHFsYGCndXAftNNOcHTKsM4DaGK cbth2443oaw1BOtJQXJFEFOiThR6cNq/74ahT4zEAgOMDvWKZ+EHihro+Yuj9k0fNlTp VYdg== 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=gpFeOP5hFHQHN7rmmvGomwQ+EZc/H5uDtVH+BHzCxlI=; b=ciErCxVlIWpgDlqdSWZ9o0bc9RDZ+cEjUjqjGQNvFJzfEw34GFvuMeafI5lvyIQcJT /kXQM6xSBxvJF0BUE0vc7o0cVOnz2hV9oJNMOXw5xi6ajLveeGBDeRBkcyIn6EnAw5sP Pd4AUmd6KWtDoE90uvAmgI1bjFJHYpTJ+JXuotOvgl+kpeubooXL/Ov/d4xIWCLfGXR1 acreIkQcW2JdxgV4TlFTWWKrlEjaooRHLYOFeYMBfpK8RWXhOa258/UBrYoR8kxksJJv cz3V9Vf/OAEkAYQMbTRW7sn0kCEBs4NqxdZiI6vgdczFyGlX1KaDXa/LL4zQ7W0J9XgG aJaQ== X-Gm-Message-State: AOAM533PGYOj/8pFBrPwTOHxk7LlrSZkNbEebQ3ICWUweEtwAJHva0Q+ C/p3XkD+CC7IPVtlajrpPkV9uUxTGCl4cA== X-Received: by 2002:a5d:47a1:0:b0:20f:ecc4:7f6c with SMTP id 1-20020a5d47a1000000b0020fecc47f6cmr28373503wrb.236.1653926903225; Mon, 30 May 2022 09:08:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 079/117] target/arm: Use TRANS_FEAT for do_zzi_ool Date: Mon, 30 May 2022 17:06:30 +0100 Message-Id: <20220530160708.726466-80-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-77-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e6434589f46..b8bd1047b0a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3330,14 +3330,11 @@ static bool do_zzi_ool(DisasContext *s, arg_rri_esz *a, gen_helper_gvec_2i *fn) } #define DO_ZZI(NAME, name) \ -static bool trans_##NAME##_zzi(DisasContext *s, arg_rri_esz *a) \ -{ \ - static gen_helper_gvec_2i * const fns[4] = { \ + static gen_helper_gvec_2i * const name##i_fns[4] = { \ gen_helper_sve_##name##i_b, gen_helper_sve_##name##i_h, \ gen_helper_sve_##name##i_s, gen_helper_sve_##name##i_d, \ }; \ - return do_zzi_ool(s, a, fns[a->esz]); \ -} + TRANS_FEAT(NAME##_zzi, aa64_sve, do_zzi_ool, a, name##i_fns[a->esz]) DO_ZZI(SMAX, smax) DO_ZZI(UMAX, umax) From patchwork Mon May 30 16:06:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577290 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp461903mag; Mon, 30 May 2022 11:04:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5vx+YwYZT0C26YLBU/YmxJVxMUj9CfYVo5tpl+kRZp93A8hwK7AXRlfIh+XvPTQrpWR3F X-Received: by 2002:a05:622a:4c9:b0:2f3:c6a9:39d with SMTP id q9-20020a05622a04c900b002f3c6a9039dmr45263586qtx.363.1653933845779; Mon, 30 May 2022 11:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933845; cv=none; d=google.com; s=arc-20160816; b=bgzc/s0sz00ytUs2iSeutn+sKsXGxGWw65B23O5XUnHSzjCEaPEmS9LGj4Z7MSsk2V iLDs66/ZATbCg5BSC5q9SBHgqih561c0I/GQ6+hFyer640cJPRyJZcItd4PZzXmRt6tu bj4Bqiq1IyEZaqI/QWvJxz7w/l6axmYlfb4JRnspo553tb8VyBTr4s3iICJ/AKPuIzse 2ULMBQkgCKOP2RF42paBRtcnSw3ftHzfy4H+0Hpkb4yNWFx2WQHofuPkyG+HRPEF/vjq 24v1zzO+kW5uNSCpGjJt3ycoZpiPN1YFQirf7eSCc1RWhT5Co/xvMaG+/yRv7zh0jdhl mZOA== 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=3ZaK8O8eU5pJi1dV9nyyn078aiiGZhquvOpuL5BWDR0=; b=0HDWUs/fNTmF0UgMNoeVIFApG+8tWDpe3uxCw3x3GMDC7m+bT5jbBKD9RDPRaHU7Xb 6o3dBmaTXkiV0xj6IlQODoxygy8gg2WA8QqK5nUv50DbHQLYy0CgYMd7iWL7WU3sMkgw lxjdysHRaGGJqp7YDXBkJWiE40/5iFh6qt6ekY0jcxCV/OC0Zvt1xQm/wBNI2f58okTD EhEtTbW/BnhWU+6LRz4t2RvLPekLyQAJOjEmk0XLHqiWemrto3E5GKyawofl8dSVqMLq mk3w5nKYsS/C6Epd8aAAvpGEpcc1vgreZEUrDo0kC3/fIE9gwHNpLWnb3FqfhMZo5LEw tG6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ldzSvYeN; 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 i17-20020ac85e51000000b002f3e174ca23si7720437qtx.158.2022.05.30.11.04.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 11:04:05 -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=ldzSvYeN; 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]:36692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjkK-0000vX-8c for patch@linaro.org; Mon, 30 May 2022 14:04:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwT-0003wm-Ih for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:29 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007Aw-AD for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:29 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:08:24 -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=3ZaK8O8eU5pJi1dV9nyyn078aiiGZhquvOpuL5BWDR0=; b=ldzSvYeN5ORw2gxEK6h2IqJ3tUAMw3VFYlboXh6UJMCcV+rmHdC+T+jxIwD3hJa84i UmyHvJ4V/NicgGDrL82u8gWQZcAZMznnCnxMe8izII1CcuZOIdkzGbapRSaGLTGBcbU5 MZt07ww8eEzvB83DVUf1VFG6Yntt5nOb1VJghG+wvhUaoRHoIkm0Ics+ytg1E6Yo2g8t 7hZDvskCZ443xlN5WLOjLjlXbSjUMwig7M2ZvaeAjJPAgQO8cIrqzC8O32G4tqbBHPaG N8BPoStjpmuW7Nw7jQmTYUleFc0YEIok4Hc8qlSNXCl+BMDXSBAZ3Wk0mYUiD8XzxnBx To+A== 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=3ZaK8O8eU5pJi1dV9nyyn078aiiGZhquvOpuL5BWDR0=; b=kh8CA5wFd5EiRdWd3zycKdHnGzc0pXlGHGjTT3O3asl2s6nGtS4A+CzGWJGyNLpe+w LXuV41icsXJln3HA43FHLUqEgC0hrsgL6qb8v8KhxwDrmyuH7GvLQuMlqGo3/VG+Fwh5 U56I8Kl/7m8Qs2IC6BkYRVM2tWCUq+7uSVUQ+0Xa3VTa/rk13qONPGAGo+VTDR2+Ue+k yGm16UNDsh1ErewWMdLB/4pqauCVmdN5z/4qokhRrsn4FP7hvm0bk4emSTzmSneLnnnr pydeTSql7J00nZB+o5pdUXuvkCMWv/ESOMMXChZrFm1M8AMlZgMJb9ru8PiPLYmQdYBn zywQ== X-Gm-Message-State: AOAM530utEGfnNwJa4FkCaIZXu/EErMuaM8LNkGHOcOIZBtBa6CFF0Og 96NAPiCy40Lnk3FhAvQpSZB7flc2jQYNYA== X-Received: by 2002:a05:6000:352:b0:210:3509:7364 with SMTP id e18-20020a056000035200b0021035097364mr4724693wre.82.1653926904107; Mon, 30 May 2022 09:08:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 080/117] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz Date: Mon, 30 May 2022 17:06:31 +0100 Message-Id: <20220530160708.726466-81-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 these for the several varieties of floating-point multiply-add instructions. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-78-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 140 ++++++++++++++----------------------- 1 file changed, 53 insertions(+), 87 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b8bd1047b0a..a799ce3110a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -205,6 +205,35 @@ static bool gen_gvec_ool_arg_zzxz(DisasContext *s, gen_helper_gvec_4 *fn, return gen_gvec_ool_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, a->index); } +/* Invoke an out-of-line helper on 4 Zregs, plus a pointer. */ +static bool gen_gvec_ptr_zzzz(DisasContext *s, gen_helper_gvec_4_ptr *fn, + int rd, int rn, int rm, int ra, + int data, TCGv_ptr ptr) +{ + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + vec_full_reg_offset(s, ra), + ptr, vsz, vsz, data, fn); + } + return true; +} + +static bool gen_gvec_fpst_zzzz(DisasContext *s, gen_helper_gvec_4_ptr *fn, + int rd, int rn, int rm, int ra, + int data, ARMFPStatusFlavour flavour) +{ + TCGv_ptr status = fpstatus_ptr(flavour); + bool ret = gen_gvec_ptr_zzzz(s, fn, rd, rn, rm, ra, data, status); + tcg_temp_free_ptr(status); + return ret; +} + /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) @@ -3485,24 +3514,15 @@ DO_SVE2_RRXR_ROT(CDOT_zzxw_d, gen_helper_sve2_cdot_idx_d) static bool do_FMLA_zzxz(DisasContext *s, arg_rrxr_esz *a, bool sub) { - static gen_helper_gvec_4_ptr * const fns[3] = { + static gen_helper_gvec_4_ptr * const fns[4] = { + NULL, gen_helper_gvec_fmla_idx_h, gen_helper_gvec_fmla_idx_s, gen_helper_gvec_fmla_idx_d, }; - - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - status, vsz, vsz, (a->index << 1) | sub, - fns[a->esz - 1]); - tcg_temp_free_ptr(status); - } - return true; + return gen_gvec_fpst_zzzz(s, fns[a->esz], a->rd, a->rn, a->rm, a->ra, + (a->index << 1) | sub, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); } static bool trans_FMLA_zzxz(DisasContext *s, arg_FMLA_zzxz *a) @@ -4040,26 +4060,18 @@ static bool trans_FCMLA_zpzzz(DisasContext *s, arg_FCMLA_zpzzz *a) static bool trans_FCMLA_zzxz(DisasContext *s, arg_FCMLA_zzxz *a) { - static gen_helper_gvec_4_ptr * const fns[2] = { + static gen_helper_gvec_4_ptr * const fns[4] = { + NULL, gen_helper_gvec_fcmlah_idx, gen_helper_gvec_fcmlas_idx, + NULL, }; - tcg_debug_assert(a->esz == 1 || a->esz == 2); tcg_debug_assert(a->rd == a->ra); - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - status, vsz, vsz, - a->index * 4 + a->rot, - fns[a->esz - 1]); - tcg_temp_free_ptr(status); - } - return true; + + return gen_gvec_fpst_zzzz(s, fns[a->esz], a->rd, a->rn, a->rm, a->ra, + a->index * 4 + a->rot, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); } /* @@ -7327,17 +7339,7 @@ static bool trans_FMMLA(DisasContext *s, arg_rrrr_esz *a) return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(FPST_FPCR); - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - status, vsz, vsz, 0, fn); - tcg_temp_free_ptr(status); - } - return true; + return gen_gvec_fpst_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR); } static gen_helper_gvec_4 * const sqdmlal_zzzw_fns[] = { @@ -7535,16 +7537,9 @@ static bool do_FMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sub, bool sel) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - cpu_env, vsz, vsz, (sel << 1) | sub, - gen_helper_sve2_fmlal_zzzw_s); - } - return true; + return gen_gvec_ptr_zzzz(s, gen_helper_sve2_fmlal_zzzw_s, + a->rd, a->rn, a->rm, a->ra, + (sel << 1) | sub, cpu_env); } static bool trans_FMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a) @@ -7572,17 +7567,9 @@ static bool do_FMLAL_zzxw(DisasContext *s, arg_rrxr_esz *a, bool sub, bool sel) if (!dc_isar_feature(aa64_sve2, s)) { return false; } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - cpu_env, vsz, vsz, - (a->index << 2) | (sel << 1) | sub, - gen_helper_sve2_fmlal_zzxw_s); - } - return true; + return gen_gvec_ptr_zzzz(s, gen_helper_sve2_fmlal_zzxw_s, + a->rd, a->rn, a->rm, a->ra, + (a->index << 2) | (sel << 1) | sub, cpu_env); } static bool trans_FMLALB_zzxw(DisasContext *s, arg_rrxr_esz *a) @@ -7625,19 +7612,8 @@ static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - if (sve_access_check(s)) { - TCGv_ptr status = fpstatus_ptr(FPST_FPCR); - unsigned vsz = vec_full_reg_size(s); - - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - status, vsz, vsz, sel, - gen_helper_gvec_bfmlal); - tcg_temp_free_ptr(status); - } - return true; + return gen_gvec_fpst_zzzz(s, gen_helper_gvec_bfmlal, + a->rd, a->rn, a->rm, a->ra, sel, FPST_FPCR); } static bool trans_BFMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a) @@ -7655,19 +7631,9 @@ static bool do_BFMLAL_zzxw(DisasContext *s, arg_rrxr_esz *a, bool sel) if (!dc_isar_feature(aa64_sve_bf16, s)) { return false; } - if (sve_access_check(s)) { - TCGv_ptr status = fpstatus_ptr(FPST_FPCR); - unsigned vsz = vec_full_reg_size(s); - - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - status, vsz, vsz, (a->index << 1) | sel, - gen_helper_gvec_bfmlal_idx); - tcg_temp_free_ptr(status); - } - return true; + return gen_gvec_fpst_zzzz(s, gen_helper_gvec_bfmlal_idx, + a->rd, a->rn, a->rm, a->ra, + (a->index << 1) | sel, FPST_FPCR); } static bool trans_BFMLALB_zzxw(DisasContext *s, arg_rrxr_esz *a) From patchwork Mon May 30 16:06:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577273 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp435413mag; Mon, 30 May 2022 10:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuL2bpucKbl2cpms71PqfVI01J8wQHkYR6xOZx0Ag5HN1BFszs1twgz0/2jNHo+6IdByWr X-Received: by 2002:a05:6214:5013:b0:464:5348:2ef3 with SMTP id jo19-20020a056214501300b0046453482ef3mr3936143qvb.69.1653931701056; Mon, 30 May 2022 10:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931701; cv=none; d=google.com; s=arc-20160816; b=Rgkd0gcwR8T5oRnZ1JZerJnjstM2NW8e1KsMipthcGV26KbyHyP3aSrHCC7g2Jd5T4 KE3Tk/N1hqVgq7iDRZBg6lbhL9RtduZuqkCqDK8qxVdVfhcvU8m1YT1Mw2kp1jcvx936 xD8ngAXmQ3YzDsroiUEu399cmQ1CzAfruqKl0yy1aiF2qcjHYvg93xakGM05uV8pYEK1 JCVG9FKTJTy+IUijxmyf9gbwlJ8Rgto+qZk4Ke8/R0hgxAbbOWBuXRiBNie+705fjRhf cd0qwzgO6feXfHHqBigav3TTW1Wy0QnYCbucB3ndKEdw+RDWVb2clMIgvTbF7E2FufXJ o+Fw== 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=ebGGe9LyDpXcGYT3qpOhGNDX6ZvB/bb1IoWjtN9lGi4=; b=GIkZK2qHMPWX38aeClnnhfIraUpKxe3tFQG/sckLKZ/6YWFWCnBtRsXSkFYAFEKZRk ubhl7lhCfrdz+BDc2ZN+Zhv9pPIkWR1MqNtdH4V77CZfGXAVKXoEPETN8AEVNH1+vBmi +X5pF4Ce7jivnzwebg1lvDk+FXJ7xgU24/nncTq5Ts8RUMmL5nmxe5cGjdzfbCbUdk8y NSgosmSIfixVspXWs+UJUQXI1XFwjevYgtkzeKOd8TpyB/lLaPdiLyfeIhFfxvnrziBr H9nKLYCQ6cR2Gg51Jlqhm3iUEhX0++YgE0lwwlrJ5CPYtp0j8FhY9liLzV6/R+YbNUjq xMCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XHWnKUuY; 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 b1-20020a05620a0f8100b0069fc9d0a280si6339211qkn.566.2022.05.30.10.28.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:28:21 -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=XHWnKUuY; 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]:54376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjBk-0004WN-Kg for patch@linaro.org; Mon, 30 May 2022 13:28:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwb-00044d-VA for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:38 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:41903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007GW-Hj for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:37 -0400 Received: by mail-wm1-x333.google.com with SMTP id p5-20020a1c2905000000b003970dd5404dso6724791wmp.0 for ; Mon, 30 May 2022 09:08:25 -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=ebGGe9LyDpXcGYT3qpOhGNDX6ZvB/bb1IoWjtN9lGi4=; b=XHWnKUuYk48kGNFSo0pQOXtsVY2Agf+Cv7umCKAWmlUapXprWQ3lWJpN3BlzYMDPmy FFtG5/NO22AT0GXyczaUaKhmgkQPqHVfLKCwRyekjvOfJX0FDzqz31yXdSL0bzG8ghC1 0I3pGcqFX+Hk/vRI/b+Js+vECvZlDwA85PzVXOMoxTpoZw66SXAEOq2VvxF6vXTrm8x6 /3fVNfoZNahmppw9B6Zs+gfB0Y+8HFTZstL4tS2y+19o/npyhAWS1/9zVMhaOEMIcWc3 c15zT3ly0I8ihMj6tgPbVTPMB0gJZ6R7slE8+KhML3u7dy9S9c3Gl2frJRK0veoCZ+qb DfxA== 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=ebGGe9LyDpXcGYT3qpOhGNDX6ZvB/bb1IoWjtN9lGi4=; b=gMH7bqW1gpLmVU67ThZiIKWvUYLsDw57fg6gT4GZh1tti39De5XDfTamtlHw4u62rE /Vmwk33v9s7+AWP/9sPNiIrKAQsf6uavqI/8y4acRz96yNry1tjsjjx5Nyw5PXZGG5oD fJ/Qlw48FxI3tyXyiYYQ/z8xrExqRR02XehqfpnbpLaXkI7fk37fVMENzcZwZq/hFFaE tv5qaXU0GwusYxKlnTs6kSpDbHbEE2hxiw14EHe3+ed1IvTawN+j+zPAu98TmFtqRD7u biDyJIEhnghrFX1f7XGjt91JV873NcMKAergJJHmGwPSAApDBr+xYsSX0DIpakLMnG+8 SvRA== X-Gm-Message-State: AOAM5309DF04o/tjItuSMjgLRGKQf8CLjdBNMlLopa6MVrJ5WHBGDKoj gSLB045sMMvcEQbJvGcTXRheKoVz2gfVEA== X-Received: by 2002:a05:600c:3d10:b0:397:835e:bf64 with SMTP id bh16-20020a05600c3d1000b00397835ebf64mr18211323wmb.167.1653926904833; Mon, 30 May 2022 09:08:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 081/117] target/arm: Use TRANS_FEAT for FMMLA Date: Mon, 30 May 2022 17:06:32 +0100 Message-Id: <20220530160708.726466-82-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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 Being able to specify the feature predicate in TRANS_FEAT makes it easier to split trans_FMMLA by element size, which also happens to simplify the decode. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-79-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/sve.decode | 7 +++---- target/arm/translate-sve.c | 27 ++++----------------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 7e79198f5ba..a54feb2f61d 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1598,10 +1598,9 @@ SQRDCMLAH_zzzz 01000100 esz:2 0 rm:5 0011 rot:2 rn:5 rd:5 ra=%reg_movprfx USDOT_zzzz 01000100 .. 0 ..... 011 110 ..... ..... @rda_rn_rm ### SVE2 floating point matrix multiply accumulate -{ - BFMMLA 01100100 01 1 ..... 111 001 ..... ..... @rda_rn_rm_e0 - FMMLA 01100100 .. 1 ..... 111 001 ..... ..... @rda_rn_rm -} +BFMMLA 01100100 01 1 ..... 111 001 ..... ..... @rda_rn_rm_e0 +FMMLA_s 01100100 10 1 ..... 111 001 ..... ..... @rda_rn_rm_e0 +FMMLA_d 01100100 11 1 ..... 111 001 ..... ..... @rda_rn_rm_e0 ### SVE2 Memory Gather Load Group diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index a799ce3110a..364e419f3eb 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7318,29 +7318,10 @@ DO_SVE2_ZPZZ_FP(FMINP, fminp) * SVE Integer Multiply-Add (unpredicated) */ -static bool trans_FMMLA(DisasContext *s, arg_rrrr_esz *a) -{ - gen_helper_gvec_4_ptr *fn; - - switch (a->esz) { - case MO_32: - if (!dc_isar_feature(aa64_sve_f32mm, s)) { - return false; - } - fn = gen_helper_fmmla_s; - break; - case MO_64: - if (!dc_isar_feature(aa64_sve_f64mm, s)) { - return false; - } - fn = gen_helper_fmmla_d; - break; - default: - return false; - } - - return gen_gvec_fpst_zzzz(s, fn, a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR); -} +TRANS_FEAT(FMMLA_s, aa64_sve_f32mm, gen_gvec_fpst_zzzz, gen_helper_fmmla_s, + a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR) +TRANS_FEAT(FMMLA_d, aa64_sve_f64mm, gen_gvec_fpst_zzzz, gen_helper_fmmla_d, + a->rd, a->rn, a->rm, a->ra, 0, FPST_FPCR) static gen_helper_gvec_4 * const sqdmlal_zzzw_fns[] = { NULL, gen_helper_sve2_sqdmlal_zzzw_h, From patchwork Mon May 30 16:06: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: 577287 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp455326mag; Mon, 30 May 2022 10:55:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEyyjqlboUe3xE+n5niTDwJrODNZmZElkhh4pDz89GZQvUOYCEszCEdnHFjTjqR3VSnGqn X-Received: by 2002:a05:6214:2305:b0:432:f1d4:6177 with SMTP id gc5-20020a056214230500b00432f1d46177mr47324652qvb.107.1653933341969; Mon, 30 May 2022 10:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933341; cv=none; d=google.com; s=arc-20160816; b=eXe96EmmLhsucb7hacIF7n2W5r/EKAAiopqn4ruqbei3FixYGSa3rxSuP8uwWGuYsX Q/6Tdbq702x1oNf8qau+coECED3LyKOBHl5EQ3W++td0PwozV1FNyOyYsKZejCwFKhQn eFYaMU2MbxsDNFPZ8WW89oqTKO3MAVfieZT9k8zgRAEt8fx4QBBnghIy/PebEOigW+mN poZMcHHvYoZo0hvVRKzCf2TCkP6UqFIWxX6KKCU6AlvhKJvREVZHPZ1whQtfWWl2Wkfo E2BLjVhxxWvkkmPNbHznvU7Ne/i+MEJl2je6Cbq6Mh7DmpHzuYAYZgT9bR9hM90mLKsA IuhA== 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=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=FxzHVzxVkAxcyI8QXKeeoZG6KAKGnqDgd9OEcCOgJmAKxa0OBTV4Tkjkxs2xSEmtnm ehnJWwziWAk6smOfEhSN1xbI5E7RXg6FqpxWtL3GoJBF8J9dnLkcJjNC3Oxo3BoozA0J RAita7YZIXs4MSYMH9vetBIP+7/LHOAEVP1CC11f0NpFjyMV1hEet9DyOYV53S+o7X6g lv4kRl/9LqrwFvCeJ+2OdfBKd++68jARZYy6HYKamT2KH6JPV+DYZq19SSB+qbv+Stg7 y2KIWXTdw3vhTs/W0dLx4iZhrDZqoas9l04Fuu7ov8Yjoel3KBuSr9AqabyUIXR4Khk8 LTeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ap26YMBt; 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 h9-20020a05620a284900b0069f38f14eb8si8185335qkp.84.2022.05.30.10.55.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:55:41 -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=ap26YMBt; 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]:46512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjcD-00052v-Gm for patch@linaro.org; Mon, 30 May 2022 13:55:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004Db-Uj for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007Aj-IG for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: by mail-wr1-x42b.google.com with SMTP id e2so15314489wrc.1 for ; Mon, 30 May 2022 09:08:26 -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=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=ap26YMBtCQ2ftZKvNv2zQrQcmKGZ54Qeyn3lNLRTbWjhSP5C/hQ/oBSqxwbWkjckaz UF3T53K/IrFm7XAKqwBnRYEk0cqAX0uKXxLUQ0pIlHk4VziJIgL0KbuEywbmbx6ehib7 NMpIOFE1EY+3NdhCBzwH3D1mRnnNZRbXT3wtTalAtXYxqvSEdV9sl0tEmbTlFZ2OmVCD gqip2BUe87hdgIwNmXqZbu3lGhLtHy9+8VRHaXat2pF9+PXb/bru238nqJiNwQp5Q8k6 tJu6FwG5bGL+54Tq1EiWt7IKcOKiye7XoDnHPAtLMGGfXqn7zhRyw95JzI81T4Y3MjQ5 kcGA== 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=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=4UB+/NMe7gyxniP3XjJG393ISbvjnfotM4EvW0s80eAVlBmccjSOgKpvwQ9bXndU7E V/rIiBXSb2RAzyXdtjwP/3/cUo21iWs2hKdUB6iLkFm38klI6ZlPV3W7nbJtiXTvUuad cl2tOAcLNExzhmc3Vu650VH7vsl0LuHD/qmiQpo+SMTtumgAIljDo+tc0h3uvA2wueTE 2yn4IiKdC5dV4n728LRfyS3wWTRw/hzC+k5C+S7XXoh1IdVfMqZ4L3fQqiFeiP5XPYtL 1M1VU7CCIBDjcmQ9RoTCHHERLZxgUUbRQl3sQAIAiP/DksY5Y7FlDUI+lIwCiy+glsup /iXw== X-Gm-Message-State: AOAM530Zg6nAlujrqD9Md5TnUbAj4TzoEOFrLxmtNReyHf+mpoVJWgEy 32NLmVXI9mGI1S6xn06/MZV8xFhzgzm7qA== X-Received: by 2002:a05:6000:3c1:b0:210:2e6d:86cd with SMTP id b1-20020a05600003c100b002102e6d86cdmr7214844wrg.335.1653926905683; Mon, 30 May 2022 09:08:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:25 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 082/117] target/arm: Move sve check into gen_gvec_fn_ppp Date: Mon, 30 May 2022 17:06:33 +0100 Message-Id: <20220530160708.726466-83-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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 Combined with the check already present in gen_mov_p, we can simplify some special cases in trans_AND_pppp and trans_BIC_pppp. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-80-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 364e419f3eb..f33bc9d480b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -370,13 +370,16 @@ static void do_dupi_z(DisasContext *s, int rd, uint64_t word) } /* Invoke a vector expander on three Pregs. */ -static void gen_gvec_fn_ppp(DisasContext *s, GVecGen3Fn *gvec_fn, +static bool gen_gvec_fn_ppp(DisasContext *s, GVecGen3Fn *gvec_fn, int rd, int rn, int rm) { - unsigned psz = pred_gvec_reg_size(s); - gvec_fn(MO_64, pred_full_reg_offset(s, rd), - pred_full_reg_offset(s, rn), - pred_full_reg_offset(s, rm), psz, psz); + if (sve_access_check(s)) { + unsigned psz = pred_gvec_reg_size(s); + gvec_fn(MO_64, pred_full_reg_offset(s, rd), + pred_full_reg_offset(s, rn), + pred_full_reg_offset(s, rm), psz, psz); + } + return true; } /* Invoke a vector move on two Pregs. */ @@ -1317,19 +1320,13 @@ static bool trans_AND_pppp(DisasContext *s, arg_rprr_s *a) }; if (!a->s) { - if (!sve_access_check(s)) { - return true; - } if (a->rn == a->rm) { if (a->pg == a->rn) { - do_mov_p(s, a->rd, a->rn); - } else { - gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->pg); + return do_mov_p(s, a->rd, a->rn); } - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->pg); } else if (a->pg == a->rn || a->pg == a->rm) { - gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->rm); - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->rm); } } return do_pppp_flags(s, a, &op); @@ -1358,10 +1355,7 @@ static bool trans_BIC_pppp(DisasContext *s, arg_rprr_s *a) }; if (!a->s && a->pg == a->rn) { - if (sve_access_check(s)) { - gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm); } return do_pppp_flags(s, a, &op); } From patchwork Mon May 30 16:06:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577280 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp443152mag; Mon, 30 May 2022 10:37:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFqC1ilGlzViQ+Hf+iBXM1t5G1r8HPxM2e/6F170/MSMnMpk12K7rQVF/deyAjlRNSjxK8 X-Received: by 2002:a05:622a:547:b0:2f9:1e08:1217 with SMTP id m7-20020a05622a054700b002f91e081217mr39276550qtx.417.1653932248337; Mon, 30 May 2022 10:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932248; cv=none; d=google.com; s=arc-20160816; b=jQtJU7Kuid1PytlztdM7qUzMnmsV4xaPB8DayubQ8JAxS7A2h/3ejWPj0vDQYCyMnr 1huRF1efCuBB9WQV9eRPJSXL0llVMRfKTVMZv4wLtrYWdL+QIzz8HSJwIB0nmdw2/ikd w4BqdLNxnlaM5Dj9ZxKzGwYXtF6cqzpqin6zXsCWXtHQA4mdZejCnevknR2Y+kkHYjl4 85JI1o+EaTiPnJBRLdPwlI+ow3bwVw8szAUSnK6IsbFOCu8B9pWNhfYioLOQxxXvwp3H olBpg8pIOUJJVpQsdtoNqWzlxpx7opSPvWrcIm/K0v1JvfFCNw1cVpZ9v3TzIMVFXRVe wmDQ== 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=N7dS28ODWWgUWcDQHKDWdPICO+TR3n4iZCzHtMO59e4=; b=AgZqWXq1T2UbI0WWAL4EBGDZTGuushW7eVxBPWgytc5Wj7+JF06txT3SBCGp0XtJUQ xvqE/d2ed+Z44+IBi/iA7sHr/we5HTVtpmLbwYqgmVoWuyh54WZxj9DHHpUHbfSGOjVA aK04A0+mDpRYHuJOVWXuUhqLsPSpcerkJf3tu2+G4v+3XR/pnqg4ppNho8X4QiXHhwL9 e632tWvp8AiJOPolj1Ov8tfbMYs7QYN1EeoFBufKq93CSY6wX9DE/FEhXYY7Sawaybtn +l7FM8DNqHlEzt8ApuhBtFQ7IZ6BVEb1MWJCIe3oH0whNZ5uIRfvY8RyyLEBJxmUB6Qm ynxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ax+ZEDwE; 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 s26-20020a05620a16ba00b006a032903acdsi6547032qkj.366.2022.05.30.10.37.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:37:28 -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=Ax+ZEDwE; 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]:49058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjKZ-0003rd-Ur for patch@linaro.org; Mon, 30 May 2022 13:37:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwV-0003yl-Q5 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:32 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:41905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwS-0007Qy-0a for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:31 -0400 Received: by mail-wm1-x332.google.com with SMTP id p5-20020a1c2905000000b003970dd5404dso6726064wmp.0 for ; Mon, 30 May 2022 09:08:27 -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=N7dS28ODWWgUWcDQHKDWdPICO+TR3n4iZCzHtMO59e4=; b=Ax+ZEDwErrDy6Z+rFC3J5/wSWdEOhadDgItfNuBlsSAz2CLxHIbZqG8ISf84fl7rfS TswPoeqONfolL00CTG2mjgA3LLzjc619Rim/H4NivrvjXrlht/GoSiJPYzRCEJY0KAst xyWyN6lvDMTr/2U35iuh4dasxNcNNb0Yq9c31BGMiP3U9CZ4uiyvjOgKVCbqwUIlsIl6 UazKGz6hemmOGVRO9janm4BCUg5SBwicrhvZJfZoWcal5gMOKgKhh0CZT5nMs66Egmi5 7HjdGPhdOO2NpMv5E67v37wySy9ik1pMLBWQHm7+0dvREpG/vltW0cRIsuz0l9jkQT41 UJzg== 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=N7dS28ODWWgUWcDQHKDWdPICO+TR3n4iZCzHtMO59e4=; b=cD1caz5kWo2GznyIfIV/Jdow/fc8xk2Yf61v0ua6RRfP2Avm4XZkqpDaGqWBDcDqO6 5lkIcRDNxEbGmxlETcCg2bYwvG5cmRXdQche/ggswW2y6PrS89499O6MbO7DlFEs537+ GG9Rwzb0dJjXdvmmxCYDTCtWS7kzrpQGJTdpr/FykImQCH4DF+nXY+Vm5rBCewfY6etl gZGU3+3mu5vzQzSgM8zmXlpFViA/0oNtgYFMa928Dq/Ma7oA4IIFTZIw9OpdfYX2gp46 IvqEvJprw8+gR4NY+2dLRlVnMbtTj+CwQAu7DjXXjMIAjwlDB/sBEu9WGeVTrkhYAPQP PIUQ== X-Gm-Message-State: AOAM532qLmMLd0srPCXDPt3St5V1mTVPeea65YZg/MspRNgXM7hHDhFH 6gidI8QFqOpdNC21Lwjg7cjPqgww2BxnIQ== X-Received: by 2002:a7b:c1d9:0:b0:397:335d:4d9f with SMTP id a25-20020a7bc1d9000000b00397335d4d9fmr20043315wmj.55.1653926906357; Mon, 30 May 2022 09:08:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 083/117] target/arm: Implement NOT (prediates) alias Date: Mon, 30 May 2022 17:06:34 +0100 Message-Id: <20220530160708.726466-84-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 This alias is defined on EOR (prediates). While the same operation could be performed with NAND or NOR, only bother with the official alias. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-81-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f33bc9d480b..b6b5980e2db 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1381,6 +1381,11 @@ static bool trans_EOR_pppp(DisasContext *s, arg_rprr_s *a) .fno = gen_helper_sve_eor_pppp, .prefer_i64 = TCG_TARGET_REG_BITS == 64, }; + + /* Alias NOT (predicate) is EOR Pd.B, Pg/Z, Pn.B, Pg.B */ + if (!a->s && a->pg == a->rm) { + return gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->pg, a->rn); + } return do_pppp_flags(s, a, &op); } From patchwork Mon May 30 16:06:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577277 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp440747mag; Mon, 30 May 2022 10:34:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1sd/OvkuQHVnyNxpSGkz3ujdHn8pHPXgCe1vwqfvyPXrlqvcoz4EfDWv7e3RchwSycRQR X-Received: by 2002:a05:6214:d6f:b0:462:446a:df0b with SMTP id 15-20020a0562140d6f00b00462446adf0bmr32174027qvs.111.1653932085181; Mon, 30 May 2022 10:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932085; cv=none; d=google.com; s=arc-20160816; b=kWPo6NLJFNHv3HeGd49Dw2idbJ7+iFYD+U0bzEUTviQHQzE6UFwAVY+l5w7b36akvL jFwYwd1kxhMeUr0eC/kpnudEuJCnau8mds4nVJtrwwec5bRHTO8K4sigAHjJ8O2UTdju HoYqUgUBSTJqMOt0hg0dYzlZaZwNqikMFCAk7Ebqxdq2W9+wPJ4zoo1nhXKRvqyOHvHk o111gNfccLyrXroWjGqNBT77grxl9l03RX+96ucMy18bVZAc8oqJid/ETtSgAiIbq9UF zO/GqdKuNfWy+s2raZz19hYyZi1e8JH49c45hgka2fkb2Y39ns7zXeA0ETUzZ8hWzouE zgaw== 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=8FfE1VcOazzOS1uCYip/LEQfgsBGZ40XQqaUaIsLZxc=; b=BwKujmhxDHG6LhMpcN9d3+34UQ0bVqNUPX4N+jEd3PMOBqrn2yjRNgW3pMapGLGMo3 0bo//BxHGM2rhQ0dDEnQVtSs8X73XQji0jht/s6l0wXxOIbKiJLaEgkdeWMT3LRWAD74 a1hG06dmBcjNogBwIXP07kSP7Ve3cCsDmaUz7Pip1vveP2KUoz6JEFa3rsNKtoM+sJdi sbd7LLa6Ho9JbvkTCt3CDir1Du49Cj/Y+QQ6nUhKsnPqQVDe0udut13n+h3Kogic2dF7 3ED+eeAWOadXv50BYMz0G7Zb/nhegWm9uGZ38z23Dt+4sNlbqpSZIJNmYX49usPys1BT nZYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uvv8rk8G; 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 x84-20020a376357000000b006a3367f7e61si6669471qkb.446.2022.05.30.10.34.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:34:45 -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=uvv8rk8G; 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]:40546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjHw-00066L-LO for patch@linaro.org; Mon, 30 May 2022 13:34:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwU-0003xW-Mh for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:31 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:32840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwS-0007Lc-0p for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:30 -0400 Received: by mail-wm1-x331.google.com with SMTP id o29-20020a05600c511d00b00397697f172dso202732wms.0 for ; Mon, 30 May 2022 09:08:27 -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=8FfE1VcOazzOS1uCYip/LEQfgsBGZ40XQqaUaIsLZxc=; b=uvv8rk8GsFkj74jheJF2qRGd905awQUghdRF4j6NaJzSdMHYlLI4LYTm0OPma0x/0p BMyEwNdzoQghxNIhjEPmPOCnnmQZYNGtZN/Vo/44J++2sInkkmw6m4eCsIP2D37mFUaY roPqtmqhfw/NQWSUKrmJIa5A7+FfQDO6k0X2msZoOHZO/NDSxpp0sgIgsiIGdTSZTn2G f9NtQ6P8NsW5dBQsWLod4VpvRVFbwgphA8YyCOZ9HRNZATcja8omDoogERpQ9T9C61F6 V9+P0XLIN3HQoh0D/engyHetbSCSH0KrrifF/l1qI6zQZBkMhS3chqpQ590/YMa0+Yc5 /C6A== 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=8FfE1VcOazzOS1uCYip/LEQfgsBGZ40XQqaUaIsLZxc=; b=rBTM6bWAv7C+zrj1Nu8YlBli1zI3D2+1cVpeKwF9b6HLXJ7oDX6MxwUC0JmEtcFVuv KeO0jvnRjpEiCwGWdzWjnYL4XbFV4H/kkhlHfWAuuaSgroo2RYhxGh9bGFycw3o6WTlr xJZVuuMqEkJOU5NbNoH17qTscUwxCr9qJRoIiu5k/zHKb4lAYKZZuy+9GR+2yPcp04+F sS4HwYBOVgRjRip8NmX7SDuh0pSJy5Jl8wuYpCvL0uaQSecEPFhVbi/LiSFLK8HWEB0q 6oz4pp7SYznART8nUn1yD9Taqf4fzP50W+BvfjFp52PD+Ey5loa3vSBv7skASecCyTEe 8cyg== X-Gm-Message-State: AOAM531xYyDonC7ggJbHdq3CuhR3xgIXisG/oR6Ao5pxGnbBwcdlCjMD iLtWjcU8HbnP5avKiDVcL1gi9qrpPaithA== X-Received: by 2002:a05:600c:20c6:b0:397:408f:effb with SMTP id y6-20020a05600c20c600b00397408feffbmr19795845wmm.1.1653926907190; Mon, 30 May 2022 09:08:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 084/117] target/arm: Use TRANS_FEAT for SEL_zpzz Date: Mon, 30 May 2022 17:06:35 +0100 Message-Id: <20220530160708.726466-85-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-82-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b6b5980e2db..a040d694eab 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -795,10 +795,7 @@ static gen_helper_gvec_4 * const udiv_fns[4] = { }; TRANS_FEAT(UDIV_zpzz, aa64_sve, gen_gvec_ool_arg_zpzz, udiv_fns[a->esz], a, 0) -static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) -{ - return do_sel_z(s, a->rd, a->rn, a->rm, a->pg, a->esz); -} +TRANS_FEAT(SEL_zpzz, aa64_sve, do_sel_z, a->rd, a->rn, a->rm, a->pg, a->esz) /* *** SVE Integer Arithmetic - Unary Predicated Group From patchwork Mon May 30 16:06:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577265 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp430049mag; Mon, 30 May 2022 10:21:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjUyOPtoqwRoHD0c23eEL06mdyvJgg+MiAZAyI3fmoqNsS3pJGHGrESSqM8zQT9JUob4I3 X-Received: by 2002:a37:a102:0:b0:6a3:5d5e:2706 with SMTP id k2-20020a37a102000000b006a35d5e2706mr32288005qke.251.1653931286570; Mon, 30 May 2022 10:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931286; cv=none; d=google.com; s=arc-20160816; b=J6FH7xpFW/9JSyKst4y3pEVdqRLWQZAKDbQxRXQmc0L/SiHVknqCvW11Hb2NXml6HW ha4RrIwuWRZ1TXkBpd3JXo3HLBC+5LjuhMKWjJfJB3VkEpThEcE/J5tKSAywcSSkRJTC akwwl3dyBRuqkb2AbW76gMnEB0IgMipvbAeFbWyHQNgRwuwvOccmFk91f4X7lZjtFHin w0AlAyrrqItnF6asLmjTMeTybVq2qGaUS7zLoco2nxmMf8yE8VscMoXtf8erlX7XzGla VzdZv9z6DcEkOTVJCOHL0aH3WUpqR6IjwF3YXHelXOI8FVe9cG9FaW1xIr8ws+qvjVjC AF+w== 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=FD6w/7DiE3v3KE01pXoBFAU8YKoTVucpdCsqwe263ok=; b=woFDcmD3BKME8wUUa5rOGXzPxbkj6TMIJ9tLGuZc4X7/inYqFChrJRNcXEslBkJVYk jgDqf5GYpEAFqMfcorTr0qrKNkTKsDvXt8CPLJO412zeK0IljaMDmSD9oVX4e9yEl+dG De6pjI4pJ4RwBKAJ8VZctPLHhS8ORYSXcTgKk1NOZdz3Jkkp3aE8eMIAUWSWzzUvh18t K+/B/htZOM78Vcj3awnw/yEMseWVhhV13RyQr6YgecODS4LfBK+nsD3IFrtXrrUAHpE+ l99+R5l7oJWfu9LXJyjPukD7LLQIV6HWJQzO/SU558l7B+T7JJVruJpQVQmRqUcoxpMB qSqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rEiUAKor; 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 m22-20020a05620a291600b006a5cb5623c6si8288445qkp.558.2022.05.30.10.21.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:21:26 -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=rEiUAKor; 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]:34952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj54-0008EL-4W for patch@linaro.org; Mon, 30 May 2022 13:21:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwW-0003zs-9B for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:36 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwS-0007MD-Qu for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:31 -0400 Received: by mail-wr1-x434.google.com with SMTP id q21so4089541wra.2 for ; Mon, 30 May 2022 09:08:28 -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=FD6w/7DiE3v3KE01pXoBFAU8YKoTVucpdCsqwe263ok=; b=rEiUAKorCPqUR4n/l2Emgzm3UblNYrzx/Zk6TqdMw3MCDx62+68my3+OoMt0TeZent iwN9wtBi3Qmekyd0Ls4hJD8wWfPc0gYEm5+kbH/bYECTi+G2TVgpH8VRjOTfdHvHvyZ/ KlFSWtaIMxzOJ0pv4PBuP1CPeEcyw/x8v+K5NxY2buZnSw8nFppH2kkTiluu1XC7Hyjz ubrOVbRlLseKGdTzSp0Ph8H+nxDcdEg01YNlLt/NbSzNYorI5YnOPxrYAxXb6UGg3Asw nIgguL/TWQpISkuPOI4Wfbyg1wp3YwA1ojVZg4vHR8WPpuycn7pb+qei3uU/+RQ4AWfA FJ9A== 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=FD6w/7DiE3v3KE01pXoBFAU8YKoTVucpdCsqwe263ok=; b=2gX/h7y8BnyNkQmjmzM5tHilv8m0gb3g4GOW2fBySE0KJXuahufPC9rOjCxyTcfia7 ZYjPNIr3/apGIvMB2uBwcaGXLaAUiE9NsxoOyG4PKAvdVNztXDD0fpP2lQsC6YIt5ilp 9b/j8yfi/70SL+d7ycEo9FWBm38mJkg6f0O/n9LZpkiFzKHntu6I6gbancQ153OgybCP rrSwNzHHDoZxT1DdpjGoYvuwQZnM3VeJLHnKe6H99zRUVk3llBBvV50FYVQY1E1AILY2 z6ypKKsXh/I0nSN1qSfNzj8yjG5uga6s9Jf7OVo+ZiRzU3C0J0ivFXFXmiwjsGDbwu0K ZRuw== X-Gm-Message-State: AOAM533oZG/28gLX9ybmr2cbmH8Y5ZhX5asdaao8WyNgcbKjYDJJcOTO +/4HzRnpZnsyEmnSBh69fpDyCqURx1nymQ== X-Received: by 2002:adf:e0c3:0:b0:20c:5672:9577 with SMTP id m3-20020adfe0c3000000b0020c56729577mr45682568wri.466.1653926907875; Mon, 30 May 2022 09:08:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:27 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 085/117] target/arm: Use TRANS_FEAT for MOVPRFX Date: Mon, 30 May 2022 17:06:36 +0100 Message-Id: <20220530160708.726466-86-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-83-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index a040d694eab..6e8d8d54bfe 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -6054,20 +6054,9 @@ static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a) * In the meantime, just emit the moves. */ -static bool trans_MOVPRFX(DisasContext *s, arg_MOVPRFX *a) -{ - return do_mov_z(s, a->rd, a->rn); -} - -static bool trans_MOVPRFX_m(DisasContext *s, arg_rpr_esz *a) -{ - return do_sel_z(s, a->rd, a->rn, a->rd, a->pg, a->esz); -} - -static bool trans_MOVPRFX_z(DisasContext *s, arg_rpr_esz *a) -{ - return do_movz_zpz(s, a->rd, a->rn, a->pg, a->esz, false); -} +TRANS_FEAT(MOVPRFX, aa64_sve, do_mov_z, a->rd, a->rn) +TRANS_FEAT(MOVPRFX_m, aa64_sve, do_sel_z, a->rd, a->rn, a->rd, a->pg, a->esz) +TRANS_FEAT(MOVPRFX_z, aa64_sve, do_movz_zpz, a->rd, a->rn, a->pg, a->esz, false) /* * SVE2 Integer Multiply - Unpredicated From patchwork Mon May 30 16:06:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577275 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp439063mag; Mon, 30 May 2022 10:32:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/k8FAvpNJ6QjEVCrh1w7oGFHaVVLCAMxsxciJQk3fjj+5sFGS7BOtvAJYMBnA7/5wBydN X-Received: by 2002:a05:6214:305:b0:435:35c3:f0f1 with SMTP id i5-20020a056214030500b0043535c3f0f1mr13154038qvu.0.1653931958774; Mon, 30 May 2022 10:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931958; cv=none; d=google.com; s=arc-20160816; b=wRUbhy9l6/QyGvvFEHnTuIxeXIr8WDt7UaJl6zCjWyz23aQ9UI1cGPiat3miE6rVCa zhSgTG7ncOGRDJ9cz/vS7mV+9/MjQC2s1g24otiKYujc0X5fuV8jcDnSvHPjPZBvCDSh cYAuNTO7M1bnNU0vO70kCccnBMnNsqBsRVfDlBEVStMphzNkRjLHS/bDABNjWwzwcdrD HxXl1XhgLmRnPVMxly5in5oCTNgV/vf+gv6HD6ZCb+JaTo7bIQQsfjmGutQxUNgl26UE p38e8WEawerYL47gSehc9MRADK8vTkbHrc42VxB8Gu32XngSfi77OU3mTtrLc+PUc/F6 AWHg== 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=j38rR0DmUpKr03zUziWy7jqA4Zq/6/O7kU6iERnZ0VY=; b=FiSfiJmE86Z8tP/evv8PuFHopyJRI3CrhVH1da6x+HztEdxtgUdW/mAu9SU/J//qJ9 waNoWtU05Skmw6AdAjfHcLDgQcM5k/1bFIKDtIpFa3QHFb6nupS9foBzKN7pqnol2VUm fJlyJLZyfMzKK36l6VIkiR1R5N7midezcIq1vRXVJsy+HO76ShqCUzW+l9/H4UEEQTj/ uGg35u8MeEx2f1wPrjN7fqXdyqkf9g7pDY08yN+kg9F9Kg1Qa1yKXzArHyz0iZ2UR9He 5Ee+fdLqA1c4DV32B44wAZcVfXTOvxNHRjVpWg9GvJXnJWy6VWtaB6ZX2Z+2/xeZ1tpM 3oTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ONex172p; 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 jm13-20020ad45ecd000000b004621982fa3asi7930027qvb.300.2022.05.30.10.32.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:32:38 -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=ONex172p; 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]:34516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjFu-0001p1-DK for patch@linaro.org; Mon, 30 May 2022 13:32:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwa-00040U-B4 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:36 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwU-0007Rd-34 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:32 -0400 Received: by mail-wr1-x432.google.com with SMTP id k16so10945408wrg.7 for ; Mon, 30 May 2022 09:08:29 -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=j38rR0DmUpKr03zUziWy7jqA4Zq/6/O7kU6iERnZ0VY=; b=ONex172p7fAE9jfJ78t4A3M5zu6w14nYPJpaGBSowjoSjsweH3ctJhGHPVXipbwByb zPcOdk1aT4Kc6p3zfgf0dbhGx+S/uvb8LoGSnoGx9i4MsD+InvEL2dtPN5g2us/T7Hax MDiXAD9ztna+csu5gKqej7tiWkLA0R3RMTeOhnCBmJRwZnpgSrnsc3vu1kHr7Fvy3EEZ aDW/KVy+1To1queUzXk9Q9NVnDFRaZxGQwJX9iq9VkBDFwHU5TGC87nc339SyxmqyXGJ /mGkGDiX4jztjxJHB41V0FKDkMOv0U5hL4OXYuapftUDUw3KZij7DD0ZB5/25mEP0p1y vTXQ== 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=j38rR0DmUpKr03zUziWy7jqA4Zq/6/O7kU6iERnZ0VY=; b=nH5Ck5Z6cLzwfNeJ4EMI6Chftn3vsuz1OeHGc7CVNFf28O6GfYv7OyhLQw19JGuUBB EyDeGriPSpd1j0qT+Ay4dQ/BnI6J3V+H2hHbMMALLLiUJXnmp7RGMrYy6xv9brHOhlAs JmrvCDTb86Jca8xgjIJBAjUy2hVy07lyhsV1BgprFIPIo7zOik9rItmfTAKcG4tPsiBP 2XtbXWpV8VvSL/n7/iKwewC403pERB7PxlnxHkJwqcVE7bUQoIG6utucXttNZ7tZ0oV1 pBJ9uudSpvzM4hnFeC8xV38b167ifcgjPAnFDzOzDXyA4DRCJInuZvH7Z1Tq90Ccv1h4 b45A== X-Gm-Message-State: AOAM53152Bo8VM5sm4fgagPF/NiDR2vKSTl/De5VY6snI+RJdLnJGkxi Ux3EIjWwdODCUmF+r9bmyWhSEo1SXbJDDA== X-Received: by 2002:adf:fbcb:0:b0:20e:674f:9364 with SMTP id d11-20020adffbcb000000b0020e674f9364mr48143144wrs.430.1653926908608; Mon, 30 May 2022 09:08:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 086/117] target/arm: Use TRANS_FEAT for FMLA Date: Mon, 30 May 2022 17:06:37 +0100 Message-Id: <20220530160708.726466-87-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-84-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6e8d8d54bfe..5aa3e477cfb 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3521,15 +3521,8 @@ static bool do_FMLA_zzxz(DisasContext *s, arg_rrxr_esz *a, bool sub) a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); } -static bool trans_FMLA_zzxz(DisasContext *s, arg_FMLA_zzxz *a) -{ - return do_FMLA_zzxz(s, a, false); -} - -static bool trans_FMLS_zzxz(DisasContext *s, arg_FMLA_zzxz *a) -{ - return do_FMLA_zzxz(s, a, true); -} +TRANS_FEAT(FMLA_zzxz, aa64_sve, do_FMLA_zzxz, a, false) +TRANS_FEAT(FMLS_zzxz, aa64_sve, do_FMLA_zzxz, a, true) /* *** SVE Floating Point Multiply Indexed Group From patchwork Mon May 30 16:06:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577272 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp435296mag; Mon, 30 May 2022 10:28:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7t/f37Y3Q312mLYIe1kwAeYjWYXOzEGHkQZVoqJllUHIEL45HCKsI2oHZLXQtvqSSDFtL X-Received: by 2002:ad4:5b83:0:b0:464:56c2:881e with SMTP id 3-20020ad45b83000000b0046456c2881emr2921438qvp.84.1653931692778; Mon, 30 May 2022 10:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931692; cv=none; d=google.com; s=arc-20160816; b=GKffPHJqVTYH8C3e7sMfwc/by5btGU2cTH2zccp5AMnb7FHxolKvMiouGjeWBXlvUi UZAlUl82IZ6QGE9740y4uTQ2MyRUnTxSKTQWVbMdzI4gv8yqApwyJ/ilaLNfOcLU33LS CSPghtmad4n8wuxIR8LrprQCHc57gM/Rj/ye+4Fsa5LipIUFfSvmaf7iy07mQCxBwKOo hZgI3clqa8k+EaU8tlisf8RFL84taFTCnjUATHPcmTTMY+A1OytLSX5BS1BPDIF8qBop Y/cMz4t8lHdAe/OdodJSbsgvBAvMn8dMpTDQII5I0Ri1Gnfh0ejpCatY1uFRk1VMyFDj FOlA== 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=xJwhKbyM174ARiKDgTM7s52QgSFnWHIJp+9TkqMSv5s=; b=YdmehD63b8A2kEZYxUkE/AG9L5nXZF/mE6koLosTDSiYzpoU7Mj4jfBLL8GzKbmI/k 4D2p9pyJcASX5aNnwSdawO705a9tA4Xy5Vl3MEBtq71oaOGvpwm8+Ja1Ee8BL61WfCbU OxeMxGXu8PS3xXee/Tp3fxHfmEHBIp/0lP+XNTmT8t3v2dXIQUeGmlK6XsvskvqwlDPO kBJMuSMQfb8B0gy6Q1WbdWODemRTCPA4mj1bFcg1P/yXEdUCL23lmxF3X2cWRIV2hEBP fTMqgo7k5RO5Fl4ttSZcse/EQvY+TNQJOs57tP9C7hJPpKgNKDkDK7sFacOZ9fOddxkC 6uHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dG/WgQzb"; 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 i6-20020a05620a27c600b006a609a8c413si3924538qkp.394.2022.05.30.10.28.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:28:12 -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="dG/WgQzb"; 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]:54350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjBc-0004VX-CX for patch@linaro.org; Mon, 30 May 2022 13:28:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwa-00040P-9c for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:36 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:40693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwU-0007Rn-MV for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:32 -0400 Received: by mail-wr1-x434.google.com with SMTP id k16so10945436wrg.7 for ; Mon, 30 May 2022 09:08:30 -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=xJwhKbyM174ARiKDgTM7s52QgSFnWHIJp+9TkqMSv5s=; b=dG/WgQzbo2TlQOCBZQoIf2+SQnj8bkJLhG6xS/HNqHlkfFg7OUpd9HtJNZMQlekP4s /10GHCtWH/FUNiwfYzSi/288FM4lf07KliIain96uUgK91O9KKCKRak4b38Z6Dz2JEGh xJmHfPXgVMtdUIlLqTuwvENSnT5mm0r0JbrPN0yuUthL7Bs9MnYL8bRovJ9xuJTGKmJT x5zCwG0CJojl4jtmJbnFRThK1RMtw3ACr3BDUPXdAVfulC/GqjGEUvq767lfuAaR089U 7TkV2/hFaXn+a8wcEMhX932kUrQRcb0HXoZSB0IA+4v+kg8Q86GOOMbz4ouzUrPunBzN B2Ng== 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=xJwhKbyM174ARiKDgTM7s52QgSFnWHIJp+9TkqMSv5s=; b=lA+e8LATkijOq/VOuS7WhOBTQBmHkmR/pTndKXffKamOB7k1JVDGR5X8+7GuI0WVyR Y8gGPuq9kgVvNWuj5YACShx18WUj3OQGYbSuuxqseGTBj2+OpBQPR3c6p+tXtH+C1kyR q9capMqkWZ9VCjnUt71f86XrL90hj8g3fSdq5JknqpoQFFmroHJXbtvXbSAw7lmYNcXl VynX4Ut5Y0+yBCsadY1OYY6u8KLmtx/h6TlRfJ9JREgmCyI3c2QAE8CLGDqVq0vVWf0H ld6QPAXJWT1fghxdk5apLExvte8m7CiUGAg8+wKL3P+Bpagrip7rNVh7cqPQzETpt+f2 dOpA== X-Gm-Message-State: AOAM5317zooaFPXwuzkFrhqUFLvtpDzyVK9a+GtSnkO5KuDstJj1rjUV 85olaPTgtIQnhWF6DiPs/9ECY2awhy534g== X-Received: by 2002:a5d:4302:0:b0:210:824:48ee with SMTP id h2-20020a5d4302000000b00210082448eemr18899223wrq.471.1653926909289; Mon, 30 May 2022 09:08:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 087/117] target/arm: Use TRANS_FEAT for BFMLA Date: Mon, 30 May 2022 17:06:38 +0100 Message-Id: <20220530160708.726466-88-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-85-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 5aa3e477cfb..f2939fbeb97 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7568,39 +7568,19 @@ TRANS_FEAT(BFMMLA, aa64_sve_bf16, gen_gvec_ool_arg_zzzz, static bool do_BFMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sel) { - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } return gen_gvec_fpst_zzzz(s, gen_helper_gvec_bfmlal, a->rd, a->rn, a->rm, a->ra, sel, FPST_FPCR); } -static bool trans_BFMLALB_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_BFMLAL_zzzw(s, a, false); -} - -static bool trans_BFMLALT_zzzw(DisasContext *s, arg_rrrr_esz *a) -{ - return do_BFMLAL_zzzw(s, a, true); -} +TRANS_FEAT(BFMLALB_zzzw, aa64_sve_bf16, do_BFMLAL_zzzw, a, false) +TRANS_FEAT(BFMLALT_zzzw, aa64_sve_bf16, do_BFMLAL_zzzw, a, true) static bool do_BFMLAL_zzxw(DisasContext *s, arg_rrxr_esz *a, bool sel) { - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } return gen_gvec_fpst_zzzz(s, gen_helper_gvec_bfmlal_idx, a->rd, a->rn, a->rm, a->ra, (a->index << 1) | sel, FPST_FPCR); } -static bool trans_BFMLALB_zzxw(DisasContext *s, arg_rrxr_esz *a) -{ - return do_BFMLAL_zzxw(s, a, false); -} - -static bool trans_BFMLALT_zzxw(DisasContext *s, arg_rrxr_esz *a) -{ - return do_BFMLAL_zzxw(s, a, true); -} +TRANS_FEAT(BFMLALB_zzxw, aa64_sve_bf16, do_BFMLAL_zzxw, a, false) +TRANS_FEAT(BFMLALT_zzxw, aa64_sve_bf16, do_BFMLAL_zzxw, a, true) From patchwork Mon May 30 16:06:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577248 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp419790mag; Mon, 30 May 2022 10:07:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1g3Oui8FNRX/LjBj3kSWzYsC/9AIXulYDA6CwmIzhVQyE1nhhyCghVtvEJo1EE22gs19b X-Received: by 2002:ac8:5f4f:0:b0:2f3:d763:4be6 with SMTP id y15-20020ac85f4f000000b002f3d7634be6mr45507362qta.406.1653930474667; Mon, 30 May 2022 10:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930474; cv=none; d=google.com; s=arc-20160816; b=qmAMhZTyjLsK16675viVGj7bd4WcAh/tPBHN2zjcqJP4/gV42SJAWj0nb8GiwaNBlR QnUDvG7NglDNxE4tiJ7KMzI49T4+YfhWdr8kqITuinrKFL5YdsF21WddPRdSIeMZguNN nvCMvyx5DXg0owasFq32tQPbxUsJUqMN45uKGEk+A5wIx+wCGVJcM+OV3Z7fOC6NpCHQ +7QgMfBLYp+9pKgRuP26lGI7Hj3sjV8U0lhWE4W/8Kz+D85zdPlucdEDGkq0KvHKKJxE U4Vfsa7J+oKHMCXUs/azg1h1WVftmZ49GGQBNmYoP1zBghTyp0ZODDJjpG/BF2oV/ghw 3ccg== 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=p6XbVXSerzEOTJcljr2FxdN77EJ22a/aQXsqzMKAjv0=; b=fYI+K8XkxatM0TY+9raTfDdgPFoijnS/6A2YIx4O+MSIY6LQJ9ghXIT6lnujyLAQQJ sCC1PnSuqwnyVUGi93DVW20XV2Iij75Yv/9H8gjWtFku4TMgUe5sdND6MZFYbjAddNvJ I7Al29Vz++34AJBLZgCFwI3dfbRbGkYJsU23x8ovSSaur3nmAbF6dTgyvqiFQbpqatrE bRYLeokNMnz+u2yaZTbmd+Mz/qdudmzLOYrBK20ayOcEybgF+2VWhBQfGFMIl2PSeZh5 ryw82qrjpVBYm5yF5HQ1vIiBpA4DdL6kSukEo2MKDyE6VlhCckRzqHaW4STwocMfksGv nf/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eH+FFR2r; 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 e4-20020a0562140d8400b004620e890fe1si7356831qve.272.2022.05.30.10.07.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:07:54 -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=eH+FFR2r; 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]:56722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviry-0000Y2-5V for patch@linaro.org; Mon, 30 May 2022 13:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwa-00040O-92 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:36 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:35742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwV-0007S8-Iw for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:33 -0400 Received: by mail-wr1-x42a.google.com with SMTP id q21so4090949wra.2 for ; Mon, 30 May 2022 09:08:31 -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=p6XbVXSerzEOTJcljr2FxdN77EJ22a/aQXsqzMKAjv0=; b=eH+FFR2rmPgNwmrhGxtfzEa7BV0aXZLBd59hHxhG6Aw3aLCWff6UgaWYjj7hnG818O +e+gxBnL8OrySFYjyg1sVFmn4Ax4G7mnjSnb2Xp8mM1ST8rWuC1L3K8vVU62jL+PwljF RZZtIDkj7OpEgIBO5Z5cLAepTQYOVhmByoMLlK+rG0oBs4OSVxMTDJjdSTVTTta3NvSC wBP+Sie2+foxiKgxOY/gGAS55WvQMUJHqSPj8kBlOd878Yewm/DH5Wr/Nw2qsov/wTRZ AutKKyHvm/Hx34gW+hTLMkyX6BzMqzTOtrdes00eZKtRAh7YLu+gmLtM6z2kgqsqiGt9 ZOtQ== 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=p6XbVXSerzEOTJcljr2FxdN77EJ22a/aQXsqzMKAjv0=; b=spqzhNLw/JCdHmHkMeehR8vATlRFNvUUPP23tY5PsoJCjI+cntDgL/PV4dJjZFb0t7 0oEnWMTyKKpDYzOj33Q4tKatavWrbB6CiRLd6Ce4OQv1khwRzVzre8BNfBvBUEPob+fR tYl1AkBI3KTmRoYS86L1rz2y0zdv0fj/StzKmFFmqPqJm2iEYAxtRPhORMC2ibkwM0wR B1l1rt0SlbvkeyH7LdvWceXeOrUVx4YUzsqrCHXYZq43ZBcxcpFYoLeGEdoAruGI/C/B LmcowP62TDAx7L0/tX+XUgCCHqguok0HMHlbja84OcvWU9bfmOF4XxUZA5vXJoFiVLtJ EmvA== X-Gm-Message-State: AOAM530cL0bEtHnZeoB8FKjsqK7VjbMoWwu+37WwUBJ3eK3qyH2k8Vgm g+Q1cT5g6trS5puakTlTmB5ZmXwhe/RCmw== X-Received: by 2002:adf:ea04:0:b0:210:134:4398 with SMTP id q4-20020adfea04000000b0021001344398mr21244884wrm.356.1653926910092; Mon, 30 May 2022 09:08:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:29 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 088/117] target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz Date: Mon, 30 May 2022 17:06:39 +0100 Message-Id: <20220530160708.726466-89-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Rename the function to match gen_gvec_ool_arg_zzz, and move to be adjacent. Split out gen_gvec_fpst_zzz as a helper while we're at it. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-86-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 50 +++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index f2939fbeb97..61bf5f57578 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -175,6 +175,35 @@ static bool gen_gvec_ool_arg_zzz(DisasContext *s, gen_helper_gvec_3 *fn, return gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data); } +/* Invoke an out-of-line helper on 3 Zregs, plus float_status. */ +static bool gen_gvec_fpst_zzz(DisasContext *s, gen_helper_gvec_3_ptr *fn, + int rd, int rn, int rm, + int data, ARMFPStatusFlavour flavour) +{ + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + TCGv_ptr status = fpstatus_ptr(flavour); + + tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + status, vsz, vsz, data, fn); + + tcg_temp_free_ptr(status); + } + return true; +} + +static bool gen_gvec_fpst_arg_zzz(DisasContext *s, gen_helper_gvec_3_ptr *fn, + arg_rrr_esz *a, int data) +{ + return gen_gvec_fpst_zzz(s, fn, a->rd, a->rn, a->rm, data, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); +} + /* Invoke an out-of-line helper on 4 Zregs. */ static bool gen_gvec_ool_zzzz(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int ra, int data) @@ -3769,25 +3798,6 @@ static bool trans_FADDA(DisasContext *s, arg_rprr_esz *a) *** SVE Floating Point Arithmetic - Unpredicated Group */ -static bool do_zzz_fp(DisasContext *s, arg_rrr_esz *a, - gen_helper_gvec_3_ptr *fn) -{ - if (fn == NULL) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - status, vsz, vsz, 0, fn); - tcg_temp_free_ptr(status); - } - return true; -} - - #define DO_FP3(NAME, name) \ static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ { \ @@ -3795,7 +3805,7 @@ static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ NULL, gen_helper_gvec_##name##_h, \ gen_helper_gvec_##name##_s, gen_helper_gvec_##name##_d \ }; \ - return do_zzz_fp(s, a, fns[a->esz]); \ + return gen_gvec_fpst_arg_zzz(s, fns[a->esz], a, 0); \ } DO_FP3(FADD_zzz, fadd) From patchwork Mon May 30 16:06:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577291 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp464613mag; Mon, 30 May 2022 11:07:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr8ul8uabhxeMdnKc/zp+g0r/16eavJcTApnV2v1Ebrl9fW5HDbQVx9xoRprsh0Z8kQJm1 X-Received: by 2002:ae9:e318:0:b0:6a3:7c6e:a52b with SMTP id v24-20020ae9e318000000b006a37c6ea52bmr27951040qkf.98.1653934048793; Mon, 30 May 2022 11:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653934048; cv=none; d=google.com; s=arc-20160816; b=E19FT3va90JHHdnejO+G2HWl2N3xSMvoyVtsXwkIVIiod95wo/6gxHL+tHIxMVz7Sb 0zuAM/MbqSqemIUKEqqaHCMGrQXTE/liE3KZThJZLDajfRam+GsT55PT/8lMzWc3BT9u yEgZ4uV6Dprt6F+yflaWyiturJYhn6ptU+qgpTDB2NUaGOI+Ec1LF9zQVJsBh2oXNqwb vLEQe50GAbJtsSj8mm/IUCdjUs1X1f92U+5qmAGp/gpIMpeDlBjCAzNcjuj124IH4Qq0 eeeWKbwe4+sNk5bp31gpztwUb8UrfPzvY/2DrNZ59VYwVZD1ZiJxiNYoTu/qvwslMYS8 j1NQ== 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=O+yJvbh7BLlQNWDjDVOzRXcWwfLPp+Ci/M3gIfNfqGE=; b=zluOkUvXNVOhPeMi/8m8tV59OilWHigdRzvHgdgPNq2vbvokcaNpbMX30Y86l+zkwH Yk32Ks0zHYasIQhqYx7EkQj2mrswHSE2KjgEYCTmIVW0zg9pp5Dkud4mMDZ8fZR8xF5e 7R9p4DWqxO/RkBvS7Zw3eyl4X/gMyISkUSXSN5kEviFN5cfQ1xIyTSaVfRxl+q40JyaJ G4zDEV9X4DC01a2BnDIhejy+LWEknKoWio1llrdg0UPExbCaDEPBVdPFuC4nB0V3sA+3 1V4Sdgjca0G7GtAM9i893benvC6MIqDKQJPoHh2lXxVoTSkTkymg21e9R6LfXyFw1wUL BMEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPvC0ttl; 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 189-20020a370bc6000000b0069f3f0cc7e5si7023035qkl.483.2022.05.30.11.07.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 11:07:28 -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=RPvC0ttl; 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]:45104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjnc-0007Rf-DD for patch@linaro.org; Mon, 30 May 2022 14:07:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwa-00040Q-AY for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:36 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwV-0007Aw-N0 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:33 -0400 Received: by mail-wr1-x436.google.com with SMTP id q7so4314885wrg.5 for ; Mon, 30 May 2022 09:08:31 -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=O+yJvbh7BLlQNWDjDVOzRXcWwfLPp+Ci/M3gIfNfqGE=; b=RPvC0ttlXHGIgiGImXTx+fJRdQ9CoN4/pRvf8ggQqOEh2RaS7fvPwHRHfp7KHi8R/R esF3EySmpBPvU7QRGM1KFaBZUCpEqPyZKOi4dQ2rIkYWibPM3jCSkZKh79DSh/2dOKpk iGS8wOZBxOdT+R4xJSP/I9vUChN6oA1yh8Cp2Fw1y/xNpCtEpaBhSbl00wWYNixGUd1v poi3tjJ24RliumOarN8JnsABC/Z/UuYcGvjV1WIBIuRAdp1Z/7zvWpoiiLgXsRZxkRds RXWvdaSN7KFDfF/UCWCUu6ar/Wsp3E0/6MpC5Cll5umwOrv2C5syR/nM8YGFK1IbVivF ztjg== 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=O+yJvbh7BLlQNWDjDVOzRXcWwfLPp+Ci/M3gIfNfqGE=; b=LPF11rgX5wIjxpmA8JbV9aEeYNjqwOgFZntDMwLYoeKj1Hf3zUO5AlY9MKDrMZj7UL 9V7WHAalmIx5cq8hG2neoiq1n84L5mRWkEBJyJF/D16RYSjVvpbGGNmN6d0JMYDxQMpo aVFXYTZDxh3gC+BS0wQyMgdVAEMSIEuR/FfXy4SSH5dq50asTej4C9KN4YWQEgs31DhQ GzJ4Yy96oOeUSDn/giiUbcjko16f6PTBbeqQoQ98P2KIw/MZtjkwKte2hKaQ8RQ+9Ab/ hggf3mZbAnrFU74cMEVLnxONk0/wY6NS/p70wHFjFhGKpiJ/RPVOfUCIeFO0QfAWpA58 KbMw== X-Gm-Message-State: AOAM532FRp0y++cE7qC+RmIqLtkL7eVS3f6GigIQ5+HgKL6wOhfNz6dK Ew/RZH9l/VUA3lt+juP3uMEr4bExrZ7NMQ== X-Received: by 2002:a5d:47c5:0:b0:20e:73a0:79a0 with SMTP id o5-20020a5d47c5000000b0020e73a079a0mr43526705wrc.632.1653926910826; Mon, 30 May 2022 09:08:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 089/117] target/arm: Use TRANS_FEAT for DO_FP3 Date: Mon, 30 May 2022 17:06:40 +0100 Message-Id: <20220530160708.726466-90-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-87-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 61bf5f57578..d596e7a0277 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3799,14 +3799,11 @@ static bool trans_FADDA(DisasContext *s, arg_rprr_esz *a) */ #define DO_FP3(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rrr_esz *a) \ -{ \ - static gen_helper_gvec_3_ptr * const fns[4] = { \ + static gen_helper_gvec_3_ptr * const name##_fns[4] = { \ NULL, gen_helper_gvec_##name##_h, \ gen_helper_gvec_##name##_s, gen_helper_gvec_##name##_d \ }; \ - return gen_gvec_fpst_arg_zzz(s, fns[a->esz], a, 0); \ -} + TRANS_FEAT(NAME, aa64_sve, gen_gvec_fpst_arg_zzz, name##_fns[a->esz], a, 0) DO_FP3(FADD_zzz, fadd) DO_FP3(FSUB_zzz, fsub) From patchwork Mon May 30 16:06:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577253 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp421426mag; Mon, 30 May 2022 10:09:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS12veS14YaQrxdIR6O/Lj/eMGebyXqXyVWKLngp6GaHktFHk5cVYr2o57yp1ECxrtTjAz X-Received: by 2002:a05:620a:b4a:b0:6a5:e7f7:271b with SMTP id x10-20020a05620a0b4a00b006a5e7f7271bmr11191404qkg.61.1653930599502; Mon, 30 May 2022 10:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930599; cv=none; d=google.com; s=arc-20160816; b=mi/G5DeN2ER8h/xwB9sxE6p10mChmRcq3AMSKnAbzPm+4Cj6reVx+MeJbGLY/IsGpq H4MlKJE/DRTAiq4AR9M1nhj/gT1u2gJwtmaouvX1x+HEKtngYB0GKk9oSoipSFuilBFB RC2MRKFrCItxsM+ebB3SZ9ni73vYSiYdLzRWAnnVLOmfb1Wz7devDehdw0YNQegxZBoE 0rPsYsi7adDd+zi1QmJsw9HQ8s0TzApLjgeUdpp9/+Pqt1X91lqbRuiy6wWY1335XcUe FzbIu8hodzflUMnNQy830SvcSktFR5xDZ0phfd2Gj7nbBbFVU9n1SrF08MYUwXqx7GUy QBUg== 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=ATzDWQ8y/K2dhpcM3KY3VN3ACEf+1v6c9bKZV/+5haw=; b=yXuzUyuK3k8A/RFycBQmp3BBKag40nVaAEpUHO4Yvy83FI1QJEvXCPLuu3NzYjEcyY eLL2bPomrwwX1+hy653559N6gF1ZQeRMJroBaF32pzefacU2HGw2Q4GrHP0AoT1/YkYG VHLXHV87WMYOw2WWdBmKlr9auAS7KEsL7Fw58+4ZuTNfkfiT0zVuaKjIHMhvgvZN0fx0 WDFJZuzAeJY222+30PGlHGUoKqmXaYBtoWaaX2XSaG5SxNN4ukpT8iGXG6GHErElSoWK qXRhbQKMabtjuQO/VZZVyVlPKLUAkEaqBI1aMYKmXHjw4Nk/RbAR6mZ8V50AMGlBUd0M SW/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ozZFIaR2; 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 bm13-20020a05620a198d00b006a328d98cfdsi10281793qkb.65.2022.05.30.10.09.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:09:59 -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=ozZFIaR2; 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]:37212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvitz-0006ao-3s for patch@linaro.org; Mon, 30 May 2022 13:09:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwd-00046c-4Z for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:39 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwa-0007Mu-13 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:38 -0400 Received: by mail-wr1-x42d.google.com with SMTP id s24so7959037wrb.10 for ; Mon, 30 May 2022 09:08:31 -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=ATzDWQ8y/K2dhpcM3KY3VN3ACEf+1v6c9bKZV/+5haw=; b=ozZFIaR239LO2fx1t7+YZIS9LAMIAYNV11/bpYLK3oMyXWKYxEFkYpQ4+f4jtX3KgZ 5bKHdDLdHJuBFA8DDL2oMyvJG4COjs/4gIB0N337ixizNJ+qRjufCDrJUjXsQ8c4vsSm Q922tfyRGZnVb6UmFTCq+SEJ/yc0Ha4//4tqpv4PyM5K1mBt1Z8wbanblnS05H1267W0 oCq9YauIgVPvvJ4rdBIJSKlekONhcIP7sDrwaFuP/dUpelPXDI9Df5vyhU1kahxRPF83 1TfNHMtLlF/Dl5LxChEm+MbOtFxDqDldwzTCr4cf3IqbfvejGHV6Ve/lyfxGw9eBGU8T mHzg== 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=ATzDWQ8y/K2dhpcM3KY3VN3ACEf+1v6c9bKZV/+5haw=; b=cij79UNvsd+REke7VB1/8ydZFJnwDERtNN5eaDzFekPZbwwLwAiXwbZBpX8sZmqdxu kynmJ2MjCx5tfk1TEGx0GIgPVpMdtwUhf0WgzpWuY2H503xKWVr9s3f0kQvONUMUMwuu yqaYulwsMkH8njol7XoPzWBVjIbclxWUVZY5ChlW/YafwneRdJYwrdPZseKFm+JEobpM qN0L9T0GAdLgr6kJq93CXoy7lI6y+38jZC2HEXUBUHnttbySvT1ojR8aSA/lszU5oi1u W282Vmb3Ypi1zsoeXzO3Y8f5GrHgsVL50KSIkNUnCle3iRhKi3edh3fC4Fm08CDDEahj m9lw== X-Gm-Message-State: AOAM530C/So0t5T/9cHne8RFxTrF0QSsEEe/GiaGnIsCcI8K5I/DEKBY PgkUPKxrC3Bg8D66pkcSdyKlbweGGC+KnQ== X-Received: by 2002:a5d:64ab:0:b0:20f:ef37:a9d1 with SMTP id m11-20020a5d64ab000000b0020fef37a9d1mr26047511wrp.197.1653926911568; Mon, 30 May 2022 09:08:31 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 090/117] target/arm: Use TRANS_FEAT for FMUL_zzx Date: Mon, 30 May 2022 17:06:41 +0100 Message-Id: <20220530160708.726466-91-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-88-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index d596e7a0277..29fcc8b0141 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3557,25 +3557,13 @@ TRANS_FEAT(FMLS_zzxz, aa64_sve, do_FMLA_zzxz, a, true) *** SVE Floating Point Multiply Indexed Group */ -static bool trans_FMUL_zzx(DisasContext *s, arg_FMUL_zzx *a) -{ - static gen_helper_gvec_3_ptr * const fns[3] = { - gen_helper_gvec_fmul_idx_h, - gen_helper_gvec_fmul_idx_s, - gen_helper_gvec_fmul_idx_d, - }; - - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - status, vsz, vsz, a->index, fns[a->esz - 1]); - tcg_temp_free_ptr(status); - } - return true; -} +static gen_helper_gvec_3_ptr * const fmul_idx_fns[4] = { + NULL, gen_helper_gvec_fmul_idx_h, + gen_helper_gvec_fmul_idx_s, gen_helper_gvec_fmul_idx_d, +}; +TRANS_FEAT(FMUL_zzx, aa64_sve, gen_gvec_fpst_zzz, + fmul_idx_fns[a->esz], a->rd, a->rn, a->rm, a->index, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) /* *** SVE Floating Point Fast Reduction Group From patchwork Mon May 30 16:06:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577278 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp441925mag; Mon, 30 May 2022 10:35:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8kqCFavqoG2tPY6znLX2dcjKASdT03VjjHiaRTfgzqb3D0TwbkT6YKzNPTbtyxFpnFrMw X-Received: by 2002:ac8:7f8a:0:b0:304:ce5:6a2f with SMTP id z10-20020ac87f8a000000b003040ce56a2fmr5149074qtj.563.1653932159383; Mon, 30 May 2022 10:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932159; cv=none; d=google.com; s=arc-20160816; b=MICoEkEr7pU/wkNbGNavn8eXhDVmxN1CZn45TF0l8Uw5iF+5kdmtT6Wp157fIt3jOg uI0nb8NTU5hxotBJ8kZpibkskG+G4XMUNj3rKgpGRPv4ZCcfQ29bzG7X5kbMGFqQyHUJ qiZsJVKH32S/Nz8Ee9Pk84R4Hu+CC8bpnjguVZVAqjxoLgGN3LP/OPxZumOrce1n3MuA mYaBbzH1K6MFvspVHNl48FPVChbftuoU7M0oEqEqdEQt9Z+XlDwSE/COmBS+MtohUyZu iAB9+lYOcU3Nj2CeUvYsXqje+QFPx86xjXVOVmWgdbBYR33H9UCnxWGn1inzKJewdTFn HIhA== 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=vWEUha9/FpKpSr3NefwhwgbQhO/TxyF64NaiHMcRV/8=; b=hrM1NqZUC483ecwOKTvg86CerFQoXAQXYN8zo0FpXclzhJgdEcvsgwTPyfiZ7MUSoI EZAp+chOLCnxyJfrolarbHf6HCd2phV9Tk0sJ+SeM5d6X/u/+lzfCUk/oxnHuYL9phZ3 YtqDAoj9a00Dn3k25f35mtmOq/ZjaPNBwpO21QCrxO8dUREK43UbKNxHGhS1t13dNALC Gc0B2rp59ixuwzPUwXF0d62X90CCYdsBjWL8m/RHlT5QucaybHqz5pXvdE0azd+Xh5O6 KWkwOcyw2LV9zegclFyWwqen47VJBagQ1m2HQ8piJKXdr3GCi2AoDSuDrXZdR+pz0hcm HvMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yb4Bv/dl"; 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 70-20020a370949000000b006a34c3b71bdsi6745168qkj.77.2022.05.30.10.35.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:35:59 -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="yb4Bv/dl"; 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]:42894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjJ8-0007hR-Vs for patch@linaro.org; Mon, 30 May 2022 13:35:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwd-000471-Bi for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:39 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwa-0007BN-6V for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:38 -0400 Received: by mail-wr1-x42a.google.com with SMTP id t6so15296903wra.4 for ; Mon, 30 May 2022 09:08:32 -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=vWEUha9/FpKpSr3NefwhwgbQhO/TxyF64NaiHMcRV/8=; b=yb4Bv/dlKWnyY7D7BKfEWa7juAHDZRobNxEiSledeopptxBbxbpQuLvJN0QGH3eyAG ieShrBeFYb4D6aBMssWoxOun4FDwBTq8r++oSvrOp9KTOYpvLOnrnXZWTglG9mFTsUr9 tpLbeht21m+bWBRKnbXdj9MPd4PiJrCjoQGegk66TXJvCoQG2e5+AWIgfELKy30xCl42 NI+QGHmDlfqLmt83MKiVxSLOxi5CA9Sx88X/IM+nStay/DpK6jpGgM/ZAxV2G1mKnRhe THcOjUb/dnQIkgY0Z66nbWutVLxrGkxMlno7gaZTYlXEChoaa9RGCZNNPAnXxm6l1PQG Zuvg== 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=vWEUha9/FpKpSr3NefwhwgbQhO/TxyF64NaiHMcRV/8=; b=xcAHhijRCRH/RPG0QwxuFWxYSqtSSNpxizU/RyDNIpKh3zycLGoKxsL4by1V5YxxTM DwSggca2gpfALGoDawGZwuZXJCW8fHBf9z1kej6/27FBpMuHPDcOVs1RueSiV8XmRPSo KCa13oPclHdw+rgBmJIe6Vwy9jBGLhXx6fbFxx2BG95jPuZZdNpaaBQ74lARVjyNb7DN 0uD226GK8de1gth1jDLyorYzX0LVytHO2tUplFa0t9qXU0nyumfeS4WF/jV2kbMNcAmD S3njOtaXQOH3OJCP68oYrwuIDzgYTUwFCjcljfYErziAcFBxyLNknN5/8KYufLT+dyEY B/Hw== X-Gm-Message-State: AOAM533JLucboiuqXIapjzs1sDWCOHUoFfm/TWjS2qr1h69zWB2e71N2 h9fnF3nzQR/NUPFfGcwQCUl3BkItUDJrTg== X-Received: by 2002:a5d:47a1:0:b0:20f:ecc4:7f6c with SMTP id 1-20020a5d47a1000000b0020fecc47f6cmr28374000wrb.236.1653926912235; Mon, 30 May 2022 09:08:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 091/117] target/arm: Use TRANS_FEAT for FTMAD Date: Mon, 30 May 2022 17:06:42 +0100 Message-Id: <20220530160708.726466-92-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-89-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 29fcc8b0141..11e4b4e1e4a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3715,28 +3715,13 @@ DO_PPZ(FCMNE_ppz0, fcmne0) *** SVE floating-point trig multiply-add coefficient */ -static bool trans_FTMAD(DisasContext *s, arg_FTMAD *a) -{ - static gen_helper_gvec_3_ptr * const fns[3] = { - gen_helper_sve_ftmad_h, - gen_helper_sve_ftmad_s, - gen_helper_sve_ftmad_d, - }; - - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - status, vsz, vsz, a->imm, fns[a->esz - 1]); - tcg_temp_free_ptr(status); - } - return true; -} +static gen_helper_gvec_3_ptr * const ftmad_fns[4] = { + NULL, gen_helper_sve_ftmad_h, + gen_helper_sve_ftmad_s, gen_helper_sve_ftmad_d, +}; +TRANS_FEAT(FTMAD, aa64_sve, gen_gvec_fpst_zzz, + ftmad_fns[a->esz], a->rd, a->rn, a->rm, a->imm, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) /* *** SVE Floating Point Accumulating Reduction Group From patchwork Mon May 30 16:06:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577283 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp449103mag; Mon, 30 May 2022 10:46:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi87zhzdY3JBgqAWDydgBmi/JWIz/kMb+0gAAc/LnWEV1Ha4xMgTV/Ls2Bu7W+g10pdG65 X-Received: by 2002:a05:6214:242e:b0:464:5c29:ac8f with SMTP id gy14-20020a056214242e00b004645c29ac8fmr1174214qvb.121.1653932777954; Mon, 30 May 2022 10:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932777; cv=none; d=google.com; s=arc-20160816; b=eCaS1V39P5Wsl1tB6i+nUoEK9JJkiPY3axi8JtB2Jx0JwzmQ7KNl+mnTyPlpgV8E5m aNYw4tQBtSJD0EGM2xDS+A5zOV+z0yb7WzI2KcMBSTCvPkyDGMLesVM2sWQ72M38zPop e0P4B/WqNViamUyvZYGt5dyu2iHxuQXYXWTwu6AaOFnBzM36455snPXREifW30H8/Twm I2jYRd4BlX7pm1y+JlixpouZBkVGrhOIfEOBnTZw2UBberkMOagu1jPD8iLjMi2inM58 oS7iFnK2aUfOUjFXwSx9f8O/A+AtM+fPXkq8M6NrLvll14zTrb1LDqEHJDIM4xs66ois 3Ukw== 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=U5MdDTiCJ0I6T7wLRHuDD2GNLTYgYp2l3D7QRQQkOXg=; b=0tfMef+YtW8rw24ZOfQ155OxFBR7fo2TI79yqX+8FM3QBMkzXSKL+dy2iameoCxT2n JFnYHghx6jlDeXdGTmnFG1G2k8wO586IGS2N7vxZJJHZKkkSL575OCMXWCx9j09l9Hjs irjPPnWKYsvNmzJIeKIaMxo6EaNK6ozvoSC1vz2pKT6bTbAtc7qE5aEFsp6ml8uzp4Z/ NyqtbL7r3QPi8Ey7eHHpRmstx5NR4cEEqSEBww5+5lesNe4o0dEWc9fLpQRkJj2TL0/C 0TZBDYz4Am00gIPOWGbOTI1oNvtl+tTUFYl+irdPKohPa29twOsbprMFm3BKbVGH0vTS mSaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sCjsZod8; 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 q10-20020ad45caa000000b0046235bdc492si2588033qvh.288.2022.05.30.10.46.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:46:17 -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=sCjsZod8; 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]:57618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjT7-0001Vd-GC for patch@linaro.org; Mon, 30 May 2022 13:46:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwb-00043w-Pl for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:37 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwa-0007MD-1Z for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:37 -0400 Received: by mail-wr1-x434.google.com with SMTP id q21so4089541wra.2 for ; Mon, 30 May 2022 09:08:33 -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=U5MdDTiCJ0I6T7wLRHuDD2GNLTYgYp2l3D7QRQQkOXg=; b=sCjsZod86v6hm7SE6ou4H5sOra37jbEOEu3aamV//yTzNLQ/4C9HtmSUlTXF+DoDST haz8yBTjg1lKEvfPZcPY6CdRZS2wwLRLnGP7gnyxkhDRdjQqfKXpxZAyK2Ib4jjS5P3c KbN1sJhJ3iTcqPF3/hXfOWcchiFxnKCB/OhMALu1V2L5lbz9EV/6UwStY1/GjrCfBuDH eAcf721kDow4mKmDgdIdiahznEVVIni6z8TkKhnmmFbWXBI9Hc6mz54QeWy4oej1/pEE G4L+UHbeT90Th593Dt0SS8PvUPHVthIWbLzOjVkTyC8xQVjTWQkL0tmMPkgh7n2iRgEj nu4g== 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=U5MdDTiCJ0I6T7wLRHuDD2GNLTYgYp2l3D7QRQQkOXg=; b=i84vdvpyCNFDuTnH/bbnJ4xx11NWsHUteYNoIAJXYXi2/3/00LsCdr18kxjU1cchCa wwLs0iJ5Hd3CqGr4mE7oQbq2URAlPTFMDcTy4W9qaEHrVqEaZJrGIFEaMDhUlVIaFevK 1TPfhVZqVE5VhAZe6HL7MyfHIAo6hJ7WawBSw9XKo7EX2xWjoryP0w+ogVFIt406jObv SUB29I9yRkDx0w04mf6mCmG604oxS3n4/BVyuUAZAvTQ9EcgUBgmf36/AKnkN8eutoWY 0snAixh1ExrdSYmD6z533vVG+Mm4uqd7OZAVnZRygL9b+AIWu4Nr8xPv1Xqf4MWL4Plv lEHg== X-Gm-Message-State: AOAM530wwg8H/mZ28tAsDVKj8S0g4aDtTPgsvjrm0gJ3aPFfBdUSXPdS 3wH8XHlpYCUbuy/LQefoj+crRIrhfZxfsg== X-Received: by 2002:a05:6000:16ca:b0:210:3d2:9bae with SMTP id h10-20020a05600016ca00b0021003d29baemr20318394wrf.311.1653926912955; Mon, 30 May 2022 09:08:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:32 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 092/117] target/arm: Move null function and sve check into do_reduce Date: Mon, 30 May 2022 17:06:43 +0100 Message-Id: <20220530160708.726466-93-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-90-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 11e4b4e1e4a..0d71072f837 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3572,15 +3572,24 @@ TRANS_FEAT(FMUL_zzx, aa64_sve, gen_gvec_fpst_zzz, typedef void gen_helper_fp_reduce(TCGv_i64, TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_i32); -static void do_reduce(DisasContext *s, arg_rpr_esz *a, +static bool do_reduce(DisasContext *s, arg_rpr_esz *a, gen_helper_fp_reduce *fn) { - unsigned vsz = vec_full_reg_size(s); - unsigned p2vsz = pow2ceil(vsz); - TCGv_i32 t_desc = tcg_constant_i32(simd_desc(vsz, vsz, p2vsz)); + unsigned vsz, p2vsz; + TCGv_i32 t_desc; TCGv_ptr t_zn, t_pg, status; TCGv_i64 temp; + if (fn == NULL) { + return false; + } + if (!sve_access_check(s)) { + return true; + } + + vsz = vec_full_reg_size(s); + p2vsz = pow2ceil(vsz); + t_desc = tcg_constant_i32(simd_desc(vsz, vsz, p2vsz)); temp = tcg_temp_new_i64(); t_zn = tcg_temp_new_ptr(); t_pg = tcg_temp_new_ptr(); @@ -3596,23 +3605,18 @@ static void do_reduce(DisasContext *s, arg_rpr_esz *a, write_fp_dreg(s, a->rd, temp); tcg_temp_free_i64(temp); + return true; } #define DO_VPZ(NAME, name) \ static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \ { \ - static gen_helper_fp_reduce * const fns[3] = { \ - gen_helper_sve_##name##_h, \ + static gen_helper_fp_reduce * const fns[4] = { \ + NULL, gen_helper_sve_##name##_h, \ gen_helper_sve_##name##_s, \ gen_helper_sve_##name##_d, \ }; \ - if (a->esz == 0) { \ - return false; \ - } \ - if (sve_access_check(s)) { \ - do_reduce(s, a, fns[a->esz - 1]); \ - } \ - return true; \ + return do_reduce(s, a, fns[a->esz]); \ } DO_VPZ(FADDV, faddv) From patchwork Mon May 30 16:06:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577279 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp441947mag; Mon, 30 May 2022 10:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+Qto3T96hRVNiw+/1meGUnKFSDHNO3BhtZpMXIe1VSDzAYYYZpsv91yqyksX83AnLx8/h X-Received: by 2002:a05:620a:2807:b0:67d:6349:2577 with SMTP id f7-20020a05620a280700b0067d63492577mr37107345qkp.785.1653932162066; Mon, 30 May 2022 10:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932162; cv=none; d=google.com; s=arc-20160816; b=nhEc9TkhCBhAOiUQPBLN68rB+bwn9gvDX7+XuG3lBT3ysCDqO16PUrrp0SD25v1I23 L3WjPOLqPHgZgUEd5vLNShYL7XhoFMuvx0DvrWkGQYBg6iSExmdoSVTfo3H7VqM+mxvp bWpkSZ3LootVYifEJ9Su8fnV8se661sZMqE9SOUoYCsih0QPPBRNj/bHelzIZBt1Z5I+ NTh0cro8a6y1CweAnWkapJtJX5x6k5bbGIRVzxoHThpIQAL2LkRYLMMyJg6ZY+685Xoa S78sGOpRrAKQaUHi1/LLNR8iic34FHU5qVwI7RFyr7MVRFHoOLuJ684Va8mVLanXobai 8UBg== 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=ZyjefK2N6kk1K8g0EnZkJnhroFFyabcGZiimwzhqkyg=; b=lJpRg5VRwsowPrKE9SGJaGkiqW4rZ22GI6CsbO6Jwgl9IgG4P+NH7SPiwJ4yIE20rw KwLZxES/84nS+MCwKTejUwzwwo8yiCdyk58hx+Q728H1unt8bUncK0ZTJsCYQMbDOS50 bQb7/SkutX1CeP9S5TU9RYTTqG49fQCDtIz4rf9irp/pn+c/yJqPWkXWG1sZ0KrNb2Xk hnLEt/ty8ZuUB+RhHvaS1EHbW7xaHqFnF1ZGOIvNVF4WOQgMlw84UdiGU3fCEVvAa2PJ VQoXheWRMy7ESN31YWtrCxaQ8ERy1QIAi26svN3LGsvhT7Zw2rSkBHIUWd6uXWzt6BxL nqWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gulOOUI4; 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 c2-20020ac87dc2000000b002f3a69289cesi7827266qte.764.2022.05.30.10.36.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:36:02 -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=gulOOUI4; 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]:43018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjJB-0007mY-KL for patch@linaro.org; Mon, 30 May 2022 13:36:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwd-00047m-Jg for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:40 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwa-0007Mz-6Y for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:39 -0400 Received: by mail-wr1-x433.google.com with SMTP id s24so7959084wrb.10 for ; Mon, 30 May 2022 09:08: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=ZyjefK2N6kk1K8g0EnZkJnhroFFyabcGZiimwzhqkyg=; b=gulOOUI4LgCXEVrz8aUiu+K/Wf5wf+hw9653NLlp/3D9BNdBcmTcdGRaUoX63SNOQE PKrwWWqtcaQDikXJJxugya/h/OWVRcfNEg4EoW4TEL5qheMBuXsI1m0IdhMHM7EGfIBz zega2XyJGE+jLNOYJI5eKUxys/NNDTpZhXEI0aFzruoperxnlvmwkRTT+6miFX1u6UuQ Or39n67ds+F3KrjFn+9zVlkP8yyD0AREOAaAIlO/0MlSkAHXLA+RiGjZPmNYmAQOOtDf MxfnxcRxVZkGL10ly0DMroc7A44uu/+d3uROQ8/YsLCVM8pBRNCTyNXGnLBJrlpWolfi IMQw== 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=ZyjefK2N6kk1K8g0EnZkJnhroFFyabcGZiimwzhqkyg=; b=OpTNagp5NSj/tMDvG3RuDVbDquofc1BcBLkuZh0dIw7IHGIfHconmYylvVP1RqJ6Hy tSZSUjsuksqUPRavEdGNx5VGjM3jgyBcLEXT/oMnb2R+ClzBxLevWQsRcOMNh9bGbJyg gvm09u7oBYhwqcldv6BRhYX/MnjUynz0WdKhksufJOdwN9FUUyU6Xj1WHkkduf8zjZGv h97N9Oo51M2au9jvfe5PbJLi1jAi/9koD3/v9HQxiMLp+8IYjXl5pg/bx7CNAs/9NUaP tli28ss9lD9i/qV+N/oW6pdT/0lBqrWgiGnprsDzYkJN8SfNQVddomSkg/vbEs0y3ZB2 0/zQ== X-Gm-Message-State: AOAM533iz7n7jBiwlzrOiudQ/7YjLSWSQvz1/JXfYvR6bMzdY6CLyghd v/9oEVGffSQeSYTiSDWZ6++P3M35KZOWUg== X-Received: by 2002:a5d:5888:0:b0:20c:d66e:a637 with SMTP id n8-20020a5d5888000000b0020cd66ea637mr47145177wrf.215.1653926913689; Mon, 30 May 2022 09:08:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 093/117] target/arm: Use TRANS_FEAT for do_reduce Date: Mon, 30 May 2022 17:06:44 +0100 Message-Id: <20220530160708.726466-94-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-91-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 0d71072f837..4a9ecd5e72d 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3609,15 +3609,11 @@ static bool do_reduce(DisasContext *s, arg_rpr_esz *a, } #define DO_VPZ(NAME, name) \ -static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a) \ -{ \ - static gen_helper_fp_reduce * const fns[4] = { \ - NULL, gen_helper_sve_##name##_h, \ - gen_helper_sve_##name##_s, \ - gen_helper_sve_##name##_d, \ + static gen_helper_fp_reduce * const name##_fns[4] = { \ + NULL, gen_helper_sve_##name##_h, \ + gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \ }; \ - return do_reduce(s, a, fns[a->esz]); \ -} + TRANS_FEAT(NAME, aa64_sve, do_reduce, a, name##_fns[a->esz]) DO_VPZ(FADDV, faddv) DO_VPZ(FMINNMV, fminnmv) @@ -3625,6 +3621,8 @@ DO_VPZ(FMAXNMV, fmaxnmv) DO_VPZ(FMINV, fminv) DO_VPZ(FMAXV, fmaxv) +#undef DO_VPZ + /* *** SVE Floating Point Unary Operations - Unpredicated Group */ From patchwork Mon May 30 16:06:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577276 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp439076mag; Mon, 30 May 2022 10:32:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbib3O2yPL+EB4bt4gDC3pu1wfwmhf/sqflxmgGHM0OXK6LGwuCg0C8wd9BANEBLSR1YEr X-Received: by 2002:a05:6214:2523:b0:464:29c8:8cd9 with SMTP id gg3-20020a056214252300b0046429c88cd9mr14381733qvb.16.1653931959423; Mon, 30 May 2022 10:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931959; cv=none; d=google.com; s=arc-20160816; b=zGS4trd5hOUFOuu0WFFuA8p06SPiCSkqewGpw+SomLdSSpjKcVkm+fhEpGsbQ2q2sC cGw0Ody9IXTlUFuCfbrD8+JZimdJJb035ZWp2SxDBJ3itGURtYV9beYi7aSAWdlrt6wW 4ayTmvy/TazX7U4QdTSMpr0rl1xxMXWT2eVzkL4xtfYdOV6xVh16ji3Mz/PRxll18Gk+ ZgrFuTXXx2o6HhKhfIM73M46gfPX8fmrnZ7fvdc2F/BhHuQwyreoby+6wUgATI0smbLY B9WGVwnAkkZBALWbuUywK3lOHHO7ukObwcdvsawWUm6HAnohvFnWsag/3l23FGg6Fzuv B79g== 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=B+S5E6ge/+wsWYJ5Kej7wJNG7Uhv19vqV3imdXXvdmk=; b=cpF5l9nj3PWFYqFIgeOZkSR4Guq8NYCEh5Lcmu3AqSps3JhfwLipqqYlIpw6zxsLVs WXhNjGRcWUyhKWRkEbrNQfw8qEFGi9vrZwflcQ68olysWC6QSsrPTwJNP97d4EIVN6rE eVm4X2WBG66Vnf8lFh88TkpVtEmAyP2Z0Vvuy8k/OMSVbBlvtif5PM24cDmR6roW0QK0 OF9/SUauWxYV3sR8cjH3FpkpvFlxQ2HmgYB3tbDTR/jRTAZCzl4AGVdToaFk+fHewRqD QLDeh7PKoFRvwETdN6gc+MNAE9Z5Uu7yjsmCG8Jzol4IvOauMMefQ5pcL9NcP8TwPy9i fzig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uA3QkP8H; 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 d7-20020a05622a05c700b002fbc8932a67si7637339qtb.103.2022.05.30.10.32.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:32:39 -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=uA3QkP8H; 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]:34530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjFv-0001pK-0R for patch@linaro.org; Mon, 30 May 2022 13:32:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwd-00046s-Ad for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:39 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwa-0007Hl-2j for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:38 -0400 Received: by mail-wr1-x42a.google.com with SMTP id d26so9674574wrb.13 for ; Mon, 30 May 2022 09:08: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=B+S5E6ge/+wsWYJ5Kej7wJNG7Uhv19vqV3imdXXvdmk=; b=uA3QkP8HXQZMkqYDVsiDNZdE9WiJiSpt8JMxIFPqFp3ZWxnnqQzyzeGftZ8W/Cdt5p zpLfNzdGzCSDuTIWE9kxMCLiqlz3910BuLF+kKqnP34/6naC8VkWqqoHZW1WnbCuwr04 aC6zZ+BCJyO3VETwzD/XJKFY7WVn5yeojwSdh7+nf7f+vXW7xnH1TMbHR83sa5P1iAjB JKt1YbtbT8r0/qJpwdWsnQZnyL/6xQra3QlFG7jZ8qiJ4Wm4FhZ5VLrQNZaTzgCpsZVe XOsM6Dw2G7Fw81nbyX/rTFMAD514lHf1m2Xi9SlHhlGVDeM4sa4FOml3mzzNkIE42GRj KbiQ== 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=B+S5E6ge/+wsWYJ5Kej7wJNG7Uhv19vqV3imdXXvdmk=; b=5FchlGXn58LLpo+cxrNXRmZLzDjTmc+Ja88UFeXiKfaQkkjRpbZeO680B11Uo8sOaE YWNh+Q2iB99GJMIqxgOgNzIzDQVdLqHVyYNxo2msC4nuiO5rUDB6dFarzOnYGlWx+KJ6 g2UZQnBwvkbyUPqS/A7ildxdwauDWYGkIP7FnKQmiQ05YKywhW2nunQxd03Yix7y+GOK crDkWo+GmSh+o/eBoc2D7ibsfMtCsHuKlVzfYX7jEuFUxaSpCNYWVpbSA3hkWF+cCM7X NbVIoZPEF/xNI7C0InNB/jPJB1YOIy9KsLBabO9AsX67GDfH0Wsooj+23YHhb5RUYLhW VFwg== X-Gm-Message-State: AOAM533jNzcgDBqdx1xqA9S/USFtLpatxSgmylC1qVUmUx9BjxTbwk6U ongIp1T/qPPsaD9cKp63YhKX5L3NhUCjAg== X-Received: by 2002:a5d:58c2:0:b0:210:2baa:52b8 with SMTP id o2-20020a5d58c2000000b002102baa52b8mr8200007wrf.20.1653926914452; Mon, 30 May 2022 09:08:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 094/117] target/arm: Use TRANS_FEAT for FRECPE, FRSQRTE Date: Mon, 30 May 2022 17:06:45 +0100 Message-Id: <20220530160708.726466-95-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Rename do_zz_fp to gen_gvec_fpst_arg_zz, and move up. Split out gen_gvec_fpst_zz as a helper while we're at it. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-92-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 77 ++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 4a9ecd5e72d..2f7651249ad 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -152,6 +152,32 @@ static bool gen_gvec_ool_zz(DisasContext *s, gen_helper_gvec_2 *fn, return true; } +static bool gen_gvec_fpst_zz(DisasContext *s, gen_helper_gvec_2_ptr *fn, + int rd, int rn, int data, + ARMFPStatusFlavour flavour) +{ + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + TCGv_ptr status = fpstatus_ptr(flavour); + + tcg_gen_gvec_2_ptr(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + status, vsz, vsz, data, fn); + tcg_temp_free_ptr(status); + } + return true; +} + +static bool gen_gvec_fpst_arg_zz(DisasContext *s, gen_helper_gvec_2_ptr *fn, + arg_rr_esz *a, int data) +{ + return gen_gvec_fpst_zz(s, fn, a->rd, a->rn, data, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); +} + /* Invoke an out-of-line helper on 3 Zregs. */ static bool gen_gvec_ool_zzz(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int rm, int data) @@ -3627,48 +3653,17 @@ DO_VPZ(FMAXV, fmaxv) *** SVE Floating Point Unary Operations - Unpredicated Group */ -static void do_zz_fp(DisasContext *s, arg_rr_esz *a, gen_helper_gvec_2_ptr *fn) -{ - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); +static gen_helper_gvec_2_ptr * const frecpe_fns[] = { + NULL, gen_helper_gvec_frecpe_h, + gen_helper_gvec_frecpe_s, gen_helper_gvec_frecpe_d, +}; +TRANS_FEAT(FRECPE, aa64_sve, gen_gvec_fpst_arg_zz, frecpe_fns[a->esz], a, 0) - tcg_gen_gvec_2_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - status, vsz, vsz, 0, fn); - tcg_temp_free_ptr(status); -} - -static bool trans_FRECPE(DisasContext *s, arg_rr_esz *a) -{ - static gen_helper_gvec_2_ptr * const fns[3] = { - gen_helper_gvec_frecpe_h, - gen_helper_gvec_frecpe_s, - gen_helper_gvec_frecpe_d, - }; - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - do_zz_fp(s, a, fns[a->esz - 1]); - } - return true; -} - -static bool trans_FRSQRTE(DisasContext *s, arg_rr_esz *a) -{ - static gen_helper_gvec_2_ptr * const fns[3] = { - gen_helper_gvec_frsqrte_h, - gen_helper_gvec_frsqrte_s, - gen_helper_gvec_frsqrte_d, - }; - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - do_zz_fp(s, a, fns[a->esz - 1]); - } - return true; -} +static gen_helper_gvec_2_ptr * const frsqrte_fns[] = { + NULL, gen_helper_gvec_frsqrte_h, + gen_helper_gvec_frsqrte_s, gen_helper_gvec_frsqrte_d, +}; +TRANS_FEAT(FRSQRTE, aa64_sve, gen_gvec_fpst_arg_zz, frsqrte_fns[a->esz], a, 0) /* *** SVE Floating Point Compare with Zero Group From patchwork Mon May 30 16:06:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577285 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp452182mag; Mon, 30 May 2022 10:50:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4XhChxCAVc6dpI4xwVxSwDyrW5hd1mVpap29TNCinn3Oa2tIUNXZIAhDaGr7CbkRMlFFx X-Received: by 2002:ad4:4ee6:0:b0:462:6af5:dcfc with SMTP id dv6-20020ad44ee6000000b004626af5dcfcmr19697564qvb.22.1653933043505; Mon, 30 May 2022 10:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933043; cv=none; d=google.com; s=arc-20160816; b=ggx2dKDxr1h78Gvn+sDsm3kdFBJbrs63XqA4AL4Vd3I+87aZdmAqFDrMkyryc0ApH7 MZn1Q2BD3QYbYyzTUbXMc0vNXrFSDl12NLh+UaDpp97SYek0kQW7gikz4nByPEzY48MW tNGOy084yOC1wDlNSYKguYzY6EFMlbTwGGWX/VpZuyRFxud3uDzAOQye2PcJcRCU+w+v 5OPHDkcMA5ET/RuNJUV6/btkrp7DqqOHJ2GUCxcX377J8YIXAuZUqR47bOq7obp1Nmo2 xwt5MnR9nNyPShYkEyRh76LYbYNB4BsONhwU/W6aRr5iLXabBXIQwQd7xRPwZPi0vRgT RN4g== 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=wHCM3DuHcG7rVU3FS0qi4j15U6ruRI2FEaCIBxFBBAM=; b=vpALqJR8DWWLqvMm0iIXZzgSIggd2PJftHJ0Ax3zB5wVgBugl1bewYPRnufER6Mdgj v+ampcez80GsAryZkO5zkbv0f5IMnnFjMJq9FBpHpItX/thOdWZkDhngyvOdKn7/boq9 xYsyQonLXR3D7NFwY6aF0en7Fkmtk38EmV3xdCITCcQPwLJ6qcPido22c18j0NmrROdc DtF8liK/f4P0fDsEJOb6ZPzX6aKT5ovSZzkFut/l1DqvBCgFX6aNaf3mE8NTjaHs9/Ii cwRxH6XlYNlA3+UyPZbIydq7GyTWgDcnR6w38bpBTPgM9QwLEwIBLIkYz5eXHQSuLNPk NmLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aJITZzCx; 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 l192-20020a37a2c9000000b006a5aacb0609si7264821qke.556.2022.05.30.10.50.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:50:43 -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=aJITZzCx; 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]:37984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjXP-0007QY-0R for patch@linaro.org; Mon, 30 May 2022 13:50:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwe-00049H-E3 for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:40 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:44003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwa-0007T9-IY for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:40 -0400 Received: by mail-wm1-x329.google.com with SMTP id 67-20020a1c1946000000b00397382b44f4so6714409wmz.2 for ; Mon, 30 May 2022 09:08:36 -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=wHCM3DuHcG7rVU3FS0qi4j15U6ruRI2FEaCIBxFBBAM=; b=aJITZzCxGl+VwuKjQJbpWfc86DlV8bORjs45zXuO92ytvZ4qSmZevczGB9oD4S8gM6 XxvsXfSP5YbEHT/ygnYAQ8xaZrLe/+BZ4rDhdKxi+Dm/YFh1PQMZZCALWcKIH4WWygzw idhOgDErnntt1JV5Pmt7pvvrTbJR3gBInu1bkPTqKL8CF5BQEsjaoreC6xr1xCOQECs9 n1OLI+/ZmvG9Q4xVZoschgl2+5slTmcZrdZEx+RkaF5LgJH3hngP0WpjIzAbWo3PYFdK xmpEeptd1FZNTA18s6cxtYsf0tpmeR4JKK7+7GtY+S9/kCiQG/zwmrcTT3Aicm8zHIG1 +ogQ== 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=wHCM3DuHcG7rVU3FS0qi4j15U6ruRI2FEaCIBxFBBAM=; b=6tf+DV8ycMlHV20kvDiZ8c2Bin0OkMVtYFnQbDC1xwY4VARI+eLbrHPKfZ2NnHzkvk UpYA6G3MB7PLDH00k4BXqxE6sgkSwqBCQZtGJqzXlqMqDa91f2kTEwuEyQsqlyOEL8+b 0XbW+yVeR5uTKFDLfCRlFPR4DKhtgrTv0mipF9btIKnUiCM+12WV2/bc1a6W0B5/TSvg acffeznhArYvsLRi9S6lImvU5Zpy2X1OB8hwZqC61vs6+CwKzTk1/1vIx+BmFcNwV5BW +eHC8oUbpDJqNNRayZPffr5eDo5bBYWUwxRjwxGiS8oPLua0RIz+vzbDIOjSO2827TUx QkKg== X-Gm-Message-State: AOAM533v+0CJIUU06Qalo/vtelwXpQo4bhRHiZvaeG5Dw+piLMrKcgeL rX8brdqAiZsG0iyNEiBUbrOGsqFlaH+K8w== X-Received: by 2002:a05:600c:2254:b0:397:581d:34fa with SMTP id a20-20020a05600c225400b00397581d34famr19882866wmm.181.1653926915168; Mon, 30 May 2022 09:08:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 095/117] target/arm: Expand frint_fns for MO_8 Date: Mon, 30 May 2022 17:06:46 +0100 Message-Id: <20220530160708.726466-96-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Simplify indexing of this array. This will allow folding of the illegal esz == 0 into the normal fn == NULL check. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-93-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 2f7651249ad..99e5d896457 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4167,7 +4167,8 @@ static bool trans_FCVTZU_dd(DisasContext *s, arg_rpr_esz *a) return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzu_dd); } -static gen_helper_gvec_3_ptr * const frint_fns[3] = { +static gen_helper_gvec_3_ptr * const frint_fns[] = { + NULL, gen_helper_sve_frint_h, gen_helper_sve_frint_s, gen_helper_sve_frint_d @@ -4179,7 +4180,7 @@ static bool trans_FRINTI(DisasContext *s, arg_rpr_esz *a) return false; } return do_zpz_ptr(s, a->rd, a->rn, a->pg, a->esz == MO_16, - frint_fns[a->esz - 1]); + frint_fns[a->esz]); } static bool trans_FRINTX(DisasContext *s, arg_rpr_esz *a) @@ -4222,7 +4223,7 @@ static bool trans_FRINTN(DisasContext *s, arg_rpr_esz *a) if (a->esz == 0) { return false; } - return do_frint_mode(s, a, float_round_nearest_even, frint_fns[a->esz - 1]); + return do_frint_mode(s, a, float_round_nearest_even, frint_fns[a->esz]); } static bool trans_FRINTP(DisasContext *s, arg_rpr_esz *a) @@ -4230,7 +4231,7 @@ static bool trans_FRINTP(DisasContext *s, arg_rpr_esz *a) if (a->esz == 0) { return false; } - return do_frint_mode(s, a, float_round_up, frint_fns[a->esz - 1]); + return do_frint_mode(s, a, float_round_up, frint_fns[a->esz]); } static bool trans_FRINTM(DisasContext *s, arg_rpr_esz *a) @@ -4238,7 +4239,7 @@ static bool trans_FRINTM(DisasContext *s, arg_rpr_esz *a) if (a->esz == 0) { return false; } - return do_frint_mode(s, a, float_round_down, frint_fns[a->esz - 1]); + return do_frint_mode(s, a, float_round_down, frint_fns[a->esz]); } static bool trans_FRINTZ(DisasContext *s, arg_rpr_esz *a) @@ -4246,7 +4247,7 @@ static bool trans_FRINTZ(DisasContext *s, arg_rpr_esz *a) if (a->esz == 0) { return false; } - return do_frint_mode(s, a, float_round_to_zero, frint_fns[a->esz - 1]); + return do_frint_mode(s, a, float_round_to_zero, frint_fns[a->esz]); } static bool trans_FRINTA(DisasContext *s, arg_rpr_esz *a) @@ -4254,7 +4255,7 @@ static bool trans_FRINTA(DisasContext *s, arg_rpr_esz *a) if (a->esz == 0) { return false; } - return do_frint_mode(s, a, float_round_ties_away, frint_fns[a->esz - 1]); + return do_frint_mode(s, a, float_round_ties_away, frint_fns[a->esz]); } static bool trans_FRECPX(DisasContext *s, arg_rpr_esz *a) From patchwork Mon May 30 16:06:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577257 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp424750mag; Mon, 30 May 2022 10:14:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG5gj772abpgJzMDaHPkkq7fe5GUBQWxDW/IhnXJvBu1W/4eXcKSlrptQhQk00e2EAbYSn X-Received: by 2002:ac8:4e82:0:b0:2fb:502c:875e with SMTP id 2-20020ac84e82000000b002fb502c875emr21880917qtp.590.1653930850370; Mon, 30 May 2022 10:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930850; cv=none; d=google.com; s=arc-20160816; b=IrH+YEafMCaBe1RDdTIUJgN5KxOxC7NH0Kp+wmtCSf/NQ3YwoRHBNOqgsQVl4MeL9U yQfWRaul7WXtMafeOZM0GIwvXoIPOmISx0mamqPwVWgqWaBcTfR5w0znA6Tqxm3DjkKo WVPin/XYva+ahRwmv5B2lPp3BD+cyEtwVW0VGMTkyk8nbxZt3Wcld2bTt4Nht5N71xzC N+whnKdhYEyWhs4YhalEc/6Z0At4oJbvZazP88Xd9MC6zkmwI7nxG8PSAu9XQypDs82t OA/7zMqmBXHdabE3ShNwG9pfPl/qXTiFcgfdmra1T3PtNJP8NREoU9+cPs6uo5H2cS9M 8bNA== 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=jcLKb+33IxapKiJvEnPjfrqxShYTJcg2+RTGcwFVY7g=; b=xk3JMCkfjtp0EBVqQ/3sjbhUUCLqJs2X0NyqukUhrDgJMoTVn9LDAPzRgvotgOcHJm 8kYGvO9l8my1D3eO3zwxsMS2piOP3M2NPA8WhJdn3zjjzeBlQFPEzGOQoUa67K+K4vwJ qSkXTfdMsJYbOpkL7ord48gwIpTn+8f6dBV8myUcdlaSCl9ElCvT5iWXnqmk8A3fq8ys nH5T1m66kqw+wh6naUr6naZhaKaaxsQVCYeMS+0Z8hWKsuC6F5hhHBjAowrP8gTu0Ieu V5tCrmGKKlzLz3b7Vn0mRsUpgbKnX/rkfpKfczMu1kDUpMje9iBQTTcKzczMirFd9/uD V8Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vtuJNF5x; 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 t3-20020ad45bc3000000b00464469be213si3517150qvt.527.2022.05.30.10.14.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:14:10 -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=vtuJNF5x; 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]:45948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviy1-0004bn-Vm for patch@linaro.org; Mon, 30 May 2022 13:14:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004CZ-Cb for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:35742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwb-0007S8-2P for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: by mail-wr1-x42a.google.com with SMTP id q21so4090949wra.2 for ; Mon, 30 May 2022 09:08:36 -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=jcLKb+33IxapKiJvEnPjfrqxShYTJcg2+RTGcwFVY7g=; b=vtuJNF5xUV3U6ZfrWGporDyuB16DNDZlSDw3t+xpUJSkD5IJZQc+Q74Ju9sDU7gzab XZR1qTSrlRZLx6incX1f7xK9fOAgktz/G9i1daDvTJj9N867QFudxaAROwkvVX7BCOb6 VmyMJpaVgOSltQbufCYdraxyd+LB7xNjsCnPY0Q3h4Gxdsqfyqqq6RQUtOpZiU1Wp9hn AiUFHo6wCQFVOJMUBmZzOfUWunkIlUWxkYAk30jbB2XPNYiCWE0fqqPf4vrgYCC3ZbHU llMypddnNNQKw31XlrLrf2zB6jdZaGozD3ooAszYrGAey3zpvPTszIc0hrE8HiQ4rgKw hQ0w== 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=jcLKb+33IxapKiJvEnPjfrqxShYTJcg2+RTGcwFVY7g=; b=KkK0t0NIgNvXXmGHt4SqNegbZnfd2FY/bkGGQosU971zguqKUwE9x+8yeVi6uVxPVg U/gA7aLQudU2C5cNPidHFE8Y20B9l4ULZ+0JJeZ2iHyFFYQSVxj0GZD+PkDkCIprdmBM QAWN3zTXgYTEIP6xU6hHyICwOqIE4d8gTzWmEnUNmUnZSIaK45ohBRJ1mZMsm+kxi+PH 7IgxrX2cM3XmxmIWGaBnVo2gOYL5regIP3h18wiaVBGVZn7O1dbUWqHgZ6vGLtaVc5ja FcgpwqrJ5N09zIfboemo4YOUTLD2Erd7fQA7j1KPzTxvpp5HiFqzJ+Zmo8jmo1UhONPI Iexw== X-Gm-Message-State: AOAM532yo6QPhzQyN/a4+nYORV+yUN3vjZ6/2c0P8rLM00AF1Um8PpcG 5B0xYjEfyK4cEWNfqIWFHHqkIqMqbiCg7Q== X-Received: by 2002:adf:f68f:0:b0:210:2ef7:e801 with SMTP id v15-20020adff68f000000b002102ef7e801mr7014083wrp.318.1653926916107; Mon, 30 May 2022 09:08:36 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 096/117] target/arm: Rename do_zpz_ptr to gen_gvec_ool_fpst_arg_zpz Date: Mon, 30 May 2022 17:06:47 +0100 Message-Id: <20220530160708.726466-97-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Rename the function to match other expansion function and move to be adjacent. Split out gen_gvec_fpst_zzp as a helper while we're at it. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-94-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 392 ++++++++++++------------------------- 1 file changed, 129 insertions(+), 263 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 99e5d896457..2a5fbec2d6d 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -318,6 +318,33 @@ static bool gen_gvec_ool_arg_zpzi(DisasContext *s, gen_helper_gvec_3 *fn, return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); } +static bool gen_gvec_fpst_zzp(DisasContext *s, gen_helper_gvec_3_ptr *fn, + int rd, int rn, int pg, int data, + ARMFPStatusFlavour flavour) +{ + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + TCGv_ptr status = fpstatus_ptr(flavour); + + tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + pred_full_reg_offset(s, pg), + status, vsz, vsz, data, fn); + tcg_temp_free_ptr(status); + } + return true; +} + +static bool gen_gvec_fpst_arg_zpz(DisasContext *s, gen_helper_gvec_3_ptr *fn, + arg_rpr_esz *a, int data, + ARMFPStatusFlavour flavour) +{ + return gen_gvec_fpst_zzp(s, fn, a->rd, a->rn, a->pg, data, flavour); +} + /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ static bool gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int pg, int data) @@ -4044,128 +4071,53 @@ static bool trans_FCMLA_zzxz(DisasContext *s, arg_FCMLA_zzxz *a) *** SVE Floating Point Unary Operations Predicated Group */ -static bool do_zpz_ptr(DisasContext *s, int rd, int rn, int pg, - bool is_fp16, gen_helper_gvec_3_ptr *fn) -{ - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(is_fp16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - pred_full_reg_offset(s, pg), - status, vsz, vsz, 0, fn); - tcg_temp_free_ptr(status); - } - return true; -} +TRANS_FEAT(FCVT_sh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvt_sh, a, 0, FPST_FPCR) +TRANS_FEAT(FCVT_hs, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvt_hs, a, 0, FPST_FPCR) -static bool trans_FCVT_sh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvt_sh); -} +TRANS_FEAT(BFCVT, aa64_sve_bf16, gen_gvec_fpst_arg_zpz, + gen_helper_sve_bfcvt, a, 0, FPST_FPCR) -static bool trans_FCVT_hs(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvt_hs); -} +TRANS_FEAT(FCVT_dh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvt_dh, a, 0, FPST_FPCR) +TRANS_FEAT(FCVT_hd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvt_hd, a, 0, FPST_FPCR) +TRANS_FEAT(FCVT_ds, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvt_ds, a, 0, FPST_FPCR) +TRANS_FEAT(FCVT_sd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvt_sd, a, 0, FPST_FPCR) -static bool trans_BFCVT(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_bfcvt); -} +TRANS_FEAT(FCVTZS_hh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_hh, a, 0, FPST_FPCR_F16) +TRANS_FEAT(FCVTZU_hh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_hh, a, 0, FPST_FPCR_F16) +TRANS_FEAT(FCVTZS_hs, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_hs, a, 0, FPST_FPCR_F16) +TRANS_FEAT(FCVTZU_hs, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_hs, a, 0, FPST_FPCR_F16) +TRANS_FEAT(FCVTZS_hd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_hd, a, 0, FPST_FPCR_F16) +TRANS_FEAT(FCVTZU_hd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_hd, a, 0, FPST_FPCR_F16) -static bool trans_FCVT_dh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvt_dh); -} +TRANS_FEAT(FCVTZS_ss, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_ss, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTZU_ss, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_ss, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTZS_sd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_sd, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTZU_sd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_sd, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTZS_ds, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_ds, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTZU_ds, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_ds, a, 0, FPST_FPCR) -static bool trans_FCVT_hd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvt_hd); -} - -static bool trans_FCVT_ds(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvt_ds); -} - -static bool trans_FCVT_sd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvt_sd); -} - -static bool trans_FCVTZS_hh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_fcvtzs_hh); -} - -static bool trans_FCVTZU_hh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_fcvtzu_hh); -} - -static bool trans_FCVTZS_hs(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_fcvtzs_hs); -} - -static bool trans_FCVTZU_hs(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_fcvtzu_hs); -} - -static bool trans_FCVTZS_hd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_fcvtzs_hd); -} - -static bool trans_FCVTZU_hd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_fcvtzu_hd); -} - -static bool trans_FCVTZS_ss(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzs_ss); -} - -static bool trans_FCVTZU_ss(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzu_ss); -} - -static bool trans_FCVTZS_sd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzs_sd); -} - -static bool trans_FCVTZU_sd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzu_sd); -} - -static bool trans_FCVTZS_ds(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzs_ds); -} - -static bool trans_FCVTZU_ds(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzu_ds); -} - -static bool trans_FCVTZS_dd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzs_dd); -} - -static bool trans_FCVTZU_dd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_fcvtzu_dd); -} +TRANS_FEAT(FCVTZS_dd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzs_dd, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTZU_dd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_fcvtzu_dd, a, 0, FPST_FPCR) static gen_helper_gvec_3_ptr * const frint_fns[] = { NULL, @@ -4173,28 +4125,17 @@ static gen_helper_gvec_3_ptr * const frint_fns[] = { gen_helper_sve_frint_s, gen_helper_sve_frint_d }; +TRANS_FEAT(FRINTI, aa64_sve, gen_gvec_fpst_arg_zpz, frint_fns[a->esz], + a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) -static bool trans_FRINTI(DisasContext *s, arg_rpr_esz *a) -{ - if (a->esz == 0) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, a->esz == MO_16, - frint_fns[a->esz]); -} - -static bool trans_FRINTX(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3_ptr * const fns[3] = { - gen_helper_sve_frintx_h, - gen_helper_sve_frintx_s, - gen_helper_sve_frintx_d - }; - if (a->esz == 0) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, a->esz == MO_16, fns[a->esz - 1]); -} +static gen_helper_gvec_3_ptr * const frintx_fns[] = { + NULL, + gen_helper_sve_frintx_h, + gen_helper_sve_frintx_s, + gen_helper_sve_frintx_d +}; +TRANS_FEAT(FRINTX, aa64_sve, gen_gvec_fpst_arg_zpz, frintx_fns[a->esz], + a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a, int mode, gen_helper_gvec_3_ptr *fn) @@ -4258,101 +4199,53 @@ static bool trans_FRINTA(DisasContext *s, arg_rpr_esz *a) return do_frint_mode(s, a, float_round_ties_away, frint_fns[a->esz]); } -static bool trans_FRECPX(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3_ptr * const fns[3] = { - gen_helper_sve_frecpx_h, - gen_helper_sve_frecpx_s, - gen_helper_sve_frecpx_d - }; - if (a->esz == 0) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, a->esz == MO_16, fns[a->esz - 1]); -} +static gen_helper_gvec_3_ptr * const frecpx_fns[] = { + NULL, gen_helper_sve_frecpx_h, + gen_helper_sve_frecpx_s, gen_helper_sve_frecpx_d, +}; +TRANS_FEAT(FRECPX, aa64_sve, gen_gvec_fpst_arg_zpz, frecpx_fns[a->esz], + a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) -static bool trans_FSQRT(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3_ptr * const fns[3] = { - gen_helper_sve_fsqrt_h, - gen_helper_sve_fsqrt_s, - gen_helper_sve_fsqrt_d - }; - if (a->esz == 0) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, a->esz == MO_16, fns[a->esz - 1]); -} +static gen_helper_gvec_3_ptr * const fsqrt_fns[] = { + NULL, gen_helper_sve_fsqrt_h, + gen_helper_sve_fsqrt_s, gen_helper_sve_fsqrt_d, +}; +TRANS_FEAT(FSQRT, aa64_sve, gen_gvec_fpst_arg_zpz, fsqrt_fns[a->esz], + a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) -static bool trans_SCVTF_hh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_scvt_hh); -} +TRANS_FEAT(SCVTF_hh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_hh, a, 0, FPST_FPCR_F16) +TRANS_FEAT(SCVTF_sh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_sh, a, 0, FPST_FPCR_F16) +TRANS_FEAT(SCVTF_dh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_dh, a, 0, FPST_FPCR_F16) -static bool trans_SCVTF_sh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_scvt_sh); -} +TRANS_FEAT(SCVTF_ss, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_ss, a, 0, FPST_FPCR) +TRANS_FEAT(SCVTF_ds, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_ds, a, 0, FPST_FPCR) -static bool trans_SCVTF_dh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_scvt_dh); -} +TRANS_FEAT(SCVTF_sd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_sd, a, 0, FPST_FPCR) +TRANS_FEAT(SCVTF_dd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_scvt_dd, a, 0, FPST_FPCR) -static bool trans_SCVTF_ss(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_scvt_ss); -} +TRANS_FEAT(UCVTF_hh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_hh, a, 0, FPST_FPCR_F16) +TRANS_FEAT(UCVTF_sh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_sh, a, 0, FPST_FPCR_F16) +TRANS_FEAT(UCVTF_dh, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_dh, a, 0, FPST_FPCR_F16) -static bool trans_SCVTF_ds(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_scvt_ds); -} +TRANS_FEAT(UCVTF_ss, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_ss, a, 0, FPST_FPCR) +TRANS_FEAT(UCVTF_ds, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_ds, a, 0, FPST_FPCR) +TRANS_FEAT(UCVTF_sd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_sd, a, 0, FPST_FPCR) -static bool trans_SCVTF_sd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_scvt_sd); -} - -static bool trans_SCVTF_dd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_scvt_dd); -} - -static bool trans_UCVTF_hh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_ucvt_hh); -} - -static bool trans_UCVTF_sh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_ucvt_sh); -} - -static bool trans_UCVTF_dh(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, true, gen_helper_sve_ucvt_dh); -} - -static bool trans_UCVTF_ss(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_ucvt_ss); -} - -static bool trans_UCVTF_ds(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_ucvt_ds); -} - -static bool trans_UCVTF_sd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_ucvt_sd); -} - -static bool trans_UCVTF_dd(DisasContext *s, arg_rpr_esz *a) -{ - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_ucvt_dd); -} +TRANS_FEAT(UCVTF_dd, aa64_sve, gen_gvec_fpst_arg_zpz, + gen_helper_sve_ucvt_dd, a, 0, FPST_FPCR) /* *** SVE Memory - 32-bit Gather and Unsized Contiguous Group @@ -7389,45 +7282,18 @@ TRANS_FEAT(SM4EKEY, aa64_sve2_sm4, gen_gvec_ool_arg_zzz, TRANS_FEAT(RAX1, aa64_sve2_sha3, gen_gvec_fn_arg_zzz, gen_gvec_rax1, a) -static bool trans_FCVTNT_sh(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve2_fcvtnt_sh); -} +TRANS_FEAT(FCVTNT_sh, aa64_sve2, gen_gvec_fpst_arg_zpz, + gen_helper_sve2_fcvtnt_sh, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTNT_ds, aa64_sve2, gen_gvec_fpst_arg_zpz, + gen_helper_sve2_fcvtnt_ds, a, 0, FPST_FPCR) -static bool trans_BFCVTNT(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve_bf16, s)) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve_bfcvtnt); -} +TRANS_FEAT(BFCVTNT, aa64_sve_bf16, gen_gvec_fpst_arg_zpz, + gen_helper_sve_bfcvtnt, a, 0, FPST_FPCR) -static bool trans_FCVTNT_ds(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve2_fcvtnt_ds); -} - -static bool trans_FCVTLT_hs(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve2_fcvtlt_hs); -} - -static bool trans_FCVTLT_sd(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_zpz_ptr(s, a->rd, a->rn, a->pg, false, gen_helper_sve2_fcvtlt_sd); -} +TRANS_FEAT(FCVTLT_hs, aa64_sve2, gen_gvec_fpst_arg_zpz, + gen_helper_sve2_fcvtlt_hs, a, 0, FPST_FPCR) +TRANS_FEAT(FCVTLT_sd, aa64_sve2, gen_gvec_fpst_arg_zpz, + gen_helper_sve2_fcvtlt_sd, a, 0, FPST_FPCR) static bool trans_FCVTX_ds(DisasContext *s, arg_rpr_esz *a) { From patchwork Mon May 30 16:06:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577292 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp467676mag; Mon, 30 May 2022 11:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD1rjiZ5qVzwDkycsNz5P0qTaFZaBvmBRlSpfMCRASvmkAsD7Zute7dxcvacZxOqgBW7nq X-Received: by 2002:a05:620a:4714:b0:6a4:e41b:e9a4 with SMTP id bs20-20020a05620a471400b006a4e41be9a4mr24500862qkb.534.1653934288209; Mon, 30 May 2022 11:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653934288; cv=none; d=google.com; s=arc-20160816; b=pDUizSQgD1kl0I8eretRKSmSQSHBv8nTWX3cjNZRRn6T220atKN/V1Wx6S3nX0sQ6L PxiWzurazqHadqGOJ/nzzBAKToqI363nqGI5JQcP7lSgw46j5wKO5Z5kjz78b6YSKbIi Kb5bsaLi3tUFCw/Ew4ZS4uWcNTGjY07fdnPfGwEU1NzUoulPumeWp8nKEzx7UhPnCsNf oWjBImIUf8jee2inqig0b2u4G3Yywe61M0Mcf3Q+RASGd+6C5L06MLL5XxCAyi7ic9Y8 BXp5nu133ahhUtG+nej0LlJCGESI87VceqATkO8UGTfzKISvoICDe3qjBrqyaYiWNYfR Kbiw== 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=y6320XCgMwJY1zG7cLEXVifisYCoFNkKfucLWd4W1X4=; b=waQJG1MXCV0jO9pBTv+Qa/FBgBxvk4iNnam6KIyjYBY6XLruRc8wwyYZ+dmtH3I3yW VEYcxJdpXw5jQhMAFYv6PdtUIbEF1BkE/ll7X6eE/vDIcf/QAaIV65QhZnpWX3TPI4Ge gyXu9USHdqBqwb/UnVVhXwuzSNFTJlss0TONoeVn0Qq+YEnzYDM9T+ebZpFzsMYvc9d/ Y6xGBsG0SQhUDKitsVTElxP6SrxOJc9sInfHR44da0flpJUUc0vPLCa5DQ5jxu2MElZm QlR5KHvdHfWJzmXNBgQBIvVqZdRrabW2+x736dg3asVAHCgZ1JIGYYbg0W5b/K2VrClj xybA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VhBexR0V; 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 o13-20020a05622a008d00b002ebc917850bsi7702969qtw.161.2022.05.30.11.11.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 11:11:28 -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=VhBexR0V; 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]:53234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjrT-0004dQ-PK for patch@linaro.org; Mon, 30 May 2022 14:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwe-0004AE-Nu for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:40 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:36780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwb-0007MM-TW for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:40 -0400 Received: by mail-wr1-x42d.google.com with SMTP id u3so15272110wrg.3 for ; Mon, 30 May 2022 09:08:37 -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=y6320XCgMwJY1zG7cLEXVifisYCoFNkKfucLWd4W1X4=; b=VhBexR0V7LBIHP3xP7EZixnRRZwfVxpXnTf8E9xrBkOPT6PWPSxcA+Ldw6L7eoOGeL 3LqtW2KCIi6sRR3OCkr9E1QEkUtAr3DdLNnggVuKOdMfLPp4knmO+Z63X0VBgnbqBrdt 9IqNosCrCbFyaGDxC+TgSNSSb1VkyOB9wTE3TfGRB8dAYcpwqNW52Z1nVVh0J1FXpC1i 0QIsws8X3tKX0WUQ5M58h9wVWsCq62MsZBuCoIAdY7u0OQao9ULRKPHAuEWIlunBXUd6 LsmbDYAk+RrOcdHl0Zq4gcm+JkhfpRy4EdKev2+/aVHvmL359CdORo/qnJx+JbkGpqgd baxw== 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=y6320XCgMwJY1zG7cLEXVifisYCoFNkKfucLWd4W1X4=; b=IhomIwM4m+cp4O8FVDRQzQZXHEcx45eAmycQb67s3u7YZOpJw0FFNkhFKrmd/8PMxI EzMFjyn23XoW9s9rdqp/nRFLP5O1T58PYeaj7pGO1AluvT2GzkuGRgQtv2KH39gpWjEf sTwzV5biZnVR0vGI0GrGhGo64PSr4vudquitBuUwOZoCCsuG+1OA7kOhQnu01ykJEu4K Da1wyKhY4OMU8a2gkR8PjCL4Ee0tgypWF0V8ygHGqk2fNGr3l3W1Y0/0fXNaetpzIu45 A5uUWTVK8/yXCsojItOxCxWGzhk43xFE4Ww0hCRSUIhhQyes5Tdwj4aBzPvuvV9hUOyX 3+mw== X-Gm-Message-State: AOAM530kjiXodxRLP5GEllboEDo5Rh4S6TNtaQsL/KICJTpH2gW/1kTk y07O4PIGhyYgb2qmuuF+lMgYfu5nR7typQ== X-Received: by 2002:a5d:52c7:0:b0:210:ac6:3956 with SMTP id r7-20020a5d52c7000000b002100ac63956mr18447365wrv.379.1653926916967; Mon, 30 May 2022 09:08:36 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 097/117] target/arm: Move null function and sve check into do_frint_mode Date: Mon, 30 May 2022 17:06:48 +0100 Message-Id: <20220530160708.726466-98-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-95-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 52 +++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 2a5fbec2d6d..43cfd2818ea 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4140,62 +4140,56 @@ TRANS_FEAT(FRINTX, aa64_sve, gen_gvec_fpst_arg_zpz, frintx_fns[a->esz], static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a, int mode, gen_helper_gvec_3_ptr *fn) { - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_i32 tmode = tcg_const_i32(mode); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); + unsigned vsz; + TCGv_i32 tmode; + TCGv_ptr status; - gen_helper_set_rmode(tmode, tmode, status); - - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - pred_full_reg_offset(s, a->pg), - status, vsz, vsz, 0, fn); - - gen_helper_set_rmode(tmode, tmode, status); - tcg_temp_free_i32(tmode); - tcg_temp_free_ptr(status); + if (fn == NULL) { + return false; } + if (!sve_access_check(s)) { + return true; + } + + vsz = vec_full_reg_size(s); + tmode = tcg_const_i32(mode); + status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); + + gen_helper_set_rmode(tmode, tmode, status); + + tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), + vec_full_reg_offset(s, a->rn), + pred_full_reg_offset(s, a->pg), + status, vsz, vsz, 0, fn); + + gen_helper_set_rmode(tmode, tmode, status); + tcg_temp_free_i32(tmode); + tcg_temp_free_ptr(status); return true; } static bool trans_FRINTN(DisasContext *s, arg_rpr_esz *a) { - if (a->esz == 0) { - return false; - } return do_frint_mode(s, a, float_round_nearest_even, frint_fns[a->esz]); } static bool trans_FRINTP(DisasContext *s, arg_rpr_esz *a) { - if (a->esz == 0) { - return false; - } return do_frint_mode(s, a, float_round_up, frint_fns[a->esz]); } static bool trans_FRINTM(DisasContext *s, arg_rpr_esz *a) { - if (a->esz == 0) { - return false; - } return do_frint_mode(s, a, float_round_down, frint_fns[a->esz]); } static bool trans_FRINTZ(DisasContext *s, arg_rpr_esz *a) { - if (a->esz == 0) { - return false; - } return do_frint_mode(s, a, float_round_to_zero, frint_fns[a->esz]); } static bool trans_FRINTA(DisasContext *s, arg_rpr_esz *a) { - if (a->esz == 0) { - return false; - } return do_frint_mode(s, a, float_round_ties_away, frint_fns[a->esz]); } From patchwork Mon May 30 16:06:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577268 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp432013mag; Mon, 30 May 2022 10:24:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRVgkwb22mWcHSvHjiBIU3V7zVVh7lLbTlKrXVgUWnka0DDSWFiaOJXqaKB4E5qyar3YhG X-Received: by 2002:ac8:5c51:0:b0:2f3:bc1a:4922 with SMTP id j17-20020ac85c51000000b002f3bc1a4922mr44221999qtj.560.1653931443078; Mon, 30 May 2022 10:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653931443; cv=none; d=google.com; s=arc-20160816; b=l//s9aA347NWlP+NbSRbh/h5VP53oLKWrall9HzyW1n//RiT17SoRySdn096nnrkwi OHLqAc9Ro5ek6jE0YgJLIalX+8bZZZCYFacxmfDvfgh8jq8Lubuvaxfr7JEXr2QSaQUk 0q+TUnDEsbl5T3vSeUUthVmMsM2wQJrLVIttpGDNlXzYGnHRvvli/IYlOdOwBhHuwmGS BBLAzlVHIz8cca7rht8GD5w1hKoqEQWDqcj8UVRiJP96HrMuiryiEWgdGbEYse65+hn3 kvQHQabC3BBk6XYJjsZU+GKJteAqsXlD8h2vzC00raceWSWGYi/qVKbc5cyHiNxsqcHN kRVQ== 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=1FqwuUF6xMql33Kd+JvaXWCNaAvSVoqLBakEwazAero=; b=CRtHnnuOpWbAzeYHkZCZwmZHEgqC7HOxPucVt+bUbcitIA2wV/Iyy7D0TZT6oK7i0W jZNBC/tzHVnU8JlKC9kYUTC62k1hDkVjvtimmIzKre2L3lyDi1kyjTnABcV0oODBt3nh cexblSh6syKYF1sOCRwpmYlE8L+SxRcxv9L1IlRwsnudbjQYoCXgtle/0F8uW3+ZcgWZ XxJL6/fNa/Khtee7tZCcWJzgcq6ilpDopQ083nTrF1myluLVHCI6VDiZ3FrMmVeWXoBI OoEJQy++doYm7mjbwHGkJkKf7xLIkVvxpv6CDS666W5CRhjOb0LKw834qy0hycYVKiCI GCwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ym2uXKl/"; 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 iu15-20020ad45ccf000000b0046432ececf0si5616389qvb.568.2022.05.30.10.24.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:24:03 -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="ym2uXKl/"; 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]:43338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvj7a-0005SW-Cl for patch@linaro.org; Mon, 30 May 2022 13:24:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004CH-9n for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:33613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwc-0007NQ-Kl for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:40 -0400 Received: by mail-wr1-x432.google.com with SMTP id h5so7199563wrb.0 for ; Mon, 30 May 2022 09:08:38 -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=1FqwuUF6xMql33Kd+JvaXWCNaAvSVoqLBakEwazAero=; b=ym2uXKl/OiShvQWsq8MYRTukheTuWaO2AcJH9mezsouejyFfrLHaodeZX2oo41/OVk ++/jN57BShT9GRzOIRx/DozUTGflhUT04MUSfFWE+CLfa0e/XDMLaIQd9b5NodutaK5s WLWjssL887m3DT2gKjGIFD23UKX7nnLLyRftc0q+rjOJ8A2crS6rjP93yC/U2wL7o9tH IChXvF/tMz10bWa0mF0ioaRyTXw3xLfTO6AtxdSJJRr7CyducES5S72w6oHBbyXXeMnL hfEaDg+0wcnoiYz9YK10F74K3O/wazC2NZ5NaqHQ0IxUbt4w1lqfNFFck5exyVM4DTsR 1bVA== 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=1FqwuUF6xMql33Kd+JvaXWCNaAvSVoqLBakEwazAero=; b=byC/RnIX82KASYNeCSm5loro1NIqjBQDB9O7AyJzTYwlDyVIOz2sk5ZoanOeVSVkYv STkBu2BjZzV/sUG9/7iGB29Bo6kohuvJ4XT75q/qj6lQMxwFJ5bmL7o/q+ygipoqhwrt V/bR0mU5uUiivaqgpHrxR8uRl0wPILu1az4a9XjNuxEETQC25kaQ0JNdPvo1M86U+h9M pIcXnALsHps0MWGOXhfqiC4fR7kUna5Cu8I0FKK75dhgikXE6WcOz9dQWlZemG+lf0lo p9sE7FBJaGtoTThwbtuTt9qp8vblcLJ+JtpXtHvanq2Iz55a9+5RPyVaK/YWDq3VZfud wiKQ== X-Gm-Message-State: AOAM531AI+IfqedCzgugnADStokWmuCRayuAK8T5bU6W8atFr8CZOInq RdhtXpkFA/pQ04vn1B+rkjKhWP5ybz3HsQ== X-Received: by 2002:adf:fc01:0:b0:20c:ff9a:2c53 with SMTP id i1-20020adffc01000000b0020cff9a2c53mr45899449wrr.142.1653926917738; Mon, 30 May 2022 09:08:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 098/117] target/arm: Use TRANS_FEAT for do_frint_mode Date: Mon, 30 May 2022 17:06:49 +0100 Message-Id: <20220530160708.726466-99-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-96-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 53 ++++++++++---------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 43cfd2818ea..552a551fef3 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4168,30 +4168,16 @@ static bool do_frint_mode(DisasContext *s, arg_rpr_esz *a, return true; } -static bool trans_FRINTN(DisasContext *s, arg_rpr_esz *a) -{ - return do_frint_mode(s, a, float_round_nearest_even, frint_fns[a->esz]); -} - -static bool trans_FRINTP(DisasContext *s, arg_rpr_esz *a) -{ - return do_frint_mode(s, a, float_round_up, frint_fns[a->esz]); -} - -static bool trans_FRINTM(DisasContext *s, arg_rpr_esz *a) -{ - return do_frint_mode(s, a, float_round_down, frint_fns[a->esz]); -} - -static bool trans_FRINTZ(DisasContext *s, arg_rpr_esz *a) -{ - return do_frint_mode(s, a, float_round_to_zero, frint_fns[a->esz]); -} - -static bool trans_FRINTA(DisasContext *s, arg_rpr_esz *a) -{ - return do_frint_mode(s, a, float_round_ties_away, frint_fns[a->esz]); -} +TRANS_FEAT(FRINTN, aa64_sve, do_frint_mode, a, + float_round_nearest_even, frint_fns[a->esz]) +TRANS_FEAT(FRINTP, aa64_sve, do_frint_mode, a, + float_round_up, frint_fns[a->esz]) +TRANS_FEAT(FRINTM, aa64_sve, do_frint_mode, a, + float_round_down, frint_fns[a->esz]) +TRANS_FEAT(FRINTZ, aa64_sve, do_frint_mode, a, + float_round_to_zero, frint_fns[a->esz]) +TRANS_FEAT(FRINTA, aa64_sve, do_frint_mode, a, + float_round_ties_away, frint_fns[a->esz]) static gen_helper_gvec_3_ptr * const frecpx_fns[] = { NULL, gen_helper_sve_frecpx_h, @@ -7289,21 +7275,10 @@ TRANS_FEAT(FCVTLT_hs, aa64_sve2, gen_gvec_fpst_arg_zpz, TRANS_FEAT(FCVTLT_sd, aa64_sve2, gen_gvec_fpst_arg_zpz, gen_helper_sve2_fcvtlt_sd, a, 0, FPST_FPCR) -static bool trans_FCVTX_ds(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_frint_mode(s, a, float_round_to_odd, gen_helper_sve_fcvt_ds); -} - -static bool trans_FCVTXNT_ds(DisasContext *s, arg_rpr_esz *a) -{ - if (!dc_isar_feature(aa64_sve2, s)) { - return false; - } - return do_frint_mode(s, a, float_round_to_odd, gen_helper_sve2_fcvtnt_ds); -} +TRANS_FEAT(FCVTX_ds, aa64_sve2, do_frint_mode, a, + float_round_to_odd, gen_helper_sve_fcvt_ds) +TRANS_FEAT(FCVTXNT_ds, aa64_sve2, do_frint_mode, a, + float_round_to_odd, gen_helper_sve2_fcvtnt_ds) static bool trans_FLOGB(DisasContext *s, arg_rpr_esz *a) { From patchwork Mon May 30 16:06:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577282 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp444227mag; Mon, 30 May 2022 10:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRJXktbNUslJQTS92LjEVS+74rQp+G2hw1DBkiBg41X71Np4GiS8lhSC12rIW30e+yKw94 X-Received: by 2002:a37:989:0:b0:6a3:4a0e:72bb with SMTP id 131-20020a370989000000b006a34a0e72bbmr34763724qkj.597.1653932342414; Mon, 30 May 2022 10:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653932342; cv=none; d=google.com; s=arc-20160816; b=WR/b9GjUUETf99dCg2x8DHa6YQ1jjUFkT19xM2hHKP2E/an+//Bacr+V7Z0HQpy4dR 92VyLGhSLhv5QHMCvWaqRodRDLh0XSZrwxK82p+jO3zWUgPpI/q0ZNAr2ydOXXGTbXxY ojliF5NZIkg2Bo/sJdO8GDt0o4dGc32JXpQaaV7t5JtSOJL5OzLYxyTsKEM2X4YzNHwS WRLxwb+7Pa8KVH4T6ZrGLRdmsXVuj2fdlX51EjtqRgT6HPpgavJom9RMidi8xJREzyED WyWrKygvKjkLW2O23SKUk2NsUg6DNPYB8n8pcfeWvJkfehjZpHrDSPsREvBlsWXt+JVx g8uw== 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=nOBen4gxaB/GNQ5+tb7fMVQd27qw+i1GIkH6L4Gx19A=; b=bEwmfZIo0mkXfVAahzcKxAhzp+0vcqgxo5mrNT/LRjY8egxQnZRuB9vuNsHkN0TtBE aYnItlTV7DOWLXv1dAr3f2M+CKaoROlzUOLDPQW+MwY7LnCMROuxzFZMh2+tAvRMEzxb 1GZGabR2FSn+xNGJfjWTPOIZovN+Q0vfWrBs/XiA2cimFAHDoIrJTZqoQHhKFiY9LosR 0fvdvghuBX1KpSqjdxDNsfNrie05bnWFet/dFtMJBE1RLhmaVQabw3OQRk25o1IrVXBn SwyYcJ6o/abcFk5IgVlvZJiHmQDDSaboK52JaN5wl5WJ+ZeJSZPzv+cWhwVTVd7eneKY lhMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zXPjHzpQ; 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 n13-20020a05622a11cd00b002f917a0c393si7968527qtk.725.2022.05.30.10.39.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:39:02 -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=zXPjHzpQ; 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]:51470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjM5-0005Sh-S3 for patch@linaro.org; Mon, 30 May 2022 13:39:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004Cj-MB for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwd-0007MD-Bm for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: by mail-wr1-x434.google.com with SMTP id q21so4089541wra.2 for ; Mon, 30 May 2022 09:08:38 -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=nOBen4gxaB/GNQ5+tb7fMVQd27qw+i1GIkH6L4Gx19A=; b=zXPjHzpQNUk3Nvj6lY2UlyMjh3ldipKdyR/VVDjQSZAkyuQh4F4PmJxfJovdqWRw/N KCtqrwbJ+R9f/chQ8HBiM8ed03qKn92WJ75Fe16JAn9Qq1frJkC01LOtXA7LSG6jQ+Y3 1VqABL+IonY4g75HEyVdKyP5EcZ2Uoou5wmCv4YpL+Ga3/tlM6kimiDSBWqZ3yM1uP8J ASDuexz0iiYnaGRFgG+FJnDos72IUPA77PW8CDHe71ogkwL6ZSvXKC9oQ9IQ0UNBik8r vVSqpmcHTPgMSu74jFQqmVeELiMTMVAIG9u8zYbQjKFbS3dXAb0zMZR/tN19WkuNw6Z4 Z8rQ== 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=nOBen4gxaB/GNQ5+tb7fMVQd27qw+i1GIkH6L4Gx19A=; b=rd3Eu3ZFKQPnP/4eAnnQDzFouR8ianPZMOtlX08XG7MndGjEwQiHyOMGqJrrNBZXAe sIN6itHcVAQQ+8FwYGAZU98jtNOFUUvnRy8pufYaxywe2KjsZIyb5oVGINPKtyEpktF/ 8TGf2fWQa/t3gKSeNUs7FllL7C00LzCnPV+j+/BYf6SDKCk+/Yo5Fsbja2fogy53YapR ks3Fxo5GpufT/hCKmIqOnZJwtz87fS5oEP8Otpa8FF/7ayBNJ0KTud1Zuit9vsQ8HQ0p 1ZespGncz+RbMGXx2sXGxjdHtfWv9/QZLWFvfKi1V01G2d9hjTYlQ0oU9usenVo62c3r wu4g== X-Gm-Message-State: AOAM531HW0qcgakXOhkA10pH0mMzudbJfmPyc3MLgeGI9amxGEEBqRr2 gKcQf/rCjYz0TwldHs7EU8YqRO2ECgUpsA== X-Received: by 2002:adf:e0c3:0:b0:20c:5672:9577 with SMTP id m3-20020adfe0c3000000b0020c56729577mr45683145wri.466.1653926918497; Mon, 30 May 2022 09:08:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 099/117] target/arm: Use TRANS_FEAT for FLOGB Date: Mon, 30 May 2022 17:06:50 +0100 Message-Id: <20220530160708.726466-100-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-97-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 552a551fef3..2f96f52293d 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -7280,29 +7280,12 @@ TRANS_FEAT(FCVTX_ds, aa64_sve2, do_frint_mode, a, TRANS_FEAT(FCVTXNT_ds, aa64_sve2, do_frint_mode, a, float_round_to_odd, gen_helper_sve2_fcvtnt_ds) -static bool trans_FLOGB(DisasContext *s, arg_rpr_esz *a) -{ - static gen_helper_gvec_3_ptr * const fns[] = { - NULL, gen_helper_flogb_h, - gen_helper_flogb_s, gen_helper_flogb_d - }; - - if (!dc_isar_feature(aa64_sve2, s) || fns[a->esz] == NULL) { - return false; - } - if (sve_access_check(s)) { - TCGv_ptr status = - fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - unsigned vsz = vec_full_reg_size(s); - - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - pred_full_reg_offset(s, a->pg), - status, vsz, vsz, 0, fns[a->esz]); - tcg_temp_free_ptr(status); - } - return true; -} +static gen_helper_gvec_3_ptr * const flogb_fns[] = { + NULL, gen_helper_flogb_h, + gen_helper_flogb_s, gen_helper_flogb_d +}; +TRANS_FEAT(FLOGB, aa64_sve2, gen_gvec_fpst_arg_zpz, flogb_fns[a->esz], + a, 0, a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR) static bool do_FMLAL_zzzw(DisasContext *s, arg_rrrr_esz *a, bool sub, bool sel) {