From: Dirk Behme <dirk.behme@googlemail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] new MIPS instructions
Date: Sun, 23 Apr 2006 20:41:43 +0200 [thread overview]
Message-ID: <444BCA67.6020300@gmail.com> (raw)
In-Reply-To: <20060423174847.GA9279@networkno.de>
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:
Pro "emulate everything we know about" or "one MIPS fits
all": Compile your program with a -march option you want,
load the binary (or now the ELF as well ;) ) into QEMU and
(if QEMU has support for the selected architecture) it will
run. Without the user to select any special configuration on
the command line (or tweaking inside QEMUs source code). It
will run correctly without the user even to think about any
special QEMU configuration. This was what I assumed before
investigating why my code with a special -march option
didn't work.
Pro "additional parameter": FPU is a good example for this.
If the processor I want to emulate has no FPU I would assume
if my code uses (accidently?) FPU instructions I get
exception/error/warning from QEMU. It confused me that QEMU
(wrongly) executes my program with unsupported instructions
(architecture) without any warning.
"one MIPS fits all" is a user friendly and QEMU easy to use
option, while "additional parameter" is the option for
emulation accuracy.
I'm not an ELF expert: Does ELF contain information about
architecture compiled for? If yes, we can combine both ways
above? Load ELF file, read architecture from it and let QEMU
autoselect correct architecture features (or give error if
not supported). Then we have emulation accuracy but don't
need additional options.
Dirk
next prev parent reply other threads:[~2006-04-23 18:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-23 17:27 [Qemu-devel] new MIPS instructions Fabrice Bellard
2006-04-23 17:48 ` Thiemo Seufer
2006-04-23 18:41 ` Dirk Behme [this message]
2006-04-23 18:56 ` Paul Brook
2006-04-23 22:48 ` Thiemo Seufer
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=444BCA67.6020300@gmail.com \
--to=dirk.behme@googlemail.com \
--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).