Patchwork [002/147] tcg: Add TCGV_IS_UNUSED_*

login
register
mail settings
Submitter Richard Henderson
Date Sept. 27, 2012, 10:39 p.m.
Message ID <1348785610-23418-3-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/187494/
State New
Headers show

Comments

Richard Henderson - Sept. 27, 2012, 10:39 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
---
 tcg/tcg.h | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/tcg/tcg.h b/tcg/tcg.h
index 562f0ad..88c1073 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -252,6 +252,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 */
 /* A pure function only reads its arguments and TCG global variables
    and cannot raise exceptions. Hence a call to a pure function can be