提交 64584218 编写于 作者: A Aurelien Jarno

tcg/x86_64: add support for ext{8,16,32}u_i{32,64} TCG ops

Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 cfc86988
...@@ -1181,6 +1181,21 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args, ...@@ -1181,6 +1181,21 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
case INDEX_op_ext32s_i64: case INDEX_op_ext32s_i64:
tcg_out_modrm(s, 0x63 | P_REXW, args[0], args[1]); tcg_out_modrm(s, 0x63 | P_REXW, args[0], args[1]);
break; 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: case INDEX_op_qemu_ld8u:
tcg_out_qemu_ld(s, args, 0); tcg_out_qemu_ld(s, args, 0);
...@@ -1355,6 +1370,11 @@ static const TCGTargetOpDef x86_64_op_defs[] = { ...@@ -1355,6 +1370,11 @@ static const TCGTargetOpDef x86_64_op_defs[] = {
{ INDEX_op_ext8s_i64, { "r", "r"} }, { INDEX_op_ext8s_i64, { "r", "r"} },
{ INDEX_op_ext16s_i64, { "r", "r"} }, { INDEX_op_ext16s_i64, { "r", "r"} },
{ INDEX_op_ext32s_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_ld8u, { "r", "L" } },
{ INDEX_op_qemu_ld8s, { "r", "L" } }, { INDEX_op_qemu_ld8s, { "r", "L" } },
......
...@@ -70,6 +70,12 @@ enum { ...@@ -70,6 +70,12 @@ enum {
#define TCG_TARGET_HAS_ext8s_i64 #define TCG_TARGET_HAS_ext8s_i64
#define TCG_TARGET_HAS_ext16s_i64 #define TCG_TARGET_HAS_ext16s_i64
#define TCG_TARGET_HAS_ext32s_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_i32
#define TCG_TARGET_HAS_rot_i64 #define TCG_TARGET_HAS_rot_i64
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册