From: Richard Henderson Date: Fri, 7 Dec 2012 21:07:17 +0000 (-0600) Subject: tcg: Add TCGV_IS_UNUSED_* X-Git-Tag: v1.4.0-rc0~263 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=afcb92beac9e477e5ae5c36bf38830e225e2235f;p=thirdparty%2Fqemu.git tcg: Add TCGV_IS_UNUSED_* Cc: Aurelien Jarno Signed-off-by: Richard Henderson Reviewed-by: Andreas Färber Signed-off-by: Blue Swirl --- diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index 0b3cb0be3a4..91c9d80dd58 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -2329,6 +2329,7 @@ static inline void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, #define tcg_gen_qemu_ldst_op tcg_gen_op3i_i32 #define tcg_gen_qemu_ldst_op_i64 tcg_gen_qemu_ldst_op_i64_i32 #define TCGV_UNUSED(x) TCGV_UNUSED_I32(x) +#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I32(x) #define TCGV_EQUAL(a, b) TCGV_EQUAL_I32(a, b) #else #define TCGv TCGv_i64 @@ -2340,6 +2341,7 @@ static inline void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, #define tcg_gen_qemu_ldst_op tcg_gen_op3i_i64 #define tcg_gen_qemu_ldst_op_i64 tcg_gen_qemu_ldst_op_i64_i64 #define TCGV_UNUSED(x) TCGV_UNUSED_I64(x) +#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I64(x) #define TCGV_EQUAL(a, b) TCGV_EQUAL_I64(a, b) #endif diff --git a/tcg/tcg.h b/tcg/tcg.h index b2e2a25653b..a4279725a61 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -270,6 +270,9 @@ typedef int TCGv_i64; #define TCGV_UNUSED_I32(x) x = MAKE_TCGV_I32(-1) #define TCGV_UNUSED_I64(x) x = MAKE_TCGV_I64(-1) +#define TCGV_IS_UNUSED_I32(x) (GET_TCGV_I32(x) == -1) +#define TCGV_IS_UNUSED_I64(x) (GET_TCGV_I64(x) == -1) + /* call flags */ /* Helper does not read globals (either directly or through an exception). It implies TCG_CALL_NO_WRITE_GLOBALS. */