From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>,
Bug 1233225 <1233225@bugs.launchpad.net>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
"Aurélien Jarno" <aurelien@aurel32.net>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [Bug 1233225] Re: mips/mipsel linux user float division problem
Date: Wed, 02 Oct 2013 07:22:09 +0200 [thread overview]
Message-ID: <524BAD81.70405@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA9L20GnAM0PBMkEvzS2cut2b=p0Cdw29H6pwRw4kPUxiw@mail.gmail.com>
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
next prev parent reply other threads:[~2013-10-02 5:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 15:09 [Qemu-devel] [Bug 1233225] [NEW] mips/mipsel linux user float division problem Johannes Schauer
2013-10-01 17:51 ` [Qemu-devel] [Bug 1233225] " Stefan Weil
2013-10-02 1:39 ` Peter Maydell
2013-10-02 5:22 ` Stefan Weil [this message]
2013-10-02 12:58 ` Peter Maydell
2013-10-01 18:14 ` Stefan Weil
2013-10-01 20:43 ` Stefan Weil
2013-10-02 16:48 ` Johannes Schauer
2013-10-08 0:21 ` Petar Jovanovic
2016-12-06 11:43 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524BAD81.70405@weilnetz.de \
--to=sw@weilnetz.de \
--cc=1233225@bugs.launchpad.net \
--cc=aurelien@aurel32.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).