Skip to content
Snippets Groups Projects
Commit bcc66562 authored by Richard Henderson's avatar Richard Henderson Committed by Aurelien Jarno
Browse files

tcg: Add is_unsigned_cond


Before we rearrange the TCG_COND enumeration, add a predicate for
the (single) use of comparisons vs TCGCond.

Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent 457ebdcd
No related branches found
No related tags found
No related merge requests found
......@@ -1113,7 +1113,7 @@ static void tgen64_xori(TCGContext *s, TCGReg dest, tcg_target_ulong val)
static int tgen_cmp(TCGContext *s, TCGType type, TCGCond c, TCGReg r1,
TCGArg c2, int c2const)
{
bool is_unsigned = (c > TCG_COND_GT);
bool is_unsigned = is_unsigned_cond(c);
if (c2const) {
if (c2 == 0) {
if (type == TCG_TYPE_I32) {
......
......@@ -298,6 +298,11 @@ static inline TCGCond tcg_unsigned_cond(TCGCond c)
return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c);
}
static inline bool is_unsigned_cond(TCGCond c)
{
return c >= TCG_COND_LTU;
}
#define TEMP_VAL_DEAD 0
#define TEMP_VAL_REG 1
#define TEMP_VAL_MEM 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment