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 Now, FPU emulation for booke and ibm4xx...



details:   https://anonhg.NetBSD.org/src/rev/2b9464c37e76
branches:  trunk
changeset: 935994:2b9464c37e76
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jul 15 09:42:43 2020 +0000

description:
Now, FPU emulation for booke and ibm4xx works fine at a level where
all the related ATF tests pass correctly. However, there still remain
problems:

- FEX and VX bits for FPSCR cannot be modified by mcrfs, mtfsf{,i},
  and mtfsb[01].
- Invalid operations should be treated differently depending on
  FPSCR[VE].

Therefore, comment them in order not to be forgotten.

No binary changes.

diffstat:

 sys/arch/powerpc/fpu/fpu_emu.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r addac978b8f9 -r 2b9464c37e76 sys/arch/powerpc/fpu/fpu_emu.c
--- a/sys/arch/powerpc/fpu/fpu_emu.c    Wed Jul 15 09:36:35 2020 +0000
+++ b/sys/arch/powerpc/fpu/fpu_emu.c    Wed Jul 15 09:42:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_emu.c,v 1.32 2020/07/15 09:36:35 rin Exp $ */
+/*     $NetBSD: fpu_emu.c,v 1.33 2020/07/15 09:42:43 rin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.32 2020/07/15 09:36:35 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.33 2020/07/15 09:42:43 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -605,6 +605,15 @@
                                fe->fe_cx = mask & a[1];
                                fe->fe_fpscr = (fe->fe_fpscr&~mask) | 
                                        (fe->fe_cx);
+                               /*
+                                * XXX
+                                * Forbidden to set FEX and VX, also for
+                                * mcrfs, mtfsfi, and mtfsb[01].
+                                *
+                                * XXX
+                                * Handle invalid operation differently,
+                                * depending on VE.
+                                */
 /* XXX weird stuff about OX, FX, FEX, and VX should be handled */
                                break;
                        case    OPC63_FCTID:



Home | Main Index | Thread Index | Old Index