Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lrg5I-0007R3-MI for qemu-devel@nongnu.org; Wed, 08 Apr 2009 18:17:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lrg5G-0007Q5-Nm for qemu-devel@nongnu.org; Wed, 08 Apr 2009 18:17:27 -0400 Received: from [199.232.76.173] (port=36258 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lrg5G-0007Pq-Gz for qemu-devel@nongnu.org; Wed, 08 Apr 2009 18:17:26 -0400 Received: from hall.aurel32.net ([88.191.82.174]:50739) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lrg5G-0006nI-4S for qemu-devel@nongnu.org; Wed, 08 Apr 2009 18:17:26 -0400 Received: from aurel32 by hall.aurel32.net with local (Exim 4.69) (envelope-from ) id 1Lrg5E-0002xc-UK for qemu-devel@nongnu.org; Thu, 09 Apr 2009 00:17:24 +0200 Date: Thu, 9 Apr 2009 00:17:24 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] mipsIV support for mips-linux-user Message-ID: <20090408221724.GE26602@hall.aurel32.net> References: <20090329165112.G16354@stanley.csl.cornell.edu> <20090330010551.GD12026@hall.aurel32.net> <20090329220159.E17939@stanley.csl.cornell.edu> <20090330043539.GE12026@hall.aurel32.net> <20090330131050.L20376@stanley.csl.cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20090330131050.L20376@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 Mon, Mar 30, 2009 at 01:29:29PM -0400, Vince Weaver wrote: > On Mon, 30 Mar 2009, Aurelien Jarno wrote: > >> Do you have the end of qemu.log when running your code with -d in_asm,op? > > The first cop1x instruction happens relatively deep into the program, so > the debugging dump is pretty larege. How far back do you want? > > It looks like no matter what cpu option I pick, the HFLAGS is set to > 0x0022 (which is only the usermode and FPU flags). > > Because of this the generated assembly in the debug output > unconditionally generates an illegal instruction exception the first time > a cop1x instruction is executed (in my case, "msub.d") This instruction is clearly marked as MIPS64 only in the manual. > I've been digging through the qemu mips code, and I can't seem to find > where the hflags are set in the usermode case. > > The only place that sets the MIPS_HFLAG_COP1X is in exec.h, > "compute_hflags()" but that doesn't ever seem to be called if > CONFIG_USER_ONLY I think this should be enabled in cpu_reset(), where env->hflags is setup for user mode. But I am actually concern about the results you get when enabling MIPS_HFLAG_COP1X. If your program is expecting to have the FPU in 64-bit mode you may have really strange results. Did you check them? -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net