aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/elfload.c3
-rw-r--r--linux-user/main.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index c66cbbe84b..8271227339 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1054,9 +1054,8 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
for (i = 0; i < 32; i++) {
(*regs)[i] = tswapreg(env->gpr[i]);
}
-
(*regs)[32] = tswapreg(env->pc);
- (*regs)[33] = tswapreg(env->sr);
+ (*regs)[33] = tswapreg(cpu_get_sr(env));
}
#define ELF_HWCAP 0
#define ELF_PLATFORM NULL
diff --git a/linux-user/main.c b/linux-user/main.c
index 001f71c6cc..4fd49ce6b6 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4765,9 +4765,8 @@ int main(int argc, char **argv, char **envp)
for (i = 0; i < 32; i++) {
env->gpr[i] = regs->gpr[i];
}
-
- env->sr = regs->sr;
env->pc = regs->pc;
+ cpu_set_sr(env, regs->sr);
}
#elif defined(TARGET_SH4)
{