From patchwork Mon Aug 21 16:18:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 715385 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp1924992wrs; Mon, 21 Aug 2023 09:20:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFaDjvzQeeVlsVlFdgjoau00FmVMFpAu3j/2y4vyih2w4OJi81ycG0iO1yDMqf/wOj9E/dl X-Received: by 2002:ac8:5e4f:0:b0:410:8bcc:fbac with SMTP id i15-20020ac85e4f000000b004108bccfbacmr9329032qtx.7.1692634803452; Mon, 21 Aug 2023 09:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692634803; cv=none; d=google.com; s=arc-20160816; b=e/OOdXTGGjRTCCNa4+MVcssmfwbiNQt9b0wHgQ+R0UNnwdDpLSzeJIZKCsdeQpK+4z 3yPbQSvT3xVcIZCjfdxezJ0sI6ckntE0Px4kHFyylNMWP2subiN8VlKssGVvnuplUfEP MtjBfc08rC4ImGVaTMziF5jEOC9dCQk0Q5F53bpoil1Wp2suqYvbHvU4H6T2X692us6P k7lRQUrIZskRWzPDp9juwOrm4Nk1LG2qOj5eMHzKARxcAAZXrMJi4/ckvI/2/oYW6q1v MyahqGzB5BGO/JX1cCcNDNM5E6TxoLZNzgLpOkjc3J/vPcM5z2hndqoqv+jUI4wrQwe5 UPbw== 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:cc:to :from:dkim-signature; bh=m/tLt6CaJsWtmfAucUsswRTzLCX37AmxqBCjKQhyCi4=; fh=4xNVIrgzKzsUJFZ/LK5iWzslbipp0obh3zmyxXTMM5Q=; b=nzTF7MYMD0Pada5eVtLxZ2WzlZg2ZgP74dMNYp90YyF6qT74fNtZGCSUY9717T0BeW aJl/60t0fSe6efwmvgwFa+jDTUjC4t+LFJaQ6BZbsPkTA4xjjkT+zI2OYHmX3WKI2z5w giZSdDAqdtZOQqs+7cWAfeWjXfzy6v0P8OXGouOjVSaQg9ea/8f9REeTafgDfCMFAFXO fiBldZBEdPIVzqG/WE4B15WtC+d9TzZZJz3mo0btViTylhvKMGKi8zHry+17jPWv1Et9 iBRPwizyukzLz/54QWXSAzALEayfYBBnTnBJTilENRWQEdZpbMHYj9QJSXusn84xe1Zn baeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ehAokeZt; 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 o19-20020ac87c53000000b0040fd591f651si693034qtv.523.2023.08.21.09.20.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Aug 2023 09:20: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=ehAokeZt; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qY7co-0001jD-UR; Mon, 21 Aug 2023 12:19:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qY7cQ-0001UY-W5 for qemu-devel@nongnu.org; Mon, 21 Aug 2023 12:19:07 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qY7cO-0005cP-HP for qemu-devel@nongnu.org; Mon, 21 Aug 2023 12:19:06 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1bdc243d62bso20707575ad.3 for ; Mon, 21 Aug 2023 09:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692634743; x=1693239543; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m/tLt6CaJsWtmfAucUsswRTzLCX37AmxqBCjKQhyCi4=; b=ehAokeZtPiM/VMZkTTjopbJALWIlTO1Pt+Dh8O0CIM8jfuFAZ+04Rz/tViQkx8AeaI 7mIB3hQ/78SKdfz9r5gwZQU8fFS4UELHCGjEzViQVO/tdqYO5PIU28SMWn2VbeQoU+Cb X8B/NLvCEnOuEvmiy7CjYv1hlzgiBlbPPKie2Rl38fD3Sb81uhA/KlLigoTAW6db8lNI H0HhXRUNmLzxOBoSx5riqaF96uMQLeERpaBJUu3GQ7Y8Qdyn+rlwjItYOIQtlqqowl+R DgXZYIJBRqVvUm3zaPR0ehZxoLQmW9kzXC0G4HaIETAqbBosfLDKSyZzUj5GzjcTU7E3 q91w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692634743; x=1693239543; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m/tLt6CaJsWtmfAucUsswRTzLCX37AmxqBCjKQhyCi4=; b=ikV8/yOhf+g11TUPMuNIEwrjXsgqSfZN+1+iDWJD2A45FW+BAarEZ2eqsNQOlRdhlS adg/SxGAUC8uNNOJxY8i/Di7ANsdCNWDtz/ZlcSWiP8ZDeXC8F6xICovbE8SUzAbU1NX H4IvI6Z6jH7W4MEqKXA2ssm/H7jSUiO18KHa+o04PylOMFOWgkv8fNNXBr65HGIkte1j CrWWLZG9M0GN1PhUMTzcZC60avCuAAIKf6QRrpeXrKwABGlhX2c2fp/Vsw6EBUWgcNii E7TSQbkGiJGUeqdA0id4k5B7z+Ba9l/H/z8C2p9OmeufnBOEN9je3SMolRC1wm0AeXgM +qyw== X-Gm-Message-State: AOJu0YxeIGF0By0yp6zA6uMuqpAbRKDPOyidfiLawnEwycIklHRAzrhu r3btuq74HzF07jB0Mc55FIQJQhd7tbBSTDtgH5M= X-Received: by 2002:a17:903:491:b0:1bd:ccee:8f26 with SMTP id jj17-20020a170903049100b001bdccee8f26mr4099677plb.15.1692634743161; Mon, 21 Aug 2023 09:19:03 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:2c08:e710:4459:46f1]) by smtp.gmail.com with ESMTPSA id e16-20020a17090301d000b001ab2b4105ddsm7234549plh.60.2023.08.21.09.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 09:19:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: berrange@redhat.com, ardb@kernel.org Subject: [PATCH v3 08/19] target/ppc: Use clmul_16* routines Date: Mon, 21 Aug 2023 09:18:42 -0700 Message-Id: <20230821161854.419893-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230821161854.419893-1-richard.henderson@linaro.org> References: <20230821161854.419893-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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 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-bounces+patch=linaro.org@nongnu.org Use generic routines for 16-bit carry-less multiply. Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 343874863a..10e19d8c9b 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1438,6 +1438,14 @@ void helper_vpmsumb(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) } } +void helper_vpmsumh(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) +{ + for (int i = 0; i < 2; ++i) { + uint64_t aa = a->u64[i], bb = b->u64[i]; + r->u64[i] = clmul_16x2_even(aa, bb) ^ clmul_16x2_odd(aa, bb); + } +} + #define PMSUM(name, srcfld, trgfld, trgtyp) \ void helper_##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ { \ @@ -1458,7 +1466,6 @@ void helper_##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ } \ } -PMSUM(vpmsumh, u16, u32, uint32_t) PMSUM(vpmsumw, u32, u64, uint64_t) void helper_VPMSUMD(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)