提交 401d466d 编写于 作者: R Richard Henderson 提交者: Aurelien Jarno

tcg: add tcg_invert_cond

It is very handy to have a reliable mapping of a condition to its inverse.
Signed-off-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 be210acb
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册