From: kettenis Date: Wed, 14 Apr 2021 18:35:14 +0000 (+0000) Subject: Properly restore FPSCR register. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1a1a23bdf9cb792b0a87c7c4b50ebd7653530dea;p=openbsd Properly restore FPSCR register. ok deraadt@ --- 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));