From nobody Sun Nov 24 22:59:18 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=1719292172; cv=none; d=zohomail.com; s=zohoarc; b=O0Nv2tcWnzCBzRBo61U903bVFGq8i76oktNnb7uOqJDtTkKUdVabqqq5UJbqGLCjbxsCAFDnZXm0Xq06xTLNy6hi5PShFTDcCqPuRL4OHBnG/JEeut1RCN04chXGgCIMtECTyJoxGgXhP4jcVwiK1UP6KFbNdBhXFOBm+EtLDCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292172; 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=SxSbNTyLqm62CyX0wlj5AbMtTOd0dfgBThbteUcz5rI=; b=jUpShsYr8tdFMcyMMF6utiLEADfpeUApFOzobk/t4VeC+nLBwcSE5fdBxgk/9ckQCQVmlmSr29u27zuspqIum0XhCvY3Ec/w/MB3rt2x24D7WyJgn3DWwUJHZlc8vsXBHFHscv8tMtSv/ukn6cI5HIpCCjZhKZmg0z/AeSu1TVQ= 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 1719292172008516.2835804494799; Mon, 24 Jun 2024 22:09:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPm-00013C-05; Tue, 25 Jun 2024 01:08:22 -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 1sLyPh-00011W-7q for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:17 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPf-0001VC-1X for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:16 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1f6a837e9a3so31324745ad.1 for ; Mon, 24 Jun 2024 22:08: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-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292093; x=1719896893; 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=SxSbNTyLqm62CyX0wlj5AbMtTOd0dfgBThbteUcz5rI=; b=FWD41RekZQtVGMVobvF8Qg2MLiuhZ9mQR5ek2awl64oCckp9p84F0+rhDTLJhKqVSu 9qVoiOW2jXce4It1jdaGxx/SLmRsgCUD4sL6zDgA+K0wIX9PnGLob1bqvKk50KPtbX91 2JKKwuyDVPJAlM+XqwJRR2TLGmyy0Cc1GISVzEU4LY+Jq3lmPx4crDrzMR/jJ3lO7uLk Zwed9hVTe4Zsio2JDLl/VOch5DFAr70kmiJXhCCYGPlNWh9NZwqKvanpWEX4KJ5JLYgv QvlvyVL2IgEk4pTT86oIkxIwPhGbDv9eiJAFYNna55v2xxm75hT29wAMWp6I6hsGlmgH eWkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292093; x=1719896893; 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=SxSbNTyLqm62CyX0wlj5AbMtTOd0dfgBThbteUcz5rI=; b=tUoiDHebIHhYebopr5/hoO0DY8x8gDKnLduGzWqU0J0EVjY7l9q4Z6CQvguy/cnbep eHYYbbIkwyp6d/8xnUD3ykZxc6w5BzDovqxmlZ/9lZ7TSF3ds6EXH0fqht5Kc4m0WBty KjFfF2lboD6nRZ33DmyPCWK5il4OLQovCEdhevS+b0eePZsL5rkAV3Z7TqtNpvhmRQoq NwIXKCGVJ4oW4rkzePqImx/TEoY7D/t/hJBOFGJMG3h291zUyhl2RA7ZeSa0CTYd2D2w bxfj3rntbXPjjQw6+w2ortraCrYljMQlYFvwVEWtzMo/2vuyDC3m3fWTLXslVYiJvYhV tPDw== X-Gm-Message-State: AOJu0YzCWUmljup1oKZ2JWENGSyj8AeNLXs7rDD/6diKhBUk3Vg11yJ9 t0KaAEjqDrvPUTyiyH4XOdf1QBhlqAxOHnNuo2oG1oYF1oapxLbUI25P2J4Q5rm38WEPaLceM4D L X-Google-Smtp-Source: AGHT+IEKbgLPjnAmgrL3V3V8cz1vKIc6oa8zgfNP94DDWXKewOHxkTzue41GWDYFFudtvWaqlDqlyw== X-Received: by 2002:a17:902:f60b:b0:1f9:fa69:dd4d with SMTP id d9443c01a7336-1fa240f27bemr73490835ad.68.1719292093207; Mon, 24 Jun 2024 22:08:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org Subject: [PATCH 01/13] target/arm: Fix VCMLA Dd, Dn, Dm[idx] Date: Mon, 24 Jun 2024 22:07:58 -0700 Message-Id: <20240625050810.1475643-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: 1719292172858100008 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 Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292170; cv=none; d=zohomail.com; s=zohoarc; b=PIAqH0gxVr6kPAe1MYXFfCrb72K6Da638ntxXBtawzuS/msTQjYT28HQLpfbnpHr1SOinEiFBw8125TRo8cJV4qeIQ+qB60Hi61ZoCkPxspw4BLvBe/N76ts7KnWKR5Q8sslnqqEPj2xVCj8MykO3dancfHVB5zZDyx1HI2K03s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292170; 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=YQcO2r2IZyvd41q48Eu940ny4a3LvMma1E5P7T03ZrI=; b=l7w3i4qQ0PP4IzLvyfIiqtVYh3Q66aiihBv9qUNmcGcL+m+U4Vre+8AvC1AUX/s4ZH7wdFZSb9OGp7EH5CP+k7DbZP0hwuctOJD1781tzCAYc9+qCskDnWFK+RZmWVsKXl/EJ1j5jmWZ6r+thNi5PWLftagiri0tz6GhgWsZ1DY= 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 1719292170944444.65354242215494; Mon, 24 Jun 2024 22:09:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPp-00015Y-QR; Tue, 25 Jun 2024 01:08:25 -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 1sLyPi-00012M-HV for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:20 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPf-0001VP-SY for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:18 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-6c4926bf9baso4202472a12.2 for ; Mon, 24 Jun 2024 22:08:15 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292094; x=1719896894; 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=YQcO2r2IZyvd41q48Eu940ny4a3LvMma1E5P7T03ZrI=; b=A+8GtcjORd6IZ6YITkLKB5gbb5IvRbvOZkOOsJvOEjOt+vtaLG6JbSjOi+khxO6fTA Mmap4Lc4rAcNVI9DNqs1xYhvkp05hrk6SR2NZ6ryPggv6/NI0rJ+LZrRbDiPO7w/qMEW EK1Jprd3z9khkQCt5onENcR1Kyqe6ArAj3gAjNACGB1KooKzpxrl25N22xxSUs0eEaG+ VEEd6xGM1RqN21tdBfffUUkVAvnn4nD1GVHn82wp2aC+wqnjWNwiz8MWiKl9bLnEmNLb Mk9UzvRiFsQbxeZyjndtaJUHIdARfWEmrxU3s4/dzQha/CQrW4//TzyRY24jRAPxIieC xGaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292094; x=1719896894; 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=YQcO2r2IZyvd41q48Eu940ny4a3LvMma1E5P7T03ZrI=; b=TdHCu4HlVUTLpANS0yIWd19wsTMIXBbcdCHwvKQuv1ZOxYzEdotdqyncSjbRps998g jR6zO/Kj4GYtm7sPdEk5yvr2vkMOTy9LwuRXlo+9ckxAG9W3yCcPFDHZQrjB+I+Y5tz3 oF5LGb97VEMJaHMXZ2XQ8yjKtUeT9YrNF1GlwWUCsexp49GSRw9c2qcaGnsEH3w6iEKC 4VmTrMuIAFW3Cn4kYWtW0/T3iWwRv21ru6Jh5KIgYFLTqjIZNAlzbqp89zQd7VI7tXrL m/T4uehE+WfUG18XwmK+Pk3mkBEqNm8c1nDCOvLNwmRf7lzB7upOFyQjnpPTb5+t30zS 4HJw== X-Gm-Message-State: AOJu0Yz5R5pbDIBDVzLPuZZIkma6Ifce8xVlB/U4+2riZzG/3CZOmvqN YSxTIx6vPfbiH1dISbV0N8BLstLH/5dneqHebIkerE9pC8P/lNAttvNd1prrj3vVcTKoS0aZtDg V X-Google-Smtp-Source: AGHT+IFS7llonFXHEW804uNLpkBm2l9kxGuA8TkGIPLfMDZomNWv/ota1UykzSaNAhGOJ7lS69Gr7Q== X-Received: by 2002:a05:6a20:b313:b0:1bd:23f4:df70 with SMTP id adf61e73a8af0-1bd23f4e114mr17411637.52.1719292094215; Mon, 24 Jun 2024 22:08:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org Subject: [PATCH 02/13] target/arm: Fix SQDMULH (by element) with Q=0 Date: Mon, 24 Jun 2024 22:07:59 -0700 Message-Id: <20240625050810.1475643-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292172870100010 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 Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292221; cv=none; d=zohomail.com; s=zohoarc; b=ARuzW0VJbP8JU/u5djuqjDiy/RPXw9NqZ7soNhvOI4GwKWXa9giinDUjaGNan09DXCuJ/xZwh67EQhM9lWEg0WZ+yBeGjIFPanoDxS+a8eBlFbkBlBfbGWgjdeSqrIHjVlJYuYUKFY8oPZVh00bw6dslgI7QJjNxdcb82lIRt3E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292221; 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=/Pg6/3MNS2vx+BkKofM6RgZsGJ5t7KT/lobWOjzWfJo=; b=i1pm8sMAllMkuR8hcvw+8bLSLQc/9ROgs8lL+0jC7QsbGfPSTJdzn7zB49wcfqNFoCaqFhVRk7m0AYa4Q6mj7jZs+cE8srzYBIjHm78JctkzrSDBCFmEJIbmX+Xf6RlTKaevN9SNCz7fzM7ve4oq/hb7dwU14g1RK0y13NIpeqI= 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 1719292221478417.9497690914583; Mon, 24 Jun 2024 22:10:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPp-000166-TD; Tue, 25 Jun 2024 01:08:25 -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 1sLyPm-00013r-5F for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:22 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPh-0001Vs-1v for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:19 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1fa78306796so55645ad.3 for ; Mon, 24 Jun 2024 22:08: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-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292095; x=1719896895; 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=/Pg6/3MNS2vx+BkKofM6RgZsGJ5t7KT/lobWOjzWfJo=; b=qjo/tohw2kgcn4zqsCgSb0Q+qmDoeH1H0z4kjLMW6QZ/6SQh7OBk/aFg1E5+S2wycL BZ/pFyxBEtwTF7itIBopr80LefytEyhIra5QcsFMqenX9hZaG1X6HqeKvWRLNYfOExq7 L8Xw8QhQC+BgZ9JyJFpdD1TCOKNqCv9ctj5MKskH0oiefNX7lbksKWoNUnXl6BoKnEYc WzC/M86jOzBC46cG+dP/xjiUgLkqDMNVtc+Fac+18K92brVCre9KxBvQcVrqNiWaattw S9C5LErSXHFo1FIuVDTVrqN6jL+fdmJxgWDPbfQcAoonPca/YjkxGUNHOR3OytPd7Doz zvVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292095; x=1719896895; 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=/Pg6/3MNS2vx+BkKofM6RgZsGJ5t7KT/lobWOjzWfJo=; b=BK3cDRQ/AjF37ArOABYjp5g3GcVeExrZM94kC3PleU1ve15tALsmdaV5rs6d8ReG89 athuO8JFkaAD51BUDH0zejx+AHxRRBc18BWOr7XE4myOYBpsckgs5lFYiADLFbeeX6Wh 7SUinpre8V+NAdNqAp2ZYPvJa1UuevnPdZ/rO0hx3/y6lRlfl2IZLLT6FGuBg8LnRKJf TSd2BVgIAdnLaI/wq1IUSs8dUyc6w3n4kz7jsFjUzxKGMMrg3Y40sRgR/l8bKn5AkKbH nNRYlmy9FagelDUZWWhyMvEtDStnVjrJlOKJpl44bcwGIxPGz0jYxMmWiP7FuiEkJZtJ 4Aew== X-Gm-Message-State: AOJu0YyFBn0BOb81jc8qf/JJcTw7cNMPpChdO0p9WGd1fau48hoQywjU 01cQprkfFop49oMf7MRSb1/+AXbKqTJ08qxSETEcNg7ycvTl2SJvfX5WHAzRqiPM/DwChGo/5iD 9 X-Google-Smtp-Source: AGHT+IE9rTGP39kRkZtz2CxjMld3ebebDoEJ/Q0QTg05TGza++uaSO5QeOMIpmatrDhcjUnt4U1XaQ== X-Received: by 2002:a17:902:cecc:b0:1f9:d99f:61ab with SMTP id d9443c01a7336-1fa1d685713mr71326665ad.62.1719292095275; Mon, 24 Jun 2024 22:08:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-stable@nongnu.org Subject: [PATCH 03/13] target/arm: Fix FJCVTZS vs flush-to-zero Date: Mon, 24 Jun 2024 22:08:00 -0700 Message-Id: <20240625050810.1475643-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: 1719292223040100003 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 Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/vfp_helper.c | 18 +++++++++--------- tests/tcg/aarch64/test-2375.c | 20 ++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 3 ++- 3 files changed, 31 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..f83af8b3ea --- /dev/null +++ b/tests/tcg/aarch64/test-2375.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* See https://gitlab.com/qemu-project/qemu/-/issues/2375 */ + +#include + +int main() +{ + 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:59:18 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=1719292210; cv=none; d=zohomail.com; s=zohoarc; b=cFYpVDoLjFAl76l5z2h4WBMU8btyzFRuwAoNohfOHhMMVnLn6BviVvkRCOKkVEoPNFGvbY6TYzgKdNRZBUldhVwFOkbelIv5z8k4VhqWZg52VPuXnRq8oFkRVyKd+iRck7nQhRbDBsC9nZqmgC4BZtQWPvj9161SlCAco+2xNNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292210; 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=81QyZlJhFcSaEyM0gLDT2P6bgctv9OyC6CJ6KiAOonw=; b=XOrt9ymrGzX9Xz+5kvBgVgP57MwN7Eh5k843iMBizMDZkNh7N2LERZLpM3+8kReiqxzLDgit27kGPK91Je/kDLTdSekYiYJpS9JfD/3HkCIBZ1dBDfoz/tKkRaCxtsvT/Lar1gliWv2pavMKvL2fGfD4L+ec/JUL3uLipP0b4Xg= 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 1719292210425911.0022686668485; Mon, 24 Jun 2024 22:10:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPq-00016T-MH; Tue, 25 Jun 2024 01:08:26 -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 1sLyPm-00013p-4F for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:22 -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 1sLyPh-0001WM-SZ for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:20 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1f480624d0dso42820985ad.1 for ; Mon, 24 Jun 2024 22:08: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-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292096; x=1719896896; 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=81QyZlJhFcSaEyM0gLDT2P6bgctv9OyC6CJ6KiAOonw=; b=wDwBu+rx3MLY/96KH5xs806YElib5zxRb/6SRDHOhi7nGXBnvDbk/TE91MjKbFmGbM xynjktRFiNChWyCu+zTCZr40hWR9BBMAD3AIGMogmR+m6R2DPmyTvvCL7XVVKA9lXCUp HRVlQgiwf6ewaYKv5GXc3+Hi68Q0v2q4v5fvW5n/gOqopYG0Q27AUy1DY0e+9vzOpZJ3 MnSZsPCFX7krBZNGpuTayxwsc60xGU1xAQTwu1+HQn/qcaUlZssWlyzbeP0mGBpdo6yq xAheVzTNRo033cADJo/2yRDoeZssI/4QTvGHXqbztFD4rETBwHjhtOOX1TagtZ/gpOuq Cbow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292096; x=1719896896; 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=81QyZlJhFcSaEyM0gLDT2P6bgctv9OyC6CJ6KiAOonw=; b=ocRN9vCkym7+iVm+4LzxVE0b9eDOfhOcJMgAskEBLBcwKiPsgpGrkPfkghQjHDytvf o49igKz4tKqX3BgPZek/7hLSbAoPiB5yGDQGxAdsDJwiP6JjCGTH5WdMbQRIniFIo4n+ 0GEiSz5anSsenjXr9Y4ZxoUFPGT2zlKFlWs2GzuJ8KmwR66oGLD8FGqCF/y+HPITuvWY Yrf/WeLUrB5D8tCNjsv3rdP8RHzOYec4x65hyPa8mR5uC1LY3luX+JJXR3GateRFsiGx rdCXknY3M4SuL4rFvKBisILZkbNdIRLGC93mupVeUYsqSm2pQMUg6oXDHinsclaQxLJ3 gEyg== X-Gm-Message-State: AOJu0YyBopvF3knlOxDOb6dOqe+lLKZWRjeXuhG5GHX1HhEPEnVXvmfP 3rv53zHREC1m6t1XmgSJTEeOQe1EKTId/wiWH/i8mmsv+vp+RjwQL+/tsXNZDUojtGtXKKTC544 T X-Google-Smtp-Source: AGHT+IEvVUGU6hmt+gvvxQLbIez02ZVBwHxPkFt1Ff+rED3710tXemUWtiCCL9W9BxdEU9WRb9DAqg== X-Received: by 2002:a17:902:f685:b0:1fa:229c:3efb with SMTP id d9443c01a7336-1fa23ed7a5cmr93233955ad.29.1719292096359; Mon, 24 Jun 2024 22:08:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 04/13] target/arm: Convert SQRDMLAH, SQRDMLSH to decodetree Date: Mon, 24 Jun 2024 22:08:01 -0700 Message-Id: <20240625050810.1475643-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292211007100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292247; cv=none; d=zohomail.com; s=zohoarc; b=R53DnZQ2GH9poBwu93DAnZJm1EtW5vLtQ19IeL5paIvsFtQIa6RE+FemMl3/C6egc+7rM6QoeO7N95y0j5HptnkJtWNlyqrNx+PjX+0vR6UPzRg7Oc+zas9OZBFOk46nHTppIdqF9qc5xiyI9dJEbgTxCcOonBWTbJfPXF2JwR4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292247; 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=ZMOv1zIzE6GspuhwPHSAou1PZaQbe4Ud5p+lD2q/SHc=; b=eWo/KGlXXeq9v2HpMu5f23UThcs8AixmdAmOkyr5p8ro40T3ExKrWJbDSYMvrOInxVF4iNrAsT2XDxrNuajGMWr2pvQ6LrvfU78hOVcSQFIpCGG+G02jtsoNoTYWjC/nuEwEZK/fW2gBGnJHJCnP0XgIOSEHM0Ujx1zk3K82PdI= 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 1719292247793423.25011462395264; Mon, 24 Jun 2024 22:10:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPt-00019T-2G; Tue, 25 Jun 2024 01:08:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLyPo-00014a-FW for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:24 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPk-0001Wa-0P for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:23 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-706680d3a25so1875766b3a.0 for ; Mon, 24 Jun 2024 22:08:18 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292097; x=1719896897; 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=ZMOv1zIzE6GspuhwPHSAou1PZaQbe4Ud5p+lD2q/SHc=; b=LINO3Bnnn5u8ACllH+r/Ms1H64hcBudwXLON8ap0wQCNa5U4+Aqx4Appc1NQjALf8+ woOui85FsLIK/DHTnjqM6tEp33q0WCEROXNq/sVnFzwq/sU3RaaPKbDJ2yK4OzmMwzYb lgeqzcovOcZBeYdYQUbnaF+9GFcU2E926zz+3DU9geo0H9GHjKiPNGqbABCJU9TvN7WX sCz/sE+UiHtgqZQ+zq+FhlnsrqKaWt6boe7aaIQQxtSsp4pm8FZ+4r6kfqiqDK5XMSJ3 sJSnWry9mDsKUvtmiBv0We6I+rQTJ5lQEHZb2abL76Bb1zF9lMII/CWal+FeOK64KAZR X1Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292097; x=1719896897; 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=ZMOv1zIzE6GspuhwPHSAou1PZaQbe4Ud5p+lD2q/SHc=; b=xEhzFFN9ov1G30VJ1zj24ZpK6n/GA5ENtZl0HX70WtJFh5jhKPqWK4eTTcSz5jM8JW Pe82gBph9BMV3Jz0nrM/+qiLSM0z66npulnzTIBl0Rdyg5YDKUsAnOsGc9bZDThIJc2E H6+HR9WFe2kedo8KHgGvVst+ZZGC05kkM4Y/dZPrOcSi88ek+mPIlYBlT2o1FtMwx70D hjaI+dJJz9FkYkSGujVg1/ohka3ZIA+otQmGgFl5DlAgS3CWrHiUfNzrr6JES2lHr0Tc KpoB+sI1Hw/2iDC/41SVo8BhlNOwiOKDvsesYf9K+PrBS+/Mt9YBBwKCJ2rbd6pZaFEC Wdhw== X-Gm-Message-State: AOJu0YwBvWRi6rZXhr6MB4z79HzZ1BgeUoYOPINQKBnVg9yCD/908X7N K+pNrtO2mSFxtuOwHT/cIdMppXYMPo97dFhptcutTv4wNk1G9EfzFF/xrtTqucWpFbfF3kZ245q C X-Google-Smtp-Source: AGHT+IH2joKZMwdf/1YUzCMjUf9R++cLwe4wJhqRw5t5oyVFapQd4ouqbeYtXq8d/1zizXx42opmAg== X-Received: by 2002:a05:6a20:3952:b0:1bd:18ee:f141 with SMTP id adf61e73a8af0-1bd18eef20cmr1570883637.4.1719292097270; Mon, 24 Jun 2024 22:08:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 05/13] target/arm: Convert SDOT, UDOT to decodetree Date: Mon, 24 Jun 2024 22:08:02 -0700 Message-Id: <20240625050810.1475643-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292249139100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292223; cv=none; d=zohomail.com; s=zohoarc; b=JvFz3wBccBOBLz0XmcDFBiYQEpvtb/Ww6jPvgix7pwvcNQoK8zxXuTepEqy0voHc2TKCMBHtnW1tH2b8cYd/yqVnswd/iEzZgeOrvuuQ4VTtwDktEgJKUbTWexSolPbS79mdu7lKLQiE4zy9gVoW97raSMciW1cLUAMFMUL+hcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292223; 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=hRclqwFkw5aAwjIhmFzcLIsVslOSKqJp4jOj2/LLcbw=; b=gH0FSAdPOCAV/FWiRYIDQ496137ecv4CdeEZV4tcR7E9S/K6mWMAANyd0dN1j0E+6GJeVnGylN8oMGt4/OU2grFXkJMOaGNx7L9iBJJwpTLxZrd2zrtqtCIT/v+NHorDD6mFYwaTeHsT0YBoQOhSb9yqXXbyTvuaZo9FFuaAuJk= 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 1719292223786577.2727575417182; Mon, 24 Jun 2024 22:10:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPr-00018Q-PH; Tue, 25 Jun 2024 01:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLyPo-00014Z-Ck for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:24 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPl-0001XB-TW for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:23 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-70683d96d0eso1208578b3a.0 for ; Mon, 24 Jun 2024 22:08:19 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292098; x=1719896898; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hRclqwFkw5aAwjIhmFzcLIsVslOSKqJp4jOj2/LLcbw=; b=i6Zgqa/IHZkshSIe7idj5sIf25UdA+I/UdQl74aYKW0NlVempPewID9Cxx6Tg+U/JW NPSdc7WEXzZEDhN/s5fQXB/pC6Zz+0IPKRmd0Az1it7CM+vhzXDr/U9HfWghsziwcCI3 wiQkPZkyao/Ju4KuMLVIGN0zdwuUE8HnrzzXV+IV9dwbUlS6HuoEJBnsMd9K7ErOnQzI aAWdwt/xiYE8Vn18edn7RFYnCiM7402QWBjvebxbKqPxSWDKO7Lb9yCztoMNfZvutjar nqsQs/A85ImFanWLnxcMj1FMYBMmhA1juV0xtFxChrl28VGsgkCaazE3NheFzakum3/T RZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292098; x=1719896898; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hRclqwFkw5aAwjIhmFzcLIsVslOSKqJp4jOj2/LLcbw=; b=Q6L8VeViVflTXBVZ2Ee2764t4mM4JCeRcZHKKWA2KKvAdU6qBBVSF4UZHLL3szxGmk BodKR7voDB8MtokY05QepoJYpLfYn0pBhyrGNjKOVRu9Qx1MVqbeZ/V/h3iVMaltwM2g wzqzqz1oKSc4fa9Fl0CSblg4zWnuio77joSMDMEtYvgB0Mz6NEN+SYGUsbByowuMJaZy 9c/RcBSXhVncChs/bEQ/Bxdi/AItBk3aXAzZow1XC0MoACpILTIckv6ow2sj15H2M3z5 UrNFYqZcYR3vGAtmBGQDzPumk9wI77Ccl/8WEas38aGnjDxSlZwqkpjqnZY6i5h1vF+R qoAw== X-Gm-Message-State: AOJu0YzCZRZRt1U/pTj1Rvlz5GEkv0ghAP5pwrLNIBr9n096AKuyzE6r RmaeLiefMWtZ1bxAehQr1JBN8IxuiOpaD+tzuPF1rU/pdFuO43D1ss9QUcKZQZFGEU7TNRu/ey2 d X-Google-Smtp-Source: AGHT+IHVL/81Iuy/xWhX78SJxmrxEC2v/Gl0ZcwnJNCVBGClCP0fGIb1eSjYTWpC7ZV+bkChquR5yQ== X-Received: by 2002:a05:6a20:2105:b0:1bc:feb5:887d with SMTP id adf61e73a8af0-1bcfeb58bb8mr4689720637.25.1719292098253; Mon, 24 Jun 2024 22:08:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 06/13] target/arm: Convert SUDOT, USDOT to decodetree Date: Mon, 24 Jun 2024 22:08:03 -0700 Message-Id: <20240625050810.1475643-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292225038100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/tcg/a64.decode | 3 +++ target/arm/tcg/translate-a64.c | 35 ++++++++-------------------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 7411d4ba97..8a0251f83c 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -949,6 +949,7 @@ SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... .....= @qrrr_e =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:59:18 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=1719292196; cv=none; d=zohomail.com; s=zohoarc; b=LUt8FxBNP+ZVI8Mske2fH3XUhCW+jf2iDz0zj+LcCyP/FYO9KAwtvyO7XCAEdP/8wR+PW44tKju6cyk87HI9iWWqLR8wnDqak46XUyPYfjj6S3ibxwakNbqJzKr11Rh8ssHsGdiVrCYNtTktBW9hVkaMeHwjmzAhaoI6+M/883g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292196; 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=dZZKMigzegy7gdlKoRMc0EyyFAUb+mRaR5AzZiFiSzQ=; b=OiioSJcCC98gI3RvEI4hRmcVG1kX6AfaKOX888sW1x0ccv3Er9v9MggVQB3oAXw7AuhY6CnBCuKxAn0fZFQahKg2a6VY4edjfGL8ZuFl4uGZqxn3zL8ySk4R0KzlMg27HMyxWqTT2JT3h7bdUFxTXaM/paiuIsf+EsGJsDiFQ0A= 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 1719292196924321.0644559870965; Mon, 24 Jun 2024 22:09:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPq-00016S-LO; Tue, 25 Jun 2024 01:08:26 -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 1sLyPp-00014u-76 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:25 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPl-0001XL-Tw for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:24 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1f480624d10so42089225ad.1 for ; Mon, 24 Jun 2024 22:08:20 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292099; x=1719896899; 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=dZZKMigzegy7gdlKoRMc0EyyFAUb+mRaR5AzZiFiSzQ=; b=MLRRRuAKSg+XmAfoNTNagwUMoTknnrkGkkzMZ2c8K3aEzi7V2X2boWnOH68d/vG8CK mA67sxA638vQeSDERsooK2qYoDtgJBqnnuhEXfJkSBmfREq3cu4D6DJ0Phd2L04OhovM haZnb8zw9VPk58T/gEZhZ7197upyDE3Fjn/UWtpZHQgGrhxsW2xghMUZmi9lULW4Wsjl LhWmwB2yz3vl4UBVy8SGXYJjP/te0lnEdOyt5eU3sUylPv9ZoOFXxR8Ufmozymk/bSsO q9kgtXQ/ZfSOZc3+4a1tTs8CG0mCNjEa2RY9ILEUVk9qP1Lbic2Ru6gW20BknY4mPBAe f+fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292099; x=1719896899; 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=dZZKMigzegy7gdlKoRMc0EyyFAUb+mRaR5AzZiFiSzQ=; b=dcKVCinhkhWcPIRI9oJswgTY0niGmuykLsn5TnOMq0x/DniK5XSoeiKDLPbZ7Sr4ch YwN1VRvWfmqIS5yiN23+ZHi378OsBwafp2lGJULVbrWSl3ohgEgd+zxLKjvdgOs4XsfW D3ERKD9WQUwauHdDrX29+nKXG176LEWaZdfu75lEFSEx+5wNW6PpJT1YPI0GLd/m9/6P I1dCcJaWaEJseihO8I0LF+nt+ON8gor2UuFpwYZSuhdEzkjAmy2q9uLdhFTKWAl6Ldek RvwxafimMYY/QmrPO35baBZwL3uXZBS6XmZNFQOHojZgYMxATlFzzFZonoa848FbUkWF 1mAw== X-Gm-Message-State: AOJu0YxFhCHb77VBPg2ha99HrswocHLJvVrbgdteNX2KGRPccSVc7p3i Xob6DIDrsmeToPqTxT7BfgA7NKKCqKLIOqYvyu2TS5tFAgpBpOwscNfgGc0V7LGZkqeMhVGkeFl N X-Google-Smtp-Source: AGHT+IEjj6VYw/1xzdSlj5lbUw0u9xsDFpUMxoV5W4HMNVIVZDx1I8OqD7ToegPWqwaTrp5vsK46OA== X-Received: by 2002:a17:902:e891:b0:1f6:65d3:296 with SMTP id d9443c01a7336-1fa1d51e5c2mr97803705ad.29.1719292099308; Mon, 24 Jun 2024 22:08:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 07/13] target/arm: Convert BFDOT to decodetree Date: Mon, 24 Jun 2024 22:08:04 -0700 Message-Id: <20240625050810.1475643-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292198997100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292238; cv=none; d=zohomail.com; s=zohoarc; b=eu2ABeRR3o05PlgLgDWPIKomUygA6JLUqOJRtJlYhhWV04Pd3qtjzSkbqhbDATUEIeNX7xZRonUAg7Ue6DGUhqV7BZhv1lfYfPAX3JLwdcAUM3aJBo8zx0PbAqXkdy0/SSj7tcCXapzSZM7O1gfLVvitXDaWhzIYW+gmme96lTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292238; 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=uqgia+CtSFBvxE3hJrzybYSQYNCwJCQTcDGbhjUI0/I=; b=GpEMFtQ4GcMfI2ycR6SrH64dnohhf0zHkJmFLdehpQBjAVmMEsHJ1xKhWgUdnGJ7i8cwe+T7czrDpGbHCS3IVOPjOkf5d1bwTFnSveeJy0dYfu5kffHh4Lk3ckCWviVGfNmqF+LRuCrzf0lXu7W8GQIH8wBgrjpPnzhxDKwgaC4= 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 1719292238454574.712122984674; Mon, 24 Jun 2024 22:10:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPt-0001AL-TZ; Tue, 25 Jun 2024 01:08:29 -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 1sLyPp-00015G-D1 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:25 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPl-0001XW-Uy for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:25 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1f9bf484d9fso32033985ad.1 for ; Mon, 24 Jun 2024 22:08:21 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292100; x=1719896900; 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=uqgia+CtSFBvxE3hJrzybYSQYNCwJCQTcDGbhjUI0/I=; b=ihMCKMp5KQjiO7AFaDQNSbS/+S5dNu7kIFXD3U6mSPQ7miDyrUl/zwKG3w+CsvJ4Nn An1TNumIHpBMVZ07F75BqNl/F6XR539s6OkdPgxQEsR94JzDFaiDVI5QBVPs0RQnnxyx ZkIRrRuvLX+0/SC3CQHjlQtsorwe9FtpJpy3tf5xyuhiV8RW0asEXWLvFBaOs6RdO4ca VcO6rW/jQblK/lv/+ezzSn1FiCbPHfVnOwL71LlOAJ2eA6xuO1OFWKJ6G9dIBE8ev6Rf GntNBkpcN3HrEr5Vhgfg2C3QtyQz40ftked05janxlEV7zzTKVOgNVHMUCGvlq55Z4Tf qZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292100; x=1719896900; 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=uqgia+CtSFBvxE3hJrzybYSQYNCwJCQTcDGbhjUI0/I=; b=AFqtGrFi3N0spBjvRQPGWlhIGNsWR9a5vPiXcRKaBvsCK7JOEBh6GXFHsRYW4efk6J YMcrnDmbcek0qOaBboaAIRwf3nZzXuR6QR/+FTXf0Pe09sY4gq4TjmoWk5a/tWU9l1vv 67BqsEqcz9cWF49GmCCkDRYgAsYQxy1mMo/29mIBwGuCGaVTIciivIsISSxcqoy+R67K qjAHvTRdUF4h7TYrBymHR2m/fbl1h2/Mh6LRhPW4qiqPINst7ENIUrf6Ix19FvsRa1Q+ PJGssKoBTNiRjlBvUVlf8/mZI2/YUmWtbi34TYfTRSZj0Q/xxAyg5wnfaTsJ9BUCMPak 9MVQ== X-Gm-Message-State: AOJu0YymOTI3B61WksllGY2BBy/+V4bEkqIbzjLAVi0DBxa+iU1yHpxx UFfanPpRTaJUJYIuKusQhBMmRBCdD0mydsyobYOAoUlbO4AlnPWOKvX5IIWubkQ+8bpm/mQ/NtT 4 X-Google-Smtp-Source: AGHT+IEJZWjR+Xi4pwHAJ8FqtDP9cX5VBWEm5RvfTSix7D/0sBintVALB7umSY2uq7VDV3ce95Jtnw== X-Received: by 2002:a17:902:e80d:b0:1f6:e338:2a6 with SMTP id d9443c01a7336-1fa5e6ad2e4mr35991665ad.23.1719292100385; Mon, 24 Jun 2024 22:08:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 08/13] target/arm: Convert BFMLALB, BFMLALT to decodetree Date: Mon, 24 Jun 2024 22:08:05 -0700 Message-Id: <20240625050810.1475643-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292239137100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292249; cv=none; d=zohomail.com; s=zohoarc; b=HpNsVy6hOBzFSp4ypevB+406ETILwhCk2UI5iyWUZ29Krt5d7QfZGbp1+hMIh5iKE1SUHYkT0qQ8hnnkVoJel9l7MfVF/717lnHuuye+QkuyUeCDJlx67v9XQB9P+AWVruI2ZATmAzmtOx8MJLH2H1bANnLERJx3QgxouXrQHas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292249; 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=eCY0RuPqHu5iM13PrDmlYJVrVT2SB405qXFZ6R1XSxw=; b=E1lwEA4CqJnZFjLGGjq56d7fJnTwC7Ra7RObQppLZf3lUZDBPS1yYauRF+/5cfQ8a6NeneL19I9HfL8b1dKeBH16fj/VNnfGP2L2zfCX0Z96wRYxElHwnHkd1kAJeiedd2Z35WwCHKHTARIUW6imjtt/NmOtfwZnNH7yiLvgfdI= 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 1719292249337576.387096053911; Mon, 24 Jun 2024 22:10:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPr-00018R-VU; Tue, 25 Jun 2024 01:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLyPq-00016c-ST for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:26 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPn-0001Y0-Vy for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:26 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1f9aa039327so41745275ad.2 for ; Mon, 24 Jun 2024 22:08:22 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292101; x=1719896901; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eCY0RuPqHu5iM13PrDmlYJVrVT2SB405qXFZ6R1XSxw=; b=OGw7SqyqP58h/6yQ1GL/wnUuKwe42/j/s+AdWGXVsc9kSbgD71TC3JneDog+Z4dJtT L9CoutR+KYeyPFzetyBdoYFIbI9yWt9zjiNKEV55xwu3mbD3guuIcTOSZusCCfw5YedA ImofbPoePNTUqNNFx+7smvLONAx9v6iqXAPOFSjlrNcsts7iDwcziLCQG9XGbUI7pEje 4LRlTSVDPl9NJ3AR1lDLf9eX9epAmC5H/BfpATDCkeyhBPZp1T+y8rCyk6tN7twE+CjH AISjsJwRAw7UL1SApgJ1M6SDW9LwkuZlxYQ+lQJbqjMpx+ftfDmpw86AgTOHGNfe5HAC QkIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292101; x=1719896901; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eCY0RuPqHu5iM13PrDmlYJVrVT2SB405qXFZ6R1XSxw=; b=TMtJbs8/jb26N2+H1Q027xt/Tn8rSJjDBer3cpUwog+3aqvA6GzU5kgH2RPpM7bXJc IVF66RqzhbgumHndn7cGLevRHz4OtksEsoJay0VjhtCmutHjT7PeK10co7hT613dDdIr XdojnhUfKUO3WxUJkzViWWEfXdcPSSLFSQocccDadHjOQHaZ5W3cGEL4hmT5EA5siYEC YAL0zTPCNgmQ7zfRm5nId9zMXQvqksKLMkr6ADM+JSzKBMznfBaJQ0zTxJJznBrPhJnd D6xkMStJOzivHUA3Nd2qFJeWW5rJu/C8ivN9UIUDUqQikU8Hqi8vQQCZXbyOT9pzFtv2 5h+g== X-Gm-Message-State: AOJu0YyL9q3k7hLSLr6c+3UwYsBfGsI83DYZmQA/W2OI63bV3F+x2pIx 5T83/H4XXjBfVUJggISXn5jtD3DE4askgVt/XEZp3ptmu+QkrieiF8IbMLMIHBIlQAofTlGdFuB j X-Google-Smtp-Source: AGHT+IFgbK/S0Z4g0xHzym3C2mnj1pVFRk6Ky5nCkuxY57RPLUrqxeP2P4J/euwlRw50kKVpTml4vg== X-Received: by 2002:a17:902:d50b:b0:1f8:67e4:3979 with SMTP id d9443c01a7336-1fa1d6533bcmr90624085ad.47.1719292101326; Mon, 24 Jun 2024 22:08:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 09/13] target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree Date: Mon, 24 Jun 2024 22:08:06 -0700 Message-Id: <20240625050810.1475643-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292251258100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/tcg/a64.decode | 4 ++++ target/arm/tcg/translate-a64.c | 36 ++++++++-------------------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 15344a73de..b2c7e36969 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -952,6 +952,10 @@ UDOT_v 0.10 1110 100 ..... 10010 1 ..... ....= . @qrrr_s USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s BFMLAL_v 0.10 1110 110 ..... 11111 1 ..... ..... @qrrr_h +BFMMLA 0110 1110 010 ..... 11101 1 ..... ..... @rrr_q1e0 +SMMLA 0100 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 +UMMLA 0110 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 +USMMLA 0100 1110 100 ..... 10101 1 ..... ..... @rrr_q1e0 =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:59:18 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=1719292203; cv=none; d=zohomail.com; s=zohoarc; b=CurKFQWOIOFkD5uVj5dOfPrt/nHzgTAjXJ6WUgmqrIAj0uLPMy3pf0Z25gUrabYfsC03gIOkyM5pTgeM6af2c0HZ+RYFHvHrysQk/hqqP51Ihm8NzMNuallVab0mkAdu8+lEtBUdnI7M/gtrINiJ/vfYnrLfRWCJCmmgKwC3cRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292203; 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=fBS3awWlke5rOhwxZuN7iRtQwvkRtjx0DwumJDSTopQ=; b=DKJci5fHp//HzCdj5HZW5MsdIKyhyOTL7IhvmoI+RWvCv4WhjzonUuWyKet+QCVq9iV4bt/2CX+F7Sg5G4sEIOf8wRACzj16SDsa9cjHvcFsCPZMW5mAoFmeIrJbIHbijR9COjcAqaXwMfxgBSkjkHD/X+eDfwKDSln/fbhgx2I= 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 1719292203521323.19611817753923; Mon, 24 Jun 2024 22:10:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPu-0001Bc-M7; Tue, 25 Jun 2024 01:08:30 -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 1sLyPs-00018a-Fs for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:28 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPo-0001YH-7Y for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:28 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1f9de13d6baso34278565ad.2 for ; Mon, 24 Jun 2024 22:08:23 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292102; x=1719896902; 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=fBS3awWlke5rOhwxZuN7iRtQwvkRtjx0DwumJDSTopQ=; b=UcD1uonpspjPAoO2g4YXQZP6KXybbSV8IB15VnnqwAwCmNiNYH5OgUDgDdwKTw4XPm 2r7fz2CHXw06nICDkk9MWTI1orcUi07XYc4xkexjPWdXfhoV1QE7Yz0DS3PaEvoXmDnf rrqpV0v8bYcNKUr0wW9bYrV2w08ImCWzh98wat37KNHzJpC1NjA1F+3TV3wSNi9OCMxY Or/Nn2ymqCzDVTpL600uvoSjb0APx4N+yMlkA0v1lntMj9w7ilONn6cVG4r1fNilaFH7 JOqBRKWNPPWD0lGYK7OJD9vcvcIYy3YWdVecH0jIggxfl9gO+tHmYY/kbczuK8KuYvwx HK0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292102; x=1719896902; 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=fBS3awWlke5rOhwxZuN7iRtQwvkRtjx0DwumJDSTopQ=; b=Eco1PVdyJkeroZRoT4mtw+v/00tbqCohLqbeLkJGbWjHiDoKFUeN3GzD2dWqIQmOIs 8/jQiELIt3Fa+oX1rgtAWS7zWe7Z1HvU0f+uX+7Tre1DgpaWsISni8xabatbaSbqbqV1 sBLqYQea9Xd+K6iWIocefxSWqXtDa0KdMKvW0VMqiaiqKQZIffCHJ3u0pyCFHrFECq1/ StjXnk8DSVoaakNYKskaEp7jk0WpB2T49tVbBgz0KsbZDq331bU3MrxC7kUQ1RFpFwUj BVhRFgx3pgla7YlX41MR91O5XIjHGT1gTyhLaQKWpJNDlZgbx+S/9R2J2lDoNc1tMWHY 04sA== X-Gm-Message-State: AOJu0YwFUaTLUSxToqDs0YfHspqOfGyIUQ/IzUA48Yq9F2rCO+Oj6AcJ HLEgKHHtotc4hwLobHav+4U7CYKVBgeqSoWVTc2Ki/zYnA85CenlnHeds02ViJDoSXNgcPHMf5i R X-Google-Smtp-Source: AGHT+IHNCZdFeID90EBZE+HI7VdAyUlyFtjwIOej6vZIX1CFZb6ywmdws4PunGYO9qzNhh7+gS8B2A== X-Received: by 2002:a17:902:e542:b0:1f6:fcd9:5b8d with SMTP id d9443c01a7336-1fa23f22890mr65764625ad.9.1719292102406; Mon, 24 Jun 2024 22:08:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 10/13] target/arm: Add data argument to do_fp3_vector Date: Mon, 24 Jun 2024 22:08:07 -0700 Message-Id: <20240625050810.1475643-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292205029100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292173; cv=none; d=zohomail.com; s=zohoarc; b=liaxsEmTCx2VbPam8XqDPE5f2I25hLNmErcf8msCi5HccrVELhBB2z6MfjUvyj2D81VWFVFUKXhKd/FdQDybZrvb75VfWaQ6OVzmbHkqrzV0hhgKPulowr6U8elTyFstdP6EoJcPeXEzCnNa2sOAlnyZwSjcJtSkdzhWn+Plw7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292173; 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=gzQJhTxrVxQho+f1ZoeLagRwDrSdhan3/uqwSCOzuLg=; b=ZboFSLEKtlHW9+8QtiSBkD9DE6FkX0HeZYYaDQeFVxCDIH66P0syoJZZVkcdqsC7/X3JGtQFVQL/MDKDJAXu7gK+uIrIwGB4XnskFgikO+b3KHa0McnF6vpTcajTX1gzuHM/2boXYhWMLSsLZ3k44cIoAq6s1/YjJXjf7SnScGE= 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 1719292173927424.70316759428897; Mon, 24 Jun 2024 22:09:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPx-0001Dn-6H; Tue, 25 Jun 2024 01:08:33 -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 1sLyPs-00018S-9o for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:28 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPo-0001YW-Sb for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:28 -0400 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-6c4926bf9baso4202573a12.2 for ; Mon, 24 Jun 2024 22:08:24 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292103; x=1719896903; 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=gzQJhTxrVxQho+f1ZoeLagRwDrSdhan3/uqwSCOzuLg=; b=eMx5p1FkdfUK0ooxcJOnLXNTA5frU/R+LdQFgsvOeL2UioTdqyzbr8Kf2zbWNF1E2c gF96khzZFqKkxrlpOE1kNHLPdtJnnr7FpF8auwzqaZJGr6GyotxWWTf05LZG/eyuhwik GL35OfBB8zZ8k6RuPWP4392Yrr0J3ttyYdWHwD0if9dnOLIZCLF8qF3ArTgHW7Nspry4 JtcsT/we8iUU1DMbVziX5daqyNej1/tr7nwHvHMOlkzQ0yHpBxGUA6pkNOw8agGC8K41 XHkNkIXoir193FBXzQxBXk5Iq4X2Wx3vLd57GtW9Q9gHBGZBH2/fF5ZLREwACux8aAu/ lckg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292103; x=1719896903; 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=gzQJhTxrVxQho+f1ZoeLagRwDrSdhan3/uqwSCOzuLg=; b=lL94y+057jgkBNpLZJnJi2UnqaT4LMueqQBR3Zt37FK7sYpZU6Y2C/dJActmZBc2QN hFTXZEInJ14QiJ6zxFUUSrYMoNAqTgQCBgerrle2GtlFlFTznCTgT8dv+q76TECK2v3e NRVeVmxkt0U84owuVs0i7NqjUvBVFy/AxF8/y4XKC6RtW6YNZP78T4N5SU/L4EUKc6Y6 8iy2P/sDJ6uEXIhZQgfiHo9olc0iZkTr6ahC+enuV8HGde/Niq9Cw7URjvVw3x/r+aVy wH8ovfiimWo5QzK5SPcqz/+YQkIUfj504UiqYDTMYYr7OvQ5z2yuAetnsQDSThILcBq7 mR+w== X-Gm-Message-State: AOJu0YxHbShGsGN3uZHuvxXrwn00+YSGxKi5NEHcJDZIwhqGD492kGF9 VduzkqtZP3gUcFQmvxlCo8knNMRadJwT1tHPPToqdxr+3sN19QlZ5f4nP2I+TZfrPqRnNQlqi26 j X-Google-Smtp-Source: AGHT+IEb33Ce73fVkKGJpnHSJlzsgTzaKMNSsRuPUvKxdXUISxScG9PAUDcAaboOpg1QhzTUsvXlvQ== X-Received: by 2002:a05:6a20:b289:b0:1bd:1048:164a with SMTP id adf61e73a8af0-1bd104819f3mr3460126637.26.1719292103390; Mon, 24 Jun 2024 22:08:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 11/13] target/arm: Convert FCADD to decodetree Date: Mon, 24 Jun 2024 22:08:08 -0700 Message-Id: <20240625050810.1475643-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292174779100017 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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:59:18 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=1719292252; cv=none; d=zohomail.com; s=zohoarc; b=VLXt8MpX+lZ2btUda0pmKKsPtwGjpaF/KORwlZceNofn+htbMUyw4cvn29+MEyv0HryPYzSJeKS2PXQL+UVfBpVzqcT0SEQ4+DofZoTZ/apHjFJB1ZbWEO5QlOQ2bK8LUIneVtYzAPk1tEZ+ba1Rm9ZOUf+QSeVWVIv4TZHXqnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292252; 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=KOVwJ2HbyEXrwGcMTUooR/pqQ3FbdP38VzfLFDauipg=; b=KpHM0lciXVdSj5PyunOaOTZ01KcnYeD0EVZ46A+h41Y4A1Q/Qa4pkiePRTWqaDgc/U4MHaZs00GJZ9Urf6LQNxohwjAqxufN91cSIfBADb+GRozk5uPKEm8XfRiqCVM+IIsluRM9vm8y6ZzzQ2HiBRuKU7vVutjszyNmpkNUkGo= 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 1719292252867855.761347013315; Mon, 24 Jun 2024 22:10:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPv-0001Bf-8y; Tue, 25 Jun 2024 01:08:31 -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 1sLyPu-0001Ah-3D for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:30 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPq-0001Z3-Cs for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:29 -0400 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7182a634815so2341495a12.3 for ; Mon, 24 Jun 2024 22:08:25 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292104; x=1719896904; 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=KOVwJ2HbyEXrwGcMTUooR/pqQ3FbdP38VzfLFDauipg=; b=mxH6fkxe0GmKMb9/aug0CZJXdKyfjRY51f6Oktd8KC3H6t0jSpOIVZ/GhQ+yId5892 nl6iE83aO01ZgU9PatqWoh4kHe31Cu0EKgE5V6mfxCddq72bbD5WpJwE1KQks5dhXZz9 pn88Tz2hsRLGJAA/YH5NojLSTGi0KyHz7A/wzQzWwTcTIo3aHARLd9d2BKnkjX1toj+O Q5UktSNlrDka4pQuEASg+H02T0auXPbtL2ZHXSZUXH/urczMTaHKOkDdk45ZQxoOeglp y5y80qQ41ch+cr6vz29ZG8vgnfF2spUl3iI56GCBwPIQzBCC079P4sHVqU0EvFMe5W6p +4Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292104; x=1719896904; 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=KOVwJ2HbyEXrwGcMTUooR/pqQ3FbdP38VzfLFDauipg=; b=LG2AZ+8qts6I871+UTrXdKHwB3Dl1uBi3JP/8t+M/A7BH2vptWgTsaNhkASuKPRgIU 6Uu6fRyhJvNx5o/89wnpjR+epPhwR3vdqoMTYqDvwPvtssehQPleX9X4LXEJ1ys4r1Gg 3g7iqGRw11eqAzkrqdgDAzBrHIfcI7lX0rGtTz0qzZ8rU1FttfjwoFicjhsWvnksgCLH 8oy7fCKiiShA2a5K5ZbauapSm1A0hiWp2XjsU8Wm3HAqkmrknJXC0tVwodRP7uZ+Rm8z hw9B4jQuDAufAp+jhLosn+rLCH4hNmxRN6FRpY7LE6nojpMxORjJdoNWR+0KwNcaiDlL 7nEw== X-Gm-Message-State: AOJu0YzfqSiPOcwLZGa0sZp/0sIK1P/HxR3osmu98r3sAPqreoyxvTQQ xcQKvn6iJpOakVa5xMjC/jZ1ZetkhgqiwTeosydq2yIs9XTSzUE0MpzfYr5g+NceJM+l5Nzs2fn L X-Google-Smtp-Source: AGHT+IEfQx3dI/h6MqSB2uH6Qv7DJgJ7QkiFKF/bCRXVYj41j+xMQ3n6ih4vcQdvHnyV9g5441BFtg== X-Received: by 2002:a05:6a20:30d5:b0:1b8:4107:ce4d with SMTP id adf61e73a8af0-1bcf7e76fcemr5326155637.19.1719292104433; Mon, 24 Jun 2024 22:08:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 12/13] target/arm: Convert FCMLA to decodetree Date: Mon, 24 Jun 2024 22:08:09 -0700 Message-Id: <20240625050810.1475643-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292253288100013 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 5 + target/arm/tcg/translate-a64.c | 241 ++++++++++----------------------- 2 files changed, 76 insertions(+), 170 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index f330919851..4b2a6ba302 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,9 @@ 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 q:1 10 1111 10 . rm:5 0 rot:2 1 . 0 rn:5 rd:5 esz=3D1 id= x=3D%hl +FCMLA_vi 0 q:1 10 1111 01 0 rm:5 0 rot:2 1 idx:1 0 rn:5 rd:5 esz=3D2 + # 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..0a54a9ef8f 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,36 @@ 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: + if (!a->q && a->idx) { + return false; + } + 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 +11005,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 +11980,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 +12000,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 +12012,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 +12027,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 +12040,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 +12048,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 +12309,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:59:18 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=1719292171; cv=none; d=zohomail.com; s=zohoarc; b=FU4ZKLpxCdnQJQa0x446Fp2vX/CCzmBRm2QhstYSMvUGTx/DL0TOxO+K2eCWi7nsU0MJKJE30axmD4Abbh6ZIxxneTsgVXjjzInbJsgBWvGOaPDfjXGXwsJWk/2zc4MUGIksUv9lPXefHdoLPdiH3hlKtqgsHbBYPoYEM2iPrfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719292171; 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=TQx1O4lRhBgRZKl91tzhM+7YS0VF3KiwHZYbH152yYY=; b=YwD6cADiKfX04/xx5tR2nGERclcRVrulFOENku1BVCAuBKjtqUzWz6U9CDU+dIiZdocqMvxnJD6eJhEXM9671oafgfo/gxGoT/IJOq+pniRbynLUh5eQ3dvi//XvJqiV3QaDiZmie5vm+O0X6pfaIhx4lpo93lpHA5/F1taiNPo= 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 1719292171271723.8401738184162; Mon, 24 Jun 2024 22:09:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLyPw-0001Cb-1H; Tue, 25 Jun 2024 01:08: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 1sLyPt-0001AO-Ts for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:29 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLyPq-0001ZQ-QG for qemu-devel@nongnu.org; Tue, 25 Jun 2024 01:08:29 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1f47f07aceaso39877395ad.0 for ; Mon, 24 Jun 2024 22:08:26 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc72e9sm70843865ad.296.2024.06.24.22.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 22:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719292105; x=1719896905; 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=TQx1O4lRhBgRZKl91tzhM+7YS0VF3KiwHZYbH152yYY=; b=VGLWjTwdWb6Vgkn2I9rhOITeYUztro7JTAbBQ7EmyjgT5dyPsDSuO+KIUj8e27iNpN kKyBdzyvEAb6Vf1V4FXbto0yWZYMMbD2QeiCfpnmbhMyy/7aEdYi43ZdTYjFTXXUKDqJ zI2r3CTR+yNWETH7L5bMVt9mygNMxdMDNWIkLk4tatW8QoEzuNKCkFMk9hm2kMttFCGs 8ipFa0onP2AT28zbuI7YzZytuCRpyrQmG1qGYQwii4S3GTJr9AS19cmXONg4PE95GtvC hw2TbX1Mn/cpdj60AxLdK2IiKj2W7LFlY6CegIaQEaL0AmKDA8M+m29bnQLmKeBuqe28 6Ufw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719292105; x=1719896905; 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=TQx1O4lRhBgRZKl91tzhM+7YS0VF3KiwHZYbH152yYY=; b=lGjQXTCWcO9QXl7QWN4O1dv2NKAtVU/n48iejwlEMf4GDKw6K0p4Tp2Zsyu7VBejCb ita6tqCoNQze1ULL2g+VRwXBY9MAkl8zkb+nwONM37LZk1c3TDfz+FbAyrYH+C9UjMBS 6wEPvTBQCrAVJsX2McRu29OlAhmIaL3xwPk50Wp/eZh8cfvaUC3U256RG47ryI1Oiddg 6vdXc2rnAPL2Tg1d4amYruPZSOGSWshr/fyc1+CXriTab1hXEeQn/NObCCuH6YfJhQ1b QuYq1A7ihrjcIf5RnxZcOb05j9Buo5VJ6zWtP/O09e4x6J3uOZFBq9QDAPQqvF95chwH lijw== X-Gm-Message-State: AOJu0YwNpcQNyJuVzolSEgQxilbCC99TJ0kKNndUIx69RULef+diDHXK xagIZhIm2vTvKOKOSEVmk54PY/MVsblEnoWtfmur+wiF+IfmqNWOugTn91VsIwO3tonL2Z0IN7+ H X-Google-Smtp-Source: AGHT+IEyMz50+fIt8Lt9f7g3YZpxq9bST9BeIV0pLn70anWO9+R2zAiMFvSLZeXv0N3tBqDpx+5JTw== X-Received: by 2002:a17:902:ea08:b0:1f7:2479:a50b with SMTP id d9443c01a7336-1fa15937ad1mr88233715ad.54.1719292105245; Mon, 24 Jun 2024 22:08:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 13/13] target/arm: Delete dead code from disas_simd_indexed Date: Mon, 24 Jun 2024 22:08:10 -0700 Message-Id: <20240625050810.1475643-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240625050810.1475643-1-richard.henderson@linaro.org> References: <20240625050810.1475643-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719292172869100009 Content-Type: text/plain; charset="utf-8" The last insns in this block, MLA and MLS, were converted with f80701cb44d, and this code should have been removed then. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- 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 0a54a9ef8f..11955c0c36 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -11979,7 +11979,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) { @@ -11993,12 +11992,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 */ @@ -12050,96 +12047,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