qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH] s390x-linux-user


From: Paul Brook
Subject: Re: [Qemu-devel] [RFC PATCH] s390x-linux-user
Date: Fri, 26 Jun 2009 19:39:21 +0100
User-agent: KMail/1.11.4 (Linux/2.6.29-2-amd64; KDE/4.2.4; x86_64; ; )

> >  OTOH, tweaking the TCG interface so that it works as an interpreter
> > shouldn't be all that hard. It's something I've been considering to do
> > for a while, and would mean that you can build both interpreter and
> > translator from the same source.
>
> Like by adding an interpreter TCG target? If it were in C only, it
> could also serve as a portable (low performance) translator runtime.

There are a couple of different options.

You could spit out bytecode (or even some simplified form of an existing ISA) 
then run that though an interpreter. This is gets you a portable target, and 
behaves much like a native TCG target.

The alternative is to replace TCG altogether, and have tcg_gen_* perform the 
operation immediately as the code is translated. You need a couple of tricks 
to cope with conditional banches, but as long as you don't allow loops this 
isn't too hairy. This is more invasive, gives you a pure interpreter, so may 
be the fastest option for heavily self-modifying guest code.

Paul




reply via email to

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