Re: [PATCH v2 1/1] fix cmpxchg and lock cmpxchg instruction

2022-03-22 Thread Richard Henderson
On 3/21/22 21:20, Wei Li wrote: One question is that we can reduce more code duplication if we use - if(foo){ tcg_gen_atomic_cmpxchg_tl(oldv, s->A0, cmpv, newv, s->mem_index, ot | MO_LE); gen_extu(ot, oldv); gen_extu(ot, cmpv); }els

[PATCH v2 1/1] fix cmpxchg and lock cmpxchg instruction

2022-03-21 Thread Wei Li
One question is that we can reduce more code duplication if we use - if(foo){ tcg_gen_atomic_cmpxchg_tl(oldv, s->A0, cmpv, newv, s->mem_index, ot | MO_LE); gen_extu(ot, oldv); gen_extu(ot, cmpv); }else{ tcg_gen_movcond_tl(TCG