Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2004 17:58:04 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 48934 for review
Message-ID:  <200403140158.i2E1w4vF019329@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=48934

Change 48934 by jmallett@jmallett_oingo on 2004/03/13 17:57:13

	Shuffle.

Affected files ...

.. //depot/projects/mips/sys/mips/mips/swtch.S#5 edit

Differences ...

==== //depot/projects/mips/sys/mips/mips/swtch.S#5 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/mips/sys/mips/mips/swtch.S#4 $
+ * $P4: //depot/projects/mips/sys/mips/mips/swtch.S#5 $
  */
 
 #include <machine/asm.h>
@@ -51,8 +51,8 @@
 	sd	s5, SF_REG_S5(a0)
 	sd	s6, SF_REG_S6(a0)
 	sd	s7, SF_REG_S7(a0)
+	sd	s8, SF_REG_S8(a0)
 	sd	sp, SF_REG_SP(a0)
-	sd	s8, SF_REG_S8(a0)
 	sd	ra, SF_REG_RA(a0)
 	jr	ra
 	li	v0, 0
@@ -65,14 +65,14 @@
 ENTRY(cpu_throw)
 	dsubu	sp, 8
 	sd	a1, 0(sp)
+	move	a0, a1
 	jal	pmap_activate
-	move	a0, a1
-	dla	k0, pcpup
-	ld	k0, 0(k0)
-	ld	a0, 0(sp)
-	sd	a0, PC_CURTHREAD(k0)
-	daddu	sp, 8
-	ld	t0, TD_PCB(a0)
+	nop
+	ld	k1, 0(sp)
+	ld	k0, pcpup
+	sd	k1, PC_CURTHREAD(k0)
+	ld	t0, TD_PCB(k1)
+	sd	t0, PC_CURPCB(k0)
 	ld	s0, SF_REG_S0(t0)
 	ld	s1, SF_REG_S1(t0)
 	ld	s2, SF_REG_S2(t0)
@@ -81,9 +81,14 @@
 	ld	s5, SF_REG_S5(t0)
 	ld	s6, SF_REG_S6(t0)
 	ld	s7, SF_REG_S7(t0)
+	ld	s8, SF_REG_S8(t0)
 	ld	sp, SF_REG_SP(t0)
-	ld	s8, SF_REG_S8(t0)
 	ld	ra, SF_REG_RA(t0)
+	/* Copy s0-s3 into a0-s3 so we can just pass args. */
+	move	a0, s0
+	move	a1, s1
+	move	a2, s2
+	move	a3, s3
 	jr	ra
 	li	v0, 1
 END(cpu_throw)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403140158.i2E1w4vF019329>