From 1a1a23bdf9cb792b0a87c7c4b50ebd7653530dea Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 14 Apr 2021 18:35:14 +0000 Subject: [PATCH] Properly restore FPSCR register. ok deraadt@ --- sys/arch/powerpc64/powerpc64/fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/powerpc64/powerpc64/fpu.c b/sys/arch/powerpc64/powerpc64/fpu.c index 07ac84f77d0..e180691da91 100644 --- a/sys/arch/powerpc64/powerpc64/fpu.c +++ b/sys/arch/powerpc64/powerpc64/fpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.c,v 1.3 2021/01/09 13:14:02 kettenis Exp $ */ +/* $OpenBSD: fpu.c,v 1.4 2021/04/14 18:35:14 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -76,7 +76,7 @@ restore_vsx(struct proc *p) isync(); - __asm volatile ("lfs %%f0, 0(%0); mtfsf 0xff,%%f0" + __asm volatile ("lfd %%f0, 0(%0); mtfsf 0xff,%%f0" :: "b"(&fp->fp_fpscr)); __asm volatile ("vxor %%v0, %%v0, %%v0; lvewx %%v0, 0, %0; mtvscr %%v0" :: "b"(&fp->fp_vscr)); -- 2.20.1