[PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-17 Thread Richard Henderson
The actual number of bytes advanced need not be 100% exact, but we should not cross a page when the insn would not. If rvc is enabled, the minimum insn size is 2. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ta

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-17 Thread Peter Maydell
On Sat, 17 Jul 2021 at 23:18, Richard Henderson wrote: > > The actual number of bytes advanced need not be 100% exact, > but we should not cross a page when the insn would not. > > If rvc is enabled, the minimum insn size is 2. > > Signed-off-by: Richard Henderson > --- > target/riscv/translate.

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Richard Henderson
On 7/17/21 1:35 PM, Peter Maydell wrote: (What goes wrong if we just say "always use a TB size of 1 regardless of target arch" rather than having the arch return the worst case minimum insn length?) Hmm, possibly nothing. Perhaps I should try that and see what happens... r~

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Peter Maydell
On Sun, 18 Jul 2021 at 19:02, Richard Henderson wrote: > > On 7/17/21 1:35 PM, Peter Maydell wrote: > > (What goes wrong if we just say "always use a TB size of 1 regardless > > of target arch" rather than having the arch return the worst case > > minimum insn length?) > > Hmm, possibly nothing.

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Richard Henderson
On 7/18/21 8:16 AM, Peter Maydell wrote: On Sun, 18 Jul 2021 at 19:02, Richard Henderson wrote: On 7/17/21 1:35 PM, Peter Maydell wrote: (What goes wrong if we just say "always use a TB size of 1 regardless of target arch" rather than having the arch return the worst case minimum insn length?