qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] tcg_temp_local_new should take no parameter
Date: Thu, 1 Jan 2009 14:36:49 +0000	[thread overview]
Message-ID: <20090101143649.GA18298@miranda.arrow> (raw)
In-Reply-To: <761ea48b0901010519h798dac6at764a799ed630b81c@mail.gmail.com>

On Thu, Jan 01, 2009 at 02:19:10PM +0100, Laurent Desnogues wrote:
> Index: target-ppc/translate.c
> ===================================================================
> --- target-ppc/translate.c	(revision 6144)
> +++ target-ppc/translate.c	(working copy)
> @@ -6350,7 +6350,7 @@
>      TCGv_i32 t0 = tcg_temp_local_new_i32();                                   \
>      TCGv_i32 t1 = tcg_temp_local_new_i32();                                   \
>      TCGv_i32 t2 = tcg_temp_local_new_i32();                                   \
> -    TCGv_i64 t3 = tcg_temp_local_new(TCG_TYPE_I64);                           \
> +    TCGv_i64 t3 = tcg_temp_local_new();                                       \
>      tcg_gen_trunc_i64_i32(t0, cpu_gpr[rA(ctx->opcode)]);                      \
>      tcg_gen_trunc_i64_i32(t2, cpu_gpr[rB(ctx->opcode)]);                      \
>      tcg_op(t0, t0, t2);                                                       \

Wouldn't tcg_temp_local_new_i64 be a little clearer, as t3 is later 
freed with tcg_temp_free_i64()?

The SH4 emulation seems to use 'plain' TCGv mostly, expects it to be
32-bits, and doesn't use the _tl macros, which I suppose is reasonable 
for a 32-bit only target.

Alpha, ARM and M68K do something similar (so I'll try to follow the
style that they use) but CRIS uses _tl a lot, which seems peculiar...

Cheers,
-- 
Stuart Brady

  parent reply	other threads:[~2009-01-01 14:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-01 13:19 [Qemu-devel] [PATCH] tcg_temp_local_new should take no parameter Laurent Desnogues
2009-01-01 14:09 ` Aurelien Jarno
2009-01-01 14:36 ` Stuart Brady [this message]
2009-01-02  4:36   ` Paul Brook

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=20090101143649.GA18298@miranda.arrow \
    --to=sdbrady@ntlworld.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).