From patchwork Fri Apr 30 20:26:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 429912 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp815252jao; Fri, 30 Apr 2021 14:37:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbC8TaXmM1Y3RaluUeN0i0Aqkneh++Izdixy0Ns/++2dEVrAQ5GhQxV1azmuiPikU3tzpa X-Received: by 2002:aca:bc42:: with SMTP id m63mr12244664oif.96.1619818668475; Fri, 30 Apr 2021 14:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619818668; cv=none; d=google.com; s=arc-20160816; b=KjThlEGF5YV0pSN7CmrtrOr+m/jFbMzLrQC0SJrW6NkzrBXuryfLj+biuY2gDmRSQ6 oKVzwWGHlX3btdLZp6TTyhZaivsQV3kTXgNQimwfNXFlOjkNynjElvx/T32l21us2SZe Ccser8KMuzEJSFOK86hPhAFNSt+P1pM9d/PFzwC2Eo3lD51u/aPf278wyRzcIRbUXJCP a1oYZ88QkAeRQmWp/78QjFUjn3gN8C4qHmLZ0lLWYdIkOvYKftEy/7/uPcU2Itrc5Ggx D4WyiVuvKhtPXzxAVAyvDSCfUD8FqjWuHRHly6ybkR5vwSLwIxahM7xq5QB9ecifdFLR TgFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=QgPHonaDrMGTIgpcdL1HmrXmjritKf6UcNKnh0LjfQg=; b=TbdTrS36OjrPWIcsbQxYTQvplu8kwLgx50GETjHRlBd/4Lk8aUtuEu7aMX4StKTvLZ m+i5QlNfQfePAA/q1vUPuBee5Zm40soZeLAiFAgkEOXbuvpHRGiCf5HFCVr2+uiyHt3k nWjIrD+PEbCWLCo1a+Grc6/bJ8A16WVzG3gA8nc6L6hbrrB5SBmYYfjk1epMo+JFcNoN 8b8F87gLk2VSN2KS91OvcWEnszsF325hpk4hWgVXDTGHjV+x+kfGM732km5i/kO0s7/b DBL1tPr9DkpKExOozABv5numrSWogQ2i+AjA/uKzn88jg/z35hVMa7Px4Sybk5a+boQ/ um4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GKXTcRAt; 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 e25si3726692otk.89.2021.04.30.14.37.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Apr 2021 14:37:48 -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=GKXTcRAt; 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]:60568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcapX-00012T-ON for patch@linaro.org; Fri, 30 Apr 2021 17:37:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcZn5-0005EL-Up for qemu-devel@nongnu.org; Fri, 30 Apr 2021 16:31:11 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:39439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcZlx-0007p5-LM for qemu-devel@nongnu.org; Fri, 30 Apr 2021 16:31:11 -0400 Received: by mail-pl1-x62d.google.com with SMTP id s15so8821211plg.6 for ; Fri, 30 Apr 2021 13:30:01 -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=QgPHonaDrMGTIgpcdL1HmrXmjritKf6UcNKnh0LjfQg=; b=GKXTcRAt7h3AxVyN2yG3IqOzKCt9aI8vedY+F4Dh23B3s9Grk6YPbJYTJEDZrgef2H 8As9kOvWZSH7DwZiCLcu7aKE+ZCCCzXSRERpbd/Tf6D4+pJ2haUXrj6V+h/mMy3xHoLq n9AEa6MLbpICeyiZkWFB4RiYyTPgfecEk8WQMJh6uOHe6xAk1rzqFaa7tyHbjVU3J3mU OyNxKth9NLwcv9BunjLj+YYGOEDQsD18ahiSbrAZF8RXC57GK/iW2l3UXiG8p6grdlLp +bgluQ1+tWKjcw5/o4s2yEcFESafX8mM39BX9QzmHVhXipm28qkgml8rf35K5lqMX6n2 gRBw== 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=QgPHonaDrMGTIgpcdL1HmrXmjritKf6UcNKnh0LjfQg=; b=f5bDue1PIWVEVBdsE2JrV8Y1YCJyBil2xJKpSevuNbNapubHXIcKjuFzTxtfWwjy3z 1D5UPWkStA0PG6e/8HdgYKQ0cVFg1ARXb0FoQOgn10UBqGdXD/w1MS7WiNQh7dJS38u0 Ng+qWls3siZxCi6diEUnXtxUMx+73mS9g0LTRBMOqt8VqW/aSjrAjXIKBfMLPZKPObxp /5MwWQW54kv742PRfzpFxWniEuTO3DlwlPFH9+9P/W7tjIUAF23P56d5JK4mo+GKYtKW Vw34YiVtwXQGOxKEwBIft9EV5tooaaIYpysRLu7GdHmtIclizjJeBMsvVOkaIsQP/+Ef KNTw== X-Gm-Message-State: AOAM533xFRRvIVvGqINfT0uKFyr/TdnXB93H0eZbcbcno1OnmTeLChd8 HoD2hY6QuuhTchtDALFORTdx2OrOo9m2nw== X-Received: by 2002:a17:90a:5806:: with SMTP id h6mr7100545pji.14.1619814600318; Fri, 30 Apr 2021 13:30:00 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id q23sm3788781pgt.42.2021.04.30.13.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 13:30:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 79/82] target/arm: Implement aarch32 VSUDOT, VUSDOT Date: Fri, 30 Apr 2021 13:26:07 -0700 Message-Id: <20210430202610.1136687-80-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210430202610.1136687-1-richard.henderson@linaro.org> References: <20210430202610.1136687-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/cpu.h | 5 +++++ target/arm/neon-shared.decode | 6 ++++++ target/arm/translate-neon.c | 27 +++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/cpu.h b/target/arm/cpu.h index b2b684df55..5850db90f3 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3783,6 +3783,11 @@ static inline bool isar_feature_aa32_predinv(const ARMISARegisters *id) return FIELD_EX32(id->id_isar6, ID_ISAR6, SPECRES) != 0; } +static inline bool isar_feature_aa32_i8mm(const ARMISARegisters *id) +{ + return FIELD_EX32(id->id_isar6, ID_ISAR6, I8MM) != 0; +} + static inline bool isar_feature_aa32_ras(const ARMISARegisters *id) { return FIELD_EX32(id->id_pfr0, ID_PFR0, RAS) != 0; diff --git a/target/arm/neon-shared.decode b/target/arm/neon-shared.decode index 2d94369750..5befaec87b 100644 --- a/target/arm/neon-shared.decode +++ b/target/arm/neon-shared.decode @@ -50,6 +50,8 @@ VSDOT 1111 110 00 . 10 .... .... 1101 . q:1 . 0 .... \ vm=%vm_dp vn=%vn_dp vd=%vd_dp VUDOT 1111 110 00 . 10 .... .... 1101 . q:1 . 1 .... \ vm=%vm_dp vn=%vn_dp vd=%vd_dp +VUSDOT 1111 110 01 . 10 .... .... 1101 . q:1 . 0 .... \ + vm=%vm_dp vn=%vn_dp vd=%vd_dp # VFM[AS]L VFML 1111 110 0 s:1 . 10 .... .... 1000 . 0 . 1 .... \ @@ -66,6 +68,10 @@ VSDOT_scalar 1111 1110 0 . 10 .... .... 1101 . q:1 index:1 0 vm:4 \ vn=%vn_dp vd=%vd_dp VUDOT_scalar 1111 1110 0 . 10 .... .... 1101 . q:1 index:1 1 vm:4 \ vn=%vn_dp vd=%vd_dp +VUSDOT_scalar 1111 1110 1 . 00 .... .... 1101 . q:1 index:1 0 vm:4 \ + vn=%vn_dp vd=%vd_dp +VSUDOT_scalar 1111 1110 1 . 00 .... .... 1101 . q:1 index:1 1 vm:4 \ + vn=%vn_dp vd=%vd_dp %vfml_scalar_q0_rm 0:3 5:1 %vfml_scalar_q1_index 5:1 3:1 diff --git a/target/arm/translate-neon.c b/target/arm/translate-neon.c index 194e329b6c..b7774caf9e 100644 --- a/target/arm/translate-neon.c +++ b/target/arm/translate-neon.c @@ -287,6 +287,15 @@ static bool trans_VUDOT(DisasContext *s, arg_VUDOT *a) gen_helper_gvec_udot_b); } +static bool trans_VUSDOT(DisasContext *s, arg_VUSDOT *a) +{ + if (!dc_isar_feature(aa32_i8mm, s)) { + return false; + } + return do_neon_ddda(s, a->q * 7, a->vd, a->vn, a->vm, 0, + gen_helper_gvec_usdot_b); +} + static bool trans_VFML(DisasContext *s, arg_VFML *a) { int opr_sz; @@ -354,6 +363,24 @@ static bool trans_VUDOT_scalar(DisasContext *s, arg_VUDOT_scalar *a) gen_helper_gvec_udot_idx_b); } +static bool trans_VUSDOT_scalar(DisasContext *s, arg_VUSDOT_scalar *a) +{ + if (!dc_isar_feature(aa32_i8mm, s)) { + return false; + } + return do_neon_ddda(s, a->q * 6, a->vd, a->vn, a->vm, a->index, + gen_helper_gvec_usdot_idx_b); +} + +static bool trans_VSUDOT_scalar(DisasContext *s, arg_VSUDOT_scalar *a) +{ + if (!dc_isar_feature(aa32_i8mm, s)) { + return false; + } + return do_neon_ddda(s, a->q * 6, a->vd, a->vn, a->vm, a->index, + gen_helper_gvec_sudot_idx_b); +} + static bool trans_VFML_scalar(DisasContext *s, arg_VFML_scalar *a) { int opr_sz;