From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvdBE-0004AN-Hc for qemu-devel@nongnu.org; Fri, 23 Nov 2007 13:23:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvdBC-00048H-RA for qemu-devel@nongnu.org; Fri, 23 Nov 2007 13:23:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvdBC-00048D-Mn for qemu-devel@nongnu.org; Fri, 23 Nov 2007 13:23:06 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IvdBC-0002dk-A0 for qemu-devel@nongnu.org; Fri, 23 Nov 2007 13:23:06 -0500 From: Paul Brook Subject: Re: [Qemu-devel] qemu hw/ppc_oldworld.c target-ppc/cpu.h target-... Date: Fri, 23 Nov 2007 18:22:52 +0000 References: <1195840282.24939.14.camel@jma4.dev.netgem.com> In-Reply-To: <1195840282.24939.14.camel@jma4.dev.netgem.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711231822.53015.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, l_indien@magic.fr > Furthermore this patch was made in a brainless way, it will be reverted > asap. > If you think there is a bug in someone else code, submit it a patch, if > it's cleaver and addresses a real bug (which is not the case here) it > will be accepted and merged. The old code before the patch is obviously broken. It's mixing 64-bit (ppc_gpr_t) and 32-bit (target_ulong) values. As implied by the comments aboce the definition of ppc_gpt_t, and now explicitly in the above the definition of REGX, printing a ppc_gpr_t is obviously not meaningful. I don't claim that my patch is perfect, the code is still a bit of a mess. However, unlike the original code, it is at least self-consistent, and won't crash 64-bit hosts (The fact that it usually prints garbage rather than crashing is an accident of the x64-64 ABI). Paul