From patchwork Tue Oct 19 15:24:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 515966 Delivered-To: patch@linaro.org Received: by 2002:ac0:cd8c:0:0:0:0:0 with SMTP id d12csp818007imp; Tue, 19 Oct 2021 09:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXr2wjN9ikK6S8UkzBpbiDgfRFBKirnHEk+Jt4ij7c/uXqDufbtbhXkZo0CYIU9dGbAIr0 X-Received: by 2002:a67:d19b:: with SMTP id w27mr36766923vsi.54.1634660293987; Tue, 19 Oct 2021 09:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634660293; cv=none; d=google.com; s=arc-20160816; b=snIbJuQOdkjU5eLIIpiQesqI6RZptrQvh+LgBDmO8IamOXd9oTRVSClTidTxIv6zMb 3M3kMf9v23KYsplVjNvP89336YvpkJVHQHwVjo8+8kNyCp9v9Yqrl6RjyB1KGBxhQVYI Z1SesVfqLopa1ghMQ7Dsj2pneKwHPm2hOfHaM2m/wjADlkUwpAE9dgGH7v9n0O3NmJQ6 RPSEO0LVfDwzirob1QgccoD3Pd0F+SEVRwiJTgk2sCTtjeTw6DYGCkgQirIHgUfqPz6H SuAsmfZ2RhbzGl6LEBFHJZcyzqIqSrR2xlV6eNE23FXOo8+5rG0m5jhkh3RaXDE1vkSD J9YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=F1UFzoD53x5hfw3vlmPi31+uulj2FBxfz/+6B4SU6B8=; b=lZglAYnZoG0hj/WW870FN2n3ID7cQwXZxL14I/UjY6LaYtDYrHQ3S7WVLvydkT59/q vAxfP7EtBXS/sJZOGXyA69PIWQeINIHsYNCBQedLsTOiTkLSWdWQXkavsYgq4UYmwsk0 knOGNbCUXsoSdQxpMOV26zRdSO4SzflaPsABji2DjSPCk58i/SMTSTYWYjeOVH7jlKaG gt7ddS+dZaCDEFpA1f4cgXidPO4OtnfMfjyWO5FvxoywabyCLeKvRBgfYPNhKOheaQQ6 /qcqtM10DHF1YdmAsUcS5T+32MeZZ7V18U3VEW6RKXYuuMimP+Ad6MBymGt1Vu4f59aK KTog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NIj+Wse0; 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=fail (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 d184si2961253vkg.71.2021.10.19.09.18.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Oct 2021 09:18:13 -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=fail header.i=@linaro.org header.s=google header.b=NIj+Wse0; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcrob-00014Q-C8 for patch@linaro.org; Tue, 19 Oct 2021 12:18:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcqz8-0005Sl-1A for qemu-devel@nongnu.org; Tue, 19 Oct 2021 11:25:02 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:35456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcqyx-0007cP-TU for qemu-devel@nongnu.org; Tue, 19 Oct 2021 11:25:00 -0400 Received: by mail-pf1-x432.google.com with SMTP id c29so235397pfp.2 for ; Tue, 19 Oct 2021 08:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F1UFzoD53x5hfw3vlmPi31+uulj2FBxfz/+6B4SU6B8=; b=NIj+Wse00Hd23DEia3PGKBzDpEJqAMuf3pzKXEOQWejr9wpi+0qJEepNsx9d48/Zbl qaLkTjtAW/D+lO1PiT/Z4ASYhcxPx1y3eS9TeqNOpCwvP1vXrpgs1lAbpx8Z65AIOjoo WH3nui/3fcR6HLAjYzeGxdWDIlcdnt7sebC6rXMPQGn6WavM+qYGT15H6VkvKDtdPml8 D5CiwhiSh6jxFtc5BVQkIbO7vElDpljN17iWC+mI2u3YxPuXSydlgW9ZCmhJZukY3dPy EfX4UcxoclH5BfgdwcRMsGxGLKmatZvde6CTsPz2TzrymuSn0sSY7MpRYxbWdpadXcsQ 8eBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F1UFzoD53x5hfw3vlmPi31+uulj2FBxfz/+6B4SU6B8=; b=qliBHyIJkm+XYuooJZOPiRO3+sdxT/p4QRcpsImmvbk9YBhwXA2aN8wXhMtz76jK8a 2ugKDyjxeL8wmopdR9z77hBmDpAhfaNNg7uyvw8HvHSo7rC1LXLeONKUxgoqw0NxMsm4 hsrlMbl3andGvB6/ixDkYfmovqasE41RFaHpRoycjW6pV9ycg7G5+LaFdvCGeZq0gKn5 hqs4xx/Ay8EukgDIJttGwkRZcHtrkQ4PhweVUkPSM7qE7INt6Nrqdcxts/fxLCOLSDrA TmwXi0lYm5ODgf/MsGblPijlsyKoDOI4AdjJBGoA2oAKjjVvPu7KsMq52/Hj6wfUGUOi upAw== X-Gm-Message-State: AOAM533LP3HRfs2KSJE0puDp9H1OanBLF6mn+St+SsEPjunOZdkvoYx2 wPV3LOA9pIR42/ZOfksgI0h9vX87Mxl30Q== X-Received: by 2002:a62:e90d:0:b0:44d:35a1:e5a0 with SMTP id j13-20020a62e90d000000b0044d35a1e5a0mr518558pfh.54.1634657089311; Tue, 19 Oct 2021 08:24:49 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id i2sm3293814pjt.19.2021.10.19.08.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 08:24:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 14/16] target/riscv: Align gprs and fprs in cpu_dump Date: Tue, 19 Oct 2021 08:24:36 -0700 Message-Id: <20211019152438.269077-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211019152438.269077-1-richard.henderson@linaro.org> References: <20211019152438.269077-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair.francis@wdc.com, qemu-riscv@nongnu.org, zhiwei_liu@c-sky.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Allocate 8 columns per register name. Reviewed-by: LIU Zhiwei Signed-off-by: Richard Henderson --- target/riscv/cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Alistair Francis diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 4e1920d5f0..f352c2b74c 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -240,7 +240,7 @@ static void riscv_cpu_dump_state(CPUState *cs, FILE *f, int flags) qemu_fprintf(f, " %s %d\n", "V = ", riscv_cpu_virt_enabled(env)); } #endif - qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "pc ", env->pc); + qemu_fprintf(f, " %-8s " TARGET_FMT_lx "\n", "pc", env->pc); #ifndef CONFIG_USER_ONLY qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mhartid ", env->mhartid); qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mstatus ", (target_ulong)env->mstatus); @@ -290,15 +290,16 @@ static void riscv_cpu_dump_state(CPUState *cs, FILE *f, int flags) #endif for (i = 0; i < 32; i++) { - qemu_fprintf(f, " %s " TARGET_FMT_lx, + qemu_fprintf(f, " %-8s " TARGET_FMT_lx, riscv_int_regnames[i], env->gpr[i]); if ((i & 3) == 3) { qemu_fprintf(f, "\n"); } } + if (flags & CPU_DUMP_FPU) { for (i = 0; i < 32; i++) { - qemu_fprintf(f, " %s %016" PRIx64, + qemu_fprintf(f, " %-8s %016" PRIx64, riscv_fpr_regnames[i], env->fpr[i]); if ((i & 3) == 3) { qemu_fprintf(f, "\n");