qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: Thiemo Seufer <ths@networkno.de>
Cc: Paul Brook <paul@codesourcery.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [5281] Use the new concat_i32_i64 op for std and stda
Date: Mon, 22 Sep 2008 19:14:31 +0300	[thread overview]
Message-ID: <f43fc5580809220914s5edffef3y7c3ad3583aa59fd6@mail.gmail.com> (raw)
In-Reply-To: <20080921211908.GB22151@networkno.de>

On 9/22/08, Thiemo Seufer <ths@networkno.de> wrote:
> Blue Swirl wrote:
>  > On 9/21/08, Paul Brook <paul@codesourcery.com> wrote:
>  > > > Like these patches?
>  > >
>  > >  > +static inline void tcg_gen_concat_i64_i64(TCGv dest, TCGv low, TCGv high)
>  > >  > +{
>  > >  > +    TCGv tmp = tcg_temp_new(TCG_TYPE_I64);
>  > >  > +    tcg_gen_shli_i64(tmp, high, 32);
>  > >  > +    tcg_gen_or_i64(dest, low, tmp);
>  > >  > +    tcg_temp_free(tmp);
>  > >  > +}
>  > >
>  > >  This should use concat_i32_i64 on 32-bit hosts.
>  > >
>  > >  Ok with that change, the rename I suggested in my previous mail, and if you
>  > >  add documentation to tcg/README.
>  >
>  > Updated. I'll run a couple of tests.
>
>
> I noticed I could also use the complement ("split"?) to those
>  instructions in the mips backend. Maybe the same is true for
>  sparc.

Currently I'm using the following:
                        tcg_gen_trunc_i64_tl(cpu_tmp0, cpu_tmp64);
                        tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, 0xffffffffULL);
                        gen_movl_TN_reg(rd + 1, cpu_tmp0);
                        tcg_gen_shri_i64(cpu_tmp64, cpu_tmp64, 32);
                        tcg_gen_trunc_i64_tl(cpu_val, cpu_tmp64);
                        tcg_gen_andi_tl(cpu_val, cpu_val, 0xffffffffULL);

On a 32 bit host a much more efficient method could be used if wrapped in an op.

  reply	other threads:[~2008-09-22 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-21 14:49 [Qemu-devel] [5281] Use the new concat_i32_i64 op for std and stda Blue Swirl
2008-09-21 15:01 ` Paul Brook
2008-09-21 16:08   ` Blue Swirl
2008-09-21 16:29     ` Blue Swirl
2008-09-21 16:41       ` Paul Brook
2008-09-21 17:02         ` Blue Swirl
2008-09-21 21:19           ` Thiemo Seufer
2008-09-22 16:14             ` Blue Swirl [this message]
2008-09-22 16:47               ` Paul Brook
2008-09-21 16: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=f43fc5580809220914s5edffef3y7c3ad3583aa59fd6@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ths@networkno.de \
    /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).