From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lo71F-0008Vr-ML for qemu-devel@nongnu.org; Sun, 29 Mar 2009 22:14:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lo71A-0008Tg-Pa for qemu-devel@nongnu.org; Sun, 29 Mar 2009 22:14:33 -0400 Received: from [199.232.76.173] (port=50189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lo71A-0008Ta-NR for qemu-devel@nongnu.org; Sun, 29 Mar 2009 22:14:28 -0400 Received: from csl.cornell.edu ([128.84.224.10]:3585 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lo71A-0005eH-H6 for qemu-devel@nongnu.org; Sun, 29 Mar 2009 22:14:28 -0400 Received: from stanley.csl.cornell.edu (stanley.csl.cornell.edu [128.84.224.15]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id n2U2ENZT050593 for ; Sun, 29 Mar 2009 22:14:28 -0400 (EDT) Date: Sun, 29 Mar 2009 22:14:23 -0400 (EDT) From: Vince Weaver Subject: Re: [Qemu-devel] mipsIV support for mips-linux-user In-Reply-To: <20090330010551.GD12026@hall.aurel32.net> Message-ID: <20090329220159.E17939@stanley.csl.cornell.edu> References: <20090329165112.G16354@stanley.csl.cornell.edu> <20090330010551.GD12026@hall.aurel32.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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, 30 Mar 2009, Aurelien Jarno wrote: > On Sun, Mar 29, 2009 at 04:56:35PM -0400, Vince Weaver wrote: >> Hello >> >> I have some 32-bit mips binaries compiled with -mips4 -O3. >> >> These run fine on an actual mips r12k system I have, but fail with >> default mips-linux-user (0.10.1). >> >> This is because by default mips-linux-user does not have support enabled >> for mipsIV instructions. This is because MIPS_HFLAG_COP1X >> is not enabled on any of the cpus supported by mips-linux-user. >> >> So my question, what is the correct way to fix this? Add a R4000 class >> CPU that can be seen with mips-linux-user? Or should the default for >> user operation just enable this because it supports more binaries? > > Did you try with a MIPS32R2 CPU? It should have COP1X instructions. I tried all of the variants listed with -cpu ? no -cpu specified = fails at first cop1x insn MIPS '4Kc' = segfaults invalid "cfc1 v1,$31" instruction MIPS '4Km' = segfaults invalid "cfc1 v1,$31" instruction MIPS '4KEcR1' = segfaults invalid "cfc1 v1,$31" instruction MIPS '4KEmR1' = segfaults invalid "cfc1 v1,$31" instruction MIPS '4KEc' = segfaults invalid "cfc1 v1,$31" instruction MIPS '4KEm' = segfaults invalid "cfc1 v1,$31" instruction MIPS '24Kc' = segfaults invalid "cfc1 v1,$31" instruction MIPS '24Kf' = fails at first cop1x insn MIPS '34Kf' = fails at first cop1x insn If I modify the check for cop1x to always return valid, running with no -cpu runs the program successfully to completion. This might be some mistake in the cpu feature selection logic. The code is a bit hard to follow, especially as I don't have a good document specifying which CPUs have which features, especially since the real machines I have access to for comparison are SGI R4600, R5000 and R12000 machines. Vince