From ff44c2f3c80dcdec7fe1ba8853ab9c03e6e37f7e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 27 Dec 2009 09:09:41 +0000 Subject: [PATCH] tcg: Add tcg_unsigned_cond. Returns an unsigned version of a signed condition; returns the original condition otherwise. Signed-off-by: Richard Henderson Signed-off-by: Blue Swirl --- tcg/tcg.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 9824493184..121b17c2b9 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -205,6 +205,11 @@ typedef enum { TCG_COND_GTU, } TCGCond; +static inline TCGCond tcg_unsigned_cond(TCGCond c) +{ + return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c); +} + #define TEMP_VAL_DEAD 0 #define TEMP_VAL_REG 1 #define TEMP_VAL_MEM 2 -- GitLab