From a96a0a4e3993de7f7169a306aa0202e0f3e26f4f Mon Sep 17 00:00:00 2001 From: Evgeniy Naydanov Date: Thu, 13 Jun 2024 18:25:59 +0300 Subject: [PATCH] target/riscv: avoid unnecessary IR scans Change-Id: I03feb5c7d72d5aa38f2cc13c4ed30175cffde84a Signed-off-by: Evgeniy Naydanov --- src/target/riscv/riscv-013.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 073532ef2..f2c467618 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -435,6 +435,9 @@ static void select_dmi(struct target *target) select_dmi_via_bscan(target); return; } + if (buf_cmp(target->tap->cur_instr, select_dbus.out_value, + target->tap->ir_length) == 0) + return; jtag_add_ir_scan(target->tap, &select_dbus, TAP_IDLE); }