From patchwork Tue Feb 28 00:37:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 657460 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:1b90:b0:222:2e2e:b2c3 with SMTP id e16csp3395055lty; Mon, 27 Feb 2023 16:37:52 -0800 (PST) X-Google-Smtp-Source: AK7set9BqG/gZw4/IPEfRdrwLXJLRaa78G78dwfTW7Eo4+j1WBnnf56gQBi7a13+4FA8bLBguXtN X-Received: by 2002:a05:622a:14:b0:3b9:e4cf:ce2d with SMTP id x20-20020a05622a001400b003b9e4cfce2dmr2538963qtw.16.1677544672249; Mon, 27 Feb 2023 16:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677544672; cv=none; d=google.com; s=arc-20160816; b=dwQVcAafwr0ZtOJ6T9Pf7RTyJHCKyupyao243sP7p/m1OkzOvhh5F59N1K9IEEIpJM ekB2+hHVj+NY/hyjZD3HMPVdK6OD9NxJy/2FKkapy4OHmzhbkdrykgQxF8dvbXp7l4OI sJg9Aa53BuqnLTc70INfl2dfn1zA7WCAD5zzzBDpbPP+o4Qo24Wv/PL3rGD73gfUKx6P ophHEPAd7nq1QeYsFVMgCZ036lQgrRG2E8sjEnR5/MLmGVnmvx4hRGIOtrQR8lp83wO4 tkAcodb4TSukrai5Me6TAEKpuNsNGc/uHoFuxmSlPu3v+Ywf1R/aAedGeajbjCNmQ+RS Rqpw== 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=ySb1mvjSXZ66e2yK3BcHGU3IqS6n9iUd4Z/aLHtfxkk=; b=g8iqmNvt+qCb+Rpl6ITX6EoApGGclICXa6M33J7vnatq7KYsrO1WWkZ2izI5s6PQ9S SoMK1GItK9q/mAtxXgMSvL00T4hmMINqZsBb+mzdaKgR3dLD7tJLZO19OQpMF/o7o1EX NdJhKWTkeQHdSFrCfw/F5fXi3Y8e3SOVYqsikprLcvSO/XjueDiFaG4vx6RGAr6rpHQP 5qO5n6ZtwGCMA3tHTRl6kPSQxpsgTINlqRzyaWvNzcvQJXfebJ2ZZnq3i2Hcn54jehVQ NJsihQMB5woRhhEb00S52MpWbaQed3VdjMlcRnCiTvGYl1pzVX6rPFQcgKwBzgSyZ4SP Kt3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YavU0Zk6; 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 o5-20020ac85a45000000b003b860983963si7900324qta.207.2023.02.27.16.37.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 16:37:52 -0800 (PST) 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=YavU0Zk6; 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 1pWnzg-0006Sv-3s; Mon, 27 Feb 2023 19:37:24 -0500 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 1pWnze-0006RE-HJ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 19:37:22 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWnzc-0001XY-Je for qemu-devel@nongnu.org; Mon, 27 Feb 2023 19:37:21 -0500 Received: by mail-pl1-x62d.google.com with SMTP id y11so4570878plg.1 for ; Mon, 27 Feb 2023 16:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=ySb1mvjSXZ66e2yK3BcHGU3IqS6n9iUd4Z/aLHtfxkk=; b=YavU0Zk6UhmnvxJG1bZoCZUmPutdbySIKFxXEW3MkowWrvGRW5U5k886pN8h5MhXOq RHktwBnkenNfGO00sVi0uhttapKfNQYCoM8R1BLXsqDBBKUefftpifM0hKyBNIkcWYqi qb7nAVWZmtS2N2Sar2EOaqvITqJ/mac6GhM/v49IlBo4BKEHBueksDxo+5u7Tw+0xmpl UCGuXc8XkfCj1Cc0jvHXpPtcB3ARHA1KQ/oU5fGz4d86fi/DWeVzBwF4QtCw+Lq793RN sYIi2IaxIn3+GKhFog1UK8vrPQvjzHx+Zgdl1S9y/lo+VraVOeeV8AzsPUDJtV/AeBRY lsBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ySb1mvjSXZ66e2yK3BcHGU3IqS6n9iUd4Z/aLHtfxkk=; b=ddcSYLA7fAO7/39z5+ATYAnxZdyyZ19y9+cDxzhlT0mDN3xu7mDIL53tQCJcoFpO1n JUtrpnH/51BbowjGOO2btA+NwplvCWPNFdwSIyQUA7PQGPWa+RyvvYvY0VgxI0+m8LKh zJx2eymqawkIRCdy2cRowz36/cvqU/9HJBx1KVV+yOO4DG8WW/glItKOkCx5Ujf0KVah CKhuWdJWc2SmINOfLrdaNbodeXZo9vFPFus7CN6BjOX5MqVfiuBr+IBaJoLryLBe7FnV y1nLGZi060Hem3C9oChCZIuHmzgjLCdJgAIl5gqsQS+T9UdV6BdxvUk4GqBnwvL4FUaQ 2V6Q== X-Gm-Message-State: AO0yUKVY6iYEdfet8ZGPU9Sg21XmG5Cc+B4rLvubOWDMttsRvn52ghZ/ V0p/GFNhbe8ore+BkZcNky8tJVgQgZBD9YiK0zc= X-Received: by 2002:a17:903:234e:b0:19b:64bb:d546 with SMTP id c14-20020a170903234e00b0019b64bbd546mr1178025plh.18.1677544639241; Mon, 27 Feb 2023 16:37:19 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id p19-20020a1709028a9300b0019cec7d88c3sm5192651plo.236.2023.02.27.16.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 16:37:18 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 2/3] target/arm: Dump ZA[] when active Date: Mon, 27 Feb 2023 14:37:12 -1000 Message-Id: <20230228003713.861168-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230228003713.861168-1-richard.henderson@linaro.org> References: <20230228003713.861168-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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 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 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 f1f454e7a0..0e54e19b05 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1080,6 +1080,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