From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VREtI-00038j-EK for qemu-devel@nongnu.org; Wed, 02 Oct 2013 01:22:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VREtD-0006zz-Kk for qemu-devel@nongnu.org; Wed, 02 Oct 2013 01:22:28 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=43680 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VREtD-0006zf-Dx for qemu-devel@nongnu.org; Wed, 02 Oct 2013 01:22:23 -0400 Message-ID: <524BAD81.70405@weilnetz.de> Date: Wed, 02 Oct 2013 07:22:09 +0200 From: Stefan Weil MIME-Version: 1.0 References: <20130930150918.29090.41471.malonedeb@gac.canonical.com> <20131001175122.28361.22777.malone@gac.canonical.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Bug 1233225] Re: mips/mipsel linux user float division problem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Bug 1233225 <1233225@bugs.launchpad.net> Cc: QEMU Developers , =?UTF-8?B?QXVyw6lsaWVuIEphcm4=?= =?UTF-8?B?bw==?= , Richard Henderson Am 02.10.2013 03:39, schrieb Peter Maydell: > On 2 October 2013 02:51, Stefan Weil <1233225@bugs.launchpad.net> wrote: >> I can confirm that something is strange with MIPS Linux user emulation, >> but get a different result (which is also wrong): >> >> # Your test code is in file divtest.c. >> $ mipsel-linux-gnu-gcc-4.7 -g -static divtest.c >> $ mipsel-linux-user/qemu-mipsel a.out >> 0.000000 > Does the CPU you're asking qemu to emulate match the CPU gcc is > generating code for? IIRC for MIPS there's no single "right" answer > for "which CPU do we default to"... > > -- PMM > QEMU user mode emulation for MIPS knows two different default cpus: #if defined(TARGET_ABI_MIPSN32) || defined(TARGET_ABI_MIPSN64) cpu_model = "20Kc"; #else cpu_model = "24Kf"; #endif In this case, it took 24Kf which seems to be ok. I tested other cpus with -cpu xxx. They either show the same result or fail with illegal instruction. This is my executable: divtest-mips: ELF 32-bit MSB executable, MIPS, MIPS-II version 1, statically linked, for GNU/Linux 2.6.26 The original bug report said that it runs in QEMU system emulation (which I did not test because of lack of time). As system emulation uses the same cpu, it should be fine. See also my previous mail: bit CP0St_FR makes a difference: http://lists.nongnu.org/archive/html/qemu-devel/2013-10/msg00168.html Stefan