From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DWMTO-0003LJ-6j for qemu-devel@nongnu.org; Thu, 12 May 2005 18:48:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DWMMU-0001qk-Pg for qemu-devel@nongnu.org; Thu, 12 May 2005 18:41:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DWMMP-0001lc-MN for qemu-devel@nongnu.org; Thu, 12 May 2005 18:40:53 -0400 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DWMEE-0000H4-Pq for qemu-devel@nongnu.org; Thu, 12 May 2005 18:32:27 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [patch] gcc4 host support Date: Thu, 12 May 2005 23:25:21 +0100 References: <200505112204.10204.paul@codesourcery.com> <200505121800.40417.paul@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505122325.23498.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 Cc: Pascal Terjan On Thursday 12 May 2005 23:13, Pascal Terjan wrote: > On 5/12/05, Paul Brook wrote: > > On Wednesday 11 May 2005 22:04, Paul Brook wrote: > > > The attached patch adds support for gcc4 x86 and x86_64 hosts. > > > > This time with the correct patch attached. > > Hello, I can't build qemu under gcc4.0.0 with your patch and using -O2. > I get : > /home/pterjan/rpm/BUILD/qemu-0.7.0/target-i386/ops_sse.h: In function > 'op_pshufw_mmx': > /home/pterjan/rpm/BUILD/qemu-0.7.0/target-i386/ops_sse.h:574: error: > unable to find a register to spill in class 'GENERAL_REGS' > /home/pterjan/rpm/BUILD/qemu-0.7.0/target-i386/ops_sse.h:574: error: > this is the insn: > (insn:HI 18 17 19 0 > /home/pterjan/rpm/BUILD/qemu-0.7.0/target-i386/ops_sse.h:569 (set > (strict_low_part (subreg:HI (reg/v:DI 63 [ r ]) 0)) > (mem/s/j:HI (plus:SI (mult:SI (reg:SI 64) > (const_int 2 [0x2])) > (reg/v/f:SI 59 [ s ])) [0 ._w S2 A16])) 41 > {*movstricthi_1} (insn_list:REG_DEP_TRUE 16 (insn_list:REG_DEP_TRUE 12 > (insn_list:REG_DEP_TRUE 53 (nil)))) > (expr_list:REG_DEAD (reg:SI 64) > (nil))) > /home/pterjan/rpm/BUILD/qemu-0.7.0/target-i386/ops_sse.h:574: confused > by earlier errors, bailing out This is a gcc bug. See gcc.gnu.org/PR16185. Basically gcc doesn't like doing 64-bit arithmetic on a target with only three 32-bit registers (We use the other 4 registers to hold the guest CPU state). You can hack around this by not holding the guest cpu state in registers, but this incurs a significant speed penalty. Paul