On 09/19/2012 05:57 AM, Peter Maydell wrote: >> > - s->code_ptr += 16; >> > + tcg_out32 (s, NOP); >> > + tcg_out32 (s, NOP); >> > + tcg_out32 (s, NOP); >> > + tcg_out32 (s, NOP); > Not too familiar with the PPC backend, but doesn't this mean that > in the retranslation case we will overwrite a correct jump destination > with these NOP words and then rewrite it again with the correct > destination? That can cause problems with cache incoherency; > compare the fix applied in commit c69806ab8276 for ARM.
Well, i386 certainly doesn't care about re-translation here: /* direct jump method */ tcg_out8(s, OPC_JMP_long); /* jmp im */ s->tb_jmp_offset[args[0]] = s->code_ptr - s->code_buf; tcg_out32(s, 0); That creates an explicit branch to next. And as far as the referenced change, that has to do with "real" branches, i.e. INDEX_op_brcond et at. Which *do* need to be protected against retranslation. But INDEX_op_goto_tb is a different case. r~