diff options
author | Richard Henderson <rth@twiddle.net> | 2009-12-27 09:09:41 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-12-27 09:09:41 +0000 |
commit | ff44c2f3c80dcdec7fe1ba8853ab9c03e6e37f7e (patch) | |
tree | f77a897bc7399b4b1d69ff6d6fd28cd24b770739 | |
parent | ecbe1576b3287e7907b524901063a8117f544e61 (diff) |
tcg: Add tcg_unsigned_cond.
Returns an unsigned version of a signed condition;
returns the original condition otherwise.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | tcg/tcg.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -205,6 +205,11 @@ typedef enum { TCG_COND_GTU, } TCGCond; +static inline TCGCond tcg_unsigned_cond(TCGCond c) +{ + return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c); +} + #define TEMP_VAL_DEAD 0 #define TEMP_VAL_REG 1 #define TEMP_VAL_MEM 2 |