From b04f89076ac0c5415db87a459a81e27b6e87fca9 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 15 Aug 2016 13:42:39 -0700 Subject: [PATCH] Properly write 64-bit PCs. --- src/target/riscv/riscv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 92ff2d133..6bb6f273a 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -834,10 +834,10 @@ static int resume(struct target *target, int current, uint32_t address, // TODO: check if dpc is dirty (which also is true if an exception was hit // at any time) - cache_set32(target, 0, lw(S0, ZERO, DEBUG_RAM_START + 16)); + cache_set_load(target, 0, S0, SLOT0); cache_set32(target, 1, csrw(S0, CSR_DPC)); cache_set_jump(target, 2); - cache_set32(target, 4, info->dpc); + cache_set(target, SLOT0, info->dpc); if (cache_write(target, 4, true) != ERROR_OK) { return ERROR_FAIL; }