Module Name: src
Committed By: rin
Date: Wed Jul 15 09:42:43 UTC 2020
Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/fpu/fpu_emu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/powerpc/fpu/fpu_emu.c
diff -u src/sys/arch/powerpc/fpu/fpu_emu.c:1.32 src/sys/arch/powerpc/fpu/fpu_emu.c:1.33
--- src/sys/arch/powerpc/fpu/fpu_emu.c:1.32 Wed Jul 15 09:36:35 2020
+++ src/sys/arch/powerpc/fpu/fpu_emu.c Wed Jul 15 09:42:43 2020
@@ -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 @@ fpu_execute(struct trapframe *tf, struct
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: