Message ID | 4B631CD7.3010900@twiddle.net |
---|---|
State | New |
Headers | show |
diff --git a/tcg/alpha/tcg-target.c b/tcg/alpha/tcg-target.c index dcf23f2..5b7dd25 100644 --- a/tcg/alpha/tcg-target.c +++ b/tcg/alpha/tcg-target.c @@ -344,9 +344,9 @@ static inline void tcg_out_addi(TCGContext *s, int reg, long val) static void tcg_out_andi(TCGContext *s, int ra, long val, int rc) { - if (val == (uint8_t)val) { + if (val == (val & 0xff)) { tcg_out_fmt_opi(s, INSN_AND, ra, val, rc); - } else if (~val == (uint8_t)~val) { + } else if (~val == ~(val & 0xff)) { tcg_out_fmt_opi(s, INSN_BIC, ra, ~val, rc); } else { long mask0, maskff;