Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2008 13:58:22 GMT
From:      "Randall R. Stewart" <rrs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 138006 for review
Message-ID:  <200803181358.m2IDwMVc057193@repoman.freebsd.org>

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

Change 138006 by rrs@rrs-mips2-jnpr on 2008/03/18 13:58:07

	This adds back the cprestores (to keep the compiler happy
	       even though we don't do any jumps) and instead sub a callframe
	       from the stack (and add on _setjmp, not needed on _longjmp
	       since we restore the old stack)

Affected files ...

.. //depot/projects/mips2-jnpr/src/lib/libc/mips/gen/_setjmp.S#5 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/lib/libc/mips/gen/_setjmp.S#5 (text+ko) ====

@@ -60,6 +60,8 @@
 #ifdef __ABICALLS__ 
 	.set	noreorder
 	.cpload t9
+	subu	sp, sp, CALLFRAME_SIZ	# allocate stack frame
+	.cprestore 16
 #endif
 	li	v0, _JB_MAGIC__SETJMP
 	sw	v0, (_JB_MAGIC  * SZREG)(a0)
@@ -74,7 +76,9 @@
 	sw	s7, (_JB_REG_S7 * SZREG)(a0)
 	sw	sp, (_JB_REG_SP * SZREG)(a0)
 	sw	s8, (_JB_REG_S8 * SZREG)(a0)
-
+#ifdef __ABICALLS__
+	addu	sp, sp, CALLFRAME_SIZ	# allocate stack frame
+#endif	
 	j	ra
 	move	v0, zero
 END(_setjmp)
@@ -83,6 +87,8 @@
 #ifdef __ABICALLS__ 
 	.set	noreorder
 	.cpload t9
+	subu	sp, sp, CALLFRAME_SIZ	# allocate stack frame
+	.cprestore 16
 #endif  
 	lw	v0, (_JB_MAGIC  * SZREG)(a0)
 	lw	ra, (_JB_REG_RA * SZREG)(a0)



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