aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-09-24 14:21:39 -0700
committerAurelien Jarno <aurelien@aurel32.net>2012-10-06 18:48:39 +0200
commitbcc66562ad185e9c2a667b00426f625e2489bda9 (patch)
tree49d0897deed24aa4cdbf4e23bcdbf1dd9d36f936 /tcg/tcg.h
parent457ebdcd91aa7f0df094e12a8c46235f0c7d4f9b (diff)
tcg: Add is_unsigned_cond
Before we rearrange the TCG_COND enumeration, add a predicate for the (single) use of comparisons vs TCGCond. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index af7464a650..6ff2ab55be 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -298,6 +298,11 @@ static inline TCGCond tcg_unsigned_cond(TCGCond c)
return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c);
}
+static inline bool is_unsigned_cond(TCGCond c)
+{
+ return c >= TCG_COND_LTU;
+}
+
#define TEMP_VAL_DEAD 0
#define TEMP_VAL_REG 1
#define TEMP_VAL_MEM 2