From nobody Sun Nov 24 22:50:42 2024 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=1719341820; cv=none; d=zohomail.com; s=zohoarc; b=ldQOEkGnLhq+wiMaSqpoR+ScA6LPos/RWiJYcb4NXfUPcwEM/mr6CvnqD9K4awpfnuyH1YDbtvU+b8Fx1dShsANZs4KQqeQECyON/iUV8qg1/k60CnHHu81NKW86lBG8Huq94sYKN1sPBk2Y3qiC9P0/fbW979v2jtNHXEK1oJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719341820; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1U9RNUfZ6ytehLhNDsOYxOlk3M9sl8ak/3adIT4lPPs=; b=h8X9gONQMroqOcNABgDDb4CPLgbt0DCSc1Mi/9Ss+R/25pfjMOpXYGZ8/J1d0Io+uZQPhWp2trfSvCE6bOtW6ymEsFCfMvNfeloCEq9lklJVBKEmDOtM3XkzkyvOQRnRyxn/Q6Z+28BpHNuxS/5rnI+mCO9nSvXZmcCOyYaz7oA= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719341820704163.37967008539954; Tue, 25 Jun 2024 11:57:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMB9l-00022Z-Ay; Tue, 25 Jun 2024 14:44:59 -0400 Received: from [209.51.188.92] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMB4Q-0000yt-PG for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:39:24 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMB3F-00065t-QQ for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:38:55 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1f9ffd24262so29413655ad.0 for ; Tue, 25 Jun 2024 11:35:58 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719340539; x=1719945339; 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=1U9RNUfZ6ytehLhNDsOYxOlk3M9sl8ak/3adIT4lPPs=; b=FSaVAbvsbH86ywlHsxkot+XmbgYj06jzfUDfEK9meXlb42S7xGIySdDS1kLfUuqwZR jy19RRYe6ed5Y9FBg25wKhrqEEwllkWLhYq3RBCRi821zhodOdUWGprRyo8woQUHKOAG RCbQEjEhv0UE4qVKuk8gAwmfS9r3qS/7vw7QcxXrJysWN8fPHjXfINc/Eabva/H+tumC m1Ms+oxsaTLHV2FCX8pkzF4T/2SNSij3gdtWO1LhEfd1rm4TYRZ3PHiH+oLynHEfU9JC /MS8Jh0c6iYLcc/sfXDYiBEXtAGUozSgvb2loJqYb1VX76W3H0h6f/vn5N1urTSwCDSG ds5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719340539; x=1719945339; 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=1U9RNUfZ6ytehLhNDsOYxOlk3M9sl8ak/3adIT4lPPs=; b=Ln7KixviXPsP0Uy7yeENaSj/9qx0di/Nsl7LMq5FBrAYCkXvRcALkNFZQjIUE9VSmr IoZEbJeJm8RtmaycQykUI0znMOzqGtE0Mwlnhagc6BfRvU1R8O2oIuwvTsCGnO0pT2ZP BV0mlwLSJLPeFl/cke39jz/+zuuTdu67wv3S8JtNMMepu1CeYp0p5m0mAQsbb7ktLtmB okgSQZuJq7Hhv4vbwLlhf17VvY0LJkWRhk5QAaLTv7777Axc57k0N2ftiJBBVrMgjCR2 T+2hy8e+eZmtrEJchDzayfW3dBix7Vj4lHj7SKBO/zSS0jwxzMNF5v+06/r3O4ge7SxL zb8g== X-Gm-Message-State: AOJu0Yy/xYjF0kgaOKwi6+SS9yS4yd69zblIGHI/bwaqkYSc5klvoQ2R rW1UdCSeEL87njb7/zuhgcTciGt6M8lq43sjRm1y00LIvQghCXGjJJiSzGoW7F1sDHQkSsF9L+J 1 X-Google-Smtp-Source: AGHT+IGNyBXQLDqgE9brreM9lqFudZ5fw73YuRvu2DhUPtADq8ONoT+8VGzcWT5VvgrG6vkOuX8tdQ== X-Received: by 2002:a17:903:22c3:b0:1f9:df92:d67a with SMTP id d9443c01a7336-1fa23f9e4aemr97804585ad.23.1719340538680; Tue, 25 Jun 2024 11:35:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org, Peter Maydell Subject: [PATCH v2 01/13] target/arm: Fix VCMLA Dd, Dn, Dm[idx] Date: Tue, 25 Jun 2024 11:35:24 -0700 Message-Id: <20240625183536.1672454-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719341821400100002 Content-Type: text/plain; charset="utf-8" The inner loop, bounded by eltspersegment, must not be larger than the outer loop, bounded by elements. Cc: qemu-stable@nongnu.org Fixes: 18fc2405781 ("target/arm: Implement SVE fp complex multiply add (ind= exed)") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2376 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/vec_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index b05922b425..7b34cc98af 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -907,7 +907,7 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *= vm, void *va, intptr_t index =3D extract32(desc, SIMD_DATA_SHIFT + 2, 2); uint32_t neg_real =3D flip ^ neg_imag; intptr_t elements =3D opr_sz / sizeof(float16); - intptr_t eltspersegment =3D 16 / sizeof(float16); + intptr_t eltspersegment =3D MIN(16 / sizeof(float16), elements); intptr_t i, j; =20 /* Shift boolean to the sign bit so we can xor to negate. */ @@ -969,7 +969,7 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *= vm, void *va, intptr_t index =3D extract32(desc, SIMD_DATA_SHIFT + 2, 2); uint32_t neg_real =3D flip ^ neg_imag; intptr_t elements =3D opr_sz / sizeof(float32); - intptr_t eltspersegment =3D 16 / sizeof(float32); + intptr_t eltspersegment =3D MIN(16 / sizeof(float32), elements); intptr_t i, j; =20 /* Shift boolean to the sign bit so we can xor to negate. */ --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719354652; cv=none; d=zohomail.com; s=zohoarc; b=lB4NlPqCE5DJH581iOWo7RXRiiLJGhdzIMr9y9QR0dZK3eNQjRKj62Y7gWFE/MKS9B+ZzCp5FqUA9SBatGNHJbSko672A3u9k6uEu7M12NuJ0s/AfWlk3jcG1IIBvrVraM1+CakJ7cyyVDcWTApZakYaL00tX2m1zQTChgP2fZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719354652; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Mj7QlXoeP2V1pOBsxsghEG+3S3aDNGmpRLT6MqBN1Ws=; b=Ng4gcc+MNG3ENzFZEIs6hLSfHKXPehThx3/2+riUxJLdDGlUdCZdU8KAPMuUqZwNOZ1jSrfMdvmtPExE4v6u5gqKN09ZBFkPVMcUx50e7emseoasXh8WETxNOPTlBJ8m38dDzUolDaeyVJlWDb3h1fIx3y1QFtKgiV6gnCZjL3E= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719354652479930.6247230083136; Tue, 25 Jun 2024 15:30:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMED6-0003uj-Bo; Tue, 25 Jun 2024 18:00:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMECm-0003sF-0G for qemu-devel@nongnu.org; Tue, 25 Jun 2024 18:00:03 -0400 Received: from [2607:f8b0:4864:20::331] (helo=mail-ot1-x331.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMEBt-00046X-E9 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 17:59:41 -0400 Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-7009b8113ebso2628414a34.1 for ; Tue, 25 Jun 2024 14:57:53 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719352652; x=1719957452; 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=Mj7QlXoeP2V1pOBsxsghEG+3S3aDNGmpRLT6MqBN1Ws=; b=hFIni6GNtQE03mQNEVVb2gXCaYhWn0MkZUnLhAHNsJzE+AR9UJDPmKSakOnegPdAky xZWGx8szxLiArTEMYR0LFCxRChwYcFmD2WQ1amJaWtcXA88/yboIbg8xlYNA1FaKmAtp Zgh/sCGJXx9WrmTG11J4kPUn6DL87JpNTMZnEFcftKyZOm8QjzMXNM5Df/2QfV3SEUeA UnW8kzpUymYTL1H2DWRx4/0Ei4D1C3UMqlXSsSmVo/+3eyVFWAgDaXfD8Sk8H3bh4tnV HP14EWyD/UDzfvJbg1XYKc/fgPKaN8WVoD3YJKKs8d7DRdkMNwRaxmwdT+tqVfmJZAP8 VHXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719352652; x=1719957452; 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=Mj7QlXoeP2V1pOBsxsghEG+3S3aDNGmpRLT6MqBN1Ws=; b=QlP+W7tJutkouutacDDb7i3g8tVgD8bq50CnpOQMS0J4qzTS+OV12t250Shbr61oMW Go7gbRBPML8VDoMyqpwDwbe+5IMJ3XKXFxPrgCY6gmz+ak3CkagD5tNyzBCyfhaz130z LIeMcUAKDEPR02QvgKHmthpS80jKTrS3MdgC+/VYI8NUaD7yUZFgA6ziI6DGEWWvr5+Z C6Lard5KWufyGzo5uxlvuQ8czrMtjnN0rAa7UAKpgxVpL56jxDwi3F29ibfrtqi7SX8K 4ldo7TIcP51pOaOpMMdZcWbNZK0MxyIQWmerdjyLkV8Ku0cJ+pa6Ke6+352d9FQWuZgH DNEQ== X-Gm-Message-State: AOJu0YxDEAmMQ1i9jEfVzWG6a7a8tQfVXaAb8h0xLOiZMWvtIfpr6fWa R8KacOtv06gPDojC7jXclnvh5hEcar5LHraS5HoDcieK0Jx0reyRYuY9dmxorIut/iMHT8Y8v1i 0 X-Google-Smtp-Source: AGHT+IGmRpKU3uisicIyQkWV9U+fNDMQdfLn9q2ukyi+z3KUtk5TQAzgrypIuxul2gUK+0Q1sCvmaw== X-Received: by 2002:a17:902:bd07:b0:1f7:23d9:f530 with SMTP id d9443c01a7336-1fa23f8df23mr67334385ad.66.1719340539628; Tue, 25 Jun 2024 11:35:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org, Peter Maydell Subject: [PATCH v2 02/13] target/arm: Fix SQDMULH (by element) with Q=0 Date: Tue, 25 Jun 2024 11:35:25 -0700 Message-Id: <20240625183536.1672454-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::331 (deferred) 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::331; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x331.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719354653511100001 Content-Type: text/plain; charset="utf-8" The inner loop, bounded by eltspersegment, must not be larger than the outer loop, bounded by elements. Cc: qemu-stable@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/vec_helper.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index 7b34cc98af..d477479bb1 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -317,10 +317,12 @@ void HELPER(neon_sqdmulh_idx_h)(void *vd, void *vn, v= oid *vm, intptr_t i, j, opr_sz =3D simd_oprsz(desc); int idx =3D simd_data(desc); int16_t *d =3D vd, *n =3D vn, *m =3D (int16_t *)vm + H2(idx); + intptr_t elements =3D opr_sz / 2; + intptr_t eltspersegment =3D MIN(16 / 2, elements); =20 - for (i =3D 0; i < opr_sz / 2; i +=3D 16 / 2) { + for (i =3D 0; i < elements; i +=3D 16 / 2) { int16_t mm =3D m[i]; - for (j =3D 0; j < 16 / 2; ++j) { + for (j =3D 0; j < eltspersegment; ++j) { d[i + j] =3D do_sqrdmlah_h(n[i + j], mm, 0, false, false, vq); } } @@ -333,10 +335,12 @@ void HELPER(neon_sqrdmulh_idx_h)(void *vd, void *vn, = void *vm, intptr_t i, j, opr_sz =3D simd_oprsz(desc); int idx =3D simd_data(desc); int16_t *d =3D vd, *n =3D vn, *m =3D (int16_t *)vm + H2(idx); + intptr_t elements =3D opr_sz / 2; + intptr_t eltspersegment =3D MIN(16 / 2, elements); =20 - for (i =3D 0; i < opr_sz / 2; i +=3D 16 / 2) { + for (i =3D 0; i < elements; i +=3D 16 / 2) { int16_t mm =3D m[i]; - for (j =3D 0; j < 16 / 2; ++j) { + for (j =3D 0; j < eltspersegment; ++j) { d[i + j] =3D do_sqrdmlah_h(n[i + j], mm, 0, false, true, vq); } } @@ -512,10 +516,12 @@ void HELPER(neon_sqdmulh_idx_s)(void *vd, void *vn, v= oid *vm, intptr_t i, j, opr_sz =3D simd_oprsz(desc); int idx =3D simd_data(desc); int32_t *d =3D vd, *n =3D vn, *m =3D (int32_t *)vm + H4(idx); + intptr_t elements =3D opr_sz / 4; + intptr_t eltspersegment =3D MIN(16 / 4, elements); =20 - for (i =3D 0; i < opr_sz / 4; i +=3D 16 / 4) { + for (i =3D 0; i < elements; i +=3D 16 / 4) { int32_t mm =3D m[i]; - for (j =3D 0; j < 16 / 4; ++j) { + for (j =3D 0; j < eltspersegment; ++j) { d[i + j] =3D do_sqrdmlah_s(n[i + j], mm, 0, false, false, vq); } } @@ -528,10 +534,12 @@ void HELPER(neon_sqrdmulh_idx_s)(void *vd, void *vn, = void *vm, intptr_t i, j, opr_sz =3D simd_oprsz(desc); int idx =3D simd_data(desc); int32_t *d =3D vd, *n =3D vn, *m =3D (int32_t *)vm + H4(idx); + intptr_t elements =3D opr_sz / 4; + intptr_t eltspersegment =3D MIN(16 / 4, elements); =20 - for (i =3D 0; i < opr_sz / 4; i +=3D 16 / 4) { + for (i =3D 0; i < elements; i +=3D 16 / 4) { int32_t mm =3D m[i]; - for (j =3D 0; j < 16 / 4; ++j) { + for (j =3D 0; j < eltspersegment; ++j) { d[i + j] =3D do_sqrdmlah_s(n[i + j], mm, 0, false, true, vq); } } --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719347972; cv=none; d=zohomail.com; s=zohoarc; b=fkopBc3eZUaqFbM/anY2WEAM6iTu/u9ek4+Q+G2GJAoO8t9XrAd/0tFxiTVtNkE7LZm0GdBodSRP5O1t0kmnqmdTpuKAcGKxbuQnmeeeDJDY74dkxTmp7pw9cG12wLw9lQ5Kleo9V6aahMvTCpZVtlyh9Shyk17EQWM35WGqMtU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719347972; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SkIsJKtZUJAkO/lpIvhYyVEDLS6NoChogP/TAxQnzSI=; b=L/EEKFTz5AiE1QJvo1GnGl+in2OCrVtfn2JMBSVEVPqs5StdrFUk2C2O4MywMX/xJUK/Wo0F2s+hssCZGPsveHlyxT1m/Jeb+sMpkbM0rB+F2Xve/EljzVBOab3x0tUAVIkytizI/xzXU3myodtv2/ZudvjTOqgde0T6KirpwSQ= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171934797202871.59237904900237; Tue, 25 Jun 2024 13:39:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBzh-00008T-O4; Tue, 25 Jun 2024 15:38:31 -0400 Received: from [209.51.188.92] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMByk-0008LY-HE for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:37:34 -0400 Received: from [2607:f8b0:4864:20::732] (helo=mail-qk1-x732.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMBxX-0004tL-Tm for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:37:03 -0400 Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-79c06169e9cso62234785a.3 for ; Tue, 25 Jun 2024 12:34:41 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719344067; x=1719948867; 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=SkIsJKtZUJAkO/lpIvhYyVEDLS6NoChogP/TAxQnzSI=; b=SxSuKEZwRMXu2kbEvW26ggPvNXdMFcRCq7CuSriR1Abw4y/jNJ7p8Ze/Z3fFZrFpcp iwfWt1nOtZbvkTJ+szvaHiEvel0Erypweiy9U+HnIgfjSL/Kw3pxCa1WtHOvR5wtd/a3 2dS03xOmapIjOB6Sov6txjp+SWfSzlxFA5hBOUF/9K3h4wHMmTY2BxVbx9uChemit4Yt MQht/wT2KmPCcrTTkKx7mcWlhXhTJl8RCy9BnCouEBlPtf7lrxi2Vd1lv11c87jz88bV UvS/d7EUFjmFONla3yNHhEZo84aRZnIuGzIIQ6FmA3ZHPZOOmSXlrwAD2f8MOLlkol8k YMUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719344067; x=1719948867; 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=SkIsJKtZUJAkO/lpIvhYyVEDLS6NoChogP/TAxQnzSI=; b=DCUol/iK+/H68pRMpWG8dvMjgCs5V03jUuvm0jZy9z1+GbA5mmrxut2d3D/ZtG1gLp frXLYxylogzxK80likp0wVKjq60WfmEF+pkOicsvj6wI7KgTOaQ1XVDlrjV4RyObUfwm QxEK9JMSGn+rjmT4ZsY4WTNqbmWJsC1Xm8r6HZqBnHoHeGF20WKsIQu7mcHOwKk6g1mZ eBVyGITeOvLlw6ESOEKYPzIYDOo0eOXBc6OOCIsHRMUm/36GKFKCOc6QjMAMW6efeEr3 PStzU0tNth9Kmbu9/E6kp/2rZexE1Zhbvg6wLXbpJRVMbccKAwV9fK2QdWArKTttlRUW UduA== X-Gm-Message-State: AOJu0YzsMaB8r84hgS9pUv8A6pm4vMN5V1shGvKHl4Jl6yVEhNiHAY8b lGEcs5OcnHf28nCmQJRBOcvFt5VSnGTCbGjwcL4ulACRLat/6/z9gCLUnIl5mAe659mDpj/RMv4 j X-Google-Smtp-Source: AGHT+IG8cDeIeGAqVeoAwVRJanfKxbGCJH+qaOB7AgBHfa/WfcALNcSgLJ/6CwYprQsIuweEFaMJXw== X-Received: by 2002:a17:902:c40e:b0:1fa:2568:5895 with SMTP id d9443c01a7336-1fa256858femr93716095ad.63.1719340540561; Tue, 25 Jun 2024 11:35:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org, Peter Maydell Subject: [PATCH v2 03/13] target/arm: Fix FJCVTZS vs flush-to-zero Date: Tue, 25 Jun 2024 11:35:26 -0700 Message-Id: <20240625183536.1672454-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::732 (deferred) 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::732; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x732.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719347973872100003 Content-Type: text/plain; charset="utf-8" Input denormals cause the Javascript inexact bit (output to Z) to be set. Cc: qemu-stable@nongnu.org Fixes: 6c1f6f2733a ("target/arm: Implement ARMv8.3-JSConv") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2375 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/vfp_helper.c | 18 +++++++++--------- tests/tcg/aarch64/test-2375.c | 21 +++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 3 ++- 3 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 tests/tcg/aarch64/test-2375.c diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index ce26b8a71a..50d7042fa9 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -1091,8 +1091,8 @@ const FloatRoundMode arm_rmode_to_sf_map[] =3D { uint64_t HELPER(fjcvtzs)(float64 value, void *vstatus) { float_status *status =3D vstatus; - uint32_t inexact, frac; - uint32_t e_old, e_new; + uint32_t frac, e_old, e_new; + bool inexact; =20 e_old =3D get_float_exception_flags(status); set_float_exception_flags(0, status); @@ -1100,13 +1100,13 @@ uint64_t HELPER(fjcvtzs)(float64 value, void *vstat= us) e_new =3D get_float_exception_flags(status); set_float_exception_flags(e_old | e_new, status); =20 - if (value =3D=3D float64_chs(float64_zero)) { - /* While not inexact for IEEE FP, -0.0 is inexact for JavaScript. = */ - inexact =3D 1; - } else { - /* Normal inexact or overflow or NaN */ - inexact =3D e_new & (float_flag_inexact | float_flag_invalid); - } + /* Normal inexact, denormal with flush-to-zero, or overflow or NaN */ + inexact =3D e_new & (float_flag_inexact | + float_flag_input_denormal | + float_flag_invalid); + + /* While not inexact for IEEE FP, -0.0 is inexact for JavaScript. */ + inexact |=3D value =3D=3D float64_chs(float64_zero); =20 /* Pack the result and the env->ZF representation of Z together. */ return deposit64(frac, 32, 32, inexact); diff --git a/tests/tcg/aarch64/test-2375.c b/tests/tcg/aarch64/test-2375.c new file mode 100644 index 0000000000..163eba422b --- /dev/null +++ b/tests/tcg/aarch64/test-2375.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (c) 2024 Linaro Ltd */ +/* See https://gitlab.com/qemu-project/qemu/-/issues/2375 */ + +#include + +int main(void) +{ + int r, z; + + asm("msr fpcr, %2\n\t" + "fjcvtzs %w0, %d3\n\t" + "cset %1, eq" + : "=3Dr"(r), "=3Dr"(z) + : "r"(0x01000000L), /* FZ =3D 1 */ + "w"(0xfcff00L)); /* denormal */ + + assert(r =3D=3D 0); + assert(z =3D=3D 0); + return 0; +} diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile= .target index 70d728ae9a..4ecbca6a41 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -41,8 +41,9 @@ endif =20 # Pauth Tests ifneq ($(CROSS_CC_HAS_ARMV8_3),) -AARCH64_TESTS +=3D pauth-1 pauth-2 pauth-4 pauth-5 +AARCH64_TESTS +=3D pauth-1 pauth-2 pauth-4 pauth-5 test-2375 pauth-%: CFLAGS +=3D -march=3Darmv8.3-a +test-2375: CFLAGS +=3D -march=3Darmv8.3-a run-pauth-1: QEMU_OPTS +=3D -cpu max run-pauth-2: QEMU_OPTS +=3D -cpu max # Choose a cpu with FEAT_Pauth but without FEAT_FPAC for pauth-[45]. --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719346811; cv=none; d=zohomail.com; s=zohoarc; b=gqPY1LARxpuabR/WaKuVCs0pqizETVKQMbdoX+qZReAklv6pvkZdA3zPgt0pP+FezXI24O8uRIDeyfZmf6MBkoJh4bweo8LKIFpnRkEh61vfTIG17tCayfYacWioMOFwuZfyw/7cL62QcWaP+3K5gW3Eqj12oag/Oa1vlSXvEzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719346811; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7AIbqO6y6xiUL9RnuJv1C468kERJPem8Ld5P5PyRGv0=; b=d8ingMIaIhfK4QWJAUyyzEe/IoqV4Jpm+0EAEKV1wXYwPXXSbnmkxlMY6fswNsvE8vqXYbBcQomT8SoJyBALt+rmFrBXUatrQ0yGHGTFMtvn+nFDvgqldP71nvugS/m/VS00hzHCLnSERiMaEQ5gEqW0CZKYMNjojFzY906N/Z4= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17193468118561014.6616156622441; Tue, 25 Jun 2024 13:20:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBfr-00024j-LY; Tue, 25 Jun 2024 15:18: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 ) id 1sMBTB-0007em-Vw for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:04:58 -0400 Received: from [2607:f8b0:4864:20::62d] (helo=mail-pl1-x62d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMBSF-0000gL-GW for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:04:30 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1fa07e4f44eso30527235ad.2 for ; Tue, 25 Jun 2024 12:02:16 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719342114; x=1719946914; 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=7AIbqO6y6xiUL9RnuJv1C468kERJPem8Ld5P5PyRGv0=; b=wm+T0dp6Fxh65jrgFQ3CaiWq/jbB9zbrAT4WqtGLMuGyRquyrSSPu8Gw46MWquRFKy j9UPnn2WVVTnmm4XA1GDKYn+LN70VwqQ3wZ+rqhL3H4Pva92zZbgVZHoQf/PQ7H+SluI nwTLFpw576ETPtqYTTgQzbVNu5LMoHC/IkGx9B6A0LWpTAfNS5OS47KX8eyrweOE/oE+ bUQl21gR5uZYS+Mfq4+C9PILgZFymXrug/Gnd3e+o3eTdgbUvVfvNvnx6GLNGW/WvwAg B025Etwjwpm5LxDNdPKbtPGLvXugyJyMcEt04RACKGY1cs0M7vU5haAuTfwKO3qRur6I 8B7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719342114; x=1719946914; 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=7AIbqO6y6xiUL9RnuJv1C468kERJPem8Ld5P5PyRGv0=; b=PiS4HU3fLU1Pexc9M8Z0DXjiYv7bpqhSMGRQBGJ/r3YLr8kdWLgxL9lEyVjhmCa/N1 2gJMqycnyk24BaFxv3qWaU76mneGzAG75urDQhCg0U6nor9CCNBc3A3v6LHqrDeGIPWT 9KS9rwcHvZw7BnsbLFDhHKkT4LivLZ3//17RtMi64x6u3xXLDFYfET7ojtrTVoSlvRh9 DEhjWen+dKSlBS/dgT/7La8nm9owLTSKGoqE/VlzL/9cA795UUtzszbd9sISILlOT2e5 LTAiocyvrYSDYA95hVZqMtMEtns2Y1QmyvxHxfPrW18iO8adGqJIGSwQIZIwsm9sxpM5 NZ8A== X-Gm-Message-State: AOJu0YzoFvlYBSd/tvPT2KH4+tC7aqrQ//ccuqcZ9t+4a4Ykv3RkWgf/ Wx7i1JlqVEqJhUADXNC7aKYOPgva0M64lNagQSjfVRJiHzn+PQ1QhEmbHQp3UqMZ/JQwjbzxRjr b X-Google-Smtp-Source: AGHT+IEuzl5KdS32aF9Yi3WHH75dTkcOw/bD2+h+YiPqpO/pDzZ/h3TVkfnTdq2Hmdt10IXbaDPvDg== X-Received: by 2002:a17:902:b696:b0:1fa:4187:7397 with SMTP id d9443c01a7336-1fa418773e8mr45303405ad.60.1719340541588; Tue, 25 Jun 2024 11:35:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 04/13] target/arm: Convert SQRDMLAH, SQRDMLSH to decodetree Date: Tue, 25 Jun 2024 11:35:27 -0700 Message-Id: <20240625183536.1672454-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::62d (deferred) 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::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719346814153100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.h | 10 ++ target/arm/tcg/a64.decode | 16 +++ target/arm/tcg/translate-a64.c | 206 +++++++++++++-------------------- target/arm/tcg/vec_helper.c | 72 ++++++++++++ 4 files changed, 180 insertions(+), 124 deletions(-) diff --git a/target/arm/helper.h b/target/arm/helper.h index eca2043fc2..970d059dec 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -979,6 +979,16 @@ DEF_HELPER_FLAGS_5(neon_sqrdmulh_idx_h, TCG_CALL_NO_RW= G, DEF_HELPER_FLAGS_5(neon_sqrdmulh_idx_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) =20 +DEF_HELPER_FLAGS_5(neon_sqrdmlah_idx_h, TCG_CALL_NO_RWG, + void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5(neon_sqrdmlah_idx_s, TCG_CALL_NO_RWG, + void, ptr, ptr, ptr, ptr, i32) + +DEF_HELPER_FLAGS_5(neon_sqrdmlsh_idx_h, TCG_CALL_NO_RWG, + void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5(neon_sqrdmlsh_idx_s, TCG_CALL_NO_RWG, + void, ptr, ptr, ptr, ptr, i32) + DEF_HELPER_FLAGS_4(sve2_sqdmulh_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i= 32) DEF_HELPER_FLAGS_4(sve2_sqdmulh_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i= 32) DEF_HELPER_FLAGS_4(sve2_sqdmulh_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i= 32) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 2b7a3254a0..613cc9365c 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -781,6 +781,8 @@ CMEQ_s 0111 1110 111 ..... 10001 1 ..... .....= @rrr_d =20 SQDMULH_s 0101 1110 ..1 ..... 10110 1 ..... ..... @rrr_e SQRDMULH_s 0111 1110 ..1 ..... 10110 1 ..... ..... @rrr_e +SQRDMLAH_s 0111 1110 ..0 ..... 10000 1 ..... ..... @rrr_e +SQRDMLSH_s 0111 1110 ..0 ..... 10001 1 ..... ..... @rrr_e =20 ### Advanced SIMD scalar pairwise =20 @@ -941,6 +943,8 @@ MLS_v 0.10 1110 ..1 ..... 10010 1 ..... .....= @qrrr_e =20 SQDMULH_v 0.00 1110 ..1 ..... 10110 1 ..... ..... @qrrr_e SQRDMULH_v 0.10 1110 ..1 ..... 10110 1 ..... ..... @qrrr_e +SQRDMLAH_v 0.10 1110 ..0 ..... 10000 1 ..... ..... @qrrr_e +SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e =20 ### Advanced SIMD scalar x indexed element =20 @@ -966,6 +970,12 @@ SQDMULH_si 0101 1111 10 .. .... 1100 . 0 ..... ..= ... @rrx_s SQRDMULH_si 0101 1111 01 .. .... 1101 . 0 ..... ..... @rrx_h SQRDMULH_si 0101 1111 10 . ..... 1101 . 0 ..... ..... @rrx_s =20 +SQRDMLAH_si 0111 1111 01 .. .... 1101 . 0 ..... ..... @rrx_h +SQRDMLAH_si 0111 1111 10 .. .... 1101 . 0 ..... ..... @rrx_s + +SQRDMLSH_si 0111 1111 01 .. .... 1111 . 0 ..... ..... @rrx_h +SQRDMLSH_si 0111 1111 10 .. .... 1111 . 0 ..... ..... @rrx_s + ### Advanced SIMD vector x indexed element =20 FMUL_vi 0.00 1111 00 .. .... 1001 . 0 ..... ..... @qrrx_h @@ -1004,6 +1014,12 @@ SQDMULH_vi 0.00 1111 10 . ..... 1100 . 0 ..... = ..... @qrrx_s SQRDMULH_vi 0.00 1111 01 .. .... 1101 . 0 ..... ..... @qrrx_h SQRDMULH_vi 0.00 1111 10 . ..... 1101 . 0 ..... ..... @qrrx_s =20 +SQRDMLAH_vi 0.10 1111 01 .. .... 1101 . 0 ..... ..... @qrrx_h +SQRDMLAH_vi 0.10 1111 10 .. .... 1101 . 0 ..... ..... @qrrx_s + +SQRDMLSH_vi 0.10 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_h +SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s + # Floating-point conditional select =20 FCSEL 0001 1110 .. 1 rm:5 cond:4 11 rn:5 rd:5 esz=3D%esz_hsd diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 93543da39c..32c24c7422 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5235,6 +5235,43 @@ static const ENVScalar2 f_scalar_sqrdmulh =3D { }; TRANS(SQRDMULH_s, do_env_scalar2_hs, a, &f_scalar_sqrdmulh) =20 +typedef struct ENVScalar3 { + NeonGenThreeOpEnvFn *gen_hs[2]; +} ENVScalar3; + +static bool do_env_scalar3_hs(DisasContext *s, arg_rrr_e *a, + const ENVScalar3 *f) +{ + TCGv_i32 t0, t1, t2; + + if (a->esz !=3D MO_16 && a->esz !=3D MO_32) { + return false; + } + if (!fp_access_check(s)) { + return true; + } + + t0 =3D tcg_temp_new_i32(); + t1 =3D tcg_temp_new_i32(); + t2 =3D tcg_temp_new_i32(); + read_vec_element_i32(s, t0, a->rn, 0, a->esz); + read_vec_element_i32(s, t1, a->rm, 0, a->esz); + read_vec_element_i32(s, t2, a->rd, 0, a->esz); + f->gen_hs[a->esz - 1](t0, tcg_env, t0, t1, t2); + write_fp_sreg(s, a->rd, t0); + return true; +} + +static const ENVScalar3 f_scalar_sqrdmlah =3D { + { gen_helper_neon_qrdmlah_s16, gen_helper_neon_qrdmlah_s32 } +}; +TRANS_FEAT(SQRDMLAH_s, aa64_rdm, do_env_scalar3_hs, a, &f_scalar_sqrdmlah) + +static const ENVScalar3 f_scalar_sqrdmlsh =3D { + { gen_helper_neon_qrdmlsh_s16, gen_helper_neon_qrdmlsh_s32 } +}; +TRANS_FEAT(SQRDMLSH_s, aa64_rdm, do_env_scalar3_hs, a, &f_scalar_sqrdmlsh) + static bool do_cmop_d(DisasContext *s, arg_rrr_e *a, TCGCond cond) { if (fp_access_check(s)) { @@ -5552,6 +5589,8 @@ TRANS(CMTST_v, do_gvec_fn3, a, gen_gvec_cmtst) =20 TRANS(SQDMULH_v, do_gvec_fn3_no8_no64, a, gen_gvec_sqdmulh_qc) TRANS(SQRDMULH_v, do_gvec_fn3_no8_no64, a, gen_gvec_sqrdmulh_qc) +TRANS_FEAT(SQRDMLAH_v, aa64_rdm, do_gvec_fn3_no8_no64, a, gen_gvec_sqrdmla= h_qc) +TRANS_FEAT(SQRDMLSH_v, aa64_rdm, do_gvec_fn3_no8_no64, a, gen_gvec_sqrdmls= h_qc) =20 /* * Advanced SIMD scalar/vector x indexed element @@ -5681,6 +5720,29 @@ static bool do_env_scalar2_idx_hs(DisasContext *s, a= rg_rrx_e *a, TRANS(SQDMULH_si, do_env_scalar2_idx_hs, a, &f_scalar_sqdmulh) TRANS(SQRDMULH_si, do_env_scalar2_idx_hs, a, &f_scalar_sqrdmulh) =20 +static bool do_env_scalar3_idx_hs(DisasContext *s, arg_rrx_e *a, + const ENVScalar3 *f) +{ + if (a->esz < MO_16 || a->esz > MO_32) { + return false; + } + if (fp_access_check(s)) { + TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_new_i32(); + TCGv_i32 t2 =3D tcg_temp_new_i32(); + + read_vec_element_i32(s, t0, a->rn, 0, a->esz); + read_vec_element_i32(s, t1, a->rm, a->idx, a->esz); + read_vec_element_i32(s, t2, a->rd, 0, a->esz); + f->gen_hs[a->esz - 1](t0, tcg_env, t0, t1, t2); + write_fp_sreg(s, a->rd, t0); + } + return true; +} + +TRANS_FEAT(SQRDMLAH_si, aa64_rdm, do_env_scalar3_idx_hs, a, &f_scalar_sqrd= mlah) +TRANS_FEAT(SQRDMLSH_si, aa64_rdm, do_env_scalar3_idx_hs, a, &f_scalar_sqrd= mlsh) + static bool do_fp3_vector_idx(DisasContext *s, arg_qrrx_e *a, gen_helper_gvec_3_ptr * const fns[3]) { @@ -5838,6 +5900,20 @@ static gen_helper_gvec_4 * const f_vector_idx_sqrdmu= lh[2] =3D { }; TRANS(SQRDMULH_vi, do_int3_qc_vector_idx, a, f_vector_idx_sqrdmulh) =20 +static gen_helper_gvec_4 * const f_vector_idx_sqrdmlah[2] =3D { + gen_helper_neon_sqrdmlah_idx_h, + gen_helper_neon_sqrdmlah_idx_s, +}; +TRANS_FEAT(SQRDMLAH_vi, aa64_rdm, do_int3_qc_vector_idx, a, + f_vector_idx_sqrdmlah) + +static gen_helper_gvec_4 * const f_vector_idx_sqrdmlsh[2] =3D { + gen_helper_neon_sqrdmlsh_idx_h, + gen_helper_neon_sqrdmlsh_idx_s, +}; +TRANS_FEAT(SQRDMLSH_vi, aa64_rdm, do_int3_qc_vector_idx, a, + f_vector_idx_sqrdmlsh) + /* * Advanced SIMD scalar pairwise */ @@ -9536,84 +9612,6 @@ static void disas_simd_scalar_three_reg_diff(DisasCo= ntext *s, uint32_t insn) } } =20 -/* AdvSIMD scalar three same extra - * 31 30 29 28 24 23 22 21 20 16 15 14 11 10 9 5 4 0 - * +-----+---+-----------+------+---+------+---+--------+---+----+----+ - * | 0 1 | U | 1 1 1 1 0 | size | 0 | Rm | 1 | opcode | 1 | Rn | Rd | - * +-----+---+-----------+------+---+------+---+--------+---+----+----+ - */ -static void disas_simd_scalar_three_reg_same_extra(DisasContext *s, - uint32_t insn) -{ - int rd =3D extract32(insn, 0, 5); - int rn =3D extract32(insn, 5, 5); - int opcode =3D extract32(insn, 11, 4); - int rm =3D extract32(insn, 16, 5); - int size =3D extract32(insn, 22, 2); - bool u =3D extract32(insn, 29, 1); - TCGv_i32 ele1, ele2, ele3; - TCGv_i64 res; - bool feature; - - switch (u * 16 + opcode) { - case 0x10: /* SQRDMLAH (vector) */ - case 0x11: /* SQRDMLSH (vector) */ - if (size !=3D 1 && size !=3D 2) { - unallocated_encoding(s); - return; - } - feature =3D dc_isar_feature(aa64_rdm, s); - break; - default: - unallocated_encoding(s); - return; - } - if (!feature) { - unallocated_encoding(s); - return; - } - if (!fp_access_check(s)) { - return; - } - - /* Do a single operation on the lowest element in the vector. - * We use the standard Neon helpers and rely on 0 OP 0 =3D=3D 0 - * with no side effects for all these operations. - * OPTME: special-purpose helpers would avoid doing some - * unnecessary work in the helper for the 16 bit cases. - */ - ele1 =3D tcg_temp_new_i32(); - ele2 =3D tcg_temp_new_i32(); - ele3 =3D tcg_temp_new_i32(); - - read_vec_element_i32(s, ele1, rn, 0, size); - read_vec_element_i32(s, ele2, rm, 0, size); - read_vec_element_i32(s, ele3, rd, 0, size); - - switch (opcode) { - case 0x0: /* SQRDMLAH */ - if (size =3D=3D 1) { - gen_helper_neon_qrdmlah_s16(ele3, tcg_env, ele1, ele2, ele3); - } else { - gen_helper_neon_qrdmlah_s32(ele3, tcg_env, ele1, ele2, ele3); - } - break; - case 0x1: /* SQRDMLSH */ - if (size =3D=3D 1) { - gen_helper_neon_qrdmlsh_s16(ele3, tcg_env, ele1, ele2, ele3); - } else { - gen_helper_neon_qrdmlsh_s32(ele3, tcg_env, ele1, ele2, ele3); - } - break; - default: - g_assert_not_reached(); - } - - res =3D tcg_temp_new_i64(); - tcg_gen_extu_i32_i64(res, ele3); - write_fp_dreg(s, rd, res); -} - static void handle_2misc_64(DisasContext *s, int opcode, bool u, TCGv_i64 tcg_rd, TCGv_i64 tcg_rn, TCGv_i32 tcg_rmode, TCGv_ptr tcg_fpstatus) @@ -10892,14 +10890,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) int rot; =20 switch (u * 16 + opcode) { - case 0x10: /* SQRDMLAH (vector) */ - case 0x11: /* SQRDMLSH (vector) */ - if (size !=3D 1 && size !=3D 2) { - unallocated_encoding(s); - return; - } - feature =3D dc_isar_feature(aa64_rdm, s); - break; case 0x02: /* SDOT (vector) */ case 0x12: /* UDOT (vector) */ if (size !=3D MO_32) { @@ -10957,6 +10947,8 @@ static void disas_simd_three_reg_same_extra(DisasCo= ntext *s, uint32_t insn) } break; default: + case 0x10: /* SQRDMLAH (vector) */ + case 0x11: /* SQRDMLSH (vector) */ unallocated_encoding(s); return; } @@ -10969,14 +10961,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) } =20 switch (opcode) { - case 0x0: /* SQRDMLAH (vector) */ - gen_gvec_fn3(s, is_q, rd, rn, rm, gen_gvec_sqrdmlah_qc, size); - return; - - case 0x1: /* SQRDMLSH (vector) */ - gen_gvec_fn3(s, is_q, rd, rn, rm, gen_gvec_sqrdmlsh_qc, size); - return; - case 0x2: /* SDOT / UDOT */ gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, u ? gen_helper_gvec_udot_b : gen_helper_gvec_sdot= _b); @@ -12059,13 +12043,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) case 0x0b: /* SQDMULL, SQDMULL2 */ is_long =3D true; break; - case 0x1d: /* SQRDMLAH */ - case 0x1f: /* SQRDMLSH */ - if (!dc_isar_feature(aa64_rdm, s)) { - unallocated_encoding(s); - return; - } - break; case 0x0e: /* SDOT */ case 0x1e: /* UDOT */ if (is_scalar || size !=3D MO_32 || !dc_isar_feature(aa64_dp, s)) { @@ -12127,6 +12104,8 @@ static void disas_simd_indexed(DisasContext *s, uin= t32_t insn) case 0x18: /* FMLAL2 */ case 0x19: /* FMULX */ case 0x1c: /* FMLSL2 */ + case 0x1d: /* SQRDMLAH */ + case 0x1f: /* SQRDMLSH */ unallocated_encoding(s); return; } @@ -12320,33 +12299,13 @@ static void disas_simd_indexed(DisasContext *s, u= int32_t insn) tcg_op, tcg_idx); } break; - case 0x1d: /* SQRDMLAH */ - read_vec_element_i32(s, tcg_res, rd, pass, - is_scalar ? size : MO_32); - if (size =3D=3D 1) { - gen_helper_neon_qrdmlah_s16(tcg_res, tcg_env, - tcg_op, tcg_idx, tcg_res); - } else { - gen_helper_neon_qrdmlah_s32(tcg_res, tcg_env, - tcg_op, tcg_idx, tcg_res); - } - break; - case 0x1f: /* SQRDMLSH */ - read_vec_element_i32(s, tcg_res, rd, pass, - is_scalar ? size : MO_32); - if (size =3D=3D 1) { - gen_helper_neon_qrdmlsh_s16(tcg_res, tcg_env, - tcg_op, tcg_idx, tcg_res); - } else { - gen_helper_neon_qrdmlsh_s32(tcg_res, tcg_env, - tcg_op, tcg_idx, tcg_res); - } - break; default: case 0x01: /* FMLA */ case 0x05: /* FMLS */ case 0x09: /* FMUL */ case 0x19: /* FMULX */ + case 0x1d: /* SQRDMLAH */ + case 0x1f: /* SQRDMLSH */ g_assert_not_reached(); } =20 @@ -12538,7 +12497,6 @@ static const AArch64DecodeTable data_proc_simd[] = =3D { { 0x0e000000, 0xbf208c00, disas_simd_tb }, { 0x0e000800, 0xbf208c00, disas_simd_zip_trn }, { 0x2e000000, 0xbf208400, disas_simd_ext }, - { 0x5e008400, 0xdf208400, disas_simd_scalar_three_reg_same_extra }, { 0x5e200000, 0xdf200c00, disas_simd_scalar_three_reg_diff }, { 0x5e200800, 0xdf3e0c00, disas_simd_scalar_two_reg_misc }, { 0x5f000000, 0xdf000400, disas_simd_indexed }, /* scalar indexed */ diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index d477479bb1..98604d170f 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -347,6 +347,42 @@ void HELPER(neon_sqrdmulh_idx_h)(void *vd, void *vn, v= oid *vm, clear_tail(d, opr_sz, simd_maxsz(desc)); } =20 +void HELPER(neon_sqrdmlah_idx_h)(void *vd, void *vn, void *vm, + void *vq, uint32_t desc) +{ + intptr_t i, j, opr_sz =3D simd_oprsz(desc); + int idx =3D simd_data(desc); + int16_t *d =3D vd, *n =3D vn, *m =3D (int16_t *)vm + H2(idx); + intptr_t elements =3D opr_sz / 2; + intptr_t eltspersegment =3D MIN(16 / 2, elements); + + for (i =3D 0; i < elements; i +=3D 16 / 2) { + int16_t mm =3D m[i]; + for (j =3D 0; j < eltspersegment; ++j) { + d[i + j] =3D do_sqrdmlah_h(n[i + j], mm, d[i + j], false, true= , vq); + } + } + clear_tail(d, opr_sz, simd_maxsz(desc)); +} + +void HELPER(neon_sqrdmlsh_idx_h)(void *vd, void *vn, void *vm, + void *vq, uint32_t desc) +{ + intptr_t i, j, opr_sz =3D simd_oprsz(desc); + int idx =3D simd_data(desc); + int16_t *d =3D vd, *n =3D vn, *m =3D (int16_t *)vm + H2(idx); + intptr_t elements =3D opr_sz / 2; + intptr_t eltspersegment =3D MIN(16 / 2, elements); + + for (i =3D 0; i < elements; i +=3D 16 / 2) { + int16_t mm =3D m[i]; + for (j =3D 0; j < eltspersegment; ++j) { + d[i + j] =3D do_sqrdmlah_h(n[i + j], mm, d[i + j], true, true,= vq); + } + } + clear_tail(d, opr_sz, simd_maxsz(desc)); +} + void HELPER(sve2_sqrdmlah_h)(void *vd, void *vn, void *vm, void *va, uint32_t desc) { @@ -546,6 +582,42 @@ void HELPER(neon_sqrdmulh_idx_s)(void *vd, void *vn, v= oid *vm, clear_tail(d, opr_sz, simd_maxsz(desc)); } =20 +void HELPER(neon_sqrdmlah_idx_s)(void *vd, void *vn, void *vm, + void *vq, uint32_t desc) +{ + intptr_t i, j, opr_sz =3D simd_oprsz(desc); + int idx =3D simd_data(desc); + int32_t *d =3D vd, *n =3D vn, *m =3D (int32_t *)vm + H4(idx); + intptr_t elements =3D opr_sz / 4; + intptr_t eltspersegment =3D MIN(16 / 4, elements); + + for (i =3D 0; i < elements; i +=3D 16 / 4) { + int32_t mm =3D m[i]; + for (j =3D 0; j < eltspersegment; ++j) { + d[i + j] =3D do_sqrdmlah_s(n[i + j], mm, d[i + j], false, true= , vq); + } + } + clear_tail(d, opr_sz, simd_maxsz(desc)); +} + +void HELPER(neon_sqrdmlsh_idx_s)(void *vd, void *vn, void *vm, + void *vq, uint32_t desc) +{ + intptr_t i, j, opr_sz =3D simd_oprsz(desc); + int idx =3D simd_data(desc); + int32_t *d =3D vd, *n =3D vn, *m =3D (int32_t *)vm + H4(idx); + intptr_t elements =3D opr_sz / 4; + intptr_t eltspersegment =3D MIN(16 / 4, elements); + + for (i =3D 0; i < elements; i +=3D 16 / 4) { + int32_t mm =3D m[i]; + for (j =3D 0; j < eltspersegment; ++j) { + d[i + j] =3D do_sqrdmlah_s(n[i + j], mm, d[i + j], true, true,= vq); + } + } + clear_tail(d, opr_sz, simd_maxsz(desc)); +} + void HELPER(sve2_sqrdmlah_s)(void *vd, void *vn, void *vm, void *va, uint32_t desc) { --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719348325; cv=none; d=zohomail.com; s=zohoarc; b=FyJcGz03yl2MtEAgk/ryNZHhRB/35I5KRDx/m4ZlMGntCLb62InMCFXJNiXSsLzJNQVGzbhdtf9M8lpMNZAg5BloVaetYxqP50Cib6nN+CSmj2nUwLTOyDJ9H1uK25INUb0Ww7p3lvV08FjQoWlGxS5WV5jmALBvngErr5Qyz1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719348325; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eN1Efob1I3xatF3I5F8UROtAF2gQdoNN9Kj4+5dUxQA=; b=SSlDhXsVaFUxdPC2qgl5hvXo5cmPCDEnbK+TOJACYrA3mzisBbpkruZJq9hOuJPnlkTROQ/l3vGs1Qo4JkSRR2s/+Y1BYeCbqHtBLdnl+2o9fkn8J2dUS6dru0gIq2n3rNj38GNmj8NX7iEkCKMbqOsqsYl6XflRT6cfH3GRcbY= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719348325749407.31311026217054; Tue, 25 Jun 2024 13:45:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMCtM-0005Fx-Qs; Tue, 25 Jun 2024 16:36:00 -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 1sMCsg-000585-MJ for qemu-devel@nongnu.org; Tue, 25 Jun 2024 16:35:26 -0400 Received: from [2607:f8b0:4864:20::d30] (helo=mail-io1-xd30.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMCoX-00077q-D9 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 16:34:52 -0400 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7e21dfbc310so219102039f.1 for ; Tue, 25 Jun 2024 13:29:00 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719347323; x=1719952123; 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=eN1Efob1I3xatF3I5F8UROtAF2gQdoNN9Kj4+5dUxQA=; b=dlPA5B9N/0JF6XQbWR0eHBVrWS3VfsFnpN0+KCaTKg0eHl8hSsJqZ7uMnPLnwQxnCC nkDlkr+SHKSTOTspRiKkWFpzl6qK95xUsZu7UhjWUcjg0bCHk0dEo+Tn9wHb6Mj0P4CF 8sqQgS4eqHgOw10Q0JS1H0HliLvMRhW71lTD9jPQm+VqfTjO/tEbg9qo2y+ez6xxmeOh 3801mCLKQWbZmbIEjOOFHj+6GcjfurGkJRUAyEvwO2q/OHR8y5HjkLa7l4teSKT6qHfC eBzpcDJMzH5CuHQMPmBu3l0s/z0yXt9i1OczFkv8FLRKKWWsFHmqe0eoyhBjUrdhEBvJ Vw/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719347323; x=1719952123; 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=eN1Efob1I3xatF3I5F8UROtAF2gQdoNN9Kj4+5dUxQA=; b=QCJKsT+LXUyQ676EGlE8RIgyru+WIPlz7OyV1Rku2CjAr4WIEgWP1Jx+t8YVz2URlU +6JxmqvtA6bohZZFm/nSwi1eRmjknkkTwb1N8WG+hAUtsafeaLkPuqhSuwJfW43WwRxE ZUz4opvuVC5eSbuwQPQF43YhcltzaFRO0vLp6L1bj4EDzlg/7CDVhfOSHPlXPW91/7VY +kuQo0sJBuuG8jrTCjCinqlLcxpAWBzPtYmqA5kImIL4468OOWSCn9kMOPAtNbB+sPcz LsGhLHBMgrM10QfRsUH4UqF4sHvq/B7CT08i4zuhlU1zXl6t3z/+pOsnUNbCVoOXHiAg SiOA== X-Gm-Message-State: AOJu0Yx1V6a27hiL5JhmgUryP2r7ZPK7yoiFhQT/QZgFeRHnLQhfzqOa by8zGFbEVdFOE0F2tZYGW/qeXX2bjb62y71PCX/RFVg8Ni2/NKqLV2li0JTkkO8tCqI4eAhZfDZ S X-Google-Smtp-Source: AGHT+IE9swytu+mWzkrvUlWnOVCCTnrNTp9MyM/NefwvNvXaEYNlFnYM+mJSu+K7wPK/G+dLgHVddQ== X-Received: by 2002:a17:903:32ce:b0:1fa:643:f424 with SMTP id d9443c01a7336-1fa238e46ddmr109487635ad.14.1719340542474; Tue, 25 Jun 2024 11:35:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 05/13] target/arm: Convert SDOT, UDOT to decodetree Date: Tue, 25 Jun 2024 11:35:28 -0700 Message-Id: <20240625183536.1672454-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::d30 (deferred) 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::d30; envelope-from=richard.henderson@linaro.org; helo=mail-io1-xd30.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719348326531100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 7 +++++ target/arm/tcg/translate-a64.c | 54 ++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 613cc9365c..7411d4ba97 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -61,6 +61,7 @@ =20 @qrrr_b . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=3D0 @qrrr_h . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=3D1 +@qrrr_s . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=3D2 @qrrr_sd . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=3D%esz= _sd @qrrr_e . q:1 ...... esz:2 . rm:5 ...... rn:5 rd:5 &qrrr_e @qr2r_e . q:1 ...... esz:2 . ..... ...... rm:5 rd:5 &qrrr_e rn=3D%= rd @@ -946,6 +947,9 @@ SQRDMULH_v 0.10 1110 ..1 ..... 10110 1 ..... .....= @qrrr_e SQRDMLAH_v 0.10 1110 ..0 ..... 10000 1 ..... ..... @qrrr_e SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e =20 +SDOT_v 0.00 1110 100 ..... 10010 1 ..... ..... @qrrr_s +UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s + ### Advanced SIMD scalar x indexed element =20 FMUL_si 0101 1111 00 .. .... 1001 . 0 ..... ..... @rrx_h @@ -1020,6 +1024,9 @@ SQRDMLAH_vi 0.10 1111 10 .. .... 1101 . 0 ..... .= .... @qrrx_s SQRDMLSH_vi 0.10 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_h SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s =20 +SDOT_vi 0.00 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s +UDOT_vi 0.10 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s + # Floating-point conditional select =20 FCSEL 0001 1110 .. 1 rm:5 cond:4 11 rn:5 rd:5 esz=3D%esz_hsd diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 32c24c7422..f2e7d8d75c 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5592,6 +5592,18 @@ TRANS(SQRDMULH_v, do_gvec_fn3_no8_no64, a, gen_gvec_= sqrdmulh_qc) TRANS_FEAT(SQRDMLAH_v, aa64_rdm, do_gvec_fn3_no8_no64, a, gen_gvec_sqrdmla= h_qc) TRANS_FEAT(SQRDMLSH_v, aa64_rdm, do_gvec_fn3_no8_no64, a, gen_gvec_sqrdmls= h_qc) =20 +static bool do_dot_vector(DisasContext *s, arg_qrrr_e *a, + gen_helper_gvec_4 *fn) +{ + if (fp_access_check(s)) { + gen_gvec_op4_ool(s, a->q, a->rd, a->rn, a->rm, a->rd, 0, fn); + } + return true; +} + +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) + /* * Advanced SIMD scalar/vector x indexed element */ @@ -5914,6 +5926,18 @@ static gen_helper_gvec_4 * const f_vector_idx_sqrdml= sh[2] =3D { TRANS_FEAT(SQRDMLSH_vi, aa64_rdm, do_int3_qc_vector_idx, a, f_vector_idx_sqrdmlsh) =20 +static bool do_dot_vector_idx(DisasContext *s, arg_qrrx_e *a, + gen_helper_gvec_4 *fn) +{ + if (fp_access_check(s)) { + gen_gvec_op4_ool(s, a->q, a->rd, a->rn, a->rm, a->rd, a->idx, fn); + } + return true; +} + +TRANS_FEAT(SDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_sdot_id= x_b) +TRANS_FEAT(UDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_udot_id= x_b) + /* * Advanced SIMD scalar pairwise */ @@ -10890,14 +10914,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) int rot; =20 switch (u * 16 + opcode) { - case 0x02: /* SDOT (vector) */ - case 0x12: /* UDOT (vector) */ - if (size !=3D MO_32) { - unallocated_encoding(s); - return; - } - feature =3D dc_isar_feature(aa64_dp, s); - break; case 0x03: /* USDOT */ if (size !=3D MO_32) { unallocated_encoding(s); @@ -10947,8 +10963,10 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) } break; default: + case 0x02: /* SDOT (vector) */ case 0x10: /* SQRDMLAH (vector) */ case 0x11: /* SQRDMLSH (vector) */ + case 0x12: /* UDOT (vector) */ unallocated_encoding(s); return; } @@ -10961,11 +10979,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) } =20 switch (opcode) { - case 0x2: /* SDOT / UDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, - u ? gen_helper_gvec_udot_b : gen_helper_gvec_sdot= _b); - return; - case 0x3: /* USDOT */ gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, gen_helper_gvec_usdot= _b); return; @@ -12043,13 +12056,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) case 0x0b: /* SQDMULL, SQDMULL2 */ is_long =3D true; break; - case 0x0e: /* SDOT */ - case 0x1e: /* UDOT */ - if (is_scalar || size !=3D MO_32 || !dc_isar_feature(aa64_dp, s)) { - unallocated_encoding(s); - return; - } - break; case 0x0f: switch (size) { case 0: /* SUDOT */ @@ -12099,12 +12105,14 @@ static void disas_simd_indexed(DisasContext *s, u= int32_t insn) case 0x09: /* FMUL */ case 0x0c: /* SQDMULH */ case 0x0d: /* SQRDMULH */ + case 0x0e: /* SDOT */ case 0x10: /* MLA */ case 0x14: /* MLS */ case 0x18: /* FMLAL2 */ case 0x19: /* FMULX */ case 0x1c: /* FMLSL2 */ case 0x1d: /* SQRDMLAH */ + case 0x1e: /* UDOT */ case 0x1f: /* SQRDMLSH */ unallocated_encoding(s); return; @@ -12180,12 +12188,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) } =20 switch (16 * u + opcode) { - case 0x0e: /* SDOT */ - case 0x1e: /* UDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, index, - u ? gen_helper_gvec_udot_idx_b - : gen_helper_gvec_sdot_idx_b); - return; case 0x0f: switch (extract32(insn, 22, 2)) { case 0: /* SUDOT */ --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719347128; cv=none; d=zohomail.com; s=zohoarc; b=FXcOCysIjEW294R9FQrQLI1Rtjd+3n4XzZSmCkayqwEh4mzO/9cW5nwi50rcHWIZpODJJc1de2JmDmyp8OmhpuyTLLk9cEusnrKxGX/3jSjnZ4ULBxS80yt0uZgOs6WUFhsH4vknlW8ysFlt/LFWcQw6+cpwIgTZ5FYZaJvlKCQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719347128; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=A9xMCiVEPs8xOyyzawG2CVQ8zg7ghsGamdUOThsHcoY=; b=Gg2x724DlX8ylkthUwkjtvqgef5gfLlZ3ID+sa0KQ5Z5qX4LmDUhi45v3F32eA7ENzfXh1oJ/Iz7sLXUnCz017wziuBDoE1MO+kTKgVpQ5b6FhITFyeCmCoeA7iLXKrN/hDSg8Wb5nLjxm2d8YcQCbvr3XNZ+dKafZcuSJNOe/c= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719347128305981.9584719977532; Tue, 25 Jun 2024 13:25:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBBc-0002eu-Bn; Tue, 25 Jun 2024 14:46:41 -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 1sMB50-000163-8B for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:39:56 -0400 Received: from [2607:f8b0:4864:20::631] (helo=mail-pl1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMB3m-00066R-3h for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:39:34 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1fa78306796so5767215ad.3 for ; Tue, 25 Jun 2024 11:36:06 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719340543; x=1719945343; 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=A9xMCiVEPs8xOyyzawG2CVQ8zg7ghsGamdUOThsHcoY=; b=BCLB2fx1HMZWEVHNoDUFIPjYoPi2gSqcm8GP342vMmKI0LOSVp6ZjWAfK8vdzahHFA RT3mfRWKrdOSvwToZebAPA41uCPDrgBt2VYr+65fp0EOVVI3Qav/DZX5DgztOCbs1oFE 53fel413nnLZJfGV7XtRIwbJiZrO0DWsrBrpUjaqbqj88WiDKkOAir6K3sJOTPjStH/K xlciA1hVh3mCKGUZNqHAE/ZML7oe08QDxk/CMQVsjc64MqSq3g01R5jvYEcqV09h2JXC 2ebZ7cEtlR4mfjTjU4/rVu7YoOfr3km5PdVz2YCiuxobVFQYVigB2CrbOjvTYn06tEau UPBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719340543; x=1719945343; 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=A9xMCiVEPs8xOyyzawG2CVQ8zg7ghsGamdUOThsHcoY=; b=DQ6K/TRYFLk3cBJ0BkmBux7WnOPCL/hjc5G68ik7t4R6aflZJMgDASL8tN7jQv4yjM GnfqdLOd6pn1K1My+T0c0rtBcuP2eLfVyGPiFBmG4in9YcmZ++ZlAzvBBehKn0qlRvc9 jyq9XOeKhLQyyR0UIZ5rXxsvk7MKzwUjZ51/LmNxxkKY5RjZmKSSRWMjJhnxXjmQH3rm Zg41yDbqNnir5X3el8K5Os2q03leJGzK9KLw+1rwLTeJTEwhaRx+yjLD5ChUwi5oe/4Y w/zeJfy29sk8Cvjgsk9w29hcS6Eh4RF6FUBElpKruBuX3DCsir8vKNtuwvPJGH5mHMsn lhLQ== X-Gm-Message-State: AOJu0Yx/4mgo6KTSr3k67Gs137DP01NYP3eBDmJFQGYXNO0OS5tThdYF 37dRZ687Flh4RZholYap8hYuPuUnaYx5zMMPKW2FRWAlSlRLCbNUy+BIH3jUwBd45vf9EZZrtr4 U X-Google-Smtp-Source: AGHT+IFViv/QBBG8+NOpoDIIeKkAUHDNI3GZiOYVLj1uaphYFjvxjBUiTldCDLTK8JuzCno5FcMq0A== X-Received: by 2002:a17:902:da86:b0:1f6:8235:dba7 with SMTP id d9443c01a7336-1fa1d6ad2d6mr102683915ad.69.1719340543290; Tue, 25 Jun 2024 11:35:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 06/13] target/arm: Convert SUDOT, USDOT to decodetree Date: Tue, 25 Jun 2024 11:35:29 -0700 Message-Id: <20240625183536.1672454-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::631 (deferred) 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::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719347129155100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 =20 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 =20 ### Advanced SIMD scalar x indexed element =20 @@ -1026,6 +1027,8 @@ SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... .= .... @qrrx_s =20 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 =20 # Floating-point conditional select =20 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, =20 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) =20 /* * Advanced SIMD scalar/vector x indexed element @@ -5937,6 +5938,10 @@ static bool do_dot_vector_idx(DisasContext *s, arg_q= rrx_e *a, =20 TRANS_FEAT(SDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_sdot_id= x_b) TRANS_FEAT(UDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_udot_id= x_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) =20 /* * Advanced SIMD scalar pairwise @@ -10914,13 +10919,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) int rot; =20 switch (u * 16 + opcode) { - case 0x03: /* USDOT */ - if (size !=3D MO_32) { - unallocated_encoding(s); - return; - } - feature =3D 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(DisasCo= ntext *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(DisasC= ontext *s, uint32_t insn) } =20 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, ui= nt32_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 =3D 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, uin= t32_t insn) size =3D 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, u= int32_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); --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719341614; cv=none; d=zohomail.com; s=zohoarc; b=K5poLsBufq0a32ax4Ls0k5ZTaiohPYH073YgDRNhf/uaalw3A4ErCfZ7LRzhljWPZUHi9A1eufonie9+jHvSaPNEZe4u8sXjV/Tjj52ZNRK5rW5GtLGPIMwJnZfo0Y9udlTpE017jeL7E68rQGprO6c8uTpgH+wXQuoTo6Nyy/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719341614; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wsKF91GwX4/Knu6MbETuxw4jFllUHVVW6ayUlN0J0DQ=; b=YU81OmUgxCsN394nO94YQvM5NEHVlb/YmYR99HoogOP3YJ/DBTGNA+LoOv6D3n5p9SUJaeSTvdosnSJml9HJ3DLSQ1ZvUTmbreKDMrZ+vgCQykG6kCIG3XDdXrG+ImX2x9/FNLRhxCkX4vx1UzCZPEwoCbjnYRdjqWao5GRsKi4= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171934161474425.38792750346795; Tue, 25 Jun 2024 11:53:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMB7J-0001YM-1O; Tue, 25 Jun 2024 14:42:32 -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 1sMB44-0000wr-Tv for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:38:57 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMB2q-00066c-UT for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:38:39 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fa2ea1c443so23091735ad.0 for ; Tue, 25 Jun 2024 11:36:06 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719340544; x=1719945344; 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=wsKF91GwX4/Knu6MbETuxw4jFllUHVVW6ayUlN0J0DQ=; b=xNOYjSaDJrUVpHygzM01J8Z6foF5lHqzbog8hYIbqd0s6EQyiPVSTdV7d9N0rLretU FepHmDElB2ywoS+xLmgweZUBXTOhMLGBsnQikrX1Hq+pHvpc7BJccCzftf0quVXcwcVV 2X/KIyNQI5Bn1Ou6dV7J64oqeu3QL4t7gnBqZncuL4XKpaZ4p2e0sNcWBllU5Q9crN4l U183x+0Yeg/xelMu8awtA5OOfpyuBKdorhIfYW75EuJdhuKFRGiZEZXzv6ect0Mcri/8 0Jdy5VrAtOOMCTLvceU59Bqca9pRrrJKc2NRjcyVXn8RrVvu8TfBEvyOgeW7QV6cr9eT hAbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719340544; x=1719945344; 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=wsKF91GwX4/Knu6MbETuxw4jFllUHVVW6ayUlN0J0DQ=; b=IO7JnGTvx3F/Gh3fzYnah1aql8HuMO9py7ijsAxf8Kwetr1TFmH9nRDArYgn/7+96W IJjuZXtCjXby5uIseojT9ai6DJwHZ37C2nTQBd6YVUl5/96UfcDIbSkenOQDPhfulogc eheTwq6vS4mAaNTicveGbAp7jBUo9l8bwUYwbeEWRg3XGnpL/flD2y3yCVMOco3ySbLy zIU9llmPSbMmRuVbwbPRTRSWkXP4tEkQDRYEEfy3PXajTHITfJhTbs+NB+HFzDCJcimB SzGx/KBS0WIO7OAoyfkE4SV4rNGbuUfpxLL2dZJIDyefMFbdn+H3HsmSiP4/vc9zPeNg PLoA== X-Gm-Message-State: AOJu0Yx+j/O/aV341kQapkn3bmfpPTPKX7M2QWuYrc4cDwRzq/ekqXdw iDARGaffmoIJnBQC6NcnOlxAHnivLBYYUSKXtP2lIsGV5GX8J+ir+559bE1xfRS8DGeQGbTwB37 c X-Google-Smtp-Source: AGHT+IHSHVekOq6k8kQ1LaTC/I9rHDeQ584jfWTN7v/3VgrbaE7Dc00zlxeBTe7yS4aO3PRRiEoOoA== X-Received: by 2002:a17:903:244a:b0:1f9:a602:5e39 with SMTP id d9443c01a7336-1fa238e4665mr108256365ad.11.1719340544327; Tue, 25 Jun 2024 11:35:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 07/13] target/arm: Convert BFDOT to decodetree Date: Tue, 25 Jun 2024 11:35:30 -0700 Message-Id: <20240625183536.1672454-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719341616392100002 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 2 ++ target/arm/tcg/translate-a64.c | 20 +++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 8a0251f83c..6819fd2587 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -950,6 +950,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 +BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s =20 ### Advanced SIMD scalar x indexed element =20 @@ -1029,6 +1030,7 @@ 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 +BFDOT_vi 0.00 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_s =20 # Floating-point conditional select =20 diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 9a658ca876..0f44cd5aee 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5604,6 +5604,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) +TRANS_FEAT(BFDOT_v, aa64_bf16, do_dot_vector, a, gen_helper_gvec_bfdot) =20 /* * Advanced SIMD scalar/vector x indexed element @@ -5942,6 +5943,8 @@ 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) +TRANS_FEAT(BFDOT_vi, aa64_bf16, do_dot_vector_idx, a, + gen_helper_gvec_bfdot_idx) =20 /* * Advanced SIMD scalar pairwise @@ -10951,11 +10954,11 @@ static void disas_simd_three_reg_same_extra(Disas= Context *s, uint32_t insn) break; case 0x1f: switch (size) { - case 1: /* BFDOT */ case 3: /* BFMLAL{B,T} */ feature =3D dc_isar_feature(aa64_bf16, s); break; default: + case 1: /* BFDOT */ unallocated_encoding(s); return; } @@ -11036,9 +11039,6 @@ static void disas_simd_three_reg_same_extra(DisasCo= ntext *s, uint32_t insn) return; case 0xf: switch (size) { - case 1: /* BFDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, gen_helper_gvec_b= fdot); - break; case 3: /* BFMLAL{B,T} */ gen_gvec_op4_fpst(s, 1, rd, rn, rm, rd, false, is_q, gen_helper_gvec_bfmlal); @@ -12053,13 +12053,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) break; case 0x0f: switch (size) { - case 1: /* BFDOT */ - if (is_scalar || !dc_isar_feature(aa64_bf16, s)) { - unallocated_encoding(s); - return; - } - size =3D MO_32; - break; case 3: /* BFMLAL{B,T} */ if (is_scalar || !dc_isar_feature(aa64_bf16, s)) { unallocated_encoding(s); @@ -12070,6 +12063,7 @@ static void disas_simd_indexed(DisasContext *s, uin= t32_t insn) break; default: case 0: /* SUDOT */ + case 1: /* BFDOT */ case 2: /* USDOT */ unallocated_encoding(s); return; @@ -12179,10 +12173,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) switch (16 * u + opcode) { case 0x0f: switch (extract32(insn, 22, 2)) { - case 1: /* BFDOT */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, index, - gen_helper_gvec_bfdot_idx); - 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); --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719355490; cv=none; d=zohomail.com; s=zohoarc; b=nCyG1WS2NtTMwAyUGvuwWOKzluk3efS4c7EXcBuzS9uSYybGBv+nHLoxWKMUTeA2r1fRK5f/LVOtHB+pUAEXFZWk79NDwIkb93QQ5pDjRH0xnmA28tWonbJD0rjdGuglUsLdLhG6iFocAVo9rutq++XvLoIOeNS8tzkvAi9W9pM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719355490; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pO8S7b7Lc2zYJ5YuH/uyew7KLH8ZATkGu/zVIu9bhOw=; b=XII9/2IJjZw9ZvVnRQW727ygtW70a63QP4Yxga3c+a9cRlNiANKuTf7Jwvhun9Fzu15RUEv7lc9IaQfdNXlkUW2hTAjrPHavihRczwOPHVBomqRb0J2VoS+Ccq9x+n4QeFHogLO3p1EjNRRjfw7Gxrz8U5F4K86Dv1SkWxiXusM= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719355490563151.6229094356613; Tue, 25 Jun 2024 15:44:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBzR-0008Ss-L3; Tue, 25 Jun 2024 15:38:18 -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 1sMByM-0008Bd-8t for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:37:03 -0400 Received: from [2607:f8b0:4864:20::c2d] (helo=mail-oo1-xc2d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMBxf-0004wV-5C for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:36:42 -0400 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-5c21f3fbdd3so140145eaf.2 for ; Tue, 25 Jun 2024 12:35:07 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719344093; x=1719948893; 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=pO8S7b7Lc2zYJ5YuH/uyew7KLH8ZATkGu/zVIu9bhOw=; b=KF1/iPLwMvGnba+5VVDm/w+NbAXjqjY6APH59mphvdyUeHUuIxfF/tTTl6O6vfNzSR yzTxYuCR2qQ5cPsdQjq1GSCdbTL0nHdUha3zUJeKfXRkUDOT+IDeJnW1ravE7riSxkOa CkphCmyawKcNrkSg00qorFZMhtobWIdA6fUo0xxmRzWSHCMCOoOj3qnvlZ8MCnBGkEK8 JwFC54r47Cywt15LzpFLDeFtKn1B4mFZ25i+KSekkxtLKcOyKy2z7XGsYnvmJWTxQqRv HyvrwfM0ZkYYwOVTdz6vw3Mmk5fB2pPeVPA+sURJNMa7aLPlMJs9EohM5qiAexN4f00t s1rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719344093; x=1719948893; 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=pO8S7b7Lc2zYJ5YuH/uyew7KLH8ZATkGu/zVIu9bhOw=; b=su/Ko+TTVZvZL/v1LsBfW8mjdYG4rDPc4nbK5unmnHmz1rTgr/0TNbPtu59N1TyMAI Jc04Khu4wKujQ4N+Itsg8sS9IlCsYB7EMQ5GrMJv2rCvnEgG9NdcD7aWNVI2DOY+jyq9 VMqi23j6i/prOXpQfndHdOJH4oZTfr3vEDkjehyfNlIq9V1PvPlGCIUJqvAsRBNzsdKp 8pHxEhltgIMjl9DuMPS1lFkaenotctEAV0VNmvLauJBnklZVDfCFyE2MDWdTwn+3Vrs1 HnZ62wg+xLdKF86+XP/IiGuCTH5kDnYoBaAyDpP7l3bq/C4SwqI5E3JGax8aSkqBlS9O 6Qpg== X-Gm-Message-State: AOJu0YzL9xvzBJzXmGfmKd6kwHc0RjvMihI8IGXbXSOQyRMZm4xgXW2O itIINH2INi3QmI1AWYgLKlct9O9LtSlzuwUFws7rpQ1NHEdj4izfyKt/yYafL+jXQiHm3f2u2A7 P X-Google-Smtp-Source: AGHT+IEZESXdMDpgCdRWY14uSmLYthzzVVuhnprWD09BpoP2ADUSgtjTQOqVKmCpvHDp+YW2a/rE7A== X-Received: by 2002:a17:903:32ce:b0:1fa:2420:33ed with SMTP id d9443c01a7336-1fa24203694mr94894665ad.65.1719340545240; Tue, 25 Jun 2024 11:35:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 08/13] target/arm: Convert BFMLALB, BFMLALT to decodetree Date: Tue, 25 Jun 2024 11:35:31 -0700 Message-Id: <20240625183536.1672454-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::c2d (deferred) 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::c2d; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc2d.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719355490965100001 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 2 + target/arm/tcg/translate-a64.c | 77 +++++++++++++--------------------- 2 files changed, 31 insertions(+), 48 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 6819fd2587..15344a73de 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -951,6 +951,7 @@ 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 BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s +BFMLAL_v 0.10 1110 110 ..... 11111 1 ..... ..... @qrrr_h =20 ### Advanced SIMD scalar x indexed element =20 @@ -1031,6 +1032,7 @@ 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 BFDOT_vi 0.00 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_s +BFMLAL_vi 0.00 1111 11 .. .... 1111 . 0 ..... ..... @qrrx_h =20 # Floating-point conditional select =20 diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 0f44cd5aee..95be862dde 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5606,6 +5606,19 @@ TRANS_FEAT(UDOT_v, aa64_dp, do_dot_vector, a, gen_he= lper_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) =20 +static bool trans_BFMLAL_v(DisasContext *s, arg_qrrr_e *a) +{ + if (!dc_isar_feature(aa64_bf16, s)) { + return false; + } + if (fp_access_check(s)) { + /* Q bit selects BFMLALB vs BFMLALT. */ + gen_gvec_op4_fpst(s, true, a->rd, a->rn, a->rm, a->rd, false, a->q, + gen_helper_gvec_bfmlal); + } + return true; +} + /* * Advanced SIMD scalar/vector x indexed element */ @@ -5946,6 +5959,20 @@ TRANS_FEAT(USDOT_vi, aa64_i8mm, do_dot_vector_idx, a, TRANS_FEAT(BFDOT_vi, aa64_bf16, do_dot_vector_idx, a, gen_helper_gvec_bfdot_idx) =20 +static bool trans_BFMLAL_vi(DisasContext *s, arg_qrrx_e *a) +{ + if (!dc_isar_feature(aa64_bf16, s)) { + return false; + } + if (fp_access_check(s)) { + /* Q bit selects BFMLALB vs BFMLALT. */ + gen_gvec_op4_fpst(s, true, a->rd, a->rn, a->rm, a->rd, 0, + (a->idx << 1) | a->q, + gen_helper_gvec_bfmlal_idx); + } + return true; +} + /* * Advanced SIMD scalar pairwise */ @@ -10952,23 +10979,13 @@ static void disas_simd_three_reg_same_extra(Disas= Context *s, uint32_t insn) } feature =3D dc_isar_feature(aa64_bf16, s); break; - case 0x1f: - switch (size) { - case 3: /* BFMLAL{B,T} */ - feature =3D dc_isar_feature(aa64_bf16, s); - break; - default: - case 1: /* BFDOT */ - unallocated_encoding(s); - return; - } - break; default: case 0x02: /* SDOT (vector) */ case 0x03: /* USDOT */ case 0x10: /* SQRDMLAH (vector) */ case 0x11: /* SQRDMLSH (vector) */ case 0x12: /* UDOT (vector) */ + case 0x1f: /* BFDOT / BFMLAL */ unallocated_encoding(s); return; } @@ -11037,17 +11054,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) case 0xd: /* BFMMLA */ gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, gen_helper_gvec_bfmml= a); return; - case 0xf: - switch (size) { - case 3: /* BFMLAL{B,T} */ - gen_gvec_op4_fpst(s, 1, rd, rn, rm, rd, false, is_q, - gen_helper_gvec_bfmlal); - break; - default: - g_assert_not_reached(); - } - return; - default: g_assert_not_reached(); } @@ -12051,24 +12057,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) case 0x0b: /* SQDMULL, SQDMULL2 */ is_long =3D true; break; - case 0x0f: - switch (size) { - case 3: /* BFMLAL{B,T} */ - if (is_scalar || !dc_isar_feature(aa64_bf16, s)) { - unallocated_encoding(s); - return; - } - /* can't set is_fp without other incorrect size checks */ - size =3D MO_16; - break; - default: - case 0: /* SUDOT */ - case 1: /* BFDOT */ - case 2: /* USDOT */ - unallocated_encoding(s); - return; - } - break; case 0x11: /* FCMLA #0 */ case 0x13: /* FCMLA #90 */ case 0x15: /* FCMLA #180 */ @@ -12089,6 +12077,7 @@ static void disas_simd_indexed(DisasContext *s, uin= t32_t insn) case 0x0c: /* SQDMULH */ case 0x0d: /* SQRDMULH */ case 0x0e: /* SDOT */ + case 0x0f: /* SUDOT / BFDOT / USDOT / BFMLAL */ case 0x10: /* MLA */ case 0x14: /* MLS */ case 0x18: /* FMLAL2 */ @@ -12171,14 +12160,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) } =20 switch (16 * u + opcode) { - case 0x0f: - switch (extract32(insn, 22, 2)) { - 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); - return; - } - g_assert_not_reached(); case 0x11: /* FCMLA #0 */ case 0x13: /* FCMLA #90 */ case 0x15: /* FCMLA #180 */ --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719355297; cv=none; d=zohomail.com; s=zohoarc; b=Xly9vYwnNaG05WVKMuPzmJYIQFpjzvNWSfkRJM8mErI74tSQMN/8Wgeg6ndjCKBHZ/uf7BfLqdxdPtMk7xh+JdqV5y76eh04ZIq3P+/S2UDN9a0opoL5FuYdIcB+MU2zH4VR2OvZeiJOkgIzLJ6Jrx/ongg7J1Dfx2Ui0+FmWf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719355297; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8IpGOhTtGrG6tQBTmNEOspGt85++snfZsV2Uj44z4n0=; b=T94yYCUWMj4R+S+WUudxDMgHVWIp0tmVKGS8zfA+2KlDvaH9dKEw4zJNS3URZEK/xR1RfjE/2FrxSBGlddg8FvH+bZNhLageRyFAYGX0pp+UoLqN8QmEKmZ7j82T2DJzUs09ynX2D+Q3kKz8kUfyEtKjPupMCF1w+tO6bwO1O9M= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719355297563964.5107816704507; Tue, 25 Jun 2024 15:41:37 -0700 (PDT) Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBMZ-0005en-CJ; Tue, 25 Jun 2024 14:58:10 -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 1sMBAF-0002NP-7E for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:46:05 -0400 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMB8m-00071e-Lt for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:44:46 -0400 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6f8ffe1b65dso2633096a34.0 for ; Tue, 25 Jun 2024 11:43:04 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719340966; x=1719945766; 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=8IpGOhTtGrG6tQBTmNEOspGt85++snfZsV2Uj44z4n0=; b=dEjvdwSzTrim0bQUVD0xxXE61izuldCChRvcrKpejb2NflqB42P1W8rPbIeOpBqu4c yJsmpx9Ee+RI2nFk5zM+xwa5m5MZ/JxjjseN8OBexyiPN7DfnKRIBXOTx/KUIav0mSMG C8jsnQEuo6WJOgIvM4yzMi9f7NOE8QAIQqf+8cU3MmKS9nN0iFb1bgGCdWhVmCrc5QKh Iw54+mAwXjHQLThbe6gjxTdCfqShzZx/eGu2x4XRcygv0ODFt+yvY2Xf9oFg6NICfuOJ aEPfTeAqlLzOUonLf6lFkHAazpjYQh+Bif3SdyZNGq0HWFyOX+28tI/22sHMTFZMGpdF fr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719340966; x=1719945766; 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=8IpGOhTtGrG6tQBTmNEOspGt85++snfZsV2Uj44z4n0=; b=xUOSHSUV0ah3eLT50crBLjptcwZqwealntbYv2w8TAX0eeHiFKGMw4DynAJrLYei00 FWEe8C6bjO1aLTKJVcthscht2V9VTtxZq1MLQjcLVrxj110aOrN6JojYbEdC2+gOJ2i7 yPytQvBzPFJTyCMDQbuvdU8pRJf1AqS01IupO+ptZe3qfVI9FQ7aiz/u0R5vrYrCZ8qX 12MFs6biUyQrcuJ/NTIWG4kKnP0jJqZvz8YZ9PrAGOvFOKrheqZSsb9rFxb5Mb7Q+9Wq 862lLa6lV3b86VhYUw4xd8n1q+c6x0d4hKiSBCYoqIkQpYWl2c3OQCcpZFcB7kQ8ppUx aq/w== X-Gm-Message-State: AOJu0YwAgs5tNEzpT9jssH6TPifPms45PBZ/Qa+qK50EvnHcmW8v/RZb E2Cxp+bwPjkYr0EpqrBqArklY80Zd16/djo6WxMIEQO6rHL8JPRHeAML43AT68TWZyTUnOBrWic U X-Google-Smtp-Source: AGHT+IFMrb6rkZljdK8FG3tuJPWzUKQbnGbr8uapI1I3xYkMl0szAcHbeQbNOHKoFX3r+pE8FjKAxQ== X-Received: by 2002:a17:902:f548:b0:1f9:d577:f532 with SMTP id d9443c01a7336-1fa0fb4980bmr131469875ad.28.1719340546064; Tue, 25 Jun 2024 11:35:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 09/13] target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree Date: Tue, 25 Jun 2024 11:35:32 -0700 Message-Id: <20240625183536.1672454-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::333; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x333.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, T_SPF_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719355298204100001 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 =20 ### Advanced SIMD scalar x indexed element =20 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_he= lper_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) =20 static bool trans_BFMLAL_v(DisasContext *s, arg_qrrr_e *a) { @@ -10949,15 +10953,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) int rot; =20 switch (u * 16 + opcode) { - case 0x04: /* SMMLA */ - case 0x14: /* UMMLA */ - case 0x05: /* USMMLA */ - if (!is_q || size !=3D MO_32) { - unallocated_encoding(s); - return; - } - feature =3D 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(Disas= Context *s, uint32_t insn) } feature =3D dc_isar_feature(aa64_fcma, s); break; - case 0x1d: /* BFMMLA */ - if (size !=3D MO_16 || !is_q) { - unallocated_encoding(s); - return; - } - feature =3D 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(DisasC= ontext *s, uint32_t insn) } =20 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(DisasCo= ntext *s, uint32_t insn) } return; =20 - case 0xd: /* BFMMLA */ - gen_gvec_op4_ool(s, is_q, rd, rn, rm, rd, 0, gen_helper_gvec_bfmml= a); - return; default: g_assert_not_reached(); } --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719353632; cv=none; d=zohomail.com; s=zohoarc; b=UpRRRtXERFJ+W0Yx/WlqW3DsW58a+wK6tfS7NzTDRF6ns65lBRseK358jlPRs994HkTSF9oTVXy2HNXB+EB5LaPkcWSVMQeSjyDwQpEjEUKiMs5VF+fMZNJ9S0SvxE9qS1HDjJfg1y938Ava5QGvCehhm2SVvG1usCYk1Q2E1RE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719353632; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=u70FGhdj6+SDi8C75S6LZSmiHm3Th47xqHQlbQAfOcI=; b=QcyCqCO8nWbAn4ogD1eSVgOyvBvT+zySgZEhQmLjnDYmcWRGeImvm0FYgBu3ePyOfnXI6ZjKzrlZEsjXmP2j4BYvqS3HGMVBVqmEwAN9C5ekzOanIvHi1VGs7WhXZnBcWdRdavxgamiacwv3cDBfwoZ5fk+c/X9BoyhfD4AuSwA= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719353632263836.6550809913556; Tue, 25 Jun 2024 15:13:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBTT-0007VV-EN; Tue, 25 Jun 2024 15:05:24 -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 1sMBBt-0002th-Pc for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:47:18 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMBBB-0007Bm-30 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:46:41 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-70656b43fd4so3399723b3a.0 for ; Tue, 25 Jun 2024 11:44:47 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719341069; x=1719945869; 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=u70FGhdj6+SDi8C75S6LZSmiHm3Th47xqHQlbQAfOcI=; b=Jodi/6k7s3Ih+jiSPmaaz8zmC7y9UxJbJ+6xOTPm37cToQHFbjJcIhegVHMprDiGR7 hd4ZSK7SmnOv9cGfZCQf0s3HFU0L9A3OnyWGjAaFvhCOvZxEcWC90sbCNrzkrCkH3fgD 0kittIlkMqFr3H9ueaaGRH+WVeI3OV2cjNDyjwCbn5rBONjJ+ljDY5H/YXhgw0uf/CdS c3awaLgB69u6ZxVeZPPz0zN+mw4jSBexGrvQNONxvVWcLxpammV78DBtLwBeFx7Qzd1h Qn5QAZops9cLhaXNHIVkw0L1Hq2yXzTkWp5CkTAOrX4mTSNh3zl+5KzLDP9g9hU2Oezi FN5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719341069; x=1719945869; 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=u70FGhdj6+SDi8C75S6LZSmiHm3Th47xqHQlbQAfOcI=; b=gUWVr/jUFOS4ZdhFMwak+/DsW2vfsWrMglPQnbCUoqiBNjg/x/MX/gRtX+J1vIbDMn YCE8KGEd1BZSQ1I0duMxAfW6olgJmOibBnk7xcvu31woVzkhoHDJ9Mw/HrPvKb+Nlqrt KBE/0BQWru70eYnc6bag6yV1UVPlWyhlTPOtT4FMg5scnpHjQ7N6CVJRV2LyJ9x1Ocih plRFgdf5xGhSQBXx5d/mRHxBC0mziT45bR6iyMd2A8WjxkPHm/SZrAtfW356Q5BPc6jD XnTqplR++J7oidTrLy4nNU3te20b645hdiTFALXtGWZOqVGhhNt0dU/4XaRCMMaYQzc1 6Wsg== X-Gm-Message-State: AOJu0YyRBVqsiJjzRtWmRYZiUIaHAzhySfQb3YC07FyVnoy5lb6VnMbg mRT811rLRcQaHF/ZJJkqPEciLWlO0ZJOZ1UcBIp2X7hI50VasFbQqJv0dssFJo2cs0QjTCxB19C l X-Google-Smtp-Source: AGHT+IExR7US1/HehZRxiSXpfdKHm0AYigFlSgCTddaoCmbwZwMcvf+HaoeSRclDw4L0pW3MMJxikQ== X-Received: by 2002:a17:903:41cd:b0:1f9:bb35:f313 with SMTP id d9443c01a7336-1fa23edc8c2mr80059025ad.30.1719340546997; Tue, 25 Jun 2024 11:35:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 10/13] target/arm: Add data argument to do_fp3_vector Date: Tue, 25 Jun 2024 11:35:33 -0700 Message-Id: <20240625183536.1672454-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719353633294100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 2697c4b305..57cdde008e 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5290,7 +5290,7 @@ TRANS(CMHS_s, do_cmop_d, a, TCG_COND_GEU) TRANS(CMEQ_s, do_cmop_d, a, TCG_COND_EQ) TRANS(CMTST_s, do_cmop_d, a, TCG_COND_TSTNE) =20 -static bool do_fp3_vector(DisasContext *s, arg_qrrr_e *a, +static bool do_fp3_vector(DisasContext *s, arg_qrrr_e *a, int data, gen_helper_gvec_3_ptr * const fns[3]) { MemOp esz =3D a->esz; @@ -5313,7 +5313,7 @@ static bool do_fp3_vector(DisasContext *s, arg_qrrr_e= *a, } if (fp_access_check(s)) { gen_gvec_op3_fpst(s, a->q, a->rd, a->rn, a->rm, - esz =3D=3D MO_16, 0, fns[esz - 1]); + esz =3D=3D MO_16, data, fns[esz - 1]); } return true; } @@ -5323,168 +5323,168 @@ static gen_helper_gvec_3_ptr * const f_vector_fad= d[3] =3D { gen_helper_gvec_fadd_s, gen_helper_gvec_fadd_d, }; -TRANS(FADD_v, do_fp3_vector, a, f_vector_fadd) +TRANS(FADD_v, do_fp3_vector, a, 0, f_vector_fadd) =20 static gen_helper_gvec_3_ptr * const f_vector_fsub[3] =3D { gen_helper_gvec_fsub_h, gen_helper_gvec_fsub_s, gen_helper_gvec_fsub_d, }; -TRANS(FSUB_v, do_fp3_vector, a, f_vector_fsub) +TRANS(FSUB_v, do_fp3_vector, a, 0, f_vector_fsub) =20 static gen_helper_gvec_3_ptr * const f_vector_fdiv[3] =3D { gen_helper_gvec_fdiv_h, gen_helper_gvec_fdiv_s, gen_helper_gvec_fdiv_d, }; -TRANS(FDIV_v, do_fp3_vector, a, f_vector_fdiv) +TRANS(FDIV_v, do_fp3_vector, a, 0, f_vector_fdiv) =20 static gen_helper_gvec_3_ptr * const f_vector_fmul[3] =3D { gen_helper_gvec_fmul_h, gen_helper_gvec_fmul_s, gen_helper_gvec_fmul_d, }; -TRANS(FMUL_v, do_fp3_vector, a, f_vector_fmul) +TRANS(FMUL_v, do_fp3_vector, a, 0, f_vector_fmul) =20 static gen_helper_gvec_3_ptr * const f_vector_fmax[3] =3D { gen_helper_gvec_fmax_h, gen_helper_gvec_fmax_s, gen_helper_gvec_fmax_d, }; -TRANS(FMAX_v, do_fp3_vector, a, f_vector_fmax) +TRANS(FMAX_v, do_fp3_vector, a, 0, f_vector_fmax) =20 static gen_helper_gvec_3_ptr * const f_vector_fmin[3] =3D { gen_helper_gvec_fmin_h, gen_helper_gvec_fmin_s, gen_helper_gvec_fmin_d, }; -TRANS(FMIN_v, do_fp3_vector, a, f_vector_fmin) +TRANS(FMIN_v, do_fp3_vector, a, 0, f_vector_fmin) =20 static gen_helper_gvec_3_ptr * const f_vector_fmaxnm[3] =3D { gen_helper_gvec_fmaxnum_h, gen_helper_gvec_fmaxnum_s, gen_helper_gvec_fmaxnum_d, }; -TRANS(FMAXNM_v, do_fp3_vector, a, f_vector_fmaxnm) +TRANS(FMAXNM_v, do_fp3_vector, a, 0, f_vector_fmaxnm) =20 static gen_helper_gvec_3_ptr * const f_vector_fminnm[3] =3D { gen_helper_gvec_fminnum_h, gen_helper_gvec_fminnum_s, gen_helper_gvec_fminnum_d, }; -TRANS(FMINNM_v, do_fp3_vector, a, f_vector_fminnm) +TRANS(FMINNM_v, do_fp3_vector, a, 0, f_vector_fminnm) =20 static gen_helper_gvec_3_ptr * const f_vector_fmulx[3] =3D { gen_helper_gvec_fmulx_h, gen_helper_gvec_fmulx_s, gen_helper_gvec_fmulx_d, }; -TRANS(FMULX_v, do_fp3_vector, a, f_vector_fmulx) +TRANS(FMULX_v, do_fp3_vector, a, 0, f_vector_fmulx) =20 static gen_helper_gvec_3_ptr * const f_vector_fmla[3] =3D { gen_helper_gvec_vfma_h, gen_helper_gvec_vfma_s, gen_helper_gvec_vfma_d, }; -TRANS(FMLA_v, do_fp3_vector, a, f_vector_fmla) +TRANS(FMLA_v, do_fp3_vector, a, 0, f_vector_fmla) =20 static gen_helper_gvec_3_ptr * const f_vector_fmls[3] =3D { gen_helper_gvec_vfms_h, gen_helper_gvec_vfms_s, gen_helper_gvec_vfms_d, }; -TRANS(FMLS_v, do_fp3_vector, a, f_vector_fmls) +TRANS(FMLS_v, do_fp3_vector, a, 0, f_vector_fmls) =20 static gen_helper_gvec_3_ptr * const f_vector_fcmeq[3] =3D { gen_helper_gvec_fceq_h, gen_helper_gvec_fceq_s, gen_helper_gvec_fceq_d, }; -TRANS(FCMEQ_v, do_fp3_vector, a, f_vector_fcmeq) +TRANS(FCMEQ_v, do_fp3_vector, a, 0, f_vector_fcmeq) =20 static gen_helper_gvec_3_ptr * const f_vector_fcmge[3] =3D { gen_helper_gvec_fcge_h, gen_helper_gvec_fcge_s, gen_helper_gvec_fcge_d, }; -TRANS(FCMGE_v, do_fp3_vector, a, f_vector_fcmge) +TRANS(FCMGE_v, do_fp3_vector, a, 0, f_vector_fcmge) =20 static gen_helper_gvec_3_ptr * const f_vector_fcmgt[3] =3D { gen_helper_gvec_fcgt_h, gen_helper_gvec_fcgt_s, gen_helper_gvec_fcgt_d, }; -TRANS(FCMGT_v, do_fp3_vector, a, f_vector_fcmgt) +TRANS(FCMGT_v, do_fp3_vector, a, 0, f_vector_fcmgt) =20 static gen_helper_gvec_3_ptr * const f_vector_facge[3] =3D { gen_helper_gvec_facge_h, gen_helper_gvec_facge_s, gen_helper_gvec_facge_d, }; -TRANS(FACGE_v, do_fp3_vector, a, f_vector_facge) +TRANS(FACGE_v, do_fp3_vector, a, 0, f_vector_facge) =20 static gen_helper_gvec_3_ptr * const f_vector_facgt[3] =3D { gen_helper_gvec_facgt_h, gen_helper_gvec_facgt_s, gen_helper_gvec_facgt_d, }; -TRANS(FACGT_v, do_fp3_vector, a, f_vector_facgt) +TRANS(FACGT_v, do_fp3_vector, a, 0, f_vector_facgt) =20 static gen_helper_gvec_3_ptr * const f_vector_fabd[3] =3D { gen_helper_gvec_fabd_h, gen_helper_gvec_fabd_s, gen_helper_gvec_fabd_d, }; -TRANS(FABD_v, do_fp3_vector, a, f_vector_fabd) +TRANS(FABD_v, do_fp3_vector, a, 0, f_vector_fabd) =20 static gen_helper_gvec_3_ptr * const f_vector_frecps[3] =3D { gen_helper_gvec_recps_h, gen_helper_gvec_recps_s, gen_helper_gvec_recps_d, }; -TRANS(FRECPS_v, do_fp3_vector, a, f_vector_frecps) +TRANS(FRECPS_v, do_fp3_vector, a, 0, f_vector_frecps) =20 static gen_helper_gvec_3_ptr * const f_vector_frsqrts[3] =3D { gen_helper_gvec_rsqrts_h, gen_helper_gvec_rsqrts_s, gen_helper_gvec_rsqrts_d, }; -TRANS(FRSQRTS_v, do_fp3_vector, a, f_vector_frsqrts) +TRANS(FRSQRTS_v, do_fp3_vector, a, 0, f_vector_frsqrts) =20 static gen_helper_gvec_3_ptr * const f_vector_faddp[3] =3D { gen_helper_gvec_faddp_h, gen_helper_gvec_faddp_s, gen_helper_gvec_faddp_d, }; -TRANS(FADDP_v, do_fp3_vector, a, f_vector_faddp) +TRANS(FADDP_v, do_fp3_vector, a, 0, f_vector_faddp) =20 static gen_helper_gvec_3_ptr * const f_vector_fmaxp[3] =3D { gen_helper_gvec_fmaxp_h, gen_helper_gvec_fmaxp_s, gen_helper_gvec_fmaxp_d, }; -TRANS(FMAXP_v, do_fp3_vector, a, f_vector_fmaxp) +TRANS(FMAXP_v, do_fp3_vector, a, 0, f_vector_fmaxp) =20 static gen_helper_gvec_3_ptr * const f_vector_fminp[3] =3D { gen_helper_gvec_fminp_h, gen_helper_gvec_fminp_s, gen_helper_gvec_fminp_d, }; -TRANS(FMINP_v, do_fp3_vector, a, f_vector_fminp) +TRANS(FMINP_v, do_fp3_vector, a, 0, f_vector_fminp) =20 static gen_helper_gvec_3_ptr * const f_vector_fmaxnmp[3] =3D { gen_helper_gvec_fmaxnump_h, gen_helper_gvec_fmaxnump_s, gen_helper_gvec_fmaxnump_d, }; -TRANS(FMAXNMP_v, do_fp3_vector, a, f_vector_fmaxnmp) +TRANS(FMAXNMP_v, do_fp3_vector, a, 0, f_vector_fmaxnmp) =20 static gen_helper_gvec_3_ptr * const f_vector_fminnmp[3] =3D { gen_helper_gvec_fminnump_h, gen_helper_gvec_fminnump_s, gen_helper_gvec_fminnump_d, }; -TRANS(FMINNMP_v, do_fp3_vector, a, f_vector_fminnmp) +TRANS(FMINNMP_v, do_fp3_vector, a, 0, f_vector_fminnmp) =20 static bool do_fmlal(DisasContext *s, arg_qrrr_e *a, bool is_s, bool is_2) { --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719342459; cv=none; d=zohomail.com; s=zohoarc; b=aibnRzmt/tov5Qi0avEeqnItGXknzheT2MXaaDGwv+90lwA3BOawaEXr4OreqnPaWb5P7Hu/xhsEFnMSkvnQKn+3q7Czw0WIJ0xRAVCHGQLrbJHzSonphXyzoR4bwDqrsjSdQNcZ5Z5hngkTH1+7IPjfwyu3Mw9hN5sUX9v+pMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719342459; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CMjhGlcExekQf+5VSLIRvctS+6B2uJGjUo3v3Mg5lsk=; b=SUwyw9p8JuFbFaQRWeSgoJsv1SYnMS5umFCZqlRuOzPsBd/iF/anSTpOYmeqkMdwvyFGH8zPMmUGsF4ga6QVXNOUvyje2yDNWAWhYXnc/cqw29pEAmEFGUhaMNVk5lFzRVr+wvW986KOdZ58T0xpjJrDh01D4arWSWZyCeKl4cA= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719342459763441.59925099696954; Tue, 25 Jun 2024 12:07:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBJj-0004z6-Kl; Tue, 25 Jun 2024 14:55:13 -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 1sMBAL-0002Ql-JN for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:45:37 -0400 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMB9b-00078s-Vn for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:45:01 -0400 Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-4405e343dd8so24501651cf.1 for ; Tue, 25 Jun 2024 11:43:58 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719341024; x=1719945824; 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=CMjhGlcExekQf+5VSLIRvctS+6B2uJGjUo3v3Mg5lsk=; b=ariL5+NdldnEt2ECqz0DXmP2RFuPl3JdlVk3spA8c/DABHrlDOKj5x1Xf8mYtGCg6m JnCEchI1uxXlWnMSfeb9raMYjk1tN8E6inUqXlZ/QPRkpBYHF/bJoKyW97/th3ZiyiPr YwlAExcVUoEWjT5OrN4Q1/zPU/VY2LfTnlrQeDKMbHssFyCezMNpseVmRS5Zqe8aSitq wWxHc8RbD4J1NJdcHGSHe1VRS06cAzP1ajOQy3ZvIlYlHCmKNKDGoJOMmRVkQ9kWyD7k zCGqwZ+6R6SVGROEc/y4nPO5mSEddNvhmdLDOCDiLBmnbxVlJZRNjNFCVsEH+hDE/iG7 6NOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719341024; x=1719945824; 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=CMjhGlcExekQf+5VSLIRvctS+6B2uJGjUo3v3Mg5lsk=; b=BeldFcJul9n64E6i62/w6SZ/V4E8ptu3LggjRQdftJlpIvX/dIRYOnyYbDbniuMSon r96VualNjDo06gQlwQhf15zewGnIocBb5VSmpJjqeXvSH8yiqvK+j7R42nu+EzJPIHDW OP8XwxlJ70umC1LpJjFl6ecFwXOx7VGq28kEGazBRww2VyuzRtNosvQexMaWv+vhFZ7+ THlhT8ZsVApikZ8ZOzauyGPdZZJxRfEkIQdhsPbQob4fB1kphQWdZyREXho5Smmiya0w 1olzWkCZ37+nxiRkf/p0Njpl/0SRIKWBonDD6dUB35qUTdfluERtiLbT3ODVT9sUVyT/ IrzQ== X-Gm-Message-State: AOJu0YxQPa+7ABaOPDx7801IcU+4qC00+eVmAe8ROMSfjudoA4UBLB6l benLPKRbeHVZn3BwKaQXUZK73t3Q1RN+kwx3cVkUM7nR/Cp66LVyCnLwE8yIbNiAvG4sHnZWfQc C X-Google-Smtp-Source: AGHT+IFeMMKYcZXRzdeQDN8zTw8EhlztVceHIlwe0SjXLlW/mXBavKsYoeO1y0NcimQ3YD0u7ZROdw== X-Received: by 2002:a17:902:e846:b0:1f6:87c:6f with SMTP id d9443c01a7336-1fa23f36020mr81750205ad.62.1719340548123; Tue, 25 Jun 2024 11:35:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 11/13] target/arm: Convert FCADD to decodetree Date: Tue, 25 Jun 2024 11:35:34 -0700 Message-Id: <20240625183536.1672454-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::834; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x834.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719342460712100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 3 +++ target/arm/tcg/translate-a64.c | 33 ++++++++++----------------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index b2c7e36969..f330919851 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -957,6 +957,9 @@ SMMLA 0100 1110 100 ..... 10100 1 ..... .....= @rrr_q1e0 UMMLA 0110 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 USMMLA 0100 1110 100 ..... 10101 1 ..... ..... @rrr_q1e0 =20 +FCADD_90 0.10 1110 ..0 ..... 11100 1 ..... ..... @qrrr_e +FCADD_270 0.10 1110 ..0 ..... 11110 1 ..... ..... @qrrr_e + ### Advanced SIMD scalar x indexed element =20 FMUL_si 0101 1111 00 .. .... 1001 . 0 ..... ..... @rrx_h diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 57cdde008e..a1b338263f 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5623,6 +5623,14 @@ static bool trans_BFMLAL_v(DisasContext *s, arg_qrrr= _e *a) return true; } =20 +static gen_helper_gvec_3_ptr * const f_vector_fcadd[3] =3D { + gen_helper_gvec_fcaddh, + gen_helper_gvec_fcadds, + gen_helper_gvec_fcaddd, +}; +TRANS_FEAT(FCADD_90, aa64_fcma, do_fp3_vector, a, 0, f_vector_fcadd) +TRANS_FEAT(FCADD_270, aa64_fcma, do_fp3_vector, a, 1, f_vector_fcadd) + /* * Advanced SIMD scalar/vector x indexed element */ @@ -10957,8 +10965,6 @@ static void disas_simd_three_reg_same_extra(DisasCo= ntext *s, uint32_t insn) case 0x19: /* FCMLA, #90 */ case 0x1a: /* FCMLA, #180 */ case 0x1b: /* FCMLA, #270 */ - case 0x1c: /* FCADD, #90 */ - case 0x1e: /* FCADD, #270 */ if (size =3D=3D 0 || (size =3D=3D 1 && !dc_isar_feature(aa64_fp16, s)) || (size =3D=3D 3 && !is_q)) { @@ -10976,7 +10982,9 @@ static void disas_simd_three_reg_same_extra(DisasCo= ntext *s, uint32_t insn) case 0x11: /* SQRDMLSH (vector) */ case 0x12: /* UDOT (vector) */ case 0x14: /* UMMLA */ + case 0x1c: /* FCADD, #90 */ case 0x1d: /* BFMMLA */ + case 0x1e: /* FCADD, #270 */ case 0x1f: /* BFDOT / BFMLAL */ unallocated_encoding(s); return; @@ -11013,27 +11021,6 @@ static void disas_simd_three_reg_same_extra(DisasC= ontext *s, uint32_t insn) } return; =20 - case 0xc: /* FCADD, #90 */ - case 0xe: /* FCADD, #270 */ - rot =3D extract32(opcode, 1, 1); - switch (size) { - case 1: - gen_gvec_op3_fpst(s, is_q, rd, rn, rm, size =3D=3D 1, rot, - gen_helper_gvec_fcaddh); - break; - case 2: - gen_gvec_op3_fpst(s, is_q, rd, rn, rm, size =3D=3D 1, rot, - gen_helper_gvec_fcadds); - break; - case 3: - gen_gvec_op3_fpst(s, is_q, rd, rn, rm, size =3D=3D 1, rot, - gen_helper_gvec_fcaddd); - break; - default: - g_assert_not_reached(); - } - return; - default: g_assert_not_reached(); } --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719345316; cv=none; d=zohomail.com; s=zohoarc; b=CPJGTgeLhq9Dg4TwbyBg07UGeHsNINwpZmqBUxODZSLYRz0S3NSAdoWgeUFtA7smE4OX+SDhO+HRodCOwKxdOglAtg0GalHuuCun5dJGuHSJ36v8Mxxjxq08UKIQ/LEMNJSuz55QwmwTMqKNdCs/cmswiJ6OGafkoUiK1ljg4gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719345316; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1/yBAbsCLBOpqzRXUHLaN5XW4PU7cxhMwdfGxxg8ELk=; b=S0LE0SxURMiHiFR4VCvpyBJhMFfTjYOEI087G3jPB/OY3IZmfRhbSDLPD+gp3WFTtH40i3RrqDUtr+AEj69l3FmKRPx87B3mlfUug6o+GcCH74t0ZSU3UFiSlGPV8pbnemlH2VLDgrIQMWURabDtqdDt+eCODx05EjVuDc6E8XE= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719345316575843.828525485585; Tue, 25 Jun 2024 12:55:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMC6E-0002IX-3N; Tue, 25 Jun 2024 15:45:17 -0400 Received: from [2001:470:142:3::10] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMC3E-0001Py-GA for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:44:17 -0400 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMC2E-0005hp-7B for qemu-devel@nongnu.org; Tue, 25 Jun 2024 15:41:48 -0400 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7eeea388a8eso234636939f.2 for ; Tue, 25 Jun 2024 12:40:17 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719344410; x=1719949210; 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=1/yBAbsCLBOpqzRXUHLaN5XW4PU7cxhMwdfGxxg8ELk=; b=ia4716n5sU9+KlRAHMLfZjJAymOQKhY1peR8Vc4Pgdh9YUwxgiEr0khm3+9ed00v3M iOa9NXsBZTXJ/WnFUlnv5sKLppJ1viz5ETrS0gg23+5IVXnVj+ao5NINeL9OtgYfzapW S5QuI4YGVZGUBCJIvFT9y5uXOhJJJAJLGIlHlC3kpeoQ602u49rbPUmbb1qRlfrPiRah qwKr7fYy4HSob5MX3SSj6VVjfT7SGqpSzBxIjDnWIPojnvS9eWWHFf2Bh2PquuV9nX2y cgmXVGIYVNKghnsSZgcReKQEACycXqaz80AmMt+hUjImfsf5FHhv1K7tJOtDlWwxPb4P y8Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719344410; x=1719949210; 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=1/yBAbsCLBOpqzRXUHLaN5XW4PU7cxhMwdfGxxg8ELk=; b=kV8AWkEKlt2XDc72NFF3c9NURPhWGKk4KK7MKgoULouT/frU/9zQ2SrFUdwo6YPEHr ItV/iNwYywu8g/lckOuE6jVMOJ3+TBXsQUWBTvje03C3fNM+8Vnc7MK0HW3bFgPIqGx4 byOcWc9L6SqQr2jBmXVVVJCtTeJDukk++wSQGUenVy+CTXEkPCh7GrB15uCFvC5vnvkq LC8yy4CqoBDudEPHHjfy18ZWC7E04gkgZa4ir77WLPS6yi4hL6Q2SFxxT8gyFRXjij5n MILQNVmvqtAtOvLPiiWilnIdV2lgdPbXh2X74TWgiC3ziRKy2xzAsnRsm6SJXX9l//IX 7Yrg== X-Gm-Message-State: AOJu0YxckpcKXlWrpukSxM6p/zxbLI68D3f8zAE4TEGq+h1GAmDHcVWG 3uhc4OORxeHlMcqcQCiK90nfh8qt1667U3pdq4lZuvQx8IKPDy9tCyNkzEhA71ui25zYam8VFZX S X-Google-Smtp-Source: AGHT+IGAr3EMIMVn1tHmyZ/iNeiGBpog9WxixSJsvwRa2DE5lIBf7MYYp0J4AoIeeMpu75nRwfYfKA== X-Received: by 2002:a17:903:22d1:b0:1fa:2ae7:cc79 with SMTP id d9443c01a7336-1fa2ae7d470mr90117385ad.11.1719340549074; Tue, 25 Jun 2024 11:35:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v2 12/13] target/arm: Convert FCMLA to decodetree Date: Tue, 25 Jun 2024 11:35:35 -0700 Message-Id: <20240625183536.1672454-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::d2c; envelope-from=richard.henderson@linaro.org; helo=mail-io1-xd2c.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719345317338100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 6 + target/arm/tcg/translate-a64.c | 238 ++++++++++----------------------- 2 files changed, 74 insertions(+), 170 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index f330919851..223eac3cac 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -960,6 +960,8 @@ USMMLA 0100 1110 100 ..... 10101 1 ..... .....= @rrr_q1e0 FCADD_90 0.10 1110 ..0 ..... 11100 1 ..... ..... @qrrr_e FCADD_270 0.10 1110 ..0 ..... 11110 1 ..... ..... @qrrr_e =20 +FCMLA_v 0 q:1 10 1110 esz:2 0 rm:5 110 rot:2 1 rn:5 rd:5 + ### Advanced SIMD scalar x indexed element =20 FMUL_si 0101 1111 00 .. .... 1001 . 0 ..... ..... @rrx_h @@ -1041,6 +1043,10 @@ USDOT_vi 0.00 1111 10 .. .... 1111 . 0 ..... = ..... @qrrx_s BFDOT_vi 0.00 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_s BFMLAL_vi 0.00 1111 11 .. .... 1111 . 0 ..... ..... @qrrx_h =20 +FCMLA_vi 0 0 10 1111 01 idx:1 rm:5 0 rot:2 1 0 0 rn:5 rd:5 esz=3D1 = q=3D0 +FCMLA_vi 0 1 10 1111 01 . rm:5 0 rot:2 1 . 0 rn:5 rd:5 esz=3D1 idx= =3D%hl q=3D1 +FCMLA_vi 0 1 10 1111 10 0 rm:5 0 rot:2 1 idx:1 0 rn:5 rd:5 esz=3D2 = q=3D1 + # Floating-point conditional select =20 FCSEL 0001 1110 .. 1 rm:5 cond:4 11 rn:5 rd:5 esz=3D%esz_hsd diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index a1b338263f..161fa2659c 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5631,6 +5631,39 @@ static gen_helper_gvec_3_ptr * const f_vector_fcadd[= 3] =3D { TRANS_FEAT(FCADD_90, aa64_fcma, do_fp3_vector, a, 0, f_vector_fcadd) TRANS_FEAT(FCADD_270, aa64_fcma, do_fp3_vector, a, 1, f_vector_fcadd) =20 +static bool trans_FCMLA_v(DisasContext *s, arg_FCMLA_v *a) +{ + gen_helper_gvec_4_ptr *fn; + + if (!dc_isar_feature(aa64_fcma, s)) { + return false; + } + switch (a->esz) { + case MO_64: + if (!a->q) { + return false; + } + fn =3D gen_helper_gvec_fcmlad; + break; + case MO_32: + fn =3D gen_helper_gvec_fcmlas; + break; + case MO_16: + if (!dc_isar_feature(aa64_fp16, s)) { + return false; + } + fn =3D gen_helper_gvec_fcmlah; + break; + default: + return false; + } + if (fp_access_check(s)) { + gen_gvec_op4_fpst(s, a->q, a->rd, a->rn, a->rm, a->rd, + a->esz =3D=3D MO_16, a->rot, fn); + } + return true; +} + /* * Advanced SIMD scalar/vector x indexed element */ @@ -5985,6 +6018,33 @@ static bool trans_BFMLAL_vi(DisasContext *s, arg_qrr= x_e *a) return true; } =20 +static bool trans_FCMLA_vi(DisasContext *s, arg_FCMLA_vi *a) +{ + gen_helper_gvec_4_ptr *fn; + + if (!dc_isar_feature(aa64_fcma, s)) { + return false; + } + switch (a->esz) { + case MO_16: + if (!dc_isar_feature(aa64_fp16, s)) { + return false; + } + fn =3D gen_helper_gvec_fcmlah_idx; + break; + case MO_32: + fn =3D gen_helper_gvec_fcmlas_idx; + break; + default: + g_assert_not_reached(); + } + if (fp_access_check(s)) { + gen_gvec_op4_fpst(s, a->q, a->rd, a->rn, a->rm, a->rd, + a->esz =3D=3D MO_16, (a->idx << 2) | a->rot, fn); + } + return true; +} + /* * Advanced SIMD scalar pairwise */ @@ -10942,90 +11002,6 @@ static void disas_simd_three_reg_diff(DisasContext= *s, uint32_t insn) } } =20 -/* AdvSIMD three same extra - * 31 30 29 28 24 23 22 21 20 16 15 14 11 10 9 5 4 0 - * +---+---+---+-----------+------+---+------+---+--------+---+----+----+ - * | 0 | Q | U | 0 1 1 1 0 | size | 0 | Rm | 1 | opcode | 1 | Rn | Rd | - * +---+---+---+-----------+------+---+------+---+--------+---+----+----+ - */ -static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) -{ - int rd =3D extract32(insn, 0, 5); - int rn =3D extract32(insn, 5, 5); - int opcode =3D extract32(insn, 11, 4); - int rm =3D extract32(insn, 16, 5); - int size =3D extract32(insn, 22, 2); - bool u =3D extract32(insn, 29, 1); - bool is_q =3D extract32(insn, 30, 1); - bool feature; - int rot; - - switch (u * 16 + opcode) { - case 0x18: /* FCMLA, #0 */ - case 0x19: /* FCMLA, #90 */ - case 0x1a: /* FCMLA, #180 */ - case 0x1b: /* FCMLA, #270 */ - if (size =3D=3D 0 - || (size =3D=3D 1 && !dc_isar_feature(aa64_fp16, s)) - || (size =3D=3D 3 && !is_q)) { - unallocated_encoding(s); - return; - } - feature =3D dc_isar_feature(aa64_fcma, 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 0x1c: /* FCADD, #90 */ - case 0x1d: /* BFMMLA */ - case 0x1e: /* FCADD, #270 */ - case 0x1f: /* BFDOT / BFMLAL */ - unallocated_encoding(s); - return; - } - if (!feature) { - unallocated_encoding(s); - return; - } - if (!fp_access_check(s)) { - return; - } - - switch (opcode) { - case 0x8: /* FCMLA, #0 */ - case 0x9: /* FCMLA, #90 */ - case 0xa: /* FCMLA, #180 */ - case 0xb: /* FCMLA, #270 */ - rot =3D extract32(opcode, 0, 2); - switch (size) { - case 1: - gen_gvec_op4_fpst(s, is_q, rd, rn, rm, rd, true, rot, - gen_helper_gvec_fcmlah); - break; - case 2: - gen_gvec_op4_fpst(s, is_q, rd, rn, rm, rd, false, rot, - gen_helper_gvec_fcmlas); - break; - case 3: - gen_gvec_op4_fpst(s, is_q, rd, rn, rm, rd, false, rot, - gen_helper_gvec_fcmlad); - break; - default: - g_assert_not_reached(); - } - return; - - default: - g_assert_not_reached(); - } -} - static void handle_2misc_widening(DisasContext *s, int opcode, bool is_q, int size, int rn, int rd) { @@ -12001,10 +11977,7 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) int rn =3D extract32(insn, 5, 5); int rd =3D extract32(insn, 0, 5); bool is_long =3D false; - int is_fp =3D 0; - bool is_fp16 =3D false; int index; - TCGv_ptr fpst; =20 switch (16 * u + opcode) { case 0x02: /* SMLAL, SMLAL2 */ @@ -12024,16 +11997,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) case 0x0b: /* SQDMULL, SQDMULL2 */ is_long =3D true; break; - case 0x11: /* FCMLA #0 */ - case 0x13: /* FCMLA #90 */ - case 0x15: /* FCMLA #180 */ - case 0x17: /* FCMLA #270 */ - if (is_scalar || !dc_isar_feature(aa64_fcma, s)) { - unallocated_encoding(s); - return; - } - is_fp =3D 2; - break; default: case 0x00: /* FMLAL */ case 0x01: /* FMLA */ @@ -12046,7 +12009,11 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) case 0x0e: /* SDOT */ case 0x0f: /* SUDOT / BFDOT / USDOT / BFMLAL */ case 0x10: /* MLA */ + case 0x11: /* FCMLA #0 */ + case 0x13: /* FCMLA #90 */ case 0x14: /* MLS */ + case 0x15: /* FCMLA #180 */ + case 0x17: /* FCMLA #270 */ case 0x18: /* FMLAL2 */ case 0x19: /* FMULX */ case 0x1c: /* FMLSL2 */ @@ -12057,46 +12024,12 @@ static void disas_simd_indexed(DisasContext *s, u= int32_t insn) return; } =20 - switch (is_fp) { - case 1: /* normal fp */ - unallocated_encoding(s); /* in decodetree */ - return; - - case 2: /* complex fp */ - /* Each indexable element is a complex pair. */ - size +=3D 1; - switch (size) { - case MO_32: - if (h && !is_q) { - unallocated_encoding(s); - return; - } - is_fp16 =3D true; - break; - case MO_64: - break; - default: - unallocated_encoding(s); - return; - } - break; - - default: /* integer */ - switch (size) { - case MO_8: - case MO_64: - unallocated_encoding(s); - return; - } - break; - } - if (is_fp16 && !dc_isar_feature(aa64_fp16, s)) { - unallocated_encoding(s); - return; - } - /* Given MemOp size, adjust register and indexing. */ switch (size) { + case MO_8: + case MO_64: + unallocated_encoding(s); + return; case MO_16: index =3D h << 2 | l << 1 | m; break; @@ -12104,14 +12037,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) index =3D h << 1 | l; rm |=3D m << 4; break; - case MO_64: - if (l || !is_q) { - unallocated_encoding(s); - return; - } - index =3D h; - rm |=3D m << 4; - break; default: g_assert_not_reached(); } @@ -12120,32 +12045,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) return; } =20 - if (is_fp) { - fpst =3D fpstatus_ptr(is_fp16 ? FPST_FPCR_F16 : FPST_FPCR); - } else { - fpst =3D NULL; - } - - switch (16 * u + opcode) { - case 0x11: /* FCMLA #0 */ - case 0x13: /* FCMLA #90 */ - case 0x15: /* FCMLA #180 */ - case 0x17: /* FCMLA #270 */ - { - int rot =3D extract32(insn, 13, 2); - int data =3D (index << 2) | rot; - tcg_gen_gvec_4_ptr(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_full_reg_offset(s, rm), - vec_full_reg_offset(s, rd), fpst, - is_q ? 16 : 8, vec_full_reg_size(s), data, - size =3D=3D MO_64 - ? gen_helper_gvec_fcmlas_idx - : gen_helper_gvec_fcmlah_idx); - } - return; - } - if (size =3D=3D 3) { g_assert_not_reached(); } else if (!is_long) { @@ -12407,7 +12306,6 @@ static void disas_simd_indexed(DisasContext *s, uin= t32_t insn) */ static const AArch64DecodeTable data_proc_simd[] =3D { /* pattern , mask , fn */ - { 0x0e008400, 0x9f208400, disas_simd_three_reg_same_extra }, { 0x0e200000, 0x9f200c00, disas_simd_three_reg_diff }, { 0x0e200800, 0x9f3e0c00, disas_simd_two_reg_misc }, { 0x0e300800, 0x9f3e0c00, disas_simd_across_lanes }, --=20 2.34.1 From nobody Sun Nov 24 22:50:42 2024 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=1719342253; cv=none; d=zohomail.com; s=zohoarc; b=IF0u8kbQKn/PHMdmM+0KxnvCq4r6CnJGWtbs7RxbgxoTNOfy0jxzDA/YyGq1eWrQEKf9zQIwId366f5IIZE+D6c4gTtlRxo4wIwwDfhHccAcvEIGJJsIKrO3yVeWYfGWMDlJVEDkqJFaFT+SHSEQi7delAUoKLKyedc2BcHAHUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719342253; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PecZkInRMvU6dxX9NAjaqUD1RvRTPZR33lK52/GwzZA=; b=P+Qsdj+TJurteSjCUg56gaAnCWWg7+IpSNtVmAOpjyBMqVP+9uVLKREf7eZyTomKLIeaIhaVxIyr2ixcGt8GI4a5hBf+iM8aokCoXGrxEqisvtQAlF8XbhFB1GnSs8oQUOzhNC0wsDKirQ7vzkxYS7ef3YG8JvafPMlS5JIi1rs= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719342253899924.8503036072393; Tue, 25 Jun 2024 12:04:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMBGo-0003yj-6L; Tue, 25 Jun 2024 14:52:08 -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 1sMB5B-00019M-P0 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:40:09 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMB3d-00067T-MT for qemu-devel@nongnu.org; Tue, 25 Jun 2024 14:39:45 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1f9de13d6baso40991565ad.2 for ; Tue, 25 Jun 2024 11:36:14 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c6027sm84693235ad.133.2024.06.25.11.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 11:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719340550; x=1719945350; 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=PecZkInRMvU6dxX9NAjaqUD1RvRTPZR33lK52/GwzZA=; b=SvdAjfFZtIbKTxqJtVXM3wglGZPuDT1qt/9pjckoktNRO8XOdBlwZvf/qRa/bGLOgM 3J1zn3e5ogTgLJcLymcooFC3b3Q8CDYRFNb5m+GFesT1KtRfwJqRrBwe5Gq/Kbx/dlNZ P/dA/o4GYGJlS+vxoCTSoSYb3jULMt5DxpPgjW31pL0/hqcHOu2L27KMZWSg2IIiqYPf is3/eneAzAPscYdo4+zjHe6jv6+zpnlGc9G5Mua+YnkmTTO1Dm2QFtMERaYTyRjt7SxJ 9lX7U3kttYXWHwCk/u94PQayH39+Qt0+4QrWirAdjrPzQvudAzXMo/7wX8+xQ3q3zQ50 fnfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719340550; x=1719945350; 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=PecZkInRMvU6dxX9NAjaqUD1RvRTPZR33lK52/GwzZA=; b=edyRha0hYCHqbB7os2vDdCl5Iqm1LPCKQqan3CtKQqViFQfWSA9/9MVRHHArp81mU6 EG6WkJd9L9WT+PNW6Ggx97DVzzefp+2KFd/gL8fV+pCWmfAdhYZjdFap+LxJH8Z33t0w PoSv9fLsKDM2nMAsDxl+jurRKrVfL/i20wIOAVZw7jU8IX1Lat+5H4iA2h5udDfzMPjs f31IHe0mOaidRBWz9cA+nI10kzBmdPi0dGy/xr3CixT7SQhxAKlRZyJpaZF94K7jElS6 LRgfC45JDYimDKC+bUAEfNmO9jaIxbjxUJ9sY2Rw/4XRbmDYgg6BcEjZNY8kxJFGqYLh TYYw== X-Gm-Message-State: AOJu0YyJtV4CJpYpw65HsfFzxilDcW0NUc94Kus4ts67B/GemiUxFJPt xPOyd4bNMQp+D5rfeHYGnYV56Hzn35l/MkEWkjDvSMByhCQbJYEDvWLiNGRT/aT4UPJbb+w6oxD I X-Google-Smtp-Source: AGHT+IHkxUor8eUO37ZgszVYd3+UVvBM5JR18FeOUzLjJD7JkggjEkzFPDMMYUSUwKXbeRxCptgBUg== X-Received: by 2002:a17:902:ea03:b0:1f9:c1f0:7150 with SMTP id d9443c01a7336-1fa23f224a5mr85343315ad.8.1719340549928; Tue, 25 Jun 2024 11:35:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v2 13/13] target/arm: Delete dead code from disas_simd_indexed Date: Tue, 25 Jun 2024 11:35:36 -0700 Message-Id: <20240625183536.1672454-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625183536.1672454-1-richard.henderson@linaro.org> References: <20240625183536.1672454-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::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719342255759100001 Content-Type: text/plain; charset="utf-8" MLA, MLS, SQDMULH, SQRDMULH, were converted with 8db93dcd3def and f80701cb44d, and this code should have been removed then. Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 93 ---------------------------------- 1 file changed, 93 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 161fa2659c..6c07aeaf3b 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -11976,7 +11976,6 @@ static void disas_simd_indexed(DisasContext *s, uin= t32_t insn) int h =3D extract32(insn, 11, 1); int rn =3D extract32(insn, 5, 5); int rd =3D extract32(insn, 0, 5); - bool is_long =3D false; int index; =20 switch (16 * u + opcode) { @@ -11990,12 +11989,10 @@ static void disas_simd_indexed(DisasContext *s, u= int32_t insn) unallocated_encoding(s); return; } - is_long =3D true; break; case 0x03: /* SQDMLAL, SQDMLAL2 */ case 0x07: /* SQDMLSL, SQDMLSL2 */ case 0x0b: /* SQDMULL, SQDMULL2 */ - is_long =3D true; break; default: case 0x00: /* FMLAL */ @@ -12047,96 +12044,6 @@ static void disas_simd_indexed(DisasContext *s, ui= nt32_t insn) =20 if (size =3D=3D 3) { g_assert_not_reached(); - } else if (!is_long) { - /* 32 bit floating point, or 16 or 32 bit integer. - * For the 16 bit scalar case we use the usual Neon helpers and - * rely on the fact that 0 op 0 =3D=3D 0 with no side effects. - */ - TCGv_i32 tcg_idx =3D tcg_temp_new_i32(); - int pass, maxpasses; - - if (is_scalar) { - maxpasses =3D 1; - } else { - maxpasses =3D is_q ? 4 : 2; - } - - read_vec_element_i32(s, tcg_idx, rm, index, size); - - if (size =3D=3D 1 && !is_scalar) { - /* The simplest way to handle the 16x16 indexed ops is to dupl= icate - * the index into both halves of the 32 bit tcg_idx and then u= se - * the usual Neon helpers. - */ - tcg_gen_deposit_i32(tcg_idx, tcg_idx, tcg_idx, 16, 16); - } - - for (pass =3D 0; pass < maxpasses; pass++) { - TCGv_i32 tcg_op =3D tcg_temp_new_i32(); - TCGv_i32 tcg_res =3D tcg_temp_new_i32(); - - read_vec_element_i32(s, tcg_op, rn, pass, is_scalar ? size : M= O_32); - - switch (16 * u + opcode) { - case 0x10: /* MLA */ - case 0x14: /* MLS */ - { - static NeonGenTwoOpFn * const fns[2][2] =3D { - { gen_helper_neon_add_u16, gen_helper_neon_sub_u16 }, - { tcg_gen_add_i32, tcg_gen_sub_i32 }, - }; - NeonGenTwoOpFn *genfn; - bool is_sub =3D opcode =3D=3D 0x4; - - if (size =3D=3D 1) { - gen_helper_neon_mul_u16(tcg_res, tcg_op, tcg_idx); - } else { - tcg_gen_mul_i32(tcg_res, tcg_op, tcg_idx); - } - if (opcode =3D=3D 0x8) { - break; - } - read_vec_element_i32(s, tcg_op, rd, pass, MO_32); - genfn =3D fns[size - 1][is_sub]; - genfn(tcg_res, tcg_op, tcg_res); - break; - } - case 0x0c: /* SQDMULH */ - if (size =3D=3D 1) { - gen_helper_neon_qdmulh_s16(tcg_res, tcg_env, - tcg_op, tcg_idx); - } else { - gen_helper_neon_qdmulh_s32(tcg_res, tcg_env, - tcg_op, tcg_idx); - } - break; - case 0x0d: /* SQRDMULH */ - if (size =3D=3D 1) { - gen_helper_neon_qrdmulh_s16(tcg_res, tcg_env, - tcg_op, tcg_idx); - } else { - gen_helper_neon_qrdmulh_s32(tcg_res, tcg_env, - tcg_op, tcg_idx); - } - break; - default: - case 0x01: /* FMLA */ - case 0x05: /* FMLS */ - case 0x09: /* FMUL */ - case 0x19: /* FMULX */ - case 0x1d: /* SQRDMLAH */ - case 0x1f: /* SQRDMLSH */ - g_assert_not_reached(); - } - - if (is_scalar) { - write_fp_sreg(s, rd, tcg_res); - } else { - write_vec_element_i32(s, tcg_res, rd, pass, MO_32); - } - } - - clear_vec_high(s, is_q, rd); } else { /* long ops: 16x16->32 or 32x32->64 */ TCGv_i64 tcg_res[2]; --=20 2.34.1