[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [5100] SH4: Convert register moves to TCG
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [5100] SH4: Convert register moves to TCG |
Date: |
Fri, 29 Aug 2008 01:12:12 +0100 |
User-agent: |
KMail/1.9.9 |
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