From patchwork Tue Jun 25 05:08:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 807232 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp2185363wrt; Mon, 24 Jun 2024 22:10:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCViHA45n3olIBGYP71PkZRZIIqwzzEcjsATudMOoLftrcPSZDf8Y0hTx0Yqo8HOyMDxXHxC1E5Jx4b4KlBgUxNX X-Google-Smtp-Source: AGHT+IGT3/P91Z2qWlF3bPaRACow2FJgKgQ/iU5aHi4JQHy9WxDRm/42VxH/C0md8wI8SlmPrleR X-Received: by 2002:a9d:76d0:0:b0:6f9:6161:c8c8 with SMTP id 46e09a7af769-700ac5bf5c1mr7704070a34.36.1719292223477; Mon, 24 Jun 2024 22:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719292223; cv=none; d=google.com; s=arc-20160816; b=WWXgbgUsUQZPqlajK6T93N0e9S18DRPtXqF+0njuobz8gRFxPy6d5200tcvqM9CroJ W7JeXNO+y4/yfnffbzz/j2LUcMwwqBWyraoYnxzlzDuoNbEA5aPAYPcdbRzV5+oGWoRR eyHRwXWzr0OJiJYDGmpk6Bym2/AEQvU7mYipI1wwXb/tnNgOAWOKQHWHQjnXI8ZyeaZo 5c/6BP7WnaiIONvn0cNSZ8+H4IUyfkXV7ZjulhJj2A8vttc2qaV+cnlvQpUNGZ8Rz52Q tjFQ4hMYRqLtFTFZUbJJgEQyLH0ld2M17kd/WYaMXImYLmCqOfGjEnWfCgOzG+cA0Jlc I6tA== 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=hRclqwFkw5aAwjIhmFzcLIsVslOSKqJp4jOj2/LLcbw=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=uskPyCbTU156uSu0+fSenE3VXBNEY+3GjEBbsZRST2UWJo4MaM+4wP3z0cfJnd53p8 EjgGnexprk/CyFL0LttNY5kkh5lfgJsaPPSqcXpaRKkgNzKwD91hl9MK0slPUWOvLl1e tAbKcl3/l7+M+LXLKERgDkKepdldDFMdi4v05BQcwgah9p2lJQ1U5M/bbInljMsucrLC YwrfO4SC5xNJ7XfolOMw112fq7vn2QcrvyVE7k/WydVuCLT9qcLS7a5fkVhTXoUF6YiW YWXz+UUf6xwiJYM40VB22VZaIEsuOLMU9Ag68hd/ndr2KNr0ksHCkPEVPgXPAGoOPV5E EHgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="i6Zgqa/I"; 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 af79cd13be357-79bce8abc1bsi1003138285a.213.2024.06.24.22.10.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2024 22:10:23 -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="i6Zgqa/I"; 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-00018Q-PH; 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 1sLyPo-00014Z-Ck for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:24 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPl-0001XB-TW for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:23 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-70683d96d0eso1208578b3a.0 for ; Mon, 24 Jun 2024 22:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292098; x=1719896898; 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=hRclqwFkw5aAwjIhmFzcLIsVslOSKqJp4jOj2/LLcbw=; b=i6Zgqa/IHZkshSIe7idj5sIf25UdA+I/UdQl74aYKW0NlVempPewID9Cxx6Tg+U/JW NPSdc7WEXzZEDhN/s5fQXB/pC6Zz+0IPKRmd0Az1it7CM+vhzXDr/U9HfWghsziwcCI3 wiQkPZkyao/Ju4KuMLVIGN0zdwuUE8HnrzzXV+IV9dwbUlS6HuoEJBnsMd9K7ErOnQzI aAWdwt/xiYE8Vn18edn7RFYnCiM7402QWBjvebxbKqPxSWDKO7Lb9yCztoMNfZvutjar nqsQs/A85ImFanWLnxcMj1FMYBMmhA1juV0xtFxChrl28VGsgkCaazE3NheFzakum3/T RZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292098; x=1719896898; 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=hRclqwFkw5aAwjIhmFzcLIsVslOSKqJp4jOj2/LLcbw=; b=Q6L8VeViVflTXBVZ2Ee2764t4mM4JCeRcZHKKWA2KKvAdU6qBBVSF4UZHLL3szxGmk BodKR7voDB8MtokY05QepoJYpLfYn0pBhyrGNjKOVRu9Qx1MVqbeZ/V/h3iVMaltwM2g wzqzqz1oKSc4fa9Fl0CSblg4zWnuio77joSMDMEtYvgB0Mz6NEN+SYGUsbByowuMJaZy 9c/RcBSXhVncChs/bEQ/Bxdi/AItBk3aXAzZow1XC0MoACpILTIckv6ow2sj15H2M3z5 UrNFYqZcYR3vGAtmBGQDzPumk9wI77Ccl/8WEas38aGnjDxSlZwqkpjqnZY6i5h1vF+R qoAw== X-Gm-Message-State: AOJu0YzCZRZRt1U/pTj1Rvlz5GEkv0ghAP5pwrLNIBr9n096AKuyzE6r RmaeLiefMWtZ1bxAehQr1JBN8IxuiOpaD+tzuPF1rU/pdFuO43D1ss9QUcKZQZFGEU7TNRu/ey2 d X-Received: by 2002:a05:6a20:2105:b0:1bc:feb5:887d with SMTP id adf61e73a8af0-1bcfeb58bb8mr4689720637.25.1719292098253; Mon, 24 Jun 2024 22:08:18 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 06/13] target/arm: Convert SUDOT, USDOT to decodetree Date: Mon, 24 Jun 2024 22:08:03 -0700 Message-Id: <20240625050810.1475643-7-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::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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 | 3 +++ target/arm/tcg/translate-a64.c | 35 ++++++++-------------------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 7411d4ba97..8a0251f83c 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -949,6 +949,7 @@ SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e SDOT_v 0.00 1110 100 ..... 10010 1 ..... ..... @qrrr_s UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s +USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s ### Advanced SIMD scalar x indexed element @@ -1026,6 +1027,8 @@ SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s SDOT_vi 0.00 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s UDOT_vi 0.10 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s +SUDOT_vi 0.00 1111 00 .. .... 1111 . 0 ..... ..... @qrrx_s +USDOT_vi 0.00 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s # Floating-point conditional select diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index f2e7d8d75c..9a658ca876 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5603,6 +5603,7 @@ static bool do_dot_vector(DisasContext *s, arg_qrrr_e *a, 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) /* * Advanced SIMD scalar/vector x indexed element @@ -5937,6 +5938,10 @@ static bool do_dot_vector_idx(DisasContext *s, arg_qrrx_e *a, TRANS_FEAT(SDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_sdot_idx_b) TRANS_FEAT(UDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_udot_idx_b) +TRANS_FEAT(SUDOT_vi, aa64_i8mm, do_dot_vector_idx, a, + gen_helper_gvec_sudot_idx_b) +TRANS_FEAT(USDOT_vi, aa64_i8mm, do_dot_vector_idx, a, + gen_helper_gvec_usdot_idx_b) /* * Advanced SIMD scalar pairwise @@ -10914,13 +10919,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) int rot; switch (u * 16 + opcode) { - case 0x03: /* USDOT */ - if (size != MO_32) { - unallocated_encoding(s); - return; - } - feature = dc_isar_feature(aa64_i8mm, s); - break; case 0x04: /* SMMLA */ case 0x14: /* UMMLA */ case 0x05: /* USMMLA */ @@ -10964,6 +10962,7 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) break; default: case 0x02: /* SDOT (vector) */ + case 0x03: /* USDOT */ case 0x10: /* SQRDMLAH (vector) */ case 0x11: /* SQRDMLSH (vector) */ case 0x12: /* UDOT (vector) */ @@ -10979,10 +10978,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) } switch (opcode) { - case 0x3: /* USDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, gen_helper_gvec_usdot_b); - return; - case 0x04: /* SMMLA, UMMLA */ gen_gvec_op4_ool(s, 1, rd, rn, rm, rd, 0, u ? gen_helper_gvec_ummla_b @@ -12058,14 +12053,6 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) break; case 0x0f: switch (size) { - case 0: /* SUDOT */ - case 2: /* USDOT */ - if (is_scalar || !dc_isar_feature(aa64_i8mm, s)) { - unallocated_encoding(s); - return; - } - size = MO_32; - break; case 1: /* BFDOT */ if (is_scalar || !dc_isar_feature(aa64_bf16, s)) { unallocated_encoding(s); @@ -12082,6 +12069,8 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) size = MO_16; break; default: + case 0: /* SUDOT */ + case 2: /* USDOT */ unallocated_encoding(s); return; } @@ -12190,18 +12179,10 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) switch (16 * u + opcode) { case 0x0f: switch (extract32(insn, 22, 2)) { - case 0: /* SUDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, index, - gen_helper_gvec_sudot_idx_b); - return; case 1: /* BFDOT */ gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, index, gen_helper_gvec_bfdot_idx); return; - case 2: /* USDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, index, - gen_helper_gvec_usdot_idx_b); - return; case 3: /* BFMLAL{B,T} */ gen_gvec_op4_fpst(s, 1, rd, rn, rm, rd, 0, (index << 1) | is_q, gen_helper_gvec_bfmlal_idx);