Message ID | 20230620110758.787479-28-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp247192wrm; Tue, 20 Jun 2023 04:16:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Uvra62ZBKSbqzx6vPKWxmE2YnKpPlPOIQ2ccQvGge3+O7x1iOJ56o21eoVZ8FzNntIhDp X-Received: by 2002:a05:620a:1a19:b0:760:88e9:c890 with SMTP id bk25-20020a05620a1a1900b0076088e9c890mr12551565qkb.45.1687259799555; Tue, 20 Jun 2023 04:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687259799; cv=none; d=google.com; s=arc-20160816; b=uHfHBgCyahzWPzCS31T/Hw3NHe0tF8ldnZ5+uTzRV2MOKZEaOyxb8Ah5wEiRxgonkD H8y+M3h+PegnIkcKkd0oUZYGNQdHfd1o6WfqlTg34R3CSMVhp/DOSq1beDymX+VetuGq upqQMTk9jvXOgT8DKNIOXf7LCh9Ior6fIvi3aTmHucXqDOwVipe+uPtu/J8ulERgDBnc QKGUfKti8rFHflhL7bcOb/+yo4QkF4CI5i5jBWaBFey8lYxo8PPX0s6LV7gXz01LOXaW sgL8GgCL8ItzFOVIpYrqU85Bsb/saaPJVRORojAELbBpy/tbBkt5PPJ4VcGr+zLzhesx Wupg== 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=5CADGmxGJYg/RjV/FHciOOU7jKKLgdI+xydvPDVf6m0=; b=XY+dUNXBR8xI0TuCC1ou+/ZcZ7mBMGR+uXDAauaGh9EJ8fep+n0Nv9kIZOmVhLo4LJ L+ae+wAky4T0m11gTCgo8g1zNd72kcu3DC5SofWhtpfWDCJeyDbT/Aw98XOkZTVyXhQI uAr8Kzon8R8F3JW9F+q0aS43V4LHvTmkozy4VfSF8GtthQaFlhBULlgl7wZ+rY5S2SRo XvJOfTja8dEU4W87ES2TllArH0pLttOO0bCiftSrU09okGkmu/KSAIawsY2TxLNuwnXk 3q37gNxo9ju2Y1rKHn3tnylTc5Rw3GUcOmbWSMB+DA7pvuUxWUblHJvJwXeEx2p4BvEZ TfGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kmaRhTun; 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 x20-20020a05620a14b400b0075772297496si720274qkj.353.2023.06.20.04.16.39 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 04:16: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=kmaRhTun; 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 1qBZEQ-00074h-8u; Tue, 20 Jun 2023 07:09:06 -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 1qBZE0-0006Wl-PZ for qemu-devel@nongnu.org; Tue, 20 Jun 2023 07:08:41 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) 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 1qBZDx-0004Tl-OQ for qemu-devel@nongnu.org; Tue, 20 Jun 2023 07:08:40 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-988a5383fd4so396210066b.0 for <qemu-devel@nongnu.org>; Tue, 20 Jun 2023 04:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687259316; x=1689851316; 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=5CADGmxGJYg/RjV/FHciOOU7jKKLgdI+xydvPDVf6m0=; b=kmaRhTunpRHqu1Dxjhr36m8NW55YJQUI6E24JzAolRKCJ35LpPhQf30r99LGvF8UCQ mNcm17XOmsbPi32rbeNhCgieHOp/mgosexsP2OCzlxXU6xVPO3MYdAKiVPF09flgVnW8 /jyEQbc7KkxudMIOEkMwb0oiUb5E0kxvCXHd/yl0oKdE6USR5STpdBtrSlE+zHI/kjV5 WG5XQ7AJENxMmQNlGbd+Fgpxkxg9ZupJb40+WkHLNbgCnKuirfI/uRrKYkFPJPeVXVwE YHA1ppKN/4WBZQVUHgRrDtP21N8cIlkr5UADvnTJYxC8nm3F6Wzb3bsQmvXyvuGDG7Sn fS3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687259316; x=1689851316; 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=5CADGmxGJYg/RjV/FHciOOU7jKKLgdI+xydvPDVf6m0=; b=LiJANhXM9uZSRQWXy4VXTKv5+aPLXsWvvGynj1XQWGfQSCASVF4gXLo+j91LYQD2jc H2ksrN+jxBBIESv5Kz8ccmAkICcW4F/Aya1unHWQyJwX1GdcFBjNNAe9ZOGYmnhLSphW SkUx6pG7vC4vzIGx9z/nu5PP/bqCB9Req88T/6pvBADHb/mJVmTKhHY4PPPSSkFmbcMr pf1x5oyICN+yEQax9FjF4SJXr4eXb5Gn/cVHzZ/PrYcVemYWMYC4VJMx6ZOlzrWqGPof qeVFx5dyDXbIGaMEMEfZoFvpymUxeWguP12t8kAJTfkhuXsZ3mCif1+RIqENGyRAsyIV 9MmQ== X-Gm-Message-State: AC+VfDyrJf8XZ9wmK6lXllglDm9pZOpkHe/RzCfvWg4yMUzCk/VwFTtf LkvisFNaJ24HwbLKPsmMfKofVqUEol3MpsIrFx7/XPVe X-Received: by 2002:a17:907:3ea4:b0:978:8979:c66c with SMTP id hs36-20020a1709073ea400b009788979c66cmr17803113ejc.18.1687259316435; Tue, 20 Jun 2023 04:08:36 -0700 (PDT) Received: from stoup.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id x17-20020a170906711100b009884f015a44sm1170687ejj.49.2023.06.20.04.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 04:08:36 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: berrange@redhat.com, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v3 27/37] target/i386: Use aesdec_ISB_ISR_IMC_AK Date: Tue, 20 Jun 2023 13:07:48 +0200 Message-Id: <20230620110758.787479-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620110758.787479-1-richard.henderson@linaro.org> References: <20230620110758.787479-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-ej1-x632.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=unavailable 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 aes-round.h and host accel
|
expand
|
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 93a4e0cf16..a0e425733f 100644 --- a/target/i386/ops_sse.h +++ b/target/i386/ops_sse.h @@ -2162,16 +2162,12 @@ void glue(helper_pclmulqdq, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s, void glue(helper_aesdec, SUFFIX)(CPUX86State *env, Reg *d, Reg *v, Reg *s) { - int i; - Reg st = *v; - Reg rk = *s; + for (int i = 0; i < SHIFT; i++) { + AESState *ad = (AESState *)&d->ZMM_X(i); + AESState *st = (AESState *)&v->ZMM_X(i); + AESState *rk = (AESState *)&s->ZMM_X(i); - for (i = 0 ; i < 2 << SHIFT ; i++) { - int j = i & 3; - d->L(i) = rk.L(i) ^ bswap32(AES_Td0[st.B(AES_ishifts[4 * j + 0])] ^ - AES_Td1[st.B(AES_ishifts[4 * j + 1])] ^ - AES_Td2[st.B(AES_ishifts[4 * j + 2])] ^ - AES_Td3[st.B(AES_ishifts[4 * j + 3])]); + aesdec_ISB_ISR_IMC_AK(ad, st, rk, false); } }
This implements the AESDEC instruction. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/i386/ops_sse.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)