From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DVbgS-0006mR-8r for qemu-devel@nongnu.org; Tue, 10 May 2005 16:50:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DVbgO-0006l4-01 for qemu-devel@nongnu.org; Tue, 10 May 2005 16:50:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DVbgN-0006kn-Pb for qemu-devel@nongnu.org; Tue, 10 May 2005 16:50:23 -0400 Received: from [62.210.158.45] (helo=quito.magic.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DVbjl-0007fi-Uy for qemu-devel@nongnu.org; Tue, 10 May 2005 16:53:54 -0400 Received: from private2 (ppp-181.net-555.magic.fr [62.210.255.181]) by quito.magic.fr (8.11.6/8.11.2) with ESMTP id j4AKlKl25212 for ; Tue, 10 May 2005 22:47:20 +0200 (CEST) Subject: Re: [Qemu-devel] Compile fixes for newer gcc From: "J. Mayer" In-Reply-To: <200505090249.52556.paul@codesourcery.com> References: <200505090249.52556.paul@codesourcery.com> Content-Type: text/plain Date: Tue, 10 May 2005 22:47:23 +0200 Message-Id: <1115758043.29701.14.camel@rapid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 On Mon, 2005-05-09 at 02:49 +0100, Paul Brook wrote: > The attached patch fixes some trivial build problems with newer gcc on amd64. > It adds FORCE_RET on load ops, Index: target-ppc/exec.h =================================================================== RCS file: /cvsroot/qemu/qemu/target-ppc/exec.h,v retrieving revision 1.10 diff -u -p -r1.10 exec.h --- target-ppc/exec.h 13 Mar 2005 17:01:22 -0000 1.10 +++ target-ppc/exec.h 9 May 2005 01:33:04 -0000 @@ -33,11 +33,7 @@ register uint32_t T2 asm(AREG3); #define FT1 (env->ft1) #define FT2 (env->ft2) -#if defined (DEBUG_OP) -#define RETURN() __asm__ __volatile__("nop"); -#else -#define RETURN() __asm__ __volatile__(""); -#endif +#define RETURN() FORCE_RET() Please don't change this. This is usefull and your so-called "fix" only makes debug harder. Same goes for all other patches: use RETURN macro everywhere in PowerPC emulation code. > and introduces helper functions for floating > point negation (these require a literal constant load). /* fneg */ +void do_fneg (void); PPC_OP(fneg) { - FT0 = -FT0; + do_fneg(); RETURN(); } Where's the problem ? It compiles and run perfectly on my amd64. Calling a function for this is a nonsense. Don't apply this. What could (should !) be done here instead is to use: FT0 = float64_chs(FT0); I will do an update to use softfloat functions everywhere in PowerPC emulation one of those days... -- J. Mayer Never organized