tcg: Add tcg_signed_cond

Complimenting the existing tcg_unsigned_cond.

Backports commit 923ed1750186591b04d7d61399f6d68b4e0608f2 from qemu
This commit is contained in:
Richard Henderson 2018-03-05 16:55:13 -05:00 committed by Lioncash
parent 140058221d
commit bbd87f9d73
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -491,6 +491,12 @@ static inline TCGCond tcg_unsigned_cond(TCGCond c)
return c & 2 ? (TCGCond)(c ^ 6) : c;
}
/* Create a "signed" version of an "unsigned" comparison. */
static inline TCGCond tcg_signed_cond(TCGCond c)
{
return c & 4 ? (TCGCond)(c ^ 6) : c;
}
/* Must a comparison be considered unsigned? */
static inline bool is_unsigned_cond(TCGCond c)
{