tcg: Define TCG_ptr properly
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
d289837eef
commit
8b73d49f53
@ -645,11 +645,11 @@ do {\
|
|||||||
|
|
||||||
void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs);
|
void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs);
|
||||||
|
|
||||||
#if TCG_TARGET_REG_BITS == 32
|
#if UINTPTR_MAX == UINT32_MAX
|
||||||
#define TCGV_NAT_TO_PTR(n) MAKE_TCGV_PTR(GET_TCGV_I32(n))
|
#define TCGV_NAT_TO_PTR(n) MAKE_TCGV_PTR(GET_TCGV_I32(n))
|
||||||
#define TCGV_PTR_TO_NAT(n) MAKE_TCGV_I32(GET_TCGV_PTR(n))
|
#define TCGV_PTR_TO_NAT(n) MAKE_TCGV_I32(GET_TCGV_PTR(n))
|
||||||
|
|
||||||
#define tcg_const_ptr(V) TCGV_NAT_TO_PTR(tcg_const_i32((tcg_target_long)(V)))
|
#define tcg_const_ptr(V) TCGV_NAT_TO_PTR(tcg_const_i32((intptr_t)(V)))
|
||||||
#define tcg_global_reg_new_ptr(R, N) \
|
#define tcg_global_reg_new_ptr(R, N) \
|
||||||
TCGV_NAT_TO_PTR(tcg_global_reg_new_i32((R), (N)))
|
TCGV_NAT_TO_PTR(tcg_global_reg_new_i32((R), (N)))
|
||||||
#define tcg_global_mem_new_ptr(R, O, N) \
|
#define tcg_global_mem_new_ptr(R, O, N) \
|
||||||
@ -660,7 +660,7 @@ void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs);
|
|||||||
#define TCGV_NAT_TO_PTR(n) MAKE_TCGV_PTR(GET_TCGV_I64(n))
|
#define TCGV_NAT_TO_PTR(n) MAKE_TCGV_PTR(GET_TCGV_I64(n))
|
||||||
#define TCGV_PTR_TO_NAT(n) MAKE_TCGV_I64(GET_TCGV_PTR(n))
|
#define TCGV_PTR_TO_NAT(n) MAKE_TCGV_I64(GET_TCGV_PTR(n))
|
||||||
|
|
||||||
#define tcg_const_ptr(V) TCGV_NAT_TO_PTR(tcg_const_i64((tcg_target_long)(V)))
|
#define tcg_const_ptr(V) TCGV_NAT_TO_PTR(tcg_const_i64((intptr_t)(V)))
|
||||||
#define tcg_global_reg_new_ptr(R, N) \
|
#define tcg_global_reg_new_ptr(R, N) \
|
||||||
TCGV_NAT_TO_PTR(tcg_global_reg_new_i64((R), (N)))
|
TCGV_NAT_TO_PTR(tcg_global_reg_new_i64((R), (N)))
|
||||||
#define tcg_global_mem_new_ptr(R, O, N) \
|
#define tcg_global_mem_new_ptr(R, O, N) \
|
||||||
|
Loading…
Reference in New Issue
Block a user