Signed-off-by: Richard Henderson <[email protected]>
---
include/tcg/tcg-op-common.h | 2 --
include/tcg/tcg-op-def.h.inc | 1 +
tcg/tcg-op.c | 15 +++++----------
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/include/tcg/tcg-op-common.h b/include/tcg/tcg-op-common.h
index 8a42ff1f456..fd603b2de7f 100644
--- a/include/tcg/tcg-op-common.h
+++ b/include/tcg/tcg-op-common.h
@@ -117,7 +117,6 @@ void tcg_gen_plugin_mem_cb(TCGv_i64 addr, unsigned meminfo);
/* 32 bit ops */
-void tcg_gen_movi_i32(TCGv_i32 ret, int32_t arg);
void tcg_gen_addi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2);
void tcg_gen_subfi_i32(TCGv_i32 ret, int32_t arg1, TCGv_i32 arg2);
void tcg_gen_subi_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2);
@@ -224,7 +223,6 @@ void tcg_gen_not_i32(TCGv_i32 ret, TCGv_i32 arg);
/* 64 bit ops */
-void tcg_gen_movi_i64(TCGv_i64 ret, int64_t arg);
void tcg_gen_addi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2);
void tcg_gen_subfi_i64(TCGv_i64 ret, int64_t arg1, TCGv_i64 arg2);
void tcg_gen_subi_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2);
diff --git a/include/tcg/tcg-op-def.h.inc b/include/tcg/tcg-op-def.h.inc
index ebfaf0b8188..5de7648ed48 100644
--- a/include/tcg/tcg-op-def.h.inc
+++ b/include/tcg/tcg-op-def.h.inc
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: MIT */
DEF2(mov, TCGV, TCGV)
+DEF2(movi, TCGV, TINT)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 511b34b143c..82f15205c36 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -392,6 +392,11 @@ static void gen_mov(TCGType type, TCGTemp *dst, TCGTemp
*src)
}
}
+static void gen_movi(TCGType type, TCGTemp *dst, int64_t src)
+{
+ gen_op_tt(INDEX_op_mov, type, dst, tcg_constant_internal(type, src));
+}
+
/* 32 bit ops */
void tcg_gen_discard_i32(TCGv_i32 arg)
@@ -399,11 +404,6 @@ void tcg_gen_discard_i32(TCGv_i32 arg)
tcg_gen_op1_i32(INDEX_op_discard, TCG_TYPE_I32, arg);
}
-void tcg_gen_movi_i32(TCGv_i32 ret, int32_t arg)
-{
- tcg_gen_mov_i32(ret, tcg_constant_i32(arg));
-}
-
void tcg_gen_add_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
{
tcg_gen_op3_i32(INDEX_op_add, ret, arg1, arg2);
@@ -1466,11 +1466,6 @@ void tcg_gen_discard_i64(TCGv_i64 arg)
tcg_gen_op1_i64(INDEX_op_discard, TCG_TYPE_I64, arg);
}
-void tcg_gen_movi_i64(TCGv_i64 ret, int64_t arg)
-{
- tcg_gen_mov_i64(ret, tcg_constant_i64(arg));
-}
-
void tcg_gen_ld8u_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset)
{
tcg_gen_ldst_op_i64(INDEX_op_ld8u, ret, arg2, offset);
--
2.53.0