On 8 September 2015 at 06:09, Richard Henderson <r...@twiddle.net> wrote: > On 09/07/2015 10:09 AM, Peter Maydell wrote: >> >> On 2 September 2015 at 18:57, Richard Henderson <r...@twiddle.net> wrote: >>> >>> + case 9: /* ls: !C || Z -> !(C && !Z) */ >>> + cond = TCG_COND_NE; >>> + value = tcg_temp_new_i32(); >>> + global = false; >>> + tcg_gen_neg_i32(value, cpu_CF); >>> + tcg_gen_and_i32(value, value, cpu_ZF); >>> break; >> >> >> The comment says hi is C && !Z, but the code >> doesn't seem to line up with that. At least part >> of that is presumably because we store ZF inverted, >> but why are we negating CF here? > > > We're computing CF ? -1 : 0. ANDing that with !Z (aka cpu_ZF) gets us C & > !Z.
Ah yes. As with the case below, a comment would be helpful. thanks -- PMM