提交 c02244a5 编写于 作者: R Richard Henderson 提交者: Aurelien Jarno

tcg: Change TCGType to an enumeration.

The TCGType name was already used consistently.  Changing it
to an enumeration instead of a set of defines aids debugging.
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 8a56e840
...@@ -2175,7 +2175,6 @@ static inline void tcg_gen_qemu_st64(TCGv_i64 arg, TCGv addr, int mem_index) ...@@ -2175,7 +2175,6 @@ static inline void tcg_gen_qemu_st64(TCGv_i64 arg, TCGv addr, int mem_index)
#endif /* TCG_TARGET_REG_BITS != 32 */ #endif /* TCG_TARGET_REG_BITS != 32 */
#if TARGET_LONG_BITS == 64 #if TARGET_LONG_BITS == 64
#define TCG_TYPE_TL TCG_TYPE_I64
#define tcg_gen_movi_tl tcg_gen_movi_i64 #define tcg_gen_movi_tl tcg_gen_movi_i64
#define tcg_gen_mov_tl tcg_gen_mov_i64 #define tcg_gen_mov_tl tcg_gen_mov_i64
#define tcg_gen_ld8u_tl tcg_gen_ld8u_i64 #define tcg_gen_ld8u_tl tcg_gen_ld8u_i64
...@@ -2247,7 +2246,6 @@ static inline void tcg_gen_qemu_st64(TCGv_i64 arg, TCGv addr, int mem_index) ...@@ -2247,7 +2246,6 @@ static inline void tcg_gen_qemu_st64(TCGv_i64 arg, TCGv addr, int mem_index)
#define tcg_const_tl tcg_const_i64 #define tcg_const_tl tcg_const_i64
#define tcg_const_local_tl tcg_const_local_i64 #define tcg_const_local_tl tcg_const_local_i64
#else #else
#define TCG_TYPE_TL TCG_TYPE_I32
#define tcg_gen_movi_tl tcg_gen_movi_i32 #define tcg_gen_movi_tl tcg_gen_movi_i32
#define tcg_gen_mov_tl tcg_gen_mov_i32 #define tcg_gen_mov_tl tcg_gen_mov_i32
#define tcg_gen_ld8u_tl tcg_gen_ld8u_i32 #define tcg_gen_ld8u_tl tcg_gen_ld8u_i32
......
...@@ -96,17 +96,22 @@ typedef struct TCGPool { ...@@ -96,17 +96,22 @@ typedef struct TCGPool {
this value, they are statically allocated in the TB stack frame */ this value, they are statically allocated in the TB stack frame */
#define TCG_STATIC_CALL_ARGS_SIZE 128 #define TCG_STATIC_CALL_ARGS_SIZE 128
typedef int TCGType; typedef enum TCGType {
TCG_TYPE_I32,
#define TCG_TYPE_I32 0 TCG_TYPE_I64,
#define TCG_TYPE_I64 1 TCG_TYPE_COUNT, /* number of different types */
#define TCG_TYPE_COUNT 2 /* number of different types */
#if TCG_TARGET_REG_BITS == 32 #if TCG_TARGET_REG_BITS == 32
#define TCG_TYPE_PTR TCG_TYPE_I32 TCG_TYPE_PTR = TCG_TYPE_I32,
#else
TCG_TYPE_PTR = TCG_TYPE_I64,
#endif
#if TARGET_LONG_BITS == 64
TCG_TYPE_TL = TCG_TYPE_I64,
#else #else
#define TCG_TYPE_PTR TCG_TYPE_I64 TCG_TYPE_TL = TCG_TYPE_I32,
#endif #endif
} TCGType;
typedef tcg_target_ulong TCGArg; typedef tcg_target_ulong TCGArg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册