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 Optimise the interrupt vector a litte. F...



details:   https://anonhg.NetBSD.org/src/rev/6ca27b78f994
branches:  trunk
changeset: 819131:6ca27b78f994
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Nov 19 09:05:50 2016 +0000

description:
Optimise the interrupt vector a litte.  From matt@

diffstat:

 sys/arch/mips/mips/mipsX_subr.S |  19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diffs (35 lines):

diff -r c456ebfba36d -r 6ca27b78f994 sys/arch/mips/mips/mipsX_subr.S
--- a/sys/arch/mips/mips/mipsX_subr.S   Sat Nov 19 08:46:03 2016 +0000
+++ b/sys/arch/mips/mips/mipsX_subr.S   Sat Nov 19 09:05:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mipsX_subr.S,v 1.95 2016/11/09 11:50:09 maya Exp $     */
+/*     $NetBSD: mipsX_subr.S,v 1.96 2016/11/19 09:05:50 skrll Exp $    */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -638,17 +638,16 @@
  */
 VECTOR(MIPSX(intr), unknown)
        .set    noat
-       mfc0    k1, MIPS_COP_0_STATUS           #00: get the status register
+       mfc0    k0, MIPS_COP_0_STATUS           #00: get the status register
        MFC0_HAZARD                             #01: stall
-       and     k1, k1, MIPS3_SR_KSU_USER       #02: test for user mode
-       PTR_LA  k0, MIPSX(user_intr)            #03: assume user mode
-       bnez    k1, 1f                          #04: yep, do it
-        nop                                    #05:  branch deay
-       PTR_LA  k0, MIPSX(kern_intr)            #06: nope, kernel intr
+       and     k0, k0, MIPS3_SR_KSU_USER       #02: test for user mode
+       bnez    k0, 1f                          #03: yep, do it
+        nop                                    #04:  branch deay
+       j       MIPSX(kern_intr)                #05: nope, kernel intr
 1:
-       lui     k1, %hi(CPUVAR(CURLWP))         #07: k1=hi of curlwp
-       jr      k0                              #08: jump to the function
-        PTR_L  k1, %lo(CPUVAR(CURLWP))(k1)     #09: k1=lo of curlwp
+       lui     k1, %hi(CPUVAR(CURLWP))         #06: k1=hi of curlwp
+       j       MIPSX(user_intr)                #07: user intr
+        PTR_L  k1, %lo(CPUVAR(CURLWP))(k1)     #08: k1=lo of curlwp
        .set    at
 _VECTOR_END(MIPSX(intr))
 



Home | Main Index | Thread Index | Old Index