diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 232733cb71..ee379994e7 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -31,8 +31,7 @@ #if TARGET_INSN_START_EXTRA_WORDS == 0 static inline void tcg_gen_insn_start(target_ulong pc) { - TCGOp *op = tcg_emit_op(INDEX_op_insn_start, - INSN_START_WORDS * 64 / TCG_TARGET_REG_BITS); + TCGOp *op = tcg_emit_op(INDEX_op_insn_start, INSN_START_WORDS); tcg_set_insn_start_param(op, 0, pc); tcg_set_insn_start_param(op, 1, 0); tcg_set_insn_start_param(op, 2, 0); @@ -40,8 +39,7 @@ static inline void tcg_gen_insn_start(target_ulong pc) #elif TARGET_INSN_START_EXTRA_WORDS == 1 static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1) { - TCGOp *op = tcg_emit_op(INDEX_op_insn_start, - INSN_START_WORDS * 64 / TCG_TARGET_REG_BITS); + TCGOp *op = tcg_emit_op(INDEX_op_insn_start, INSN_START_WORDS); tcg_set_insn_start_param(op, 0, pc); tcg_set_insn_start_param(op, 1, a1); tcg_set_insn_start_param(op, 2, 0); @@ -50,8 +48,7 @@ static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1) static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1, target_ulong a2) { - TCGOp *op = tcg_emit_op(INDEX_op_insn_start, - INSN_START_WORDS * 64 / TCG_TARGET_REG_BITS); + TCGOp *op = tcg_emit_op(INDEX_op_insn_start, INSN_START_WORDS); tcg_set_insn_start_param(op, 0, pc); tcg_set_insn_start_param(op, 1, a1); tcg_set_insn_start_param(op, 2, a2); diff --git a/include/tcg/tcg-opc.h b/include/tcg/tcg-opc.h index 28806057c5..61f1c28858 100644 --- a/include/tcg/tcg-opc.h +++ b/include/tcg/tcg-opc.h @@ -109,9 +109,7 @@ DEF(extu_i32_i64, 1, 1, 0, 0) DEF(extrl_i64_i32, 1, 1, 0, 0) DEF(extrh_i64_i32, 1, 1, 0, 0) -#define DATA64_ARGS (TCG_TARGET_REG_BITS == 64 ? 1 : 2) - -DEF(insn_start, 0, 0, DATA64_ARGS * INSN_START_WORDS, TCG_OPF_NOT_PRESENT) +DEF(insn_start, 0, 0, INSN_START_WORDS, TCG_OPF_NOT_PRESENT) DEF(exit_tb, 0, 0, 1, TCG_OPF_BB_EXIT | TCG_OPF_BB_END | TCG_OPF_NOT_PRESENT) DEF(goto_tb, 0, 0, 1, TCG_OPF_BB_EXIT | TCG_OPF_BB_END | TCG_OPF_NOT_PRESENT) @@ -184,5 +182,4 @@ DEF(last_generic, 0, 0, 0, TCG_OPF_NOT_PRESENT) #include "tcg-target-opc.h.inc" -#undef DATA64_ARGS #undef DEF diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 067150c542..60942ce05c 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -43,19 +43,10 @@ #define CPU_TEMP_BUF_NLONGS 128 #define TCG_STATIC_FRAME_SIZE (CPU_TEMP_BUF_NLONGS * sizeof(long)) -#if TCG_TARGET_REG_BITS == 32 -typedef int32_t tcg_target_long; -typedef uint32_t tcg_target_ulong; -#define TCG_PRIlx PRIx32 -#define TCG_PRIld PRId32 -#elif TCG_TARGET_REG_BITS == 64 typedef int64_t tcg_target_long; typedef uint64_t tcg_target_ulong; #define TCG_PRIlx PRIx64 #define TCG_PRIld PRId64 -#else -#error unsupported -#endif #if TCG_TARGET_NB_REGS <= 32 typedef uint32_t TCGRegSet; @@ -147,11 +138,7 @@ typedef enum TCGType { #define TCG_TYPE_COUNT (TCG_TYPE_V256 + 1) /* An alias for the size of the host register. */ -#if TCG_TARGET_REG_BITS == 32 - TCG_TYPE_REG = TCG_TYPE_I32, -#else TCG_TYPE_REG = TCG_TYPE_I64, -#endif /* An alias for the size of the native pointer. */ #if UINTPTR_MAX == UINT32_MAX @@ -605,23 +592,13 @@ static inline void tcg_set_insn_param(TCGOp *op, unsigned arg, TCGArg v) static inline uint64_t tcg_get_insn_start_param(TCGOp *op, unsigned arg) { tcg_debug_assert(arg < INSN_START_WORDS); - if (TCG_TARGET_REG_BITS == 64) { - return tcg_get_insn_param(op, arg); - } else { - return deposit64(tcg_get_insn_param(op, arg * 2), 32, 32, - tcg_get_insn_param(op, arg * 2 + 1)); - } + return tcg_get_insn_param(op, arg); } static inline void tcg_set_insn_start_param(TCGOp *op, unsigned arg, uint64_t v) { tcg_debug_assert(arg < INSN_START_WORDS); - if (TCG_TARGET_REG_BITS == 64) { - tcg_set_insn_param(op, arg, v); - } else { - tcg_set_insn_param(op, arg * 2, v); - tcg_set_insn_param(op, arg * 2 + 1, v >> 32); - } + tcg_set_insn_param(op, arg, v); } /* The last op that was emitted. */