diff options
author | Eugene Tarassov | 2020-02-06 03:11:46 +0000 |
---|---|---|
committer | Eugene Tarassov | 2020-02-06 03:11:46 +0000 |
commit | 03d03f82582c951a6ed8155eae3abfcd986e844e (patch) | |
tree | 5c1c91700e23b339cdd22b816f68722c875c5b57 | |
parent | dad6969286f5eb83aba677f401a0a24b41d95849 (diff) | |
download | org.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.c | 3 |
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); |