From patchwork Tue May 28 20:30:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 799510 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp421575wrz; Tue, 28 May 2024 13:32:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUEf3httUmZh9pOryujSGy2dN4z8mzETkKhLtWYWEyVDi+f/zkfTk6tWAjf1RuW36ibnuEUdQnWRV4Kg/obuQD6 X-Google-Smtp-Source: AGHT+IG/iSntaa06bxTY/RufawLJKV9FQ/c3gbz/RDBy+itSE7kCm2ki6fiOBfK1K/gC7TgynHVv X-Received: by 2002:ac8:59c9:0:b0:43a:dac9:d9b7 with SMTP id d75a77b69052e-43fb0eacf3bmr151617161cf.39.1716928364283; Tue, 28 May 2024 13:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716928364; cv=none; d=google.com; s=arc-20160816; b=gKKEDirMvpxmuV0tp5WgeWSFNatHeH7Cp2+Ns2Jqw/v+bYsqAUyQJ5Zjr9BFmNL5Bd 08lMoyXyq0PSkiyigHM63xtNpF8JtBQwF2hpj1xq30Qabd2my3lm6z+NsN3f09+hXkyf TmPAbNfFvVRATPUZfl7Dqs8Pyj82Skx0kNgvnCUkAcI/zwRO0O+t2dlNna7RRxtUrxFX 1lb+K5KBqbSFw7JXYaEy0x6onhwx4V/JIF3ho28MG7xvRUqvSzg3MvrV9C1Nnv95DVpc xY+70cnsdO4dQ0Pcay+Us8QqUEsNLwgIBrHAOp97Bi7adacbpqbdcC7i/osUn0ch4MX9 rbDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aZbRVWSAzpXaBOJGm3f2hQ/+OFnj87ZeGyTFdIhlSfw=; fh=ZhBia3nL9o1nuf7SbgdYn/0pDmAeja6gisyWXi2cqYE=; b=uxjVQY5obG/wi17iKW3ge5GkFKdsy2SSMYEqGDXfJcfOSQEg3Ywx5qX+h0XvyPsuLy BSybecS3hS2fsfB9kVyXkEcHlsBOu/jzQEXG9/72wisDSNP4gwQxQQnWhJqrc+uAmGUL Q+xh3OQH+QxjynJk0FUp/1eD8XiRJMK2l6/Hs6CF9blxwbWEqS3748OpgV4cj1+ZN0oJ fiXpTYiP7eJ9CV0cTpZR1QZXuc0Q0nN6us5OLIL/C3v1QKkSHTjgjxtrz0PlvJeP79p5 7W/OnOidgpjAte5WKH/Rk9krapf+WFg70mjdlA9e07usBl79P43nKKfIVTQhKue+ljyx iLTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n+Qp007C; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18b3395si110391131cf.457.2024.05.28.13.32.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2024 13:32:44 -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=n+Qp007C; 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 1sC3UB-0003wE-Nl; Tue, 28 May 2024 16:31:55 -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 1sC3Te-00033y-3W for qemu-devel@nongnu.org; Tue, 28 May 2024 16:31:22 -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 1sC3TP-0003hf-UG for qemu-devel@nongnu.org; Tue, 28 May 2024 16:31:21 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-65c5a29f7f0so1027145a12.1 for ; Tue, 28 May 2024 13:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716928264; x=1717533064; 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=aZbRVWSAzpXaBOJGm3f2hQ/+OFnj87ZeGyTFdIhlSfw=; b=n+Qp007COUk1MdQd+uTEu7pQJx/kCFQhcYyIRfqBEiccS5K7rFcR4tUO6DxLJk8AS7 8XGjtVTgXVNf21R0y6K+NiAn8FXccFEUGdRJDALJado69+jWqKsZ91ywXAW+VjvgN+Iv teo9ZvxFD9EUkLO6zPH0aAb2zz4XJMy/GzNoWBzMoF8rXTfB/j9Xrz934b0yuMSSihSK 3vVZJtiVIsyikyYK5T6aUjhalTd+MfJp4zDdgzgJdl+nWclbNm8KznUckRpFpGTvkGLh JO5BXdlAjmPdFRHeKL5moVWASei0w8ETW0ZD0Fmlci7SELRfrkGtx0WHrps8te9xvUXQ W4bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716928264; x=1717533064; 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=aZbRVWSAzpXaBOJGm3f2hQ/+OFnj87ZeGyTFdIhlSfw=; b=fX9mzNOdj0qu7Svyy1NNXKUBZ66n4pjVsLrbr65VnId0KqG4lcKHAfF/Nz1cm94UfU 4fxY1ofFdSdX8xykeQiNpaJ7sQEfmfz1JgyOZo6ZF/5Zd/7VTYh073GFEdvta7CTi5cM EHcL9POI8U8Q8tAhhUmAe61xGzWo89/7S+0ONfJh0jKGk9oKfv88ODpQwyBhp3+757OS hld9k8xT3bSkwVlnkNl1iF9KWxqp7ji+ZnVVsk73iQd1tTMJBxgVkkGUSSu/bCPpklb1 Ig2CAodfRSbCrq1wBvFt8TBTye1m79xtOYmYZcdIdQG2amFfpV6p+pQdEdfb46pnobL0 fc2g== X-Gm-Message-State: AOJu0Yyxim53ITgvWE5z0nl2hxa7+r6YvrLeO65wszdtFAKwM2PwrdXX NY+B5Rg8DkTIKxBVF8MA2T32suypkcoIaSniuYIGTattUgOprjAeVIY03p0mmYe/TcjzXdBPuTO l X-Received: by 2002:a05:6a20:438d:b0:1b2:184d:c197 with SMTP id adf61e73a8af0-1b2184dc30fmr13256084637.42.1716928264376; Tue, 28 May 2024 13:31:04 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fbd3dbe9sm7042036b3a.10.2024.05.28.13.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:31:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v3 21/33] target/arm: Convert SHADD, UHADD to decodetree Date: Tue, 28 May 2024 13:30:32 -0700 Message-Id: <20240528203044.612851-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240528203044.612851-1-richard.henderson@linaro.org> References: <20240528203044.612851-1-richard.henderson@linaro.org> MIME-Version: 1.0 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 3061e26242..e33d91fd0a 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 5f3423513d..00c04425c1 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);