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 | 26 ++++++++++++++------------
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/include/tcg/tcg-op-common.h b/include/tcg/tcg-op-common.h
index c3d080222d9..22077246109 100644
--- a/include/tcg/tcg-op-common.h
+++ b/include/tcg/tcg-op-common.h
@@ -144,7 +144,6 @@ void tcg_gen_ld8u_i32(TCGv_i32 ret, TCGv_ptr arg2,
tcg_target_long offset);
void tcg_gen_ld8s_i32(TCGv_i32 ret, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_ld16u_i32(TCGv_i32 ret, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_ld16s_i32(TCGv_i32 ret, TCGv_ptr arg2, tcg_target_long offset);
-void tcg_gen_ld_i32(TCGv_i32 ret, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_st8_i32(TCGv_i32 arg1, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_st16_i32(TCGv_i32 arg1, TCGv_ptr arg2, tcg_target_long offset);
@@ -176,7 +175,6 @@ void tcg_gen_ld16u_i64(TCGv_i64 ret, TCGv_ptr arg2,
tcg_target_long offset);
void tcg_gen_ld16s_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_ld32u_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_ld32s_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset);
-void tcg_gen_ld_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset);
void tcg_gen_st_i64(TCGv_i64 arg1, TCGv_ptr arg2, tcg_target_long offset);
/* Size changing operations. */
diff --git a/include/tcg/tcg-op-def.h.inc b/include/tcg/tcg-op-def.h.inc
index 13aa8e15e42..dcd5be7f20c 100644
--- a/include/tcg/tcg-op-def.h.inc
+++ b/include/tcg/tcg-op-def.h.inc
@@ -30,6 +30,7 @@ DEF2(ext16u, TCGV, TCGV)
DEF4(extract, TCGV, TCGV, unsigned, unsigned)
DEF4(extract2, TCGV, TCGV, TCGV, unsigned)
DEF3(eqv, TCGV, TCGV, TCGV)
+DEF3(ld, TCGV, TCGv_ptr, tcg_target_long)
DEF2(mov, TCGV, TCGV)
DEF2(movi, TCGV, TINT)
DEF6(movcond, TCGCond, TCGV, TCGV, TCGV, TCGV, TCGV)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 33e82973d8d..b77e61c2b1d 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -284,13 +284,15 @@ void tcg_gen_plugin_mem_cb(TCGv_i64 addr, unsigned
meminfo)
#define DEF6(NAME, T1, T2, T3, T4, T5, T6) \
QEMU_ARG_NONNULL static void glue(gen_,NAME)(TCGType, T1, T2, T3, T4, T5,
T6);
-#define TCGV TCGTemp *
-#define TINT int64_t
+#define TCGv_ptr TCGTemp *
+#define TCGV TCGTemp *
+#define TINT int64_t
#include "tcg/tcg-op-def.h.inc"
#undef TINT
#undef TCGV
+#undef TCGv_ptr
#undef DEF1
#undef DEF2
@@ -332,11 +334,13 @@ void tcg_gen_plugin_mem_cb(TCGv_i64 addr, unsigned
meminfo)
#define C_TCGv_i32 tcgv_i32_temp
#define C_TCGv_i64 tcgv_i64_temp
+#define C_TCGv_ptr tcgv_ptr_temp
#define C_int32_t
#define C_int64_t
#define C_MemOp
#define C_TCGCond
#define C_TCGLabelPtr
+#define C_tcg_target_long
#define C_unsigned
#define TCGV glue(TCGv,TEXT)
@@ -363,11 +367,13 @@ void tcg_gen_plugin_mem_cb(TCGv_i64 addr, unsigned
meminfo)
#undef C_TCGv_i32
#undef C_TCGv_i64
+#undef C_TCGv_ptr
#undef C_int32_t
#undef C_int64_t
#undef C_MemOp
#undef C_TCGCond
#undef C_TCGLabelPtr
+#undef C_tcg_target_long
#undef C_unsigned
#undef DEF1
@@ -885,6 +891,12 @@ static void gen_extu_i32_i64(TCGTemp *dst, TCGTemp *src)
gen_op_tt(INDEX_op_extu_i32_i64, TCG_TYPE_I64, dst, src);
}
+static void gen_ld(TCGType type, TCGTemp *dst,
+ TCGTemp *base, tcg_target_long ofs)
+{
+ gen_op_tti(INDEX_op_ld, type, dst, base, ofs);
+}
+
static void gen_mov(TCGType type, TCGTemp *dst, TCGTemp *src)
{
if (src != dst) {
@@ -1509,11 +1521,6 @@ void tcg_gen_ld16s_i32(TCGv_i32 ret, TCGv_ptr arg2,
tcg_target_long offset)
tcg_gen_ldst_op_i32(INDEX_op_ld16s, ret, arg2, offset);
}
-void tcg_gen_ld_i32(TCGv_i32 ret, TCGv_ptr arg2, tcg_target_long offset)
-{
- tcg_gen_ldst_op_i32(INDEX_op_ld, ret, arg2, offset);
-}
-
void tcg_gen_st8_i32(TCGv_i32 arg1, TCGv_ptr arg2, tcg_target_long offset)
{
tcg_gen_ldst_op_i32(INDEX_op_st8, arg1, arg2, offset);
@@ -1562,11 +1569,6 @@ void tcg_gen_ld32s_i64(TCGv_i64 ret, TCGv_ptr arg2,
tcg_target_long offset)
tcg_gen_ldst_op_i64(INDEX_op_ld32s, ret, arg2, offset);
}
-void tcg_gen_ld_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset)
-{
- tcg_gen_ldst_op_i64(INDEX_op_ld, ret, arg2, offset);
-}
-
void tcg_gen_st8_i64(TCGv_i64 arg1, TCGv_ptr arg2, tcg_target_long offset)
{
tcg_gen_ldst_op_i64(INDEX_op_st8, arg1, arg2, offset);
--
2.53.0