[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advan
From: |
Richard Henderson |
Subject: |
[PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2 |
Date: |
Sat, 17 Jul 2021 15:18:48 -0700 |
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 <richard.henderson@linaro.org>
---
target/riscv/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/translate.c b/target/riscv/translate.c
index deda0c8a44..5527f37ada 100644
--- a/target/riscv/translate.c
+++ b/target/riscv/translate.c
@@ -973,7 +973,7 @@ static bool riscv_tr_breakpoint_check(DisasContextBase
*dcbase, CPUState *cpu,
[tb->pc, tb->pc + tb->size) in order to for it to be
properly cleared -- thus we increment the PC here so that
the logic setting tb->size below does the right thing. */
- ctx->base.pc_next += 4;
+ ctx->base.pc_next += 2;
return true;
}
--
2.25.1
- [PATCH v3 06/13] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic, (continued)
- [PATCH v3 06/13] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic, Richard Henderson, 2021/07/17
- [PATCH v3 08/13] target/avr: Advance pc in avr_tr_breakpoint_check, Richard Henderson, 2021/07/17
- [PATCH v3 12/13] accel/tcg: Hoist tb_cflags to a local in translator_loop, Richard Henderson, 2021/07/17
- [PATCH v3 03/13] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR, Richard Henderson, 2021/07/17
- [PATCH v3 13/13] accel/tcg: Encode breakpoint info into tb->cflags, Richard Henderson, 2021/07/17
- [PATCH v3 11/13] accel/tcg: Adjust interface of TranslatorOps.breakpoint_check, Richard Henderson, 2021/07/17
- [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2,
Richard Henderson <=