From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] mipsIV support for mips-linux-user
Date: Sun, 29 Mar 2009 22:14:23 -0400 (EDT) [thread overview]
Message-ID: <20090329220159.E17939@stanley.csl.cornell.edu> (raw)
In-Reply-To: <20090330010551.GD12026@hall.aurel32.net>
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.
Vince
next prev parent reply other threads:[~2009-03-30 2:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 20:56 [Qemu-devel] mipsIV support for mips-linux-user Vince Weaver
2009-03-30 1:05 ` Aurelien Jarno
2009-03-30 2:14 ` Vince Weaver [this message]
2009-03-30 4:35 ` Aurelien Jarno
2009-03-30 17:29 ` Vince Weaver
2009-04-08 22:17 ` Aurelien Jarno
2009-04-09 1:00 ` Vince Weaver
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=20090329220159.E17939@stanley.csl.cornell.edu \
--to=vince@csl.cornell.edu \
--cc=qemu-devel@nongnu.org \
/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).