From: Thomas Steffen <steffen.list.account@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch] gcc4 host support
Date: Thu, 19 May 2005 23:03:57 +0200 [thread overview]
Message-ID: <d7e2700f05051914033af48d13@mail.gmail.com> (raw)
In-Reply-To: <200505191952.48028.paul@codesourcery.com>
On 5/19/05, Paul Brook <paul@codesourcery.com> wrote:
> No. The problem is to turn machine code into (a different form of) machine
> code. A lot of the complexity in a compiler is involved with with turning the
> high-level language constructs into simple low-level machine operations.
I see your point. I did write a Z80 emulator on an early x86 once. The
flags where extremely close, and most commands have a direct
correspondency. You just have to decide on a register mapping, and you
can start. I wrote short assembler sequences for each command, very
much like the targets in qemu. But this is a special case: mapping one
architecture on a similar architecture.
Qemu is special an that it avoid both the problem in "papering over
the differences", and it avoids the combinatorial explosion of n
targets on m hosts. And it does this exactly because it uses C to
express machine commands, and not some other machine language. I think
you cannot take this away without changing the very nature of qemu.
The reason I care about this is that qemu has achived a lot more than
all other similar open source projects together. Look at bochs, or
plex86 or valgrind: they are nowhere near the performance of qemu, and
they only support x86 targets. So there must be something very
ingenious about the design of qemu, and I think it is the combination
of gcc and dyngen.
I certainly welcome every possible improvement, but I want to stress
how good qemu alread is.
> With qemu we're just translating from one simple form to another, so I'd argue
> that all you really need is a clever way of papering over the differences
> between the host and the guest.
So many projects have failed in this direction that I am tempted to
assume that this is a flawed approach. Apart from kqemu and VMware,
there is not one convincing solution even for the supposedly trivial
x86 on x86 case.
> What we have now (dyngen) is basically just an assembler. It maps qemu micro
> ops directly into blocks host code. The only reason dyngen uses gcc is to
> avoid having to hand write host encodings for all the ops.
It as also because C avoids the n by m problem.
Thomas
next prev parent reply other threads:[~2005-05-19 21:20 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-11 21:04 [Qemu-devel] [patch] gcc4 host support Paul Brook
2005-05-12 17:00 ` Paul Brook
2005-05-12 22:13 ` Pascal Terjan
2005-05-12 22:25 ` Paul Brook
2005-05-14 7:55 ` Filip Navara
2005-05-14 11:53 ` Paul Brook
2005-05-14 11:56 ` Filip Navara
2005-06-17 4:30 ` [Qemu-devel] Fedora 4 + GCC4 + Qemu WAS: " Darryl Dixon
2005-06-17 12:45 ` Paul Brook
[not found] ` <1119013084.5187.4.camel@darrylsfc3box>
2005-06-17 13:02 ` Paul Brook
2005-06-17 22:18 ` David Woodhouse
2005-06-20 1:18 ` Darryl Dixon
2005-05-16 9:41 ` [Qemu-devel] " David Woodhouse
2005-05-17 20:46 ` Paul Brook
2005-05-18 10:06 ` Herbert Poetzl
2005-05-18 16:02 ` Paul Brook
2005-05-18 16:10 ` David Woodhouse
2005-05-18 19:29 ` John Hogerhuis
2005-05-18 20:48 ` Paul Brook
2005-05-18 20:55 ` David Woodhouse
2005-05-18 21:16 ` Paul Brook
2005-05-18 21:29 ` jeebs
2005-05-18 22:37 ` Paul Brook
2005-05-18 23:05 ` Ian Rogers
2005-05-18 22:37 ` Ian Rogers
2005-05-19 7:23 ` Gwenole Beauchesne
2005-05-19 13:20 ` Paul Brook
2005-05-19 14:07 ` Gwenole Beauchesne
2005-05-19 15:44 ` Paul Brook
2005-05-19 18:14 ` Thomas Steffen
2005-05-19 18:52 ` Paul Brook
2005-05-19 19:38 ` Tim Walker
2005-05-19 19:45 ` Paul Brook
2005-05-19 21:03 ` Thomas Steffen [this message]
2005-05-19 22:25 ` John Hogerhuis
2005-05-20 9:59 ` Thomas Steffen
2005-05-20 12:57 ` Paul Brook
2005-05-19 16:18 ` Ian Rogers
2005-05-19 13:47 ` McMullan, Jason
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=d7e2700f05051914033af48d13@mail.gmail.com \
--to=steffen.list.account@gmail.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).