Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2007 18:09:50 GMT
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 118318 for review
Message-ID:  <200704171809.l3HI9oW5070130@repoman.freebsd.org>

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

Change 118318 by gonzo@gonzo_jeeves on 2007/04/17 18:09:08

	o Use v1 as temporary register and do not mess with stack.

Affected files ...

.. //depot/projects/mips2/src/lib/libc/mips/sys/sbrk.S#5 edit

Differences ...

==== //depot/projects/mips2/src/lib/libc/mips/sys/sbrk.S#5 (text+ko) ====

@@ -55,17 +55,13 @@
 	.cpload	t9
 	.set	reorder
 #endif
-	subu	sp, sp, 4
-	sw	s0, 0(sp)
-	lw	s0, _C_LABEL(__curbrk)
+	lw	v1, _C_LABEL(__curbrk)
 	li	v0, SYS_break
-	addu	a0, a0, s0		# compute current break
+	addu	a0, a0, v1		# compute current break
 	syscall
 	bne	a3, zero, 1f
-	move	v0, s0			# return old val of curbrk from above
+	move	v0, v1			# return old val of curbrk from above
 	sw	a0, _C_LABEL(__curbrk)	# save current val of curbrk from above
-	lw	s0, 0(sp)
-	addu	sp, sp, 4
 	j	ra
 1:
 	la	t9, _C_LABEL(__cerror)



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