Message ID | 20230821161854.419893-15-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 n14csp1925920wrs; Mon, 21 Aug 2023 09:21:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrlaxCjOeexLHjEsyGGTuN6i/zkl0uhErP6CGAkv02YjeRPLRHAS6dhPcnf3oTvzrmptvP X-Received: by 2002:a0c:ab05:0:b0:64f:3f26:2236 with SMTP id h5-20020a0cab05000000b0064f3f262236mr2720430qvb.16.1692634910754; Mon, 21 Aug 2023 09:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692634910; cv=none; d=google.com; s=arc-20160816; b=WalXZWuFp/KxQ2vsjBvseuE5Xg93HkpPb0kPEs+UGJppKpWKh2AJV3EvQMeIbOrOUn IeH/Bt26lJuukEXg3nsI3wgDoEs9GAbsb2hiKButfPb7e1g1dJy99Aw+SFuMJe9pBMnF ucdboqojg/j6HZ56BiC5f/Ep3tBXczxVsFnwxltOM0tSLOFYuuZKgzXWXtFlaEdgKv61 LStk2nCZVvZNNOIheA88cQLZFr6RCUGA/y9tczOmPGOfqojsA5Cm46yuujWA4/+HeVNR 1AvDBdyfq8nqcFDyIpHFZP9UsZph8Z6zlPfRMkb/j1KyIfgalfaIv1/ez8nnPAOsF2OB 5o9Q== 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=LeRwmoZj3gayyKtebRoC0JW2YuHlKTaNGyIqgqME+tw=; fh=ihrF4BApiA3Z+XvqRPGwUXuGbDlKBmHEuYVfGNAjZIQ=; b=VNG3N8WNTdR97ypAgweii32ozK0a5IgKKpJ3f0VgmLoPGMBaQITdMm6dS5InoqCMIu 00srSvkP3A21OcMpgfloZvdOioz0NcjsTOLHAYs7jLJ5zVG0APJxcyRNZTdioLoHR2ne 8V084pq/LzY364lbN0Aqm1KuR344p6D0dgBdVVynb6jbrrglGgjIh/vw8736jpWf+UFk sCTWaEF9EZ/0PDhwZDe8WINrjjy2i5qGokPawHp/TqQMWU15y+36BujSQlXSRQWi54Ib mjYbVkHo6M84i+/PboSNpToScQOiRQrXgqNT537bxeVKr8ozVmuJ42R6p3ftqTb5T5Em LImA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWHYctkq; 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 p16-20020a0cf550000000b006471113a986si55264qvm.323.2023.08.21.09.21.50 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Aug 2023 09:21:50 -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=AWHYctkq; 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 1qY7cr-0001qd-Rb; Mon, 21 Aug 2023 12:19:33 -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 1qY7cb-0001Vi-8Z for qemu-devel@nongnu.org; Mon, 21 Aug 2023 12:19:20 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) 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 1qY7cW-0005dn-70 for qemu-devel@nongnu.org; Mon, 21 Aug 2023 12:19:15 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-56b2e689828so999635a12.1 for <qemu-devel@nongnu.org>; Mon, 21 Aug 2023 09:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692634748; x=1693239548; 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=LeRwmoZj3gayyKtebRoC0JW2YuHlKTaNGyIqgqME+tw=; b=AWHYctkqAfQRB+kLjK7K2oY+ra01tdCFC9xxKekA+mPYcQE76r5bW6IlzQOmijDxJC ju+0pZliqjWDKqZ7UcpU5P0y9cei/aVzXFrsmqiBuOOGHM3ySSjwZRXTq8CMFx7LfBwj EwexEoh7qCFsPu8eEIleqjzGU6mtN9IoOkjRt0ey5Zrl31Jd5TJTYHWDE3BQgnou47Wz oefVoXl2qlWumUKem46DhcDtQfIjy4HYvy2Q2D/ebb7ONzUpVEodXRVAiJUbvIDL5j4d ypnMvbGwp/m/XXlbW4e7SaOHIqHH4NpDOY03RXDg638ogQbl/vWd5UZzP/T267aUbBYx 02+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692634748; x=1693239548; 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=LeRwmoZj3gayyKtebRoC0JW2YuHlKTaNGyIqgqME+tw=; b=fpoIUX1UvgACRQ3sruSlTg3KxiPiztd2M8hCMgHm2sZuavA5uF4ZeaEOusvDXkqC8s G8+oe4y4OYJLxRYfdCvky/wkxRRZkCr6PlomIZ2AZrXmDm4/ONkbHi+c9sYzDAIzv7sO gX1F6GAjp3guVv6Xob5OVypKaCB8WHpJRzQZudJFnD+KNinqc6wDR9g2EmJT2Mula+nn 1cG2cOnLvsQlIwpesmeIdRHKqe9eM6yuop3qNZz/NUPLPDE9ZmYFU2D64VHHsgrIzfNo PW81Y9IUmN2oiDkvnQAl7P6A7WiBjqa0Kc0RZ3Lk3m+PISXZzYzJjJ0oSf7kG3eu9M2E Ja9w== X-Gm-Message-State: AOJu0YzkktU3RoyL3/mZjnxzix+uzEnDReugotyM/IPtL4ZTQ1+ZGFdo k4XdFqsLu/Y73jW2q3cKLeX2QTlnLP5tkW5opv0= X-Received: by 2002:a05:6a20:3945:b0:140:3554:3f44 with SMTP id r5-20020a056a20394500b0014035543f44mr10294183pzg.22.1692634748425; Mon, 21 Aug 2023 09:19:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 09:19:08 -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 14/19] target/arm: Use clmul_64 Date: Mon, 21 Aug 2023 09:18:48 -0700 Message-Id: <20230821161854.419893-15-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index ffb4b44ce4..1f93510b85 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -2003,28 +2003,14 @@ void HELPER(gvec_pmul_b)(void *vd, void *vn, void *vm, uint32_t desc) */ void HELPER(gvec_pmull_q)(void *vd, void *vn, void *vm, uint32_t desc) { - intptr_t i, j, opr_sz = simd_oprsz(desc); + intptr_t i, opr_sz = simd_oprsz(desc); intptr_t hi = simd_data(desc); uint64_t *d = vd, *n = vn, *m = vm; for (i = 0; i < opr_sz / 8; i += 2) { - uint64_t nn = n[i + hi]; - uint64_t mm = m[i + hi]; - uint64_t rhi = 0; - uint64_t rlo = 0; - - /* Bit 0 can only influence the low 64-bit result. */ - if (nn & 1) { - rlo = mm; - } - - for (j = 1; j < 64; ++j) { - uint64_t mask = -((nn >> j) & 1); - rlo ^= (mm << j) & mask; - rhi ^= (mm >> (64 - j)) & mask; - } - d[i] = rlo; - d[i + 1] = rhi; + Int128 r = clmul_64(n[i + hi], m[i + hi]); + d[i] = int128_getlo(r); + d[i + 1] = int128_gethi(r); } clear_tail(d, opr_sz, simd_maxsz(desc)); }