aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 5dae87e3f4..99adfc29e4 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -5676,6 +5676,7 @@ static inline int target_rt_setup_ucontext(struct target_ucontext *uc,
CPUM68KState *env)
{
target_greg_t *gregs = uc->tuc_mcontext.gregs;
+ uint32_t sr = cpu_m68k_get_ccr(env);
__put_user(TARGET_MCONTEXT_VERSION, &uc->tuc_mcontext.version);
__put_user(env->dregs[0], &gregs[0]);
@@ -5695,7 +5696,7 @@ static inline int target_rt_setup_ucontext(struct target_ucontext *uc,
__put_user(env->aregs[6], &gregs[14]);
__put_user(env->aregs[7], &gregs[15]);
__put_user(env->pc, &gregs[16]);
- __put_user(env->sr, &gregs[17]);
+ __put_user(sr, &gregs[17]);
return 0;
}
@@ -5729,7 +5730,7 @@ static inline int target_rt_restore_ucontext(CPUM68KState *env,
__get_user(env->aregs[7], &gregs[15]);
__get_user(env->pc, &gregs[16]);
__get_user(temp, &gregs[17]);
- env->sr = (env->sr & 0xff00) | (temp & 0xff);
+ cpu_m68k_set_ccr(env, temp);
return 0;