From patchwork Tue May 28 20:30:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 799508 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp421515wrz; Tue, 28 May 2024 13:32:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHQiN4NeJC/krXOSJJUZ1cCcFOUZJQYxZmL0edkBE6DKCwPiqTqiPeRE+fykADQVBT+dTqk9TFMY3rFQxkgGfS X-Google-Smtp-Source: AGHT+IFLliBfGIc90KuTjz+/N7jTuOxPDariJgkJLk0v5tWbps9Tl/ONqCAHGsPFHf993sPTw05H X-Received: by 2002:a05:620a:270a:b0:793:750:3d5e with SMTP id af79cd13be357-794ab087b3dmr1897862385a.29.1716928353688; Tue, 28 May 2024 13:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716928353; cv=none; d=google.com; s=arc-20160816; b=0OlHXhAIu57DfITU3orDicUH7Hk6VLo3jyu5s7zpCqDZxH4GSNZUH9VQGxEKVBbs2X CBdU09NDds/zhHHO4sAskzLUgKWYj3R0kOo6V2DYPj7oC3rN+B7X0M/0aMwj45cX/KkY lUJBOVuHpHOARZjSyefWuSIG+GcQO1C3sAYLit5NreEn7XIYFSXblyDdfK3mFCkEabIq 6i/nb9l0kQ2gUvL8Ih/ITRVVkxTx6GR2mOX9b9WbPLOp2hgipo0FJZyPZPBm/hq0bocF uM2RYpUJbBoTTLzcnlzr/e1oE6MpqO2PPWqeCsIO9Schmx79Xlmf7ueGcv3MV5jkavhm PrBg== 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=pzE3AydVd0DLId7JKat9ss4c4y2S9U7RevhtH4FXhqc=; fh=ZhBia3nL9o1nuf7SbgdYn/0pDmAeja6gisyWXi2cqYE=; b=O0Z0FhnB6cip+JL8smJnXK2jzt6pea3z64XVscFtMGezEFXALzhcPze/0uW8vCvIMo 0E8G99+iXA1DwG8X70BUSyYfXSnQ/h+Q5hvo0AqWbciQmERHWiETOwqNEA0/UdHBC6GN fQ+7uNqq8GpgZz6P7YJCmubAQYi+lvraSo6z0rlurr69F+gVI6Sc+Afl8RAmnU2qRBnQ KX5HjiqnPaXRLUmtQTrLYuJUIP+oZLG6TgW/ebneNh4Tn7n+1llFV6bdRS+3Awvk6+og s1Ac67UbDWP2nf5U/zbzTZrXa0iC1iYLELPh6W6yRUoV3QQbSUBJiIijEEseZOXAhrHK P8aw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AfDJ+ZIW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-794abcabfd6si1097949285a.58.2024.05.28.13.32.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2024 13:32:33 -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=AfDJ+ZIW; 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 1sC3Tk-00039g-Pz; Tue, 28 May 2024 16:31:28 -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 1sC3TW-0002vq-Rf for qemu-devel@nongnu.org; Tue, 28 May 2024 16:31:14 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sC3TK-0003dG-9w for qemu-devel@nongnu.org; Tue, 28 May 2024 16:31:13 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6f8ea5e3812so973422b3a.2 for ; Tue, 28 May 2024 13:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716928259; x=1717533059; 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=pzE3AydVd0DLId7JKat9ss4c4y2S9U7RevhtH4FXhqc=; b=AfDJ+ZIWdixf8YXFQIreeUABnSnmY5Tzr/STSOywgsZ1Dc/ep8SlrEFmm0xuVq/04F jyf66UI1laQ3eXx+F6NuQRZ3+fkAvyDomWtqNWZtWVAonAsS+JpxhvH1tEgkNN4ETLPk Lnihhw1qGBBKEgSOpn8TKFMng49+t+e0KkqZRihY470DHx6SMBh8CR45+b27NGvMgsH7 Kxn5K2I9rXWKzSxRGRMtvyFi9tEiJwZNvx6xAyqemvJdewojH5nFJTyYTsdHJ7UJryF9 jykyQ2m16FFftM0NyOpvUsRBRIXKRDiXfYBpjG6xug80YKol28vFXHlSbVv5VmPfJat1 +xPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716928259; x=1717533059; 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=pzE3AydVd0DLId7JKat9ss4c4y2S9U7RevhtH4FXhqc=; b=KrvCF+P59pJR/Dkb1QWtVPjqvkIj7bGtnJ8ZWjcbznWj7YyE5SwDdVC3Ypm4R22Fny D5cNbEHfoNcU9XCvDHpsLvwXJPbDh2Pwj87hfVJIVFmJ+L2iDBZ9bM5USPtNSaTuD2UJ PLEk8JIX6dosl/ei3SltIvrYgKJArfIHTt7EX6WfbMteZa1QCA0g9ohLAZ2JmJJLR3lD Vxt626Wq6ENoTrmBwVpiFB7P6PlEdvrcsNOWMeMKPxp3vhM62bZ+XGSFQ+qvinGRUaR9 z7cQUjB88QZapDicQtEWrkIk59D3J3kA2dAKso2ECMngaSyt8b9Lrs+KojqO0ktsuifZ f2/Q== X-Gm-Message-State: AOJu0YwriLX7K9y9OSYu8hRfCL2OMXkfXKOc5wlv+MN7HWSi0u9VFAOh Tg9gYM0xZOcjAPhq4hoJeMXm8GRIMG+6aBJBRTGOFlbqxhFq1eP841SAAXdrotuWroIGNVzYCSY 8 X-Received: by 2002:a05:6a20:da81:b0:1b2:280d:90a4 with SMTP id adf61e73a8af0-1b2280de3d0mr10494797637.7.1716928259357; Tue, 28 May 2024 13:30:59 -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.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:30:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v3 15/33] target/arm: Convert SQRSHL, UQRSHL to decodetree Date: Tue, 28 May 2024 13:30:26 -0700 Message-Id: <20240528203044.612851-16-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::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/a64.decode | 4 +++ target/arm/tcg/translate-a64.c | 48 ++++++++++++++++------------------ 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 85caf37948..96ce35ad40 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -762,6 +762,8 @@ SRSHL_s 0101 1110 111 ..... 01010 1 ..... ..... @rrr_d URSHL_s 0111 1110 111 ..... 01010 1 ..... ..... @rrr_d SQSHL_s 0101 1110 ..1 ..... 01001 1 ..... ..... @rrr_e UQSHL_s 0111 1110 ..1 ..... 01001 1 ..... ..... @rrr_e +SQRSHL_s 0101 1110 ..1 ..... 01011 1 ..... ..... @rrr_e +UQRSHL_s 0111 1110 ..1 ..... 01011 1 ..... ..... @rrr_e ### Advanced SIMD scalar pairwise @@ -890,6 +892,8 @@ SRSHL_v 0.00 1110 ..1 ..... 01010 1 ..... ..... @qrrr_e URSHL_v 0.10 1110 ..1 ..... 01010 1 ..... ..... @qrrr_e SQSHL_v 0.00 1110 ..1 ..... 01001 1 ..... ..... @qrrr_e UQSHL_v 0.10 1110 ..1 ..... 01001 1 ..... ..... @qrrr_e +SQRSHL_v 0.00 1110 ..1 ..... 01011 1 ..... ..... @qrrr_e +UQRSHL_v 0.10 1110 ..1 ..... 01011 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 b9d577f620..2424c6d314 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5162,6 +5162,22 @@ static const ENVScalar2 f_scalar_uqshl = { }; TRANS(UQSHL_s, do_env_scalar2, a, &f_scalar_uqshl) +static const ENVScalar2 f_scalar_sqrshl = { + { gen_helper_neon_qrshl_s8, + gen_helper_neon_qrshl_s16, + gen_helper_neon_qrshl_s32 }, + gen_helper_neon_qrshl_s64, +}; +TRANS(SQRSHL_s, do_env_scalar2, a, &f_scalar_sqrshl) + +static const ENVScalar2 f_scalar_uqrshl = { + { gen_helper_neon_qrshl_u8, + gen_helper_neon_qrshl_u16, + gen_helper_neon_qrshl_u32 }, + gen_helper_neon_qrshl_u64, +}; +TRANS(UQRSHL_s, do_env_scalar2, a, &f_scalar_uqrshl) + static bool do_fp3_vector(DisasContext *s, arg_qrrr_e *a, gen_helper_gvec_3_ptr * const fns[3]) { @@ -5413,6 +5429,8 @@ TRANS(SRSHL_v, do_gvec_fn3, a, gen_gvec_srshl) TRANS(URSHL_v, do_gvec_fn3, a, gen_gvec_urshl) TRANS(SQSHL_v, do_gvec_fn3, a, gen_neon_sqshl) TRANS(UQSHL_v, do_gvec_fn3, a, gen_neon_uqshl) +TRANS(SQRSHL_v, do_gvec_fn3, a, gen_neon_sqrshl) +TRANS(UQRSHL_v, do_gvec_fn3, a, gen_neon_uqrshl) /* @@ -9426,13 +9444,6 @@ static void handle_3same_64(DisasContext *s, int opcode, bool u, } gen_cmtst_i64(tcg_rd, tcg_rn, tcg_rm); break; - case 0xb: /* SQRSHL, UQRSHL */ - if (u) { - gen_helper_neon_qrshl_u64(tcg_rd, tcg_env, tcg_rn, tcg_rm); - } else { - gen_helper_neon_qrshl_s64(tcg_rd, tcg_env, tcg_rn, tcg_rm); - } - break; case 0x10: /* ADD, SUB */ if (u) { tcg_gen_sub_i64(tcg_rd, tcg_rn, tcg_rm); @@ -9446,6 +9457,7 @@ static void handle_3same_64(DisasContext *s, int opcode, bool u, case 0x8: /* SSHL, USHL */ case 0x9: /* SQSHL, UQSHL */ case 0xa: /* SRSHL, URSHL */ + case 0xb: /* SQRSHL, UQRSHL */ g_assert_not_reached(); } } @@ -9467,8 +9479,6 @@ static void disas_simd_scalar_three_reg_same(DisasContext *s, uint32_t insn) TCGv_i64 tcg_rd; switch (opcode) { - case 0xb: /* SQRSHL, UQRSHL */ - break; case 0x6: /* CMGT, CMHI */ case 0x7: /* CMGE, CMHS */ case 0x11: /* CMTST, CMEQ */ @@ -9490,6 +9500,7 @@ static void disas_simd_scalar_three_reg_same(DisasContext *s, uint32_t insn) case 0x8: /* SSHL, USHL */ case 0x9: /* SQSHL, UQSHL */ case 0xa: /* SRSHL, URSHL */ + case 0xb: /* SQRSHL, UQRSHL */ unallocated_encoding(s); return; } @@ -9516,16 +9527,6 @@ static void disas_simd_scalar_three_reg_same(DisasContext *s, uint32_t insn) void (*genfn)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i64, MemOp) = NULL; switch (opcode) { - case 0xb: /* SQRSHL, UQRSHL */ - { - static NeonGenTwoOpEnvFn * const fns[3][2] = { - { gen_helper_neon_qrshl_s8, gen_helper_neon_qrshl_u8 }, - { gen_helper_neon_qrshl_s16, gen_helper_neon_qrshl_u16 }, - { gen_helper_neon_qrshl_s32, gen_helper_neon_qrshl_u32 }, - }; - genenvfn = fns[size][u]; - break; - } case 0x16: /* SQDMULH, SQRDMULH */ { static NeonGenTwoOpEnvFn * const fns[2][2] = { @@ -9540,6 +9541,7 @@ static void disas_simd_scalar_three_reg_same(DisasContext *s, uint32_t insn) case 0x1: /* SQADD, UQADD */ case 0x5: /* SQSUB, UQSUB */ case 0x9: /* SQSHL, UQSHL */ + case 0xb: /* SQRSHL, UQRSHL */ g_assert_not_reached(); } @@ -10959,6 +10961,7 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn) case 0x08: /* SSHL, USHL */ case 0x09: /* SQSHL, UQSHL */ case 0x0a: /* SRSHL, URSHL */ + case 0x0b: /* SQRSHL, UQRSHL */ unallocated_encoding(s); return; } @@ -10968,13 +10971,6 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn) } switch (opcode) { - case 0x0b: /* SQRSHL, UQRSHL */ - if (u) { - gen_gvec_fn3(s, is_q, rd, rn, rm, gen_neon_uqrshl, size); - } else { - gen_gvec_fn3(s, is_q, rd, rn, rm, gen_neon_sqrshl, size); - } - return; case 0x0c: /* SMAX, UMAX */ if (u) { gen_gvec_fn3(s, is_q, rd, rn, rm, tcg_gen_gvec_umax, size);