diff mbox series

[v3,03/26] target/m68k: Restore fp rounding mode on vm load

Message ID 20240909172823.649837-4-richard.henderson@linaro.org
State New
Headers show
Series target/m68k: fpu improvements | expand

Commit Message

Richard Henderson Sept. 9, 2024, 5:28 p.m. UTC
Call cpu_m68k_set_fpcr to make sure softfloat internals
are up-to-date with the restored FPCR.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/m68k/cpu.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé Sept. 9, 2024, 9:59 p.m. UTC | #1
On 9/9/24 19:28, Richard Henderson wrote:
> Call cpu_m68k_set_fpcr to make sure softfloat internals
> are up-to-date with the restored FPCR.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/m68k/cpu.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 1d49f4cb23..4d70cd50b4 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -402,6 +402,7 @@  static int fpu_post_load(void *opaque, int version)
 {
     M68kCPU *s = opaque;
 
+    cpu_m68k_set_fpcr(&s->env, s->env.fpcr);
     cpu_m68k_set_fpsr(&s->env, s->env.fpsr);
     return 0;
 }