Revision 1c086220

b/tcg/tcg.h
205 205
    TCG_COND_GTU,
206 206
} TCGCond;
207 207

  
208
/* Invert the sense of the comparison.  */
208 209
static inline TCGCond tcg_invert_cond(TCGCond c)
209 210
{
210 211
    return (TCGCond)(c ^ 1);
211 212
}
212 213

  
214
/* Swap the operands in a comparison.  */
215
static inline TCGCond tcg_swap_cond(TCGCond c)
216
{
217
    int mask = (c < TCG_COND_LT ? 0 : c < TCG_COND_LTU ? 7 : 15);
218
    return (TCGCond)(c ^ mask);
219
}
220

  
213 221
static inline TCGCond tcg_unsigned_cond(TCGCond c)
214 222
{
215 223
    return (c >= TCG_COND_LT && c <= TCG_COND_GT ? c + 4 : c);

Also available in: Unified diff