From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jc528-0000Tc-MS for qemu-devel@nongnu.org; Wed, 19 Mar 2008 16:37:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jc527-0000SA-0S for qemu-devel@nongnu.org; Wed, 19 Mar 2008 16:37:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jc526-0000S7-R0 for qemu-devel@nongnu.org; Wed, 19 Mar 2008 16:37:10 -0400 Received: from bay0-omc1-s25.bay0.hotmail.com ([65.54.246.97]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jc526-0007W9-Fg for qemu-devel@nongnu.org; Wed, 19 Mar 2008 16:37:10 -0400 Message-ID: From: "C.W. Betts" Subject: Re: [Qemu-devel] build failure on x86, any suggestions? Date: Wed, 19 Mar 2008 14:36:44 -0600 References: <1205589710.24804.65.camel@localhost> <1205673101.24804.145.camel@localhost> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1777750.lcoUf3eyjM"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200803191436.55827.computers57@hotmail.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: Blue Swirl --nextPart1777750.lcoUf3eyjM Content-Type: multipart/alternative; boundary="Boundary-01=_elX4HW7OFsASaZq" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_elX4HW7OFsASaZq Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 16 March 2008 10:20:30 am Blue Swirl wrote: > On 3/16/08, Peter Volkov wrote: > > =D0=92 =D0=92=D1=81=D0=BA, 16/03/2008 =D0=B2 00:01 -0600, C.W. Betts = =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > Try setting the compiler flags to use -march=3Dpentium-mmx . That is = the > > > max > > > > > > setting for -march that qemu compiles on. also, make sure that the > > > compiler isn't sending any of the -msse functions. > > > > > > I tried to build qemu using -msse -march=3Dpentium3 and it spat out = the > > > same thing. > > > > Well with -march=3Dpentium-mmx it works, although it occurs that > > $ export CFLAGS=3D"-march=3Dpentium-mmx" > > is not enough. I have to path CFLAGS to make with > > $ emake OS_CFLAGS=3D"${CFLAGS}" > > CFLAGS are prefixed at the beginning of the compilation command ands > > seems that -g -O2 which will go later redefine something which in turn > > cause the build to fail and OS_CFLAGS passes -march after -g -O2. > > > > Also strange thing is that if I try to disable all sse thing in compil= er > > appending -mno-sse{,2,3} -mfpmath=3D387 qemu does not builds. Either I > > miss something or sse is not the only problem. > > > > Two patches suggested here by Alexander and Blue did no difference her= e. > > Please try this patch and if it fails, report also the compiler error > message. > > I'm trying to find the range of instructions that need to be converted > to TCG helpers. Okay, the patch makes op.c and translate.c compile. I did have a problem w= ith trying to get the makefile to compile op.c with the additional flags, b= ut I worked around it. =20 However, now the helper.c file spits out: gcc-3.4 -fomit-frame-pointer -I. -I.. -I/home/test/makestuff/qemu-patched/= target-i386 -I/home/test/makestuff/qemu-patched -MMD -MP -DNEED_CPU_H -D_GN= U_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE -I/home/test/makestuf= f/qemu-patched/tcg -I/home/test/makestuff/qemu-patched/tcg/i386 -I/home/tes= t/makestuff/qemu-patched/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/home/test/m= akestuff/qemu-patched/slirp -mfpmath=3Dsse -march=3Dpentium3 -msse -Wall -O= 2 -g -fno-strict-aliasing -mfpmath=3Dsse -march=3Dpentium3 -msse -m32 -c -o= helper.o /home/test/makestuff/qemu-patched/target-i386/helper.c /home/test/makestuff/qemu-patched/target-i386/helper.c: In function `svm_ch= eck_intercept_param': /home/test/makestuff/qemu-patched/target-i386/helper.c:4375: error: unable = to find a register to spill in class `GENERAL_REGS' /home/test/makestuff/qemu-patched/target-i386/helper.c:4375: error: this is= the insn: (insn:HI 353 352 354 39 /home/test/makestuff/qemu-patched/target-i386/helpe= r.c:4368 (parallel [ (set (reg:DI 167 [ .intercept ]) (lshiftrt:DI (reg:DI 167 [ .intercept ]) (subreg:QI (reg:SI 166) 0))) (clobber (scratch:SI)) (clobber (reg:CC 17 flags)) ]) 309 {lshrdi3_1} (insn_list 351 (insn_list 352 (nil))) (expr_list:REG_DEAD (reg:SI 166) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_UNUSED (scratch:SI) (nil))))) /home/test/makestuff/qemu-patched/target-i386/helper.c:4375: confused by ea= rlier errors, bailing out make: *** [helper.o] Error 1 This is only on the i386 target. When I compile the x86_64 target, it work= s just fine. --Boundary-01=_elX4HW7OFsASaZq Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

On Sunday 16 March 2008 10:20:30 am Blue S= wirl wrote:

> On 3/16/08, Peter Volkov <pva@gent= oo.org> wrote:

> > =D0=92 =D0=92=D1=81=D0=BA, 16/03= /2008 =D0=B2 00:01 -0600, C.W. Betts =D0=BF=D0=B8=D1=88=D0=B5=D1=82:=

> > > Try setting the compiler fl= ags to use -march=3Dpentium-mmx . That is the

> > > max

> > >

> > > setting for -march that qe= mu compiles on. also, make sure that the

> > > compiler isn't sending any= of the -msse functions.

> > >

> > > I tried to build qemu usin= g -msse -march=3Dpentium3 and it spat out the

> > > same thing.

> >

> > Well with -march=3Dpentium-mmx i= t works, although it occurs that

> > $ export CFLAGS=3D"-march= =3Dpentium-mmx"

> > is not enough. I have to path C= =46LAGS to make with

> > $ emake OS_CFLAGS=3D"${CFL= AGS}"

> > CFLAGS are prefixed at the begi= nning of the compilation command ands

> > seems that -g -O2 which will go= later redefine something which in turn

> > cause the build to fail and OS_= CFLAGS passes -march after -g -O2.

> >

> > Also strange thing is that if I= try to disable all sse thing in compiler

> > appending -mno-sse{,2,3} -mfpma= th=3D387 qemu does not builds. Either I

> > miss something or sse is not th= e only problem.

> >

> > Two patches suggested here by A= lexander and Blue did no difference here.

>

> Please try this patch and if it fails= , report also the compiler error

> message.

>

> I'm trying to find the range of instr= uctions that need to be converted

> to TCG helpers.

Okay, the patch makes op.c and translate.c= compile. I did have a problem with trying to get the makefile to compile = op.c with the additional flags, but I worked around it.

However, now the helper.c file spits out:<= /span>

gcc-3.4 -fomit-fram= e-pointer -I. -I.. -I/home/test/makestuff/qemu-patched/target-i386 -I/home/= test/makestuff/qemu-patched -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFF= SET_BITS=3D64 -D_LARGEFILE_SOURCE -I/home/test/makestuff/qemu-patched/tcg -= I/home/test/makestuff/qemu-patched/tcg/i386 -I/home/test/makestuff/qemu-pat= ched/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/home/test/makestuff/qemu-patche= d/slirp -mfpmath=3Dsse -march=3Dpentium3 -msse -Wall -O2 -g -fno-strict-ali= asing -mfpmath=3Dsse -march=3Dpentium3 -msse -m32 -c -o helper.o /home/test= /makestuff/qemu-patched/target-i386/helper.c

/home/test/makestuff= /qemu-patched/target-i386/helper.c: In function `svm_check_intercept_param'= :

/home/test/makestuff= /qemu-patched/target-i386/helper.c:4375: error: unable to find a register t= o spill in class `GENERAL_REGS'

/home/test/makestuff= /qemu-patched/target-i386/helper.c:4375: error: this is the insn:

(insn:HI 353 352 354= 39 /home/test/makestuff/qemu-patched/target-i386/helper.c:4368 (parallel [=

(set (re= g:DI 167 [ <variable>.intercept ])

(lsh= iftrt:DI (reg:DI 167 [ <variable>.intercept ])

= (subreg:QI (reg:SI 166) 0)))

(clobber= (scratch:SI))

(clobber= (reg:CC 17 flags))

]) 309 {lshr= di3_1} (insn_list 351 (insn_list 352 (nil)))

(expr_list:REG_D= EAD (reg:SI 166)

(expr_list:R= EG_UNUSED (reg:CC 17 flags)

(expr_li= st:REG_UNUSED (scratch:SI)

(nil= )))))

/home/test/makestuff= /qemu-patched/target-i386/helper.c:4375: confused by earlier errors, bailin= g out

make: *** [helper.o]= Error 1

This is only on the i386 target. When I compile the x86_64 target, it w= orks just fine.

--Boundary-01=_elX4HW7OFsASaZq-- --nextPart1777750.lcoUf3eyjM Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBH4XlnIXkdd5hN+dsRAnPIAJ0ZYnMIwnKfScwiwz391lTFpfVEKgCffdPq lCm4YFBeBUwLk/KlCtJwQl0= =xow8 -----END PGP SIGNATURE----- --nextPart1777750.lcoUf3eyjM--