Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/fpu PR port-powerpc/55425



details:   https://anonhg.NetBSD.org/src/rev/4be6de20fdb3
branches:  trunk
changeset: 935983:4be6de20fdb3
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jul 15 08:10:41 2020 +0000

description:
PR port-powerpc/55425

Fix emulation for mtfsf; source register is frB here.

Now, userland processes successfully change rounding mode, by which
FPU-optimized code in OpenSSL works just fine as far as I can see.

diffstat:

 sys/arch/powerpc/fpu/fpu_emu.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 26ed543b3501 -r 4be6de20fdb3 sys/arch/powerpc/fpu/fpu_emu.c
--- a/sys/arch/powerpc/fpu/fpu_emu.c    Wed Jul 15 07:58:26 2020 +0000
+++ b/sys/arch/powerpc/fpu/fpu_emu.c    Wed Jul 15 08:10:41 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_emu.c,v 1.27 2020/07/15 07:54:25 rin Exp $ */
+/*     $NetBSD: fpu_emu.c,v 1.28 2020/07/15 08:10:41 rin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.27 2020/07/15 07:54:25 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.28 2020/07/15 08:10:41 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -586,7 +586,7 @@
                                                if (rt & (1<<ra))
                                                        mask |= (0xf<<(4*ra));
                                }
-                               a = (int *)&fs->fpreg[rt];
+                               a = (int *)&fs->fpreg[rb];
                                fe->fe_cx = mask & a[1];
                                fe->fe_fpscr = (fe->fe_fpscr&~mask) | 
                                        (fe->fe_cx);



Home | Main Index | Thread Index | Old Index