tcg: Add tcg_unsigned_cond.

Returns an unsigned version of a signed condition;
returns the original condition otherwise.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Richard Henderson 2009-12-27 09:09:41 +00:00 committed by Blue Swirl
parent ecbe1576b3
commit ff44c2f3c8
1 changed files with 5 additions and 0 deletions

View File

@ -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