From patchwork Mon Sep 24 21:55:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C2E562C0089 for ; Tue, 25 Sep 2012 07:57:14 +1000 (EST) Received: from localhost ([::1]:46614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGGeP-0007fW-2W for incoming@patchwork.ozlabs.org; Mon, 24 Sep 2012 17:57:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGGdQ-0005cR-DK for qemu-devel@nongnu.org; Mon, 24 Sep 2012 17:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGGdO-0005vz-NO for qemu-devel@nongnu.org; Mon, 24 Sep 2012 17:56:12 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:47859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGGdO-0005uL-IT for qemu-devel@nongnu.org; Mon, 24 Sep 2012 17:56:10 -0400 Received: by mail-qc0-f173.google.com with SMTP id b12so1488818qca.4 for ; Mon, 24 Sep 2012 14:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=cAHwzcNz+Si1u/YplsC00P7WpRM8ihE8LWZZYQlV1Y4=; b=GgNuDofbR97+LqLig2/YR4CMIa35eMWEw9BGwQp+NgGDg0YySJPbCp5npC6sB5qTEO H5bn5xL0XVXWgOQP3lgiX6xnetdMXECBoceM1GyWgxrJQxmpm7N6iYafEGAL2gKHGfBZ pXPvhXkGAQA2ZgYieee28NgDXAIg7P/wEM7k3PgUJzZPBDQtp8pCpMUEHAS52tRLSPZs 5w2Ms0o38KPHkzW/2NqmwhhPuyZDhmI67SDO72JYVY0d/1Dz8Pal8ncEFz98PUiMtw2Z mKdtRy0uRA0TCR3h2KWVRsV2oLtXqbyDz7V3Y1KBEHJKo1o09hzPSD5ciCfrc4pI2yM9 0fng== Received: by 10.224.214.67 with SMTP id gz3mr35359523qab.70.1348523770289; Mon, 24 Sep 2012 14:56:10 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id ck11sm27100748qab.17.2012.09.24.14.56.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 14:56:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 24 Sep 2012 14:55:53 -0700 Message-Id: <1348523753-25083-8-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348523753-25083-1-git-send-email-rth@twiddle.net> References: <1348523753-25083-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.216.173 Cc: Alexander Graf , aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 7/7] target-s390x: Tidy cpu_dump_state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The blank lines inside the single dump make it difficult for the eye to pick out the block. Worse, with interior newlines, but no blank line following, the PSW line appears to belong to the next dump block. Cc: Alexander Graf Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- target-s390x/translate.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 4cc9225..db464cc 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -79,6 +79,14 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf, { int i; + if (env->cc_op > 3) { + cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n", + env->psw.mask, env->psw.addr, cc_name(env->cc_op)); + } else { + cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n", + env->psw.mask, env->psw.addr, env->cc_op); + } + for (i = 0; i < 16; i++) { cpu_fprintf(f, "R%02d=%016" PRIx64, i, env->regs[i]); if ((i % 4) == 3) { @@ -97,8 +105,6 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf, } } - cpu_fprintf(f, "\n"); - #ifndef CONFIG_USER_ONLY for (i = 0; i < 16; i++) { cpu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]); @@ -110,22 +116,14 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf, } #endif - cpu_fprintf(f, "\n"); - - if (env->cc_op > 3) { - cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n", - env->psw.mask, env->psw.addr, cc_name(env->cc_op)); - } else { - cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n", - env->psw.mask, env->psw.addr, env->cc_op); - } - #ifdef DEBUG_INLINE_BRANCHES for (i = 0; i < CC_OP_MAX; i++) { cpu_fprintf(f, " %15s = %10ld\t%10ld\n", cc_name(i), inline_branch_miss[i], inline_branch_hit[i]); } #endif + + cpu_fprintf(f, "\n"); } static TCGv_i64 psw_addr;