On Thu, 14 Nov 2019 at 19:18, Richard Henderson <richard.hender...@linaro.org> wrote: > - If the sequence crosses a page, then so be it. Because of > step 1, this only happens when we *must* cross a page, and > will have recognized any paging exception anyway. > The generic parts of qemu will handle proper invalidation of > a TB that crosses a page boundary.
I'm not sure this would work. If you have insn1 insn2 || other-insn (where || is the page boundary and page 2 is non-executable) then the required behaviour is "execute insn1 and insn2 with normal behaviour, then fault trying to read other-insn, with the fault address being that of other-insn". Whereas for insn1 insn2 || insn3 you want to treat it as a semihosting sequence. But you can't distinguish the two because trying to read the word in page 2 will cause us to generate a fault with the fault address being that of insn1. Or have I forgotten how the page-crossing handling works ? thanks -- PMM