Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2004 22:50:12 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 48955 for review
Message-ID:  <200403140650.i2E6oCi5008621@repoman.freebsd.org>

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

Change 48955 by jmallett@jmallett_oingo on 2004/03/13 22:49:38

	Save SR.

Affected files ...

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

Differences ...

==== //depot/projects/mips/sys/mips/mips/swtch.S#6 (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#5 $
+ * $P4: //depot/projects/mips/sys/mips/mips/swtch.S#6 $
  */
 
 #include <machine/asm.h>
@@ -43,6 +43,7 @@
  * a0: struct pcb *pcb
  */
 ENTRY(savectx)
+	mfc0	t0, MIPS_COP_0_STATUS
 	sd	s0, SF_REG_S0(a0)
 	sd	s1, SF_REG_S1(a0)
 	sd	s2, SF_REG_S2(a0)
@@ -53,6 +54,7 @@
 	sd	s7, SF_REG_S7(a0)
 	sd	s8, SF_REG_S8(a0)
 	sd	sp, SF_REG_SP(a0)
+	sd	t0, SF_REG_SR(a0)
 	sd	ra, SF_REG_RA(a0)
 	jr	ra
 	li	v0, 0
@@ -84,11 +86,13 @@
 	ld	s8, SF_REG_S8(t0)
 	ld	sp, SF_REG_SP(t0)
 	ld	ra, SF_REG_RA(t0)
+	ld	t0, SF_REG_SR(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
+	mtc0	t0, MIPS_COP_0_STATUS
 	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?200403140650.i2E6oCi5008621>