diff options
author | Laurent Vivier <laurent@vivier.eu> | 2020-10-22 22:30:00 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-12-12 18:12:39 +0100 |
commit | d21f73c61ddd7676fae5df4990479f3c5fe4b858 (patch) | |
tree | b6c1619587298967ac3a33a53f73154a9b671160 /target/m68k/fpu_helper.c | |
parent | 4160d5e6bd347e5d27804912b61d02df0a90ba8e (diff) |
target/m68k: Add vmstate definition for M68kCPU
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201022203000.1922749-3-laurent@vivier.eu>
Diffstat (limited to 'target/m68k/fpu_helper.c')
-rw-r--r-- | target/m68k/fpu_helper.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index 9acf60dfd4..797000e748 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -135,10 +135,8 @@ static void restore_rounding_mode(CPUM68KState *env) } } -void cpu_m68k_set_fpcr(CPUM68KState *env, uint32_t val) +void cpu_m68k_restore_fp_status(CPUM68KState *env) { - env->fpcr = val & 0xffff; - if (m68k_feature(env, M68K_FEATURE_CF_FPU)) { cf_restore_precision_mode(env); } else { @@ -147,6 +145,12 @@ void cpu_m68k_set_fpcr(CPUM68KState *env, uint32_t val) restore_rounding_mode(env); } +void cpu_m68k_set_fpcr(CPUM68KState *env, uint32_t val) +{ + env->fpcr = val & 0xffff; + cpu_m68k_restore_fp_status(env); +} + void HELPER(fitrunc)(CPUM68KState *env, FPReg *res, FPReg *val) { FloatRoundMode rounding_mode = get_float_rounding_mode(&env->fp_status); |