Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2020-02-06 03:11:46 +0000
committerEugene Tarassov2020-02-06 03:11:46 +0000
commit03d03f82582c951a6ed8155eae3abfcd986e844e (patch)
tree5c1c91700e23b339cdd22b816f68722c875c5b57
parentdad6969286f5eb83aba677f401a0a24b41d95849 (diff)
downloadorg.eclipse.tcf.agent-03d03f82582c951a6ed8155eae3abfcd986e844e.tar.gz
org.eclipse.tcf.agent-03d03f82582c951a6ed8155eae3abfcd986e844e.tar.xz
org.eclipse.tcf.agent-03d03f82582c951a6ed8155eae3abfcd986e844e.zip
TCF Agent: RISC-V: fixed stepping over addiw instruction
-rw-r--r--agent/machine/riscv64/tcf/cpudefs-mdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/agent/machine/riscv64/tcf/cpudefs-mdep.c b/agent/machine/riscv64/tcf/cpudefs-mdep.c
index a431925e..899c80c4 100644
--- a/agent/machine/riscv64/tcf/cpudefs-mdep.c
+++ b/agent/machine/riscv64/tcf/cpudefs-mdep.c
@@ -199,6 +199,9 @@ static int riscv_get_next_address(Context * ctx, ContextExtensionRISCV * ext) {
ext->step_addr = riscv_pc + ((int64_t)imm << 1);
return 0;
}
+ if ((riscv_instr & 0xe003) == 0x2001) { /* addiw (replaces jal in RV64c) */
+ return 0;
+ }
if ((riscv_instr & 0x6003) == 0x2001) { /* j, jal */
int32_t imm = get_imm_se(imm_bits_jc);
ext->step_addr = riscv_pc + ((int64_t)imm << 1);

Back to the top