Re: [PATCH 22/22] target/i386: implement CMPccXADD

2023-12-28 Thread Richard Henderson
On 12/23/23 05:16, Paolo Bonzini wrote: +case JCC_S: +cmp_lhs = s->T0, cmp_rhs = tcg_constant_tl(0); +break; I think you need an sextract here, when ot != full word size, same as JCC_O. Otherwise, Reviewed-by: Richard Henderson r~

[PATCH 22/22] target/i386: implement CMPccXADD

2023-12-22 Thread Paolo Bonzini
The main difficulty here is that a page fault when writing to the destination must not overwrite the flags. Therefore, the compute-flags helper must be called with a temporary destination instead of using gen_jcc1*. For simplicity, I am using an unconditional cmpxchg operation, that becomes a NOP