Module Name: src
Committed By: rin
Date: Tue Jul 26 16:07:55 UTC 2022
Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c
Log Message:
Fix inverted logic; cr was completely broken by FPU insn with Rc == 1.
Why haven't we noticed this so far...
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 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.33 src/sys/arch/powerpc/fpu/fpu_emu.c:1.34
--- src/sys/arch/powerpc/fpu/fpu_emu.c:1.33 Wed Jul 15 09:42:43 2020
+++ src/sys/arch/powerpc/fpu/fpu_emu.c Tue Jul 26 16:07:55 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_emu.c,v 1.33 2020/07/15 09:42:43 rin Exp $ */
+/* $NetBSD: fpu_emu.c,v 1.34 2022/07/26 16:07:55 rin Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.33 2020/07/15 09:42:43 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.34 2022/07/26 16:07:55 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -808,7 +808,7 @@ fpu_execute(struct trapframe *tf, struct
/* Isolate condition codes */
cond >>= 28;
/* Move fpu condition codes to cr[1] */
- tf->tf_cr &= (0x0f000000);
+ tf->tf_cr &= ~(0x0f000000);
tf->tf_cr |= (cond<<24);
DPRINTF(FPE_INSN, ("fpu_execute: cr[1] <= %x\n", cond));
}