From patchwork Fri May 31 12:03:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 800528 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp696423wrw; Fri, 31 May 2024 05:11:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWBxJNVxp2k/Hx1ctpbOiaeqMNUTSLIW27+NyuTKI0IRnLe+bSu4C1xh9oPOIf+eRHjE8UcQPJhjeRR9i8T5dZX X-Google-Smtp-Source: AGHT+IF92yZUsMTNcpO6tPnDj8LRUIjL+QsllMK/qE1U9/57x/fAM8Xj1KRbe7YwivNwOqbvgbws X-Received: by 2002:aca:f19:0:b0:3d1:d217:91f9 with SMTP id 5614622812f47-3d1e3495e4emr1502743b6e.13.1717157481501; Fri, 31 May 2024 05:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717157481; cv=none; d=google.com; s=arc-20160816; b=XDRXgfG4+xNs0C7ntfn5XN1fwTMsfe0XKIo2aQEsKtmszwo8gUr+nfI0RD8fTfJyFp 4+l+Szfi3d3nhuRCwnuLmtL5eXiqeVgQhHIdGa4/N/kqqjcJ25TOtb0s1COOdDCOagev McDIbdtT3n4ePBWyv7rSsjb/vg2vVmF7HcWR9zVIwblp1+GxNoNF5es7H2k4OvV4Cw6O L2b9ogbU27RAnkS9r4V4Fn3watstR0NWG9KljE5D6jahCm9E9fACegx8mNuVWI707XXp VkECxlIvtOCWjgAOFKwKgnr+YOj7VbbtolwxBhwKVACLHM3YXNAuZKB92DLegta9tq9e POXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ClWAnerI+alfVJv/NG1loGvwRVYHgXpz9iZyVVhjoYg=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=0G9KSBNiZXPrEib1d1ptjYvUqBkVke4Fn8D01pPdeeAEZyqmIT3b+FldmHumpjImIP mBYy4Lei8a4anRVJL9pAFxWGitdvIH2lkqT47+i3An2FnC2mSwzABTG7727vmUNErEcc j9AtwaEHoCz8TAQxV8ugRlJclQPfWkcBUy/xO/YFtgnKXmJiyoxB5HMrow0v5MZJf+TD FKo/iHW9IBd7+rVRuC7vqxKADtX6CzKDQ1IRVRZ2Y32fVrjzj7uQrl2+p4g+MjTaXc/9 Hf1IQbC79CKd925jxsltTuX0iY72jautVI8OFYARJkOmyiJfJJXPP2KQ2v9fo6OUNwf0 EFdA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZQAgQCiH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a733b6dsi19196616d6.6.2024.05.31.05.11.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 May 2024 05:11:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZQAgQCiH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD108-0004Z8-53; Fri, 31 May 2024 08:04:52 -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 1sD0zk-0004PC-SG for qemu-devel@nongnu.org; Fri, 31 May 2024 08:04:28 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD0zf-0003T8-Rz for qemu-devel@nongnu.org; Fri, 31 May 2024 08:04:28 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2e6f33150bcso21078451fa.2 for ; Fri, 31 May 2024 05:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717157061; x=1717761861; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ClWAnerI+alfVJv/NG1loGvwRVYHgXpz9iZyVVhjoYg=; b=ZQAgQCiHNhXi507fxCR2/2wESVwbdR3LxCem2bMcUf9Okzz7vK4Ngxavr3nR4YhMKR jdvOJ9sJWKO3ALqscLHGxKAEfqLFdDPHTrfYeqLNHrPCcg3dt1fv3vRdaVpNTY62cC4N SvY7Kn9T1geVxO/F+2sKhqU1AUXCeV110j6ppwKrUl8uRkjmdnQQKAM4Vfi2JLBWBjRM HRq2uLKC+8tNTEaAlEGEaIHRygnXSUyaPHQkMbxKl6Jpe/031JjPNKFq7n5qJKpWgrEh gEm9r3A7aMPdhSEiuHEGh9gLyPBReNn1WFtkh6dHfKSMzVmeOumWVrjdwHWgmEH6FEEL ShKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717157061; x=1717761861; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ClWAnerI+alfVJv/NG1loGvwRVYHgXpz9iZyVVhjoYg=; b=uKbl4Jq5VZLexU8ArgmusT11NdTck5zsPou8A92tm/aC3t0kPN7DdJi9k6nb77w+cE L8sLx1pZhGl/auTEnPU8iH4u0jcuk7+0OQmZUsejByDTKuu9t0WqrFm4q3MRzamCMrEX RdZGh7WIRk+6J/1TrQLzvb6l9ffb6CAuAmHdHTjyQSdBQUJ+7A5GKXEOhRr7Q4R8Xj3i Gm9Lg9qYswdpsfBtaHoqXSiJwws6UIZQLXgldRMAv7vptQPKB/qmd14ha8827ngQog0Q ZB+gCHpWZbhlp9gWZVyoj3iG2dJCZprEryTI90NMFwE64NjGI+iLl35X4RKOvm8cHTKe Nznw== X-Gm-Message-State: AOJu0Yw34Pg5eHXDZkZ2y7IWrg28ratpbp3alRkWwSXki+HiC5dEChco xRUVibyOySKIKLtTrVooIgZfpOaaCYm7gGRi9rwUIgUAM4ajImcv0q8maq2U3xg45mHzeRAjqWV v X-Received: by 2002:a2e:6a19:0:b0:2df:b7cf:9607 with SMTP id 38308e7fff4ca-2ea95114215mr13650171fa.22.1717157061609; Fri, 31 May 2024 05:04:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42129de0cf9sm37027685e9.13.2024.05.31.05.04.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:04:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/43] target/arm: Convert SHADD, UHADD to decodetree Date: Fri, 31 May 2024 13:03:44 +0100 Message-Id: <20240531120401.394550-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531120401.394550-1-peter.maydell@linaro.org> References: <20240531120401.394550-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=peter.maydell@linaro.org; helo=mail-lj1-x229.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240528203044.612851-22-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 2 ++ target/arm/tcg/translate-a64.c | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 3061e262424..e33d91fd0a4 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -912,6 +912,8 @@ CMGE_v 0.00 1110 ..1 ..... 00111 1 ..... ..... @qrrr_e CMHS_v 0.10 1110 ..1 ..... 00111 1 ..... ..... @qrrr_e CMTST_v 0.00 1110 ..1 ..... 10001 1 ..... ..... @qrrr_e CMEQ_v 0.10 1110 ..1 ..... 10001 1 ..... ..... @qrrr_e +SHADD_v 0.00 1110 ..1 ..... 00000 1 ..... ..... @qrrr_e +UHADD_v 0.10 1110 ..1 ..... 00000 1 ..... ..... @qrrr_e ### Advanced SIMD scalar x indexed element diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 5f3423513d5..00c04425c1e 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5454,6 +5454,8 @@ TRANS(UQRSHL_v, do_gvec_fn3, a, gen_neon_uqrshl) TRANS(ADD_v, do_gvec_fn3, a, tcg_gen_gvec_add) TRANS(SUB_v, do_gvec_fn3, a, tcg_gen_gvec_sub) +TRANS(SHADD_v, do_gvec_fn3_no64, a, gen_gvec_shadd) +TRANS(UHADD_v, do_gvec_fn3_no64, a, gen_gvec_uhadd) static bool do_cmop_v(DisasContext *s, arg_qrrr_e *a, TCGCond cond) { @@ -10920,7 +10922,6 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn) return; } /* fall through */ - case 0x0: /* SHADD, UHADD */ case 0x2: /* SRHADD, URHADD */ case 0x4: /* SHSUB, UHSUB */ case 0xc: /* SMAX, UMAX */ @@ -10946,6 +10947,7 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn) } break; + case 0x0: /* SHADD, UHADD */ case 0x01: /* SQADD, UQADD */ case 0x05: /* SQSUB, UQSUB */ case 0x06: /* CMGT, CMHI */ @@ -10965,13 +10967,6 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn) } switch (opcode) { - case 0x00: /* SHADD, UHADD */ - if (u) { - gen_gvec_fn3(s, is_q, rd, rn, rm, gen_gvec_uhadd, size); - } else { - gen_gvec_fn3(s, is_q, rd, rn, rm, gen_gvec_shadd, size); - } - return; case 0x0c: /* SMAX, UMAX */ if (u) { gen_gvec_fn3(s, is_q, rd, rn, rm, tcg_gen_gvec_umax, size);