From patchwork Tue Jun 25 05:08:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 807235 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp2185483wrt; Mon, 24 Jun 2024 22:10:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXmBfHrYhuGYngY2BthSMNEqWNH3FhD5TCTGyyinzM10L1vIYU8doiQCest6+jmB9aY82dQf+0jhorEtftkpB7k X-Google-Smtp-Source: AGHT+IE7texgLur7K6XIPGI9iZJTIDClU2vNmQDQ/cmvHHgylK+Ml/EqVHMcYTOtBEb/gJA46htn X-Received: by 2002:a05:622a:190a:b0:441:45bf:9702 with SMTP id d75a77b69052e-444d646670cmr85464421cf.3.1719292249101; Mon, 24 Jun 2024 22:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719292249; cv=none; d=google.com; s=arc-20160816; b=dEo25uf3LVrzlkOO96x8oG22a0gwBbTSJ0efcB9/VoJjFloafTxkgYbaUBzLygIQ45 Wck5YmscQeTXWAXlA/sqJsP+d3/8F7XJTZsh1y1kgs/bgm5thWYh/wJ9bVfBcFGdM7v0 VeoFl0zEp2+tqgtBFGAtZPfUVasRu83co/kxvdw+YpAfpngPKfgbpME+qxdcsDJqgZCR 0nsPmZPFbsAi1MAqKw8OQPkOiTEhzsm4ftaKJXZ08U8NS8vs2zMIPUfAa22guRqQ92h5 R9Sr9nbKUiYA+XVGs8B5EMoyQW+EqKrL1dRFrbZVU+LMllKsj5AeCAZNpYaAiBMKXlXM rypQ== 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=eCY0RuPqHu5iM13PrDmlYJVrVT2SB405qXFZ6R1XSxw=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=CdSVlWJo3y3kBssjW7YGH4BILlTioUCOYazjMJ9zYzXdZHe6xDWMx0X8qy1A4FRqJn KjH32oX5zMsvjj8718xkfg1c9rNlIgcTk7TT4w634JH2uIpbX8gSS+suAR/XiQyzO7oT oHE6qp89w3UdRgi25/R+LSUYqEXIqpKxLqJnAZBCg9InjMirCQStoea+Cwn5lAUUcF+B uXvPdBQDeCOHwp4N51tQgazrofA6VUQJaAKAhRhAUnNHfhb4+bKqqacUtGcwg6VyZXaP dDgOu5Tj2mm0e8tpthaPleZgDHr9OnwZw9HCcBGjeaJAM2DuN6zgOkUe35nV0fnooouy wc7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OGw7Sqyq; 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 d75a77b69052e-444fb048444si1599621cf.145.2024.06.24.22.10.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2024 22:10:49 -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=OGw7Sqyq; 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 ) id 1sLyPr-00018R-VU; Tue, 25 Jun 2024 01:08:27 -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 ) id 1sLyPq-00016c-ST for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:26 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPn-0001Y0-Vy for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:26 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1f9aa039327so41745275ad.2 for ; Mon, 24 Jun 2024 22:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292101; x=1719896901; darn=nongnu.org; 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=eCY0RuPqHu5iM13PrDmlYJVrVT2SB405qXFZ6R1XSxw=; b=OGw7SqyqP58h/6yQ1GL/wnUuKwe42/j/s+AdWGXVsc9kSbgD71TC3JneDog+Z4dJtT L9CoutR+KYeyPFzetyBdoYFIbI9yWt9zjiNKEV55xwu3mbD3guuIcTOSZusCCfw5YedA ImofbPoePNTUqNNFx+7smvLONAx9v6iqXAPOFSjlrNcsts7iDwcziLCQG9XGbUI7pEje 4LRlTSVDPl9NJ3AR1lDLf9eX9epAmC5H/BfpATDCkeyhBPZp1T+y8rCyk6tN7twE+CjH AISjsJwRAw7UL1SApgJ1M6SDW9LwkuZlxYQ+lQJbqjMpx+ftfDmpw86AgTOHGNfe5HAC QkIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292101; x=1719896901; 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=eCY0RuPqHu5iM13PrDmlYJVrVT2SB405qXFZ6R1XSxw=; b=TMtJbs8/jb26N2+H1Q027xt/Tn8rSJjDBer3cpUwog+3aqvA6GzU5kgH2RPpM7bXJc IVF66RqzhbgumHndn7cGLevRHz4OtksEsoJay0VjhtCmutHjT7PeK10co7hT613dDdIr XdojnhUfKUO3WxUJkzViWWEfXdcPSSLFSQocccDadHjOQHaZ5W3cGEL4hmT5EA5siYEC YAL0zTPCNgmQ7zfRm5nId9zMXQvqksKLMkr6ADM+JSzKBMznfBaJQ0zTxJJznBrPhJnd D6xkMStJOzivHUA3Nd2qFJeWW5rJu/C8ivN9UIUDUqQikU8Hqi8vQQCZXbyOT9pzFtv2 5h+g== X-Gm-Message-State: AOJu0YyL9q3k7hLSLr6c+3UwYsBfGsI83DYZmQA/W2OI63bV3F+x2pIx 5T83/H4XXjBfVUJggISXn5jtD3DE4askgVt/XEZp3ptmu+QkrieiF8IbMLMIHBIlQAofTlGdFuB j X-Received: by 2002:a17:902:d50b:b0:1f8:67e4:3979 with SMTP id d9443c01a7336-1fa1d6533bcmr90624085ad.47.1719292101326; Mon, 24 Jun 2024 22:08:21 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 09/13] target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree Date: Mon, 24 Jun 2024 22:08:06 -0700 Message-Id: <20240625050810.1475643-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/tcg/a64.decode | 4 ++++ target/arm/tcg/translate-a64.c | 36 ++++++++-------------------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 15344a73de..b2c7e36969 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -952,6 +952,10 @@ UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s BFMLAL_v 0.10 1110 110 ..... 11111 1 ..... ..... @qrrr_h +BFMMLA 0110 1110 010 ..... 11101 1 ..... ..... @rrr_q1e0 +SMMLA 0100 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 +UMMLA 0110 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 +USMMLA 0100 1110 100 ..... 10101 1 ..... ..... @rrr_q1e0 ### Advanced SIMD scalar x indexed element diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 95be862dde..2697c4b305 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5605,6 +5605,10 @@ TRANS_FEAT(SDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_sdot_b) TRANS_FEAT(UDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_udot_b) TRANS_FEAT(USDOT_v, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_usdot_b) TRANS_FEAT(BFDOT_v, aa64_bf16, do_dot_vector, a, gen_helper_gvec_bfdot) +TRANS_FEAT(BFMMLA, aa64_bf16, do_dot_vector, a, gen_helper_gvec_bfmmla) +TRANS_FEAT(SMMLA, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_smmla_b) +TRANS_FEAT(UMMLA, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_ummla_b) +TRANS_FEAT(USMMLA, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_usmmla_b) static bool trans_BFMLAL_v(DisasContext *s, arg_qrrr_e *a) { @@ -10949,15 +10953,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) int rot; switch (u * 16 + opcode) { - case 0x04: /* SMMLA */ - case 0x14: /* UMMLA */ - case 0x05: /* USMMLA */ - if (!is_q || size != MO_32) { - unallocated_encoding(s); - return; - } - feature = dc_isar_feature(aa64_i8mm, s); - break; case 0x18: /* FCMLA, #0 */ case 0x19: /* FCMLA, #90 */ case 0x1a: /* FCMLA, #180 */ @@ -10972,19 +10967,16 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) } feature = dc_isar_feature(aa64_fcma, s); break; - case 0x1d: /* BFMMLA */ - if (size != MO_16 || !is_q) { - unallocated_encoding(s); - return; - } - feature = dc_isar_feature(aa64_bf16, s); - break; default: case 0x02: /* SDOT (vector) */ case 0x03: /* USDOT */ + case 0x04: /* SMMLA */ + case 0x05: /* USMMLA */ case 0x10: /* SQRDMLAH (vector) */ case 0x11: /* SQRDMLSH (vector) */ case 0x12: /* UDOT (vector) */ + case 0x14: /* UMMLA */ + case 0x1d: /* BFMMLA */ case 0x1f: /* BFDOT / BFMLAL */ unallocated_encoding(s); return; @@ -10998,15 +10990,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) } switch (opcode) { - case 0x04: /* SMMLA, UMMLA */ - gen_gvec_op4_ool(s, 1, rd, rn, rm, rd, 0, - u ? gen_helper_gvec_ummla_b - : gen_helper_gvec_smmla_b); - return; - case 0x05: /* USMMLA */ - gen_gvec_op4_ool(s, 1, rd, rn, rm, rd, 0, gen_helper_gvec_usmmla_b); - return; - case 0x8: /* FCMLA, #0 */ case 0x9: /* FCMLA, #90 */ case 0xa: /* FCMLA, #180 */ @@ -11051,9 +11034,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) } return; - case 0xd: /* BFMMLA */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, gen_helper_gvec_bfmmla); - return; default: g_assert_not_reached(); }