Re: [PATCH v2 05/25] target/i386: cleanup cc_op changes for REP/REPZ/REPNZ

2024-05-06 Thread Richard Henderson
On 5/6/24 09:31, Paolo Bonzini wrote: The comment deals with the former, the removal with the latter. The idea of the comment is that after SCAS/CMPS you have CC_OP_SUB*, so in principle you may expect that you need to set CC_OP_DYNAMIC explicitly at the end of a REPZ/REPNZ, which is where the C

Re: [PATCH v2 05/25] target/i386: cleanup cc_op changes for REP/REPZ/REPNZ

2024-05-06 Thread Paolo Bonzini
On Mon, May 6, 2024 at 6:08 PM Richard Henderson wrote: > > -gen_update_cc_op(s); > > l2 = gen_jz_ecx_string(s); > > +/* > > + * Only one iteration is done at a time, so there is > > + * no control flow junction here and cc_op is never dynamic. > > + */ > > fn(s, ot

Re: [PATCH v2 05/25] target/i386: cleanup cc_op changes for REP/REPZ/REPNZ

2024-05-06 Thread Richard Henderson
On 5/6/24 01:09, Paolo Bonzini wrote: gen_update_cc_op must be called before control flow splits. Do it where the jump on ECX!=0 is translated. On the other hand, remove the call before gen_jcc1, which takes care of it already, and explain why REPZ/REPNZ need not use CC_OP_DYNAMIC---the transla

[PATCH v2 05/25] target/i386: cleanup cc_op changes for REP/REPZ/REPNZ

2024-05-06 Thread Paolo Bonzini
gen_update_cc_op must be called before control flow splits. Do it where the jump on ECX!=0 is translated. On the other hand, remove the call before gen_jcc1, which takes care of it already, and explain why REPZ/REPNZ need not use CC_OP_DYNAMIC---the translation block ends before any control-flow-