Message ID | 20230821161854.419893-18-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp1926467wrs; Mon, 21 Aug 2023 09:23:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDl3Z4OS+ofvIkCr4iQo3bSPmWa+ENVASJ+4MdhOKrPHcTf2eudIqQk2H2UjrXvABH6t0e X-Received: by 2002:a05:620a:4146:b0:76d:a569:ccb4 with SMTP id k6-20020a05620a414600b0076da569ccb4mr4456381qko.0.1692634981906; Mon, 21 Aug 2023 09:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692634981; cv=none; d=google.com; s=arc-20160816; b=foJ7tOaH8CT723eamd13gwHlkseU+TiJpS2vlssJp/NXb0sviofOkOhyvIsDDWcFC7 iZcElxk8JRT6KSjdKEClIyVlUBogIRYGHGKh+su3sVZIVKqe9p1LcniHB1dl4lEuFMq6 O33n1zuD+1AEF9LIQMCZhnS5c19iaPfhvvodxYHsGeeoeJJUA7WO9UbdZNUbMBrb5xbD Kyr8b0cvTFwfZ+n2bdYMLyV+5XLcBsvCoSg6bwe8O3s9m5dO4IHJUEEjpl6RrRPRxz+u eueoLGHkgp3MWoieGXEIOcDIdNzMpLWKA4tfqRgfUG4+N843+Fg1mtG1usDU2NS/THQG N+Xg== 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=RNSYabeHfWwXe7wDrGrGc9BDLh4vte4K5oHOOd2gwYw=; fh=ihrF4BApiA3Z+XvqRPGwUXuGbDlKBmHEuYVfGNAjZIQ=; b=PkMHcGw71I6gTO6zAq7KGbFgyue/mDY5jvJ7DvUPMoZ3GZbz+jGKRxdcciq/jJhrzG E5gmd9DIE75EWK/NPU+0Ok/F3rXU6FN4YCyBE220v1Wqng/BnrD33hM3SFArRKNTQ9am W6Ep8F4sXEX1zWCPnbsqVZYilkbuk/iAOgShJgEGAOS+9peleTAWYljCgXdE0RZUvlm4 1RrNt+NsD3IQx5IOxEh76v22aymCFe//7zCUENiCMGR/ToPG4C3lq35sxuy4qbWRhhPV FjUvdIa7fqAexkOn3YnPzFj3D0BV1g41WQG/QmJM2FhZIPaK2c98tO0imFnwhI1DCon2 pdPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TEZPas9n; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h6-20020a05620a400600b0076d8fb61eb7si4491409qko.715.2023.08.21.09.23.01 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Aug 2023 09:23: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=TEZPas9n; 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 <qemu-devel-bounces@nongnu.org>) id 1qY7cu-00023d-DF; Mon, 21 Aug 2023 12:19:36 -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 <richard.henderson@linaro.org>) id 1qY7cd-0001Xj-8S for qemu-devel@nongnu.org; Mon, 21 Aug 2023 12:19:28 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1qY7cX-0005e7-H3 for qemu-devel@nongnu.org; Mon, 21 Aug 2023 12:19:17 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-68a440a8a20so1129645b3a.3 for <qemu-devel@nongnu.org>; Mon, 21 Aug 2023 09:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692634751; x=1693239551; 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=RNSYabeHfWwXe7wDrGrGc9BDLh4vte4K5oHOOd2gwYw=; b=TEZPas9nnKBxQpT77XYGEAjcDfHu/DuT7Ewb29LfCiWL6H9UIK6DmVMsEXa3Dsf2fH mkok2z/PH5jbYeGlhY75a9EqKP1cT4yRD1uVN5yEnDjojUItBkE1sk75HY9XfRZJ1KaO 445Lluw//xyyZBPdLXeXWQ3VYAgUpt6ITBuw1wJav02N3RK1crluBmquT14gD//ik6Kk ft8M/ma1FAajzwt6aW8DSpQq0rs8VzoTD8fCRKstTyjcUssR6pdXFlTBjV3gzBgRA0O9 0lWPnGBTc4+z3MHfoFybiR97WYH5GeAD2ZtVU6ZyHPJWe18gJVcpBVpM1kDAmP3FqT4m Hv8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692634751; x=1693239551; 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=RNSYabeHfWwXe7wDrGrGc9BDLh4vte4K5oHOOd2gwYw=; b=DA0KZaGrksrxRviY1obfNv1PsQvgh2qJ0Q5qrKG4dq8U92sJ7Zz8BVwrak2BbllvxG hPR7/1j9WGfbT2QYBOkQklx2YySXex/oIExalsL3EH4reiiNjVbBXdYXogWavsYRhSj/ dSSNN+K9p/QlN8cIUALh5nOxCrrAzZ1Ar34Z7KmCztz55OuF2l7FB5Jw51cX5K/otFWT AZAmRWFYa+tR/tu3xTxOgUmGMdhUUIBTiqDTBKgPjU/x0L87uwsvBfeuqjJiPFcW19YB xnXZjVz3Dd5hr/XLLQ6aFtprtcHv9Zg3Z7PxsJHSgxS0vRJJR/YRDqcTBpJt0cpgOg6M z/kw== X-Gm-Message-State: AOJu0Yxxm69NMpzLnl5vU0QpdIDJHSDvOjOR3ArJKldiH9guaRS34+bl IErLxeJb5jAhEq4KUi3+TLRVQbQT9Mt4zCpDkhA= X-Received: by 2002:a05:6a20:d7:b0:140:bc76:961c with SMTP id 23-20020a056a2000d700b00140bc76961cmr6490917pzh.60.1692634751275; Mon, 21 Aug 2023 09:19:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 09:19:10 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: berrange@redhat.com, ardb@kernel.org, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org> Subject: [PATCH v3 17/19] target/ppc: Use clmul_64 Date: Mon, 21 Aug 2023 09:18:51 -0700 Message-Id: <20230821161854.419893-18-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
crypto: Provide clmul.h and host accel
|
expand
|
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index ce793cf163..432834c7d5 100644 --- a/target/ppc/int_helper.c +++ b/target/ppc/int_helper.c @@ -1456,20 +1456,9 @@ void helper_vpmsumw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) void helper_VPMSUMD(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) { - int i, j; - Int128 tmp, prod[2] = {int128_zero(), int128_zero()}; - - for (j = 0; j < 64; j++) { - for (i = 0; i < ARRAY_SIZE(r->u64); i++) { - if (a->VsrD(i) & (1ull << j)) { - tmp = int128_make64(b->VsrD(i)); - tmp = int128_lshift(tmp, j); - prod[i] = int128_xor(prod[i], tmp); - } - } - } - - r->s128 = int128_xor(prod[0], prod[1]); + Int128 e = clmul_64(a->u64[0], b->u64[0]); + Int128 o = clmul_64(a->u64[1], b->u64[1]); + r->s128 = int128_xor(e, o); } #if HOST_BIG_ENDIAN