|
|
|
@ -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. */ |
|
|
|
|