qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] mipsIV support for mips-linux-user


From: Vince Weaver
Subject: Re: [Qemu-devel] mipsIV support for mips-linux-user
Date: Sun, 29 Mar 2009 22:14:23 -0400 (EDT)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]