From patchwork Thu Jun 22 15:11:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694899 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp1456328wrm; Thu, 22 Jun 2023 08:13:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zKooNQxsymJhyPb6mOaTNPg5MJXzk5ERI1eab2pacASKpLfnFvQS+FG97RRAN1aTc4J2A X-Received: by 2002:a05:6808:2203:b0:39a:ca93:53dc with SMTP id bd3-20020a056808220300b0039aca9353dcmr25933930oib.24.1687446826485; Thu, 22 Jun 2023 08:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687446826; cv=none; d=google.com; s=arc-20160816; b=dkqn3/Ra0+dV8d2BI+H8fjGOpqGac1D27yWRYYaX7CTQ/VhxVU2ng6RqY4cTcNDxrG YZR9rKeyDxJ5Y+1jpGNxXfG01OuvkqAa80tUfLz642ua3eht4ZwXZTMkOlVTMz53yg8k /b37zQNX4JcmV5wDK+74HWGqSQVpyh6ZoBZaxYG6C9eIAv0lmRkpXUgo0PRA48p8l2uP 9ZEy05SxC/NtVcJOk+4jYm311H60RZ/85JuFSQCPHJWvaF4LtKdHo1OdXJwye731bpwP bCmXZzSTv83DySq2uuL98475zq9WpoOGJuUa/KW/lsaE2CGMkFMTryT1rXI/kiATlVBU VH4A== 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=fNQxNM+X/9et0gxYk0zQKZupNp4oqf6HxOnV5h8wxLw=; b=MrbU9dQgry7BIvn1w1wBqeEi4j0O2TiWjI8VeBgMNmKDquWFGakVUcRGJM6Eyjt+KF SiDHt0wLck3kadTDFJbkjcCELCMqCJANdP4TFIKNFfih1N4kQVnQS3leNo/yxypnqGYN V4D9Tn2kRiRttQYPijlnqXQhXSgf0kJDCw3JCN1XOmcnZVTjWCgIbrMy5IfGtrL1JFrv 0DCqCD4hjfAVDhdYgNsbCxXpW0aVrBf05rL1TGxi7pM2zFIYv+XRovr1NTwcFQW7b46w psmaWEGXG6nNudFmUD84exofKKbuVcCxqCn3z2vQs+BeitS8K8OEvgYc6hnFpD4ahFAC v1lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gdi6maUL; 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 n7-20020a05622a040700b003ef41417024si2721553qtx.562.2023.06.22.08.13.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Jun 2023 08:13:46 -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=gdi6maUL; 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 1qCLyn-0006l8-JO; Thu, 22 Jun 2023 11:12:13 -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 1qCLyl-0006kX-U3 for qemu-devel@nongnu.org; Thu, 22 Jun 2023 11:12:11 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCLyk-0000Fk-8U for qemu-devel@nongnu.org; Thu, 22 Jun 2023 11:12:11 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b46f5f4d79so9536971fa.1 for ; Thu, 22 Jun 2023 08:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687446728; x=1690038728; 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=fNQxNM+X/9et0gxYk0zQKZupNp4oqf6HxOnV5h8wxLw=; b=gdi6maUL2epezfn3klrOivgtT2f/8FIz6EM2IxFL3Ntn9FXho1hDaDNz8g8kKj4juX MPk11not16RbAhKvDlGEGrSPjS3qhBgDrgw4omkHitrXPhsjCJpNZAKN7V2ZyHaZdPta DSfeQxX9djSVXW/6NzgI7VYHZTCI2LnXLODsjCVXSP1TFHAXPjeg6++Co9EojVy404Vd cupTJ1ac09/jplNBwGXIlWxV+agKYsgOsJ1NkJ37yHmDUwe0xldihe6qOeIJ9pQnXiQv 7CCt4oMXKHUlMpc5MuaoofFJ5CzcSYGKBqUlcBkGCSOZKtwtqPCc6yOp07likf1R+tPh bk4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687446728; x=1690038728; 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=fNQxNM+X/9et0gxYk0zQKZupNp4oqf6HxOnV5h8wxLw=; b=e9IyX6fm/L9ZlI+YHa/YNa+9psTABaMNM05EAkO0qaAYh6nvXUJO3vWmN702zyeIpb PENhuuwWXThCA0hJwsB8AbzDVbQ67uvcsfEcplACvGYqModkz9JpIZXxOExxIjnCUmBN A+lnHZ9lmUIVxFXaimGViAqu1SRwWntaJAN8cqGGCsViywKyQlSivX/n2jtJQfZh9xRm xppTA8jedCEj44jd21C3xHcG3PVEgNXMm4zgdDKKDkI8PG9b0Z1ZI6JkvoQkAIw9cP8l R04GLBj9hSLqiN7YoijtqkoXxSelvHb1iQNzfBjSz7Ldcs3eYsA/hw2D5ScJ+1SbRiJ5 pH+A== X-Gm-Message-State: AC+VfDxvI42zdPxWNKBE/wyuFrQsbR4aHH7gRWxmMh7OG+qLOdg3SF5P 6S4WySdfTaIFj5fjA83d1VBYujtj/n3fKUNxFMusX5hl X-Received: by 2002:a2e:8e2b:0:b0:2b4:5d74:d760 with SMTP id r11-20020a2e8e2b000000b002b45d74d760mr5103734ljk.25.1687446728250; Thu, 22 Jun 2023 08:12:08 -0700 (PDT) Received: from stoup.. ([91.223.100.38]) by smtp.gmail.com with ESMTPSA id v3-20020a2e9f43000000b002b47fc5219dsm1320276ljk.67.2023.06.22.08.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 08:12:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PATCH 2/4] target/arm: Dump ZA[] when active Date: Thu, 22 Jun 2023 17:11:59 +0200 Message-Id: <20230622151201.1578522-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230622151201.1578522-1-richard.henderson@linaro.org> References: <20230622151201.1578522-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=richard.henderson@linaro.org; helo=mail-lj1-x22d.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 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 Reviewed-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 7cb70f9727..3da811bc5e 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