All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: "Chen Gang" <xili_gchen_5257@hotmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Chris Metcalf" <cmetcalf@ezchip.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Riku Voipio" <riku.voipio@iki.fi>,
	"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Consult] tilegx: Is it a qemu's system bug?
Date: Sat, 25 Apr 2015 09:30:06 -1000	[thread overview]
Message-ID: <553BEB3E.4020909@twiddle.net> (raw)
In-Reply-To: <BLU436-SMTP1994B1CAA3FBA3AD3A2CEB1B9EB0@phx.gbl>

On 04/25/2015 05:12 AM, Chen Gang wrote:
> Hello All:
> 
> I want to consult an issue I met below for the latest master branch, is
> it a qemu's bug? (it is about ctz/cnttz instruction for tilegx)
> 
>   OP: 
>    ld_i32 tmp0,env,$0xfffffffffffffffc
>    movi_i32 tmp1,$0x0
>    brcond_i32 tmp0,tmp1,ne,$L0
>    movi_i64 tmp3,$0x0                    /* Initialize tmp3 */
>    set_label $L1 
>    shr_i64 tmp2,r2,tmp3

You can't keep temporaries live across basic blocks.
That is, across set_label, br, or brcond.  In that case
you'd have to use tcg_new_local_temp() instead.

That said, you shouldn't open-code ctz but instead use
a helper function and use ctz64().


r~

  reply	other threads:[~2015-04-25 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-25 15:12 [Qemu-devel] [Consult] tilegx: Is it a qemu's system bug? Chen Gang
2015-04-25 19:30 ` Richard Henderson [this message]
2015-04-25 23:30   ` Chen Gang

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=553BEB3E.4020909@twiddle.net \
    --to=rth@twiddle.net \
    --cc=afaerber@suse.de \
    --cc=cmetcalf@ezchip.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=walt@tilera.com \
    --cc=xili_gchen_5257@hotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.