From 7dc41a8e4e5113753bf430f48d51df4c5a95897f Mon Sep 17 00:00:00 2001 From: mothran Date: Sun, 13 Sep 2015 18:10:28 -0700 Subject: [PATCH] update the regwptr upon reset --- qemu/target-sparc/unicorn.c | 1 + qemu/target-sparc/unicorn64.c | 1 + 2 files changed, 2 insertions(+) diff --git a/qemu/target-sparc/unicorn.c b/qemu/target-sparc/unicorn.c index f070d07d..02aadd7f 100644 --- a/qemu/target-sparc/unicorn.c +++ b/qemu/target-sparc/unicorn.c @@ -42,6 +42,7 @@ void sparc_reg_reset(struct uc_struct *uc) env->pc = 0; env->npc = 0; + env->regwptr = env->regbase; } int sparc_reg_read(struct uc_struct *uc, unsigned int regid, void *value) diff --git a/qemu/target-sparc/unicorn64.c b/qemu/target-sparc/unicorn64.c index 5def992e..6b62695f 100644 --- a/qemu/target-sparc/unicorn64.c +++ b/qemu/target-sparc/unicorn64.c @@ -25,6 +25,7 @@ void sparc_reg_reset(struct uc_struct *uc) env->pc = 0; env->npc = 0; + env->regwptr = env->regbase; } int sparc_reg_read(struct uc_struct *uc, unsigned int regid, void *value)