From patchwork Thu Jul 6 13:25:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 699598 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp3312280wrs; Thu, 6 Jul 2023 06:27:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFsEoxChIhSia76dMU6vKs6grnWZLMyNzEAYQo+7wZvS/QRf5FezvcKk81UpK9cUnHjr/XE X-Received: by 2002:a05:620a:40c5:b0:765:3ab9:df8d with SMTP id g5-20020a05620a40c500b007653ab9df8dmr2023974qko.32.1688650028213; Thu, 06 Jul 2023 06:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688650028; cv=none; d=google.com; s=arc-20160816; b=cDayMJNS0i896JtYVXZd+vu0G/WZ6/FjDOG54H8+t5QMeTXDbWmCz1FViBVQ4O3noh O1xfiqWqhr/eikwWCHPvvUyE9Y+CgQisIGVN/wL/w0TnIGfF5cyVOqfsUhnP/d4uSxc1 aDOLx4qlUDKIyLo3VK/EUu+kGNQV5pJ22Ildca5t1XrZFgennVH/yQaGJgN0aaQcwTH+ zhCbBpdFKXfTEC2lZ19uZH9wnrnPb7xD1YyIFM80gGUwhDZsPPksFAzmQLHzaHDp7H7V 6nFqZbF9SfdU8TgBxF25b0AAa7cgwp6dgDiBAhUrT+QuE0xrxEp4/maHKL74dehEQUvN hgsQ== 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=bFDrUYhlTVi/QyetgXx/byg2+yO/22Hp9SjwoefyKLk=; b=Ok+mCZPHQrQBRVidQ9C34CCMYuC3w9K+N1hB61zshnzePP8VqwqrvdQ8jZE6f3YenW 3cK6wZY4P18bnQViZW9jpwS9WjCwyTdsNxk7oOHrGKkEecpBVSTaTZVIV+N6MiHUlByS XfPRrEC+SZz8i8cnTIK9bOsCqpkJ4UDVcgcC3xodO8cR69pCjUUd3rpu+HKXlRdqzbSh bEt3fb8WRECZg95B/aUC90g8qh7vgo+uDAAqvnwLclASqPOK8SLNj3J99l4LfYlR56O0 8PAkrnP8ww9DG25ROHHsNFM52z7urJIXkb6gi30ntOXM+NiY0agovG0yXY4tepUJ86Wh Dd8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H3umnWHW; 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 w8-20020a05620a128800b007624010271esi1055259qki.343.2023.07.06.06.27.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jul 2023 06:27:08 -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=H3umnWHW; 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 1qHOzb-0005E7-G4; Thu, 06 Jul 2023 09:25:55 -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 1qHOzP-0004sG-EE for qemu-devel@nongnu.org; Thu, 06 Jul 2023 09:25:45 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHOzM-0000rR-1F for qemu-devel@nongnu.org; Thu, 06 Jul 2023 09:25:43 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fbc63c2e84so7582835e9.3 for ; Thu, 06 Jul 2023 06:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688649916; x=1691241916; 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=H3umnWHWDBIXVy6Bnx4og1aOwr5TnkX2OiHshU2ZRhVpjOPMzJRyMqCfPNtbH4/MEp 4dME/MxuDimzzhQIcaOMo2s2moB6f7TvPBwYEr+AmACJ93ECbm2FG0sgjFnlBp76Xs1V UJytsB9PG3VMvgAl7xB5PTcUWUWAgdst2IZEW2lKoCq0mN/6Dw0+nzZchosr6MPcZ9l3 eC5WpdRpt8EHePI3mr1Hs+BCTmy6di7leXpYRALEVgCxAxqIjUWhy8OWZDtf+EG3KyJ5 x+SJefEaloQetNmAhjpOlaVvK9XNWV/7qAISGLM9wgkQn9Xk+sFkNF9+qZ5lqB5kHL9U Rblw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688649916; x=1691241916; 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=ArXjFt/yEf2/1n5dLARjiIXHnE1FDVvDA56xyQTPUCeys0vqOBZB9KeEzwOm5ENhT3 SwzvBt+oO2tUgzUL0VcgsOluCOqfocbCh2O0uhXW31NjKh6rjKf1mcQROaMbVw0JaGhZ DzqDo+KGVxlnxqryy4kUoqONPHaP80gCknN3wrdGaia+jolkM+ZILDjvZq6GzMh91kKq ccSdbSPQ560KizljwhVnPJH4H1KqLbanFf9MLWlbtr3L7fg3RAUMZzM/2qmZfJ5HkTq/ NaBspuEkSK2WIwYodwCy9Toen4b0Dcjy1+CIb7iLOQgMR7BAYYJ3cHm5qUxWyao2aO34 lqLw== X-Gm-Message-State: ABy/qLY/MlpLwOXS+oTIxzCAtxvXzcNVnL10zhRyd3ZsRKWmFuQRZcmC 9KfZRAVPto8KusfCcFphqeHMtsejyLZOvIGfNKE= X-Received: by 2002:a7b:c8d1:0:b0:3fa:8fb1:50fe with SMTP id f17-20020a7bc8d1000000b003fa8fb150femr1352408wml.15.1688649916396; Thu, 06 Jul 2023 06:25:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s15-20020a5d510f000000b00304adbeeabbsm1856170wrt.99.2023.07.06.06.25.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 06:25:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/14] target/arm: Dump ZA[] when active Date: Thu, 6 Jul 2023 14:25:03 +0100 Message-Id: <20230706132512.3534397-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230706132512.3534397-1-peter.maydell@linaro.org> References: <20230706132512.3534397-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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