summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2017-11-22 11:56:17 +1100
committerapopple <alistair@popple.id.au>2017-11-24 11:32:17 +1100
commit782f893c0349e40e14a27c9d829506c3c3008ed1 (patch)
tree10f3b2f4be57949a2e9ba4b5b39dcfcdb8c47185
parent527fe54e1c95e031efd3db008c3f4e096cb3ea58 (diff)
downloadpdbg-782f893c0349e40e14a27c9d829506c3c3008ed1.tar.gz
pdbg-782f893c0349e40e14a27c9d829506c3c3008ed1.zip
libpdbg: Fix incorrect restore of r1 in ram_instructions()
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
-rw-r--r--libpdbg/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 539438a..0dd2363 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -158,7 +158,7 @@ static int ram_instructions(struct thread *thread, uint64_t *opcodes,
} else if (i == len + 1) {
/* Restore r1 */
scratch = r1;
- opcode = mfspr(0, 277);
+ opcode = mfspr(1, 277);
}
CHECK_ERR(thread->ram_instruction(thread, opcode, &scratch));
OpenPOWER on IntegriCloud