[Top][All Lists]

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

Re: [Qemu-devel] new MIPS instructions

From: Paul Brook
Subject: Re: [Qemu-devel] new MIPS instructions
Date: Sun, 23 Apr 2006 19:56:37 +0100
User-agent: KMail/1.9.1

On Sunday 23 April 2006 19:41, Dirk Behme wrote:
> Thiemo Seufer wrote:
> > Fabrice Bellard wrote:
> >>I suggest adding a parameter to cpu_mips_init() telling the exact CPU
> >>model which is emulated. Optionnal features (such as the FPU) could be
> >>specified with an additionnal parameter.
> >
> > Probably with an additional switch "emulate everything we know about",
> > which would be especially useful for usermode emulation where CPU
> > specifics don't matter that much.
> Good points, but I don't know which is the best way to go ;)
> I think there are pros for both ways:

The way the Arm emulation handles this is to have a set of features that are 
checked by the emulation code. Or at least that's the idea, current CVS 
doesn't actually enforce most of these.

CPU selection is done by CPU model. This selects which features are available, 
and cpu specific info (Device IDs, etc). If neccy for usermode emulation you 
can invent a fictional CPU that contains the superset of all features.

I think ppc does something similar. Ideally there would be a common mechanism, 
but that doesn't exist.

The important thing is to make the emulation conditional, even if the initial 
implementation just uses compile time constants. Once the conditionals are 
there it's relatively easy to wire them up to whatever cpu selection 
mechanisms qemu invents.


reply via email to

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