On Tue, 7 Sept 2021 at 15:11, Richard Henderson <richard.hender...@linaro.org> wrote: > > * gen_update_fp_context() -- this function gets called for pretty > > much every FP/MVE insn (as part of vfp_access_check), and it > > can in rare cases update the FPSCR.LTPSIZE and the VPR. I guess > > this means we really do need to end the TB > > if (MVE && s->v7m_new_fp_ctxt_needed) (ie the comment in > > gen_update_fp_context "We don't need to arrange to end the TB, > > because [we don't cache FPSCR in TB flags]" is no longer true). > > That seems likely to be painful because some of the insns that > > do a vfp_access_check do complicated things with the TB exits > > (eg WLSTP, LETP) that are going to override a naive setting of > > is_jmp in gen_update_fp_context()... > > Well, we could let gen_goto_tb see that is_jmp is already UPDATE_NOCHAIN, and > suppress the > goto_tb in that case. That would seem to take care of any entry into > gen_jmp(_tb).
We actually already have code that sets is_jmp (to DISAS_UPDATE_EXIT) from gen_preserve_fp_state() -- we do that if we're using icount, setting DISAS_UPDATE_EXIT to force this to be the last insn in the TB. Do icount IO instructions need to avoid a possible goto_tb ? I suppose we do want them to go back to the main loop. This suggests that we need to make gen_goto_tb() look at the is_jmp value anyway, regardless of this series. -- PMM