Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips Eliminate redundant load delays.



details:   https://anonhg.NetBSD.org/src/rev/ddb2371f737a
branches:  trunk
changeset: 355961:ddb2371f737a
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Aug 24 14:26:16 2017 +0000

description:
Eliminate redundant load delays.

Machines that need load delays do not have ll/sc instructions.

diffstat:

 sys/arch/mips/mips/lock_stubs_llsc.S |  13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diffs (90 lines):

diff -r 9fe36d5e93be -r ddb2371f737a sys/arch/mips/mips/lock_stubs_llsc.S
--- a/sys/arch/mips/mips/lock_stubs_llsc.S      Thu Aug 24 14:19:36 2017 +0000
+++ b/sys/arch/mips/mips/lock_stubs_llsc.S      Thu Aug 24 14:26:16 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock_stubs_llsc.S,v 1.7 2016/08/19 10:05:35 skrll Exp $        */
+/*     $NetBSD: lock_stubs_llsc.S,v 1.8 2017/08/24 14:26:16 maya Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: lock_stubs_llsc.S,v 1.7 2016/08/19 10:05:35 skrll Exp $")
+RCSID("$NetBSD: lock_stubs_llsc.S,v 1.8 2017/08/24 14:26:16 maya Exp $")
 
 #include "assym.h"
 
@@ -134,7 +134,6 @@
        move    v0, zero
 
 1:     INT_LL  t0, 0(a0)
-        nop
        bne     t0, a1, 2f
         move   t1, a2
        INT_SC  t1, 0(a0)
@@ -162,7 +161,6 @@
        move    v0, zero
 
 1:     LONG_LL t0, 0(a0)
-        nop
        bne     t0, a1, 2f
         move   t1, a2
        LONG_SC t1, 0(a0)
@@ -188,7 +186,6 @@
  */
 STATIC_LEAF(llsc_mutex_enter)
        PTR_LL  t0, MTX_OWNER(a0)
-       nop
 1:
        bnez    t0, 2f
         move   t2, MIPS_CURLWP
@@ -252,7 +249,6 @@
         */
 1:
        INT_L   ta2, CPU_INFO_MTX_COUNT(t2)
-       nop
        INT_ADDU ta3, ta2, -1
        INT_S   ta3, CPU_INFO_MTX_COUNT(t2)
        bltz    ta2, 2f
@@ -262,7 +258,6 @@
 #ifdef PARANOIA
        INT_L   ta1, CPU_INFO_MTX_OLDSPL(t2)
        INT_L   ta2, CPU_INFO_CPL(t2)   # get updated CPL
-       nop
        sltu    v0, ta2, ta0            # v0 = cpl < mtx_ipl
        sltu    v1, ta2, ta1            # v1 = cpl < oldspl
        sll     v0, 1
@@ -272,7 +267,6 @@
 #endif /* PARANOIA */
 #if defined(FULL)
        INT_LL  t3, MTX_LOCK(t0)
-       nop
 3:
        bnez    t3, 4f
         li     t1, 1
@@ -297,7 +291,6 @@
        PTR_L   t2, L_CPU(MIPS_CURLWP)
 #if defined(DIAGNOSTIC)
        INT_L   t0, MTX_LOCK(a0)
-       nop
        beqz    t0, 2f
         nop
        INT_S   zero, MTX_LOCK(a0)
@@ -310,7 +303,6 @@
         */
 #ifdef PARANOIA
        INT_L   a2, MTX_IPL(a0)
-       nop
 #endif
        INT_L   a0, CPU_INFO_MTX_OLDSPL(t2)
 
@@ -318,7 +310,6 @@
         * Increment the mutex count
         */
        INT_L   t0, CPU_INFO_MTX_COUNT(t2)
-       nop
        INT_ADDU t0, t0, 1
        INT_S   t0, CPU_INFO_MTX_COUNT(t2)
 



Home | Main Index | Thread Index | Old Index