From: Richard Henderson Date: Sun, 27 Dec 2009 09:09:41 +0000 (+0000) Subject: tcg: Add tcg_unsigned_cond. X-Git-Tag: v0.13.0-rc0~1813 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ff44c2f3c80dcdec7fe1ba8853ab9c03e6e37f7e;p=thirdparty%2Fqemu.git 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 --- diff --git a/tcg/tcg.h b/tcg/tcg.h index 98244931849..121b17c2b90 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