From patchwork Tue Jul 4 16:36:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 698967 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp2364704wrs; Tue, 4 Jul 2023 09:38:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7g1b8aFCTAVbEnBxmdW6bxu2yBaRc4RHqmKetEpmIFFzxY0EeVzUJyp+r+WrocMdSokX0s X-Received: by 2002:ac8:5890:0:b0:403:3885:b80f with SMTP id t16-20020ac85890000000b004033885b80fmr19524751qta.57.1688488691480; Tue, 04 Jul 2023 09:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688488691; cv=none; d=google.com; s=arc-20160816; b=oUF2+hTdgcSBT5IouU6Hl3UdXDgW+vyiB4y0HP7RoqJdGg4zQYeqhnwPHx5MiodXPn TXBad4ir6fvDlsxxrEBYfVSr6KZ5tTaaQJtD9sqW2yYHZCkN/DDhK+f4WcppxFvPesCe ASPPcfau7ndROH2fo1vnDZgAnpdfcqA9zCDgGqKQj8TXhdkZfUSQafA4qHQna3wcTOyq UOPwpv8fY7iNAWQAWrGbO4BnV7Sz3HkkbFn0u5kZV5cZMnQ765PLfqct/TT3IwuHZCHk X5bgrLK/Ir6NmPWEIGu2Dp74nfyBt7yQpyH1Wo320S7dI7e6EQwQsZ5k3DH28ms+4Dmv h2pA== 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=kTYABhSkRPbMfHK4MqNnIuIncwaUJ0xXtOeHrnGp338=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=aaR3we/i0tnHi7qwkfjL8Pc93mR00ntg5noNofffvrfHKzEwZR/E4o9VPiIolsZYlW boRK1W2WL6O5mvUwyNPenj7CQjcCC0ICGe2a9y8K1Og/HHouFs0ygLSC+VQYM9rZIcyh tq1iYp+8Eoz8y+K6zCqu4UpMQIvvKz/KHY38h3oPqb1pVbxUhCCtbvjHBh2zvLdKc8rt XRrfNT+hgSgFHLKd9hiQM8yU+aWG8k6NcZ+EsMMtK64KVXLagVtwGnsWabTNqDyAPA2c sZMOFSs99yaGd/+7E02NY1pbmI6fazZa68G/xXdrrB5f9WxqnYhtIpB1ZmFEBQZTXQoA Cspw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5wSPoS2; 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 w18-20020a05622a135200b0040375686db5si412105qtk.187.2023.07.04.09.38.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jul 2023 09:38:11 -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=h5wSPoS2; 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 1qGj1D-0001J1-7a; Tue, 04 Jul 2023 12:36:47 -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 1qGj1B-0001HQ-J3 for qemu-devel@nongnu.org; Tue, 04 Jul 2023 12:36:45 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGj15-0001o5-1T for qemu-devel@nongnu.org; Tue, 04 Jul 2023 12:36:40 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3fbca8935bfso44744545e9.3 for ; Tue, 04 Jul 2023 09:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688488597; x=1691080597; 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=kTYABhSkRPbMfHK4MqNnIuIncwaUJ0xXtOeHrnGp338=; b=h5wSPoS2/Q/8BMCP0t4cxH/SMk5RnztokAaememdIDeTUgep8lanNs04LwOUQFqhJQ UjjuWPQW2M5lYyzKrHq8m0touV6v5VD/qJiRyj4hC8nFyDNckIOjeNdkFgpQtnNcYZI8 m14qkhHCxaQuhEU4PMnlT3ac3IGknDrt/FOXmKg0EoS6m8TLBoKWMiYwD7woJK6PWYxs ExzJanKZHhAeSWG+75PthCRMsomDOtansZ1Et3uaKVutMfYxPv+gT4xEVf8R9pFshzo2 gF3WRTNTakV4v5aTPcYm8Ybzu6ZnoU30+jfItUPsuzVMi4zqHRJCoWSsMDAlWNTagM8y guSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688488597; x=1691080597; 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=kTYABhSkRPbMfHK4MqNnIuIncwaUJ0xXtOeHrnGp338=; b=XGcBztFg0jTd7dWe81sy7WvvXDP7XmQJRiVQyO1rKEjYmfdY+ZK7ZOEVjP1bibjYoo GO5b87Mx+XzjJ62XISO7S0UW5Uxezv01rqjL4WAzIW29FXO1nExkVHRHjQr5WEOn4Zp3 PruEIJiHnFtFsP8HHqFd1tMqUzVzxXUj3+gI5+cyWFgz2JEP9mJGEgZyCLRao3uto7Zo 3SUYcW36KRUUz6XDqj73mPWpcG49+bo2SfMsXXYnpTgbeRUPg54j1SZWgLdZXik6Mchu j3m2gMeoZq/SZL2dLdI6g/M3y3RWMwDA9A5Y1u3Hg7bRqjdtS6rBlnqd9EzHvEV268EB 63/w== X-Gm-Message-State: ABy/qLYr2v70PhbxowQz2g3pE1cAmwbIy/dnzXVbUq8HSxDpZ3Dol1bX aWM1jW6nhpjXvQKbjHThZOs4AZj3MCyUV2E0W7E= X-Received: by 2002:a1c:e913:0:b0:3fb:e356:b60d with SMTP id q19-20020a1ce913000000b003fbe356b60dmr1513784wmc.38.1688488597475; Tue, 04 Jul 2023 09:36:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id r8-20020a056000014800b003143b032b7asm4354258wrx.116.2023.07.04.09.36.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 09:36:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/11] target/arm: Dump ZA[] when active Date: Tue, 4 Jul 2023 17:36:27 +0100 Message-Id: <20230704163634.3188465-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230704163634.3188465-1-peter.maydell@linaro.org> References: <20230704163634.3188465-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 Always print each matrix row whole, one per line, so that we get the entire matrix in the proper shape. Signed-off-by: Richard Henderson Message-id: 20230622151201.1578522-3-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/cpu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index f12c714bc43..adf84f96860 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1082,6 +1082,24 @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags) i, q[1], q[0], (i & 1 ? "\n" : " ")); } } + + if (cpu_isar_feature(aa64_sme, cpu) && + FIELD_EX64(env->svcr, SVCR, ZA) && + sme_exception_el(env, el) == 0) { + int zcr_len = sve_vqm1_for_el_sm(env, el, true); + int svl = (zcr_len + 1) * 16; + int svl_lg10 = svl < 100 ? 2 : 3; + + for (i = 0; i < svl; i++) { + qemu_fprintf(f, "ZA[%0*d]=", svl_lg10, i); + for (j = zcr_len; j >= 0; --j) { + qemu_fprintf(f, "%016" PRIx64 ":%016" PRIx64 "%c", + env->zarray[i].d[2 * j + 1], + env->zarray[i].d[2 * j], + j ? ':' : '\n'); + } + } + } } #else