Module Name: src
Committed By: tsutsui
Date: Wed Mar 9 16:10:29 UTC 2011
Modified Files:
src/lib/libc/arch/mips/gen: _setjmp.S
Log Message:
Reorder insns to fix more load delay hazard botches on R3000.
Fixes floating point exceptions in _longjmp() during /etc/rc and
now NWS-3470D boots up to multi user with -current userland binaries.
Also fill BDslots in error path properly.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/mips/gen/_setjmp.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/arch/mips/gen/_setjmp.S
diff -u src/lib/libc/arch/mips/gen/_setjmp.S:1.22 src/lib/libc/arch/mips/gen/_setjmp.S:1.23
--- src/lib/libc/arch/mips/gen/_setjmp.S:1.22 Fri Sep 3 17:22:51 2010
+++ src/lib/libc/arch/mips/gen/_setjmp.S Wed Mar 9 16:10:29 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: _setjmp.S,v 1.22 2010/09/03 17:22:51 matt Exp $ */
+/* $NetBSD: _setjmp.S,v 1.23 2011/03/09 16:10:29 tsutsui Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@
#if 0
RCSID("from: @(#)_setjmp.s 8.1 (Berkeley) 6/4/93")
#else
- RCSID("$NetBSD: _setjmp.S,v 1.22 2010/09/03 17:22:51 matt Exp $")
+ RCSID("$NetBSD: _setjmp.S,v 1.23 2011/03/09 16:10:29 tsutsui Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@@ -88,7 +88,6 @@
*/
#ifndef SOFTFLOAT_FOR_GCC
cfc1 v0, $31 # too bad cant check if FP used
- INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
#if defined(__mips_n64) || defined(__mips_n32)
FP_S $f30, _OFFSETOF_SC_FPREGS_F30(a0)
FP_S $f28, _OFFSETOF_SC_FPREGS_F28(a0)
@@ -109,6 +108,7 @@
FP_S $f29, _OFFSETOF_SC_FPREGS_F29(a0)
FP_S $f31, _OFFSETOF_SC_FPREGS_F31(a0)
#endif
+ INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
#endif /* SOFTFLOAT_FOR_GCC */
REG_EPILOGUE
@@ -139,11 +139,13 @@
#if defined(__mips_n32) || defined(__mips_n64)
REG_L gp, _OFFSETOF_SC_REGS_GP(a0)
#endif
+#ifndef SOFTFLOAT_FOR_GCC
# get fpu status
+ INT_L v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
+#endif
REG_L sp, _OFFSETOF_SC_REGS_SP(a0)
REG_L s8, _OFFSETOF_SC_REGS_S8(a0)
#ifndef SOFTFLOAT_FOR_GCC
- INT_L v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
ctc1 v0, $31
/*
* In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved.
@@ -183,6 +185,8 @@
* our caller's GP.
*/
jal _C_LABEL(longjmperror)
+ nop
PIC_TAILCALL(abort)
+ nop
END(_longjmp)