Subject: Re: qemu (0.8.0) and MMX/SSE errors
To: None <tech-pkg@netbsd.org>
From: Joel CARNAT <joel@carnat.net>
List: tech-pkg
Date: 01/16/2006 16:21:33
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

of course, I sent the mail to quickly (w/o the attachement)...
sorry - here it is.

Dans l'épisode précédent (Mon, Jan 16 2006 - 16:19), Joel CARNAT nous apprenait que :
> Hi,
> 
> I'm trying CFLAGS for my Pentium4 processor and QEmu seem to have issue
> with them. Flags are set (in mk.conf) as follow :
> #########################
> PKGSRC_CPUFLAGS=-march=pentium4 -mfpmath=sse -mmmx -msse -msse2
> PKGSRC_CFLAGS=-Os -pipe
> COPTS+=${PKGSRC_CFLAGS} ${PKGSRC_CPUFLAGS}
> CFLAGS+=${PKGSRC_CFLAGS} ${PKGSRC_CPUFLAGS}
> CXXFLAGS+=${PKGSRC_CFLAGS} ${PKGSRC_CPUFLAGS}
> #########################
> 
> I've attached the error (to have a clean mail content ;)
> When not using MMX and SSE CFLAGS ("PKGSRC_CPUFLAGS=-march=pentium4"),
> qemu compiles OK.
> 
> According to qemu changelog (0.7.0), it should be able to use
> "MMX/SSE/SSE2/PNI support". Is the issue worth a PR ?
> 
> PS: I have quite a lot of things compiled with those CFLAGS (firefox,
> gnome, kde, ...) without issues.
> 
> TIA,
> 	Jo
> 

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: attachment; filename="qemu.log"

gcc -O2 -Os -pipe -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -fomit-frame-pointer -I. -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386 -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/fpu -DHAS_AUDIO -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/slirp -c -o exec.o /home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/exec.c
gcc -O2 -Os -pipe -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -fomit-frame-pointer -I. -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386 -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/fpu -DHAS_AUDIO -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/slirp -c -o kqemu.o /home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/kqemu.c
gcc -O2 -Os -pipe -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -fomit-frame-pointer -mpreferred-stack-boundary=2 -falign-functions=0 -fno-gcse -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386 -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/fpu -DHAS_AUDIO -I/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/slirp -c -o op.o /home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386/op.c
In file included from /home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386/op.c:238
6:
/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386/ops_sse.h: In function `op_psrlq_mmx':
/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386/ops_sse.h:213: error: unable to find a register to spill in class `GENERAL_REGS'
/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386/ops_sse.h:213: error: this is the insn:
(insn:HI 36 35 37 3 0xbd136688 (parallel [
            (set (reg:DI 63)
                (lshiftrt:DI (reg:DI 63)
                    (subreg:QI (reg/v:SI 60) 0)))
            (clobber (scratch:SI))
            (clobber (reg:CC 17 flags))
        ]) 320 {lshrdi3_1} (insn_list 33 (insn_list 35 (nil)))
    (expr_list:REG_DEAD (reg/v:SI 60)
        (expr_list:REG_UNUSED (scratch:SI)
            (expr_list:REG_UNUSED (reg:CC 17 flags)
                (nil)))))
/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/target-i386/ops_sse.h:213: confused by earlier errors, bailing out
gmake[1]: *** [op.o] Error 1
gmake[1]: Leaving directory `/home/cvs/pkgsrc/emulators/qemu/work/qemu-0.8.0/i386-softmmu'
gmake: *** [all] Error 1
*** Error code 2

Stop.
make: stopped in /home/cvs/pkgsrc/emulators/qemu
===> 
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /home/cvs/pkgsrc/emulators/qemu/work/.work.log
===> 
*** Error code 1

Stop.
make: stopped in /home/cvs/pkgsrc/emulators/qemu

--sm4nu43k4a2Rpi4c--