Commit ff44c2f3 authored by Richard Henderson's avatar Richard Henderson Committed by Blue Swirl
Browse files

tcg: Add tcg_unsigned_cond.



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

Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent ecbe1576
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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