From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <andreas.faerber@web.de>,
"Aurélien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] ppc: Convert op_405_check_{sat,satu} to TCG
Date: Sat, 25 Oct 2008 21:09:17 +0100 [thread overview]
Message-ID: <200810252109.18477.paul@codesourcery.com> (raw)
In-Reply-To: <83999635-3F2E-4BB9-B14B-57088A1B1A8D@web.de>
On Saturday 25 October 2008, Andreas Färber wrote:
> + tcg_gen_shri_tl(tmp, tmp, 31);
> + tcg_gen_brcondi_tl(TCG_COND_EQ, tmp, 0, endLabel);
Is this really right for ppc64?
You can easily test the high bit using TCG_COND_LT.
> + tcg_gen_shri_tl(tmp, cpu_T[2], 31);
> + tcg_gen_brcondi_tl(TCG_COND_EQ, tmp, 0, innerLabel);
> +
> + tcg_gen_movi_tl(cpu_T[0], INT32_MIN);
> + tcg_gen_br(endLabel);
> +
> + gen_set_label(innerLabel);
> + tcg_gen_movi_tl(cpu_T[0], INT32_MAX);
((signed)x >> 31) ^ 0x7fffffff)
is a much more efficient way of implementing this.
Paul
next prev parent reply other threads:[~2008-10-25 20:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 19:59 [Qemu-devel] [PATCH] ppc: Convert op_405_check_{sat,satu} to TCG Andreas Färber
2008-10-25 20:09 ` Paul Brook [this message]
2008-10-25 20:25 ` Andreas Färber
2008-10-25 23:29 ` Anthony Liguori
2008-10-27 16:05 ` Hollis Blanchard
2008-10-28 20:01 ` [Qemu-devel] [PATCH v2] " Andreas Färber
2008-11-01 0:55 ` Aurélien Jarno
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=200810252109.18477.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=andreas.faerber@web.de \
--cc=aurelien@aurel32.net \
--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).