summaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2009-09-30 23:44:51 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-10-04 13:24:45 +0200
commit64584218021e7bd788728b7fbcec04c1562aca0f (patch)
tree124c2fab5c4f886dc6b951a5714a346ac634e434 /tcg
parentcfc86988a830d89ed22433af83711847d7859b15 (diff)
downloadqemu-64584218021e7bd788728b7fbcec04c1562aca0f.tar.gz
qemu-64584218021e7bd788728b7fbcec04c1562aca0f.tar.bz2
qemu-64584218021e7bd788728b7fbcec04c1562aca0f.zip
tcg/x86_64: add support for ext{8,16,32}u_i{32,64} TCG ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/x86_64/tcg-target.c20
-rw-r--r--tcg/x86_64/tcg-target.h6
2 files changed, 26 insertions, 0 deletions
diff --git a/tcg/x86_64/tcg-target.c b/tcg/x86_64/tcg-target.c
index b4ba65f972..5c829e76e7 100644
--- a/tcg/x86_64/tcg-target.c
+++ b/tcg/x86_64/tcg-target.c
@@ -1181,6 +1181,21 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
case INDEX_op_ext32s_i64:
tcg_out_modrm(s, 0x63 | P_REXW, args[0], args[1]);
break;
+ case INDEX_op_ext8u_i32:
+ tcg_out_modrm(s, 0xb6 | P_EXT | P_REXB, args[0], args[1]);
+ break;
+ case INDEX_op_ext16u_i32:
+ tcg_out_modrm(s, 0xb7 | P_EXT, args[0], args[1]);
+ break;
+ case INDEX_op_ext8u_i64:
+ tcg_out_modrm(s, 0xb6 | P_EXT | P_REXW, args[0], args[1]);
+ break;
+ case INDEX_op_ext16u_i64:
+ tcg_out_modrm(s, 0xb7 | P_EXT | P_REXW, args[0], args[1]);
+ break;
+ case INDEX_op_ext32u_i64:
+ tcg_out_modrm(s, 0x8b, args[0], args[1]);
+ break;
case INDEX_op_qemu_ld8u:
tcg_out_qemu_ld(s, args, 0);
@@ -1355,6 +1370,11 @@ static const TCGTargetOpDef x86_64_op_defs[] = {
{ INDEX_op_ext8s_i64, { "r", "r"} },
{ INDEX_op_ext16s_i64, { "r", "r"} },
{ INDEX_op_ext32s_i64, { "r", "r"} },
+ { INDEX_op_ext8u_i32, { "r", "r"} },
+ { INDEX_op_ext16u_i32, { "r", "r"} },
+ { INDEX_op_ext8u_i64, { "r", "r"} },
+ { INDEX_op_ext16u_i64, { "r", "r"} },
+ { INDEX_op_ext32u_i64, { "r", "r"} },
{ INDEX_op_qemu_ld8u, { "r", "L" } },
{ INDEX_op_qemu_ld8s, { "r", "L" } },
diff --git a/tcg/x86_64/tcg-target.h b/tcg/x86_64/tcg-target.h
index 8d47e78738..3ca392ff21 100644
--- a/tcg/x86_64/tcg-target.h
+++ b/tcg/x86_64/tcg-target.h
@@ -70,6 +70,12 @@ enum {
#define TCG_TARGET_HAS_ext8s_i64
#define TCG_TARGET_HAS_ext16s_i64
#define TCG_TARGET_HAS_ext32s_i64
+#define TCG_TARGET_HAS_ext8u_i32
+#define TCG_TARGET_HAS_ext16u_i32
+#define TCG_TARGET_HAS_ext8u_i64
+#define TCG_TARGET_HAS_ext16u_i64
+#define TCG_TARGET_HAS_ext32u_i64
+
#define TCG_TARGET_HAS_rot_i32
#define TCG_TARGET_HAS_rot_i64