From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBLtu-00076L-Uy for qemu-devel@nongnu.org; Tue, 15 Mar 2005 18:56:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBLtr-00074n-IF for qemu-devel@nongnu.org; Tue, 15 Mar 2005 18:56:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBLsU-0006cB-EQ for qemu-devel@nongnu.org; Tue, 15 Mar 2005 18:55:10 -0500 Received: from [217.204.41.189] (helo=kula.newsnow.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DBL4R-0000dx-Az for qemu-devel@nongnu.org; Tue, 15 Mar 2005 18:03:27 -0500 Received: from r3j188.chello.upc.cz ([213.220.201.188] helo=[192.168.0.4]) by kula.newsnow.net with esmtp (Exim 3.35 #1 (Debian)) id 1DBL36-0005ry-00 for ; Tue, 15 Mar 2005 23:02:04 +0000 Message-ID: <423769B5.2000701@praguespringpeople.org> Date: Wed, 16 Mar 2005 00:03:17 +0100 From: Struan Bartlett MIME-Version: 1.0 Subject: Re: [Qemu-devel] Error during compilation References: <20050315155818.84245.qmail@web13826.mail.yahoo.com> <20050315220901.GA24612@nic-nac-project.de> In-Reply-To: <20050315220901.GA24612@nic-nac-project.de> Content-Type: multipart/alternative; boundary="------------070803070307040403030006" 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 This is a multi-part message in MIME format. --------------070803070307040403030006 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thomas Schwinge wrote: >On Tue, Mar 15, 2005 at 07:57:55AM -0800, Peter Federighi wrote: > > >>gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. >>-I/usr/src/qemu-0.6.1/target-i386 -I/usr/src/qemu-0.6.1 -D_GNU_SOURCE >>-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/src/qemu-0.6.1/slirp -c >>-o helper.o /usr/src/qemu-0.6.1/target-i386/helper.c >>/usr/src/qemu-0.6.1/softmmu_template.h: In function `__stq_mmu': >>/usr/src/qemu-0.6.1/softmmu_template.h:223: error: unable to find a >>register to spill in class `GENERAL_REGS' >>/usr/src/qemu-0.6.1/softmmu_template.h:223: error: this is the insn: >>(insn:HI 315 314 316 13 /usr/src/qemu-0.6.1/softmmu_template.h:252 >>(parallel [ >> (set (reg:DI 0 ax [194]) >> (lshiftrt:DI (reg/v:DI 59 [ val ]) >> (subreg:QI (reg:SI 0 ax [193]) 0))) >> (clobber (scratch:SI)) >> (clobber (reg:CC 17 flags)) >> ]) 306 {lshrdi3_1} (insn_list 314 (nil)) >> (expr_list:REG_DEAD (reg:SI 0 ax [193]) >> (expr_list:REG_UNUSED (reg:CC 17 flags) >> (expr_list:REG_UNUSED (scratch:SI) >> (nil))))) >>/usr/src/qemu-0.6.1/softmmu_template.h:223: confused by earlier errors, >>bailing out >>make[1]: *** [helper.o] Error 1 >>make[1]: Leaving directory `/usr/src/qemu-0.6.1/i386' >>make: *** [all] Error 1 >> >> > >I'm getting the same error when having '-march=athlon-xp' in my $CFLAGS >(and forcing qemu to use those). Replacing that with '-march=pentium' >fixes the issue for me. > I got the same error compiling QEMU with -march=pentium3, but only on op.c and helper.c. All other files compiled fine with that option. Those two files compiled fine with -march=pentium. Is it a bug? I idly speculated that the register selection method might be different for different archs and that, because these files might demand certain registers be used for certain purposes, the compiler might simple be "unable to find a register" for its needs. Struan --------------070803070307040403030006 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Thomas Schwinge wrote:
On Tue, Mar 15, 2005 at 07:57:55AM -0800, Peter Federighi wrote:
  
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I.
-I/usr/src/qemu-0.6.1/target-i386 -I/usr/src/qemu-0.6.1 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/src/qemu-0.6.1/slirp -c
-o helper.o /usr/src/qemu-0.6.1/target-i386/helper.c
/usr/src/qemu-0.6.1/softmmu_template.h: In function `__stq_mmu':
/usr/src/qemu-0.6.1/softmmu_template.h:223: error: unable to find a
register to spill in class `GENERAL_REGS'
/usr/src/qemu-0.6.1/softmmu_template.h:223: error: this is the insn:
(insn:HI 315 314 316 13 /usr/src/qemu-0.6.1/softmmu_template.h:252
(parallel [
            (set (reg:DI 0 ax [194])
                (lshiftrt:DI (reg/v:DI 59 [ val ])
                    (subreg:QI (reg:SI 0 ax [193]) 0)))
            (clobber (scratch:SI))
            (clobber (reg:CC 17 flags))
        ]) 306 {lshrdi3_1} (insn_list 314 (nil))
    (expr_list:REG_DEAD (reg:SI 0 ax [193])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_UNUSED (scratch:SI)
                (nil)))))
/usr/src/qemu-0.6.1/softmmu_template.h:223: confused by earlier errors,
bailing out
make[1]: *** [helper.o] Error 1
make[1]: Leaving directory `/usr/src/qemu-0.6.1/i386'
make: *** [all] Error 1
    

I'm getting the same error when having '-march=athlon-xp' in my $CFLAGS
(and forcing qemu to use those).  Replacing that with '-march=pentium'
fixes the issue for me.
I got the same error compiling QEMU with -march=pentium3, but only on op.c and helper.c. All other files compiled fine with that option. Those two files compiled fine with -march=pentium.

Is it a bug? I idly speculated that the register selection method might be different for different archs and that, because these files might demand certain registers be used for certain purposes, the compiler might simple be "unable to find a register" for its needs.

Struan

--------------070803070307040403030006--