From patchwork Wed May 12 18:34:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 52406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C0F0DB7D93 for ; Thu, 13 May 2010 04:58:35 +1000 (EST) Received: from localhost ([127.0.0.1]:33902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCH8a-0004Pe-5Z for incoming@patchwork.ozlabs.org; Wed, 12 May 2010 14:58:32 -0400 Received: from [140.186.70.92] (port=48359 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCGzF-0007Tz-F2 for qemu-devel@nongnu.org; Wed, 12 May 2010 14:48:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCGle-0006RH-LX for qemu-devel@nongnu.org; Wed, 12 May 2010 14:34:52 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:53343) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCGle-0006Qm-6w for qemu-devel@nongnu.org; Wed, 12 May 2010 14:34:50 -0400 Received: from flocke.weilnetz.de (p54ADF1DC.dip.t-dialin.net [84.173.241.220]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MdZVI-1Nxt9M14M0-00Q0Zi; Wed, 12 May 2010 20:34:44 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1OCGlX-0002QS-Di; Wed, 12 May 2010 20:34:43 +0200 From: Stefan Weil To: qemu-devel@nongnu.org Date: Wed, 12 May 2010 20:34:39 +0200 Message-Id: <1273689279-9297-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.1 X-Provags-ID: V01U2FsdGVkX1/H7PYhSx+7wiZ+U74y9XTUUELpU2VjfIYfPLP yOcGTXea9ILPB07q8WN+0lnuktA82QwnKYirqC8ETGP1WmGHN6 lQrkt4NSG4nGM9nRNmtp81GKTkydED0Yk+rx/YznbjcXDRsbAy J6A== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Blue Swirl Subject: [Qemu-devel] [PATCH] target-sparc: Fix wrong printf argument X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org cpu_get_ccr() returns a target_ulong, so a type cast is needed to avoid wrong output on big endian hosts. We could also use TARGET_FMT_lx, but that would print 8 instead of 2 digits. Cc: Blue Swirl Signed-off-by: Stefan Weil --- target-sparc/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 4642122..582de10 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -1490,7 +1490,7 @@ void cpu_dump_state(CPUState *env, FILE *f, } #ifdef TARGET_SPARC64 cpu_fprintf(f, "pstate: %08x ccr: %02x (icc: ", env->pstate, - cpu_get_ccr(env)); + (unsigned)cpu_get_ccr(env)); cpu_print_cc(f, cpu_fprintf, cpu_get_ccr(env) << PSR_CARRY_SHIFT); cpu_fprintf(f, " xcc: "); cpu_print_cc(f, cpu_fprintf, cpu_get_ccr(env) << (PSR_CARRY_SHIFT - 4));