From: Paul Brook <paul@nowt.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5179] Implement TCG sign extension ops for x86-64.
Date: Sun, 07 Sep 2008 17:45:16 +0000 [thread overview]
Message-ID: <E1KcOK4-00048A-8z@cvs.savannah.gnu.org> (raw)
Revision: 5179
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5179
Author: pbrook
Date: 2008-09-07 17:45:15 +0000 (Sun, 07 Sep 2008)
Log Message:
-----------
Implement TCG sign extension ops for x86-64.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Modified Paths:
--------------
trunk/tcg/x86_64/tcg-target.c
trunk/tcg/x86_64/tcg-target.h
Modified: trunk/tcg/x86_64/tcg-target.c
===================================================================
--- trunk/tcg/x86_64/tcg-target.c 2008-09-07 16:42:53 UTC (rev 5178)
+++ trunk/tcg/x86_64/tcg-target.c 2008-09-07 17:45:15 UTC (rev 5179)
@@ -1070,6 +1070,22 @@
tcg_out_modrm(s, 0xf7 | P_REXW, 3, args[0]);
break;
+ case INDEX_op_ext8s_i32:
+ tcg_out_modrm(s, 0xbe | P_EXT | P_REXB, args[0], args[1]);
+ break;
+ case INDEX_op_ext16s_i32:
+ tcg_out_modrm(s, 0xbf | P_EXT, args[0], args[1]);
+ break;
+ case INDEX_op_ext8s_i64:
+ tcg_out_modrm(s, 0xbe | P_EXT | P_REXW, args[0], args[1]);
+ break;
+ case INDEX_op_ext16s_i64:
+ tcg_out_modrm(s, 0xbf | P_EXT | P_REXW, args[0], args[1]);
+ break;
+ case INDEX_op_ext32s_i64:
+ tcg_out_modrm(s, 0x63 | P_REXW, args[0], args[1]);
+ break;
+
case INDEX_op_qemu_ld8u:
tcg_out_qemu_ld(s, args, 0);
break;
@@ -1228,6 +1244,12 @@
{ INDEX_op_neg_i32, { "r", "0" } },
{ INDEX_op_neg_i64, { "r", "0" } },
+ { INDEX_op_ext8s_i32, { "r", "r"} },
+ { INDEX_op_ext16s_i32, { "r", "r"} },
+ { INDEX_op_ext8s_i64, { "r", "r"} },
+ { INDEX_op_ext16s_i64, { "r", "r"} },
+ { INDEX_op_ext32s_i64, { "r", "r"} },
+
{ INDEX_op_qemu_ld8u, { "r", "L" } },
{ INDEX_op_qemu_ld8s, { "r", "L" } },
{ INDEX_op_qemu_ld16u, { "r", "L" } },
Modified: trunk/tcg/x86_64/tcg-target.h
===================================================================
--- trunk/tcg/x86_64/tcg-target.h 2008-09-07 16:42:53 UTC (rev 5178)
+++ trunk/tcg/x86_64/tcg-target.h 2008-09-07 17:45:15 UTC (rev 5179)
@@ -60,6 +60,11 @@
#define TCG_TARGET_HAS_bswap_i64
#define TCG_TARGET_HAS_neg_i32
#define TCG_TARGET_HAS_neg_i64
+#define TCG_TARGET_HAS_ext8s_i32
+#define TCG_TARGET_HAS_ext16s_i32
+#define TCG_TARGET_HAS_ext8s_i64
+#define TCG_TARGET_HAS_ext16s_i64
+#define TCG_TARGET_HAS_ext32s_i64
/* Note: must be synced with dyngen-exec.h */
#define TCG_AREG0 TCG_REG_R14
reply other threads:[~2008-09-07 17:45 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=E1KcOK4-00048A-8z@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).