Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lo9Dr-0007x7-6b for qemu-devel@nongnu.org; Mon, 30 Mar 2009 00:35:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lo9Dp-0007wv-MB for qemu-devel@nongnu.org; Mon, 30 Mar 2009 00:35:41 -0400 Received: from [199.232.76.173] (port=49494 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lo9Dp-0007ws-H7 for qemu-devel@nongnu.org; Mon, 30 Mar 2009 00:35:41 -0400 Received: from hall.aurel32.net ([88.191.82.174]:44937) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lo9Dp-00024j-5j for qemu-devel@nongnu.org; Mon, 30 Mar 2009 00:35:41 -0400 Received: from aurel32 by hall.aurel32.net with local (Exim 4.69) (envelope-from ) id 1Lo9Dn-0002zv-HK for qemu-devel@nongnu.org; Mon, 30 Mar 2009 06:35:39 +0200 Date: Mon, 30 Mar 2009 06:35:39 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] mipsIV support for mips-linux-user Message-ID: <20090330043539.GE12026@hall.aurel32.net> References: <20090329165112.G16354@stanley.csl.cornell.edu> <20090330010551.GD12026@hall.aurel32.net> <20090329220159.E17939@stanley.csl.cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20090329220159.E17939@stanley.csl.cornell.edu> Sender: Aurelien Jarno 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 Sun, Mar 29, 2009 at 10:14:23PM -0400, Vince Weaver wrote: > 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. > Do you have the end of qemu.log when running your code with -d in_asm,op? -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net