mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06: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
1 changed files with 5 additions and 0 deletions
|
@ -205,6 +205,11 @@ typedef enum {
|
|||
TCG_COND_GTU,
|
||||
} TCGCond;
|
||||
|
||||
static inline TCGCond tcg_invert_cond(TCGCond c)
|
||||
{
|
||||
return (TCGCond)(c ^ 1);
|
||||
}
|
||||
|
||||
static inline TCGCond tcg_unsigned_cond(TCGCond c)
|
||||
{
|
||||
return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue