Module Name:    src
Committed By:   skrll
Date:           Mon Jul  4 14:29:55 UTC 2016

Modified Files:
        src/sys/arch/mips/mips: mipsX_subr.S

Log Message:
Fix code inversion in an #ifdef NOFPU case


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mips/mips/mipsX_subr.S

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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.63 src/sys/arch/mips/mips/mipsX_subr.S:1.64
--- src/sys/arch/mips/mips/mipsX_subr.S:1.63	Sat Jul  2 19:40:57 2016
+++ src/sys/arch/mips/mips/mipsX_subr.S	Mon Jul  4 14:29:55 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.63 2016/07/02 19:40:57 maya Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.64 2016/07/04 14:29:55 skrll Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -1651,12 +1651,12 @@ NESTED_NOPROFILE(MIPSX(systemcall), CALL
 	 * Turn off FPU and enter kernel mode
 	 */
 #ifdef NOFPU
+	and	t0, a1, MIPS_SR_KSU_MASK|MIPS_SR_EXL
+	xor	t0, a1				# clear the bits
+#else
 	lui	t0, %hi(~(MIPS_SR_COP_1_BIT|MIPS_SR_EXL|MIPS_SR_KSU_MASK))
 	addiu	t0, %lo(~(MIPS_SR_COP_1_BIT|MIPS_SR_EXL|MIPS_SR_KSU_MASK))
 	and	t0, a1
-#else
-	and	t0, a1, MIPS_SR_EXL|MIPS_SR_KSU_MASK
-	xor	t0, a1				# turns off the FPU & ints on
 #endif
 	mtc0	t0, MIPS_COP_0_STATUS		# re-enable interrupts
 	COP0_SYNC

Reply via email to