From nobody Tue Feb 10 12:09:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1600457090; cv=none; d=zohomail.com; s=zohoarc; b=BMUOnWujRLCLOMRU5ht7GOwtDu2GXjoGeame8xIs3Imet5a7+M7Of1+j9C0qAHlrXZoeH4nvDJV6uKWeQI08Bo/14K9Li7XzcZpNowq2G4Zj85wMMsISt3wRmVL349z50P8tgwd9bvzH8jI/glfxqyVv6Mv8eStYHNuRUFhnRNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600457090; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l4iKSLJO0P4KO8p8doEML+s4OAJMNAjz9gFYt+6w6ZQ=; b=e2ZP0k7wTkg5mOxsUU+4fNB/ZQ+puXyIFCiStftb5Lenox/VoVIYRgvZZAaDdNdbINUGp+zVY/RpluLzTpXQ9Z50ZdzOHlrJ/ItdBKw8uXvk4LEpB1yE32lo0vb3TeIEHmuM1UejhvnjIzQb/fNsnIAtZ8u2rG3qcd+zHXDefoA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1600457090229902.2515795395815; Fri, 18 Sep 2020 12:24:50 -0700 (PDT) Received: from localhost ([::1]:35214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJM00-0007lf-Uu for importer@patchew.org; Fri, 18 Sep 2020 15:24:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJLIB-00014P-Np for qemu-devel@nongnu.org; Fri, 18 Sep 2020 14:39:31 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:44558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJLI7-0007Gs-0x for qemu-devel@nongnu.org; Fri, 18 Sep 2020 14:39:31 -0400 Received: by mail-pl1-x62a.google.com with SMTP id j7so3419555plk.11 for ; Fri, 18 Sep 2020 11:39:25 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id f4sm3680723pfj.147.2020.09.18.11.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 11:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l4iKSLJO0P4KO8p8doEML+s4OAJMNAjz9gFYt+6w6ZQ=; b=e2XZ1IAREOy6JNtBbiXfnWHxRtlwD7gdk3vfeHa1GJiHYrd+O6YFppKneZybOYQVdq D3JAhCi2gaJxtxbnvabW2dH2k/Ej/l4l3AlrmcPr67Ea2cQ3EJAinE31G0KfFf2ERmld jV3shRXJW1ak0ParjhynMjyKRblJRVt0okwAk5li/vbOSKLm0XSItpLVv9o7i5XFNQAd m2D9Aq273ojekoMTUqQETrx+zCqr7n6Gplr0cx07W9zUweLpJaPG0tzBVjBIjPQdRcnS uQr5FVy/MnjeVcWyCkUqHDZukYugJVjY1HByd7kt6C0DrFwxPfbab1kzqi0TxOkgxs3T fcYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l4iKSLJO0P4KO8p8doEML+s4OAJMNAjz9gFYt+6w6ZQ=; b=pS5iNy0cz7OguZCgJVoUpRscev7hAscsBxtCPRka+reDVWGEfr/v4eBcRx2ilBhjGt Hni3SmB9VKRsUeJW46lhFjlYuDgubBZ/2OrxLS3QA92Q/l2q/1adxgTIbzD1SMLsixXq ROOvNmskhB9HAr2wpWHbHbRqv/Sl6OPW6I8iYSji4Ck+969IdlSV9PhCCdeGlIM+CwjO reZySWDmk6uIRp/Ml5xmIfLhImVxo+kQ+M9OteFvvYz3hL0yq/8IExml3EyLxbP3AiTy JPsrSct0fxClQ8rg025CnMVGnOg+9C7fuxA14GMrN1qTKQjlo9ztJtA9u81EDiRTzZ9g SjlA== X-Gm-Message-State: AOAM530gmuXEjs16vQOnMJuxsBKgqutqcTmzwMPrGEKBxNmfI2k5SgwK EOQ8wTxaE2/px2q1LDFQc/ml4N03VIIItQ== X-Google-Smtp-Source: ABdhPJzYzRXP61hGoe44hLUsEliGZGI3iUQ0IaHSb0QyQjTr4mAjJVGjzbDRmxL3wYomBCKPzg+B8g== X-Received: by 2002:a17:90a:c501:: with SMTP id k1mr12830330pjt.170.1600454364474; Fri, 18 Sep 2020 11:39:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 69/81] target/arm: Implement SVE2 crypto constructive binary operations Date: Fri, 18 Sep 2020 11:37:39 -0700 Message-Id: <20200918183751.2787647-70-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918183751.2787647-1-richard.henderson@linaro.org> References: <20200918183751.2787647-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/arm/cpu.h | 5 +++++ target/arm/sve.decode | 4 ++++ target/arm/translate-sve.c | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index f5052a58a4..67b2834035 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3917,6 +3917,11 @@ static inline bool isar_feature_aa64_sve2_bitperm(co= nst ARMISARegisters *id) return FIELD_EX64(id->id_aa64zfr0, ID_AA64ZFR0, BITPERM) !=3D 0; } =20 +static inline bool isar_feature_aa64_sve2_sha3(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64zfr0, ID_AA64ZFR0, SHA3) !=3D 0; +} + static inline bool isar_feature_aa64_sve2_sm4(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64zfr0, ID_AA64ZFR0, SM4) !=3D 0; diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 2ebf65f376..5f2fad4754 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1564,3 +1564,7 @@ AESMC 01000101 00 10000011100 decrypt:1 000= 00 rd:5 AESE 01000101 00 10001 0 11100 0 ..... ..... @rdn_rm_e0 AESD 01000101 00 10001 0 11100 1 ..... ..... @rdn_rm_e0 SM4E 01000101 00 10001 1 11100 0 ..... ..... @rdn_rm_e0 + +# SVE2 crypto constructive binary operations +SM4EKEY 01000101 00 1 ..... 11110 0 ..... ..... @rd_rn_rm_e0 +RAX1 01000101 00 1 ..... 11110 1 ..... ..... @rd_rn_rm_e0 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index aa459ed30a..cb493d838d 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -8176,3 +8176,19 @@ 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); +} + +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; +} --=20 2.25.1