Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/mips/gen Reorder insns to fix more load delay ...



details:   https://anonhg.NetBSD.org/src/rev/3d5713e8ae7a
branches:  trunk
changeset: 763060:3d5713e8ae7a
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Mar 09 16:10:29 2011 +0000

description:
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.

diffstat:

 lib/libc/arch/mips/gen/_setjmp.S |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (58 lines):

diff -r 4ab8cae7266e -r 3d5713e8ae7a lib/libc/arch/mips/gen/_setjmp.S
--- a/lib/libc/arch/mips/gen/_setjmp.S  Wed Mar 09 15:09:21 2011 +0000
+++ b/lib/libc/arch/mips/gen/_setjmp.S  Wed Mar 09 16:10:29 2011 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index