qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [5100] SH4: Convert register moves to TCG
Date: Fri, 29 Aug 2008 01:12:12 +0100	[thread overview]
Message-ID: <200808290112.13308.paul@codesourcery.com> (raw)
In-Reply-To: <20080828232353.GA10605@volta.aurel32.net>

On Friday 29 August 2008, Aurelien Jarno wrote:
> On Thu, Aug 28, 2008 at 11:13:42PM +0100, Paul Brook wrote:
> > On Thursday 28 August 2008, Aurelien Jarno wrote:
> > > +static always_inline void gen_movl_T_rN (TCGv t, int reg)
> > > +{
> > > +    tcg_gen_st_tl(t, cpu_env, offsetof(CPUState, gregs[reg]));
> >
> > The preferred way of doing this is to have TCG variables for common
> > (possibly all?) registers. See e.g. m68k or sparc.
>
> Until now I have used MIPS as an example, it copies CPU registers to TCG
> variables. As you pointed, m68k and sparc use direct access to CPU
> registers through TCG variables.
>
> I wonder in which way what your propose is better? It seems easier to
> write, but what about the runtime speed?

I'm guessing that with current tcg there's not a lot of difference. Using 
variables (like sparc/m68k) gives scope for better/easier code generation in 
the future, and makes debug dumps look prettier.

Paul

  reply	other threads:[~2008-08-29  0:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 21:02 [Qemu-devel] [5100] SH4: Convert register moves to TCG Aurelien Jarno
2008-08-28 22:13 ` Paul Brook
2008-08-28 23:23   ` Aurelien Jarno
2008-08-29  0:12     ` Paul Brook [this message]
2008-08-29 10:46     ` 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=200808290112.13308.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=aurelien@aurel32.net \
    --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).