From: Paul Brook <paul@nowt.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5180] TCG: Use x86-64 zero extension instructions.
Date: Sun, 07 Sep 2008 18:07:39 +0000 [thread overview]
Message-ID: <E1KcOfj-0006sw-Mw@cvs.savannah.gnu.org> (raw)
Revision: 5180
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5180
Author: pbrook
Date: 2008-09-07 18:07:39 +0000 (Sun, 07 Sep 2008)
Log Message:
-----------
TCG: Use x86-64 zero extension instructions.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Modified Paths:
--------------
trunk/tcg/x86_64/tcg-target.c
Modified: trunk/tcg/x86_64/tcg-target.c
===================================================================
--- trunk/tcg/x86_64/tcg-target.c 2008-09-07 17:45:15 UTC (rev 5179)
+++ trunk/tcg/x86_64/tcg-target.c 2008-09-07 18:07:39 UTC (rev 5180)
@@ -382,6 +382,12 @@
if (val == (int8_t)val) {
tcg_out_modrm(s, 0x83, c, r0);
tcg_out8(s, val);
+ } else if (c == ARITH_AND && val == 0xffu) {
+ /* movzbl */
+ tcg_out_modrm(s, 0xb6 | P_EXT | P_REXB, r0, r0);
+ } else if (c == ARITH_AND && val == 0xffffu) {
+ /* movzwl */
+ tcg_out_modrm(s, 0xb7 | P_EXT, r0, r0);
} else {
tcg_out_modrm(s, 0x81, c, r0);
tcg_out32(s, val);
@@ -393,6 +399,15 @@
if (val == (int8_t)val) {
tcg_out_modrm(s, 0x83 | P_REXW, c, r0);
tcg_out8(s, val);
+ } else if (c == ARITH_AND && val == 0xffu) {
+ /* movzbl */
+ tcg_out_modrm(s, 0xb6 | P_EXT | P_REXW, r0, r0);
+ } else if (c == ARITH_AND && val == 0xffffu) {
+ /* movzwl */
+ tcg_out_modrm(s, 0xb7 | P_EXT | P_REXW, r0, r0);
+ } else if (c == ARITH_AND && val == 0xffffffffu) {
+ /* 32-bit mov zero extends */
+ tcg_out_modrm(s, 0x8b, r0, r0);
} else if (val == (int32_t)val) {
tcg_out_modrm(s, 0x81 | P_REXW, c, r0);
tcg_out32(s, val);
reply other threads:[~2008-09-07 18:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1KcOfj-0006sw-Mw@cvs.savannah.gnu.org \
--to=paul@nowt.org \
--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).