qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Stuart Brady <sdbrady@ntlworld.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-arm: tcg temp variable usage cleanup
Date: Thu, 29 Oct 2009 19:32:56 +0100	[thread overview]
Message-ID: <761ea48b0910291132t6306047evdb551eb1bb0eaa06@mail.gmail.com> (raw)
In-Reply-To: <20091029182217.GA10660@miranda.arrow>

On Thu, Oct 29, 2009 at 7:22 PM, Stuart Brady <sdbrady@ntlworld.com> wrote:
> On Thu, Oct 29, 2009 at 04:01:15PM +0200, juha.riihimaki@nokia.com wrote:
>>
>> -static inline TCGv gen_ld8s(TCGv addr, int index)
>> +static inline void gen_ld8s(TCGv ret, TCGv addr, int index)
>>  {
>> -    TCGv tmp = new_tmp();
>> -    tcg_gen_qemu_ld8s(tmp, addr, index);
>> -    return tmp;
>> +    tcg_gen_qemu_ld8s(ret, addr, index);
>>  }
> [...]
>>  static inline void gen_st8(TCGv val, TCGv addr, int index)
>>  {
>>      tcg_gen_qemu_st8(val, addr, index);
>> -    dead_tmp(val);
>>  }
>>  static inline void gen_st16(TCGv val, TCGv addr, int index)
>>  {
>>      tcg_gen_qemu_st16(val, addr, index);
>> -    dead_tmp(val);
>>  }
> [...]
>
> Why not remove these functions entirely, replacing them with calls to
> tcg_gen_qemu_ld/st()?

It eases adding calls to a memory tracer for instance.


Laurent

> I presume there's a reason, given this:
>
>> @@ -1001,25 +955,24 @@ VFP_GEN_FIX(ulto)
>>  static inline void gen_vfp_ld(DisasContext *s, int dp, TCGv addr)
>>  {
>>      if (dp)
>> -        tcg_gen_qemu_ld64(cpu_F0d, addr, IS_USER(s));
>> +        gen_ld64(cpu_F0d, addr, IS_USER(s));
>>      else
>> -        tcg_gen_qemu_ld32u(cpu_F0s, addr, IS_USER(s));
>> +        gen_ld32(cpu_F0s, addr, IS_USER(s));
>>  }
>
> Cheers,
> --
> Stuart Brady
>
>
>

  reply	other threads:[~2009-10-29 18:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 14:01 [Qemu-devel] [PATCH] target-arm: tcg temp variable usage cleanup juha.riihimaki
2009-10-29 18:22 ` Stuart Brady
2009-10-29 18:32   ` Laurent Desnogues [this message]
2009-11-01  0:08 ` Laurent Desnogues
2009-11-02  8:06   ` Juha.Riihimaki

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=761ea48b0910291132t6306047evdb551eb1bb0eaa06@mail.gmail.com \
    --to=laurent.desnogues@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sdbrady@ntlworld.com \
    /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).