From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [Qemu-devel] [5281] Use the new concat_i32_i64 op for std and stda
Date: Sun, 21 Sep 2008 17:36:25 +0100 [thread overview]
Message-ID: <200809211736.25590.paul@codesourcery.com> (raw)
In-Reply-To: <f43fc5580809210908g62651ae4q2c876f55fbb9d299@mail.gmail.com>
> > It's more efficient to not use concat_i32_i64 on 64-bit targets.
> > See patch below. I'll let you decide if you want to apply or ignore it.
>
> Good point. How about adding instead a concat_i64_i64 starting from this
> piece:
I'd call it concat32_i64 (c.f. extu_i32_i64 v.s. ext32u_i64).
> > + tcg_gen_shli_i64(dest, high, 32);
> > + tcg_gen_ext32u_i64(low, low);
> > + tcg_gen_or_i64(dest, dest, low);
>
> and also add defines for concat_tl_i64? That would be both clean and
> efficient.
Sounds reasonable. The cheat for tl->i64 on 32-bit hosts is ok if it's
confined to tcg-opc.h.
> I think ldd on i386 would benefit from a reverse operation (64 to two
> 32/64 bit words).
64 to 32 should be much easier for TCG to optimize automatically. It's just a
a series of copies, and can often be implemented without requiring any extra
temporaries. The 32 to 64 case is a trickier because you generally need
additional temporaries for type correctness and have to propagate all the
zeros through the 64-bit logical or.
Paul
prev parent reply other threads:[~2008-09-21 16:36 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
2008-09-22 16:47 ` Paul Brook
2008-09-21 16:36 ` Paul Brook [this message]
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=200809211736.25590.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=blauwirbel@gmail.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 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.