[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Bug 1233225] Re: mips/mipsel linux user float division
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [Bug 1233225] Re: mips/mipsel linux user float division problem |
Date: |
Wed, 02 Oct 2013 07:22:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
Am 02.10.2013 03:39, schrieb Peter Maydell:
> On 2 October 2013 02:51, Stefan Weil <address@hidden> 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