Skip to content

Commit

Permalink
tcg: Add TCGV_IS_UNUSED_*
Browse files Browse the repository at this point in the history
Cc: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
rth7680 authored and blueswirl committed Dec 29, 2012
1 parent 927fa90 commit afcb92b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tcg/tcg-op.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions tcg/tcg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit afcb92b

Please sign in to comment.