mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
tcg: add tcg_invert_cond
It is very handy to have a reliable mapping of a condition to its inverse. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
be210acb41
commit
401d466da9
@ -205,6 +205,11 @@ typedef enum {
|
|||||||
TCG_COND_GTU,
|
TCG_COND_GTU,
|
||||||
} TCGCond;
|
} TCGCond;
|
||||||
|
|
||||||
|
static inline TCGCond tcg_invert_cond(TCGCond c)
|
||||||
|
{
|
||||||
|
return (TCGCond)(c ^ 1);
|
||||||
|
}
|
||||||
|
|
||||||
static inline TCGCond tcg_unsigned_cond(TCGCond c)
|
static inline TCGCond tcg_unsigned_cond(TCGCond c)
|
||||||
{
|
{
|
||||||
return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c);
|
return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c);
|
||||||
|
Loading…
Reference in New Issue
Block a user