From patchwork Fri May 12 14:40:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 681180 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp3995060wrs; Fri, 12 May 2023 07:45:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Xua/N/GTPoEM5r/frDEnqMxFXNLlwjjc3VvrKQ9j+bj7J8dIgZDBcBkeX9LI1CEP/ajXi X-Received: by 2002:a05:6214:c8d:b0:577:5ffe:e0ce with SMTP id r13-20020a0562140c8d00b005775ffee0cemr34483079qvr.25.1683902735624; Fri, 12 May 2023 07:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683902735; cv=none; d=google.com; s=arc-20160816; b=ZqO2jc+k1vblPoJPssfMdiMTb8JHeDXu5ecG8Euf2oO5N7jCAgSsyr09LpplPwYZbJ ZRwiHnfxk0hAN7e4Hpr77oO1Ie8gIHmTEOMGiobjrthlsWGzrmtHzEUjy9RuKQi5jiNB vTKSipsLYNcyekE+epZEjpJd0KG1tyu8wx9uzluF1R6HPLPNZ0XgCm4OCHujA77yQFL6 Tps/nSiCwh218Nzqz08GKTNMWd3tnzMMR85jbzC23aYaGrMFNAiCjU5JJvoRAPX97FGf t22pDSg9tzLFF4Ou4EpXF7+ei6AgjnPgWf1OcVOtljg6O3H1vTsXAQfZk/3tjYk/rogB DV+A== 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=F7ZdreOn7GzP2/qhzWCJzqHK4hMlTf1RtG4DdFV8A+I=; b=gD7llqRBYTUErDNvVd+VDfPmI5vfcl5F8S9qdCXI/+RVHZt+jcAUu2KN9y7Z1LFzIS 3ZeakWqqki+aZEJ2yVJ1AagaK3VXw6GJDWDlGyWgIvrsp/IcLIGZfJk2aC2IX9s8SwFo 7yP8pN6qoY7a0umA1MhhwppgnQ/+xxFftgo2lBqo+qZKY6ZDKuMAGhPSu5FnMHfvW+Fr 1eESbUhhHP8Bh61baJSrtRtUMadqqpLq6O7pYHsy4jf0gg+yydG4UNkBSQAki/NSdlOh swwUX4TzXYlfm7l7iz8heoNRNb9ABs5PWiI6yoYJ5fcYMgXd0sO++YRBQRakQYDQw8SS tRLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ruCmCfeA; 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 a2-20020ad45c42000000b005ef58580b80si5961688qva.186.2023.05.12.07.45.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 May 2023 07:45:35 -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=ruCmCfeA; 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 1pxTxW-0006xZ-JN; Fri, 12 May 2023 10:41: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 1pxTxU-0006uv-Ns for qemu-devel@nongnu.org; Fri, 12 May 2023 10:41:24 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxTxG-0004hR-O2 for qemu-devel@nongnu.org; Fri, 12 May 2023 10:41:24 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-30789a4c537so5092239f8f.0 for ; Fri, 12 May 2023 07:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683902469; x=1686494469; 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=F7ZdreOn7GzP2/qhzWCJzqHK4hMlTf1RtG4DdFV8A+I=; b=ruCmCfeAjlWFv6ZAPQ1UCtxDHaOIBb3VUZxb6qXl4HP1Q4Vtwp4zJh6LG6zDL17gqI gQtGlrIR0fUBGWUyD8zMvHUMPAYMc2Xh1Eb5Jyy/oMANuGsrKI1Hz/y3Q06bC9/+RBYN zKzm07JtdFVOu8qwjznHxzsgW4YtdpUDN+rcWSOsbWe6aYTOCWRwekXgjTYRxSWxHBLw 0Z+kUMUrUS5oGJyh1eE2AGyC03HVpg5KftAyIk/8k7RKhA4foVXbViTxRSWQqEYkVy01 eo0GnWXEgTzdTfgSbrE2F7l5GAYuuSR8S3x3nrZYCIkIv2azjQGJrDpgoYXAE8SeGYr/ aGfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683902469; x=1686494469; 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=F7ZdreOn7GzP2/qhzWCJzqHK4hMlTf1RtG4DdFV8A+I=; b=LlYtH9dLm+7PynGCTbOco+mL9Tfi8cZGwT9eNiuw11XGHwqjBmZcSQOHbLdbitDCLk aN5eJCcLjm5+i5zKQUImqxTBKtitGWrlouHu1pHNF3XDpp4gb5nTjIjugt/bRbCSy7wn 8UDxWKbqigmxDXYvm3vytGVNpVmgmj3nSJUdoUVgE4u5Vw4p6p4/NQdQBuvqUb8wYBA3 KLkyVwjfych/rlFuuNPG615YsW0ofOGNfTIJtiDFM/dEOsho6Tw2Ce10D/c2zlBkxeyu VBEeiOPUhK7WrNRB43aaUE5XOQ7l98LBBllfr5DTvXwgNRHiEIpkyQPudCkKUYGiiDCB 6cVg== X-Gm-Message-State: AC+VfDwxDDATabcO8BizypAmTEqgdQm3Zv4W13CBvA1MAfXd05GJbS00 HLr2itvosAn+QtrmVyj3t8F21g== X-Received: by 2002:adf:e991:0:b0:307:a58f:5f7b with SMTP id h17-20020adfe991000000b00307a58f5f7bmr8780705wrm.64.1683902469393; Fri, 12 May 2023 07:41:09 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id f12-20020a7bcc0c000000b003f17848673fsm28916167wmh.27.2023.05.12.07.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 07:41:08 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PATCH 03/20] target/arm: Pull calls to disas_sve() and disas_sme() out of legacy decoder Date: Fri, 12 May 2023 15:40:49 +0100 Message-Id: <20230512144106.3608981-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230512144106.3608981-1-peter.maydell@linaro.org> References: <20230512144106.3608981-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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 The SVE and SME decode is already done by decodetree. Pull the calls to these decoders out of the legacy decoder. This doesn't change behaviour because all the patterns in sve.decode and sme.decode already require the bits that the legacy decoder is decoding to have the correct values. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 7862e9dd4e3..2845febb713 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -14205,19 +14205,6 @@ static bool btype_destination_ok(uint32_t insn, bool bt, int btype) static void disas_a64_legacy(DisasContext *s, uint32_t insn) { switch (extract32(insn, 25, 4)) { - case 0x0: - if (!extract32(insn, 31, 1) || !disas_sme(s, insn)) { - unallocated_encoding(s); - } - break; - case 0x1: case 0x3: /* UNALLOCATED */ - unallocated_encoding(s); - break; - case 0x2: - if (!disas_sve(s, insn)) { - unallocated_encoding(s); - } - break; case 0x8: case 0x9: /* Data processing - immediate */ disas_data_proc_imm(s, insn); break; @@ -14239,7 +14226,7 @@ static void disas_a64_legacy(DisasContext *s, uint32_t insn) disas_data_proc_simd_fp(s, insn); break; default: - assert(FALSE); /* all 15 cases should be handled above */ + unallocated_encoding(s); break; } } @@ -14445,8 +14432,9 @@ static void aarch64_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu) disas_sme_fa64(s, insn); } - - if (!disas_a64(s, insn)) { + if (!disas_a64(s, insn) && + !disas_sme(s,insn) && + !disas_sve(s, insn)) { disas_a64_legacy(s, insn); }