patch-2.1.26 linux/arch/alpha/lib/stxcpy.S

Next file: linux/arch/alpha/lib/stxncpy.S
Previous file: linux/arch/alpha/lib/strncpy_from_user.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.25/linux/arch/alpha/lib/stxcpy.S linux/arch/alpha/lib/stxcpy.S
@@ -13,7 +13,7 @@
  *	a1 = SRC
  *
  * On output:
- *	t8  = bitmask (with one bit set) indicating the last byte written
+ *	t12 = bitmask (with one bit set) indicating the last byte written
  *	a0  = unaligned address of the last *word* written
  *
  * Furthermore, v0, a3-a5, t11, and t12 are untouched.
@@ -47,9 +47,9 @@
 	mskqh	t1, a1, t3	# e0    :
 	ornot	t1, t2, t2	# .. e1 :
 	mskql	t0, a1, t0	# e0    : assemble the first output word
-	cmpbge	zero, t2, t7	# .. e1 : bits set iff null found
+	cmpbge	zero, t2, t8	# .. e1 : bits set iff null found
 	or	t0, t3, t1	# e0    :
-	bne	t7, $a_eos	# .. e1 :
+	bne	t8, $a_eos	# .. e1 :
 
 	/* On entry to this basic block:
 	   t0 == the first destination word for masking back in
@@ -60,29 +60,29 @@
 	addq	a0, 8, a0	# .. e1 :
 	ldq_u	t1, 0(a1)	# e0    :
 	addq	a1, 8, a1	# .. e1 :
-	cmpbge	zero, t1, t7	# e0 (stall)
-	beq	t7, $a_loop	# .. e1 (zdb)
+	cmpbge	zero, t1, t8	# e0 (stall)
+	beq	t8, $a_loop	# .. e1 (zdb)
 
 	/* Take care of the final (partial) word store.
 	   On entry to this basic block we have:
 	   t1 == the source word containing the null
-	   t7 == the cmpbge mask that found it.  */
+	   t8 == the cmpbge mask that found it.  */
 $a_eos:
-	negq	t7, t6		# e0    : find low bit set
-	and	t7, t6, t8	# e1 (stall)
+	negq	t8, t6		# e0    : find low bit set
+	and	t8, t6, t12	# e1 (stall)
 
 	/* For the sake of the cache, don't read a destination word
 	   if we're not going to need it.  */
-	and	t8, 0x80, t6	# e0    :
+	and	t12, 0x80, t6	# e0    :
 	bne	t6, 1f		# .. e1 (zdb)
 
 	/* We're doing a partial word store and so need to combine
 	   our source and original destination words.  */
 	ldq_u	t0, 0(a0)	# e0    :
-	subq	t8, 1, t6	# .. e1 :
+	subq	t12, 1, t6	# .. e1 :
 	zapnot	t1, t6, t1	# e0    : clear src bytes >= null
-	or	t8, t6, t7	# .. e1 :
-	zap	t0, t7, t0	# e0    : clear dst bytes <= null
+	or	t12, t6, t8	# .. e1 :
+	zap	t0, t8, t0	# e0    : clear dst bytes <= null
 	or	t0, t1, t1	# e1    :
 
 1:	stq_u	t1, 0(a0)	# e0    :
@@ -138,14 +138,14 @@
 	or	t0, t1, t1	# e1    :
 
 	or	t1, t6, t6	# e0    :
-	cmpbge	zero, t6, t7	# .. e1 :
+	cmpbge	zero, t6, t8	# .. e1 :
 	lda	t6, -1		# e0    : for masking just below
-	bne	t7, $u_final	# .. e1 :
+	bne	t8, $u_final	# .. e1 :
 
 	mskql	t6, a1, t6		# e0    : mask out the bits we have
 	or	t6, t2, t2		# e1    :   already extracted before
-	cmpbge	zero, t2, t7		# e0    :   testing eos
-	bne	t7, $u_late_head_exit	# .. e1 (zdb)
+	cmpbge	zero, t2, t8		# e0    :   testing eos
+	bne	t8, $u_late_head_exit	# .. e1 (zdb)
 
 	/* Finally, we've got all the stupid leading edge cases taken care
 	   of and we can set up to enter the main loop.  */
@@ -155,9 +155,9 @@
 	extql	t2, a1, t0	# e0    : position ho-bits of lo word
 	ldq_u	t2, 8(a1)	# .. e1 : read next high-order source word
 	addq	a1, 8, a1	# e0    :
-	cmpbge	zero, t2, t7	# .. e1 :
+	cmpbge	zero, t2, t8	# .. e1 :
 	nop			# e0    :
-	bne	t7, $u_eos	# .. e1 :
+	bne	t8, $u_eos	# .. e1 :
 
 	/* Unaligned copy main loop.  In order to avoid reading too much,
 	   the loop is structured to detect zeros in aligned source words.
@@ -182,8 +182,8 @@
 	ldq_u	t2, 0(a1)	# .. e1 : load high word for next time
 	stq_u	t1, -8(a0)	# e0    : save the current word
 	mov	t3, t0		# .. e1 :
-	cmpbge	zero, t2, t7	# e0    : test new word for eos
-	beq	t7, $u_loop	# .. e1 :
+	cmpbge	zero, t2, t8	# e0    : test new word for eos
+	beq	t8, $u_loop	# .. e1 :
 
 	/* We've found a zero somewhere in the source word we just read.
 	   If it resides in the lower half, we have one (probably partial)
@@ -197,31 +197,31 @@
 	extqh	t2, a1, t1	# e0    :
 	or	t0, t1, t1	# e1    : first (partial) source word complete
 
-	cmpbge	zero, t1, t7	# e0    : is the null in this first bit?
-	bne	t7, $u_final	# .. e1 (zdb)
+	cmpbge	zero, t1, t8	# e0    : is the null in this first bit?
+	bne	t8, $u_final	# .. e1 (zdb)
 
 $u_late_head_exit:
 	stq_u	t1, 0(a0)	# e0    : the null was in the high-order bits
 	addq	a0, 8, a0	# .. e1 :
 	extql	t2, a1, t1	# e0    :
-	cmpbge	zero, t1, t7	# .. e1 :
+	cmpbge	zero, t1, t8	# .. e1 :
 
 	/* Take care of a final (probably partial) result word.
 	   On entry to this basic block:
 	   t1 == assembled source word
-	   t7 == cmpbge mask that found the null.  */
+	   t8 == cmpbge mask that found the null.  */
 $u_final:
-	negq	t7, t6		# e0    : isolate low bit set
-	and	t6, t7, t8	# e1    :
+	negq	t8, t6		# e0    : isolate low bit set
+	and	t6, t8, t12	# e1    :
 
-	and	t8, 0x80, t6	# e0    : avoid dest word load if we can
+	and	t12, 0x80, t6	# e0    : avoid dest word load if we can
 	bne	t6, 1f		# .. e1 (zdb)
 
 	ldq_u	t0, 0(a0)	# e0    :
-	subq	t8, 1, t6	# .. e1 :
-	or	t6, t8, t7	# e0    :
+	subq	t12, 1, t6	# .. e1 :
+	or	t6, t12, t8	# e0    :
 	zapnot	t1, t6, t1	# .. e1 : kill source bytes >= null
-	zap	t0, t7, t0	# e0    : kill dest bytes <= null
+	zap	t0, t8, t0	# e0    : kill dest bytes <= null
 	or	t0, t1, t1	# e1    :
 
 1:	stq_u	t1, 0(a0)	# e0    :
@@ -251,15 +251,15 @@
 	/* If source misalignment is larger than dest misalignment, we need
 	   extra startup checks to avoid SEGV.  */
 
-	cmplt	t4, t5, t8	# e0    :
-	beq	t8, $u_head	# .. e1 (zdb)
+	cmplt	t4, t5, t12	# e0    :
+	beq	t12, $u_head	# .. e1 (zdb)
 
 	lda	t2, -1		# e1    : mask out leading garbage in source
 	mskqh	t2, t5, t2	# e0    :
 	nop			# e0    :
 	ornot	t1, t2, t3	# .. e1 :
-	cmpbge	zero, t3, t7	# e0    : is there a zero?
-	beq	t7, $u_head	# .. e1 (zdb)
+	cmpbge	zero, t3, t8	# e0    : is there a zero?
+	beq	t8, $u_head	# .. e1 (zdb)
 
 	/* At this point we've found a zero in the first partial word of
 	   the source.  We need to isolate the valid source data and mask
@@ -268,14 +268,14 @@
 
 	ldq_u	t0, 0(a0)	# e0    :
 
-	negq	t7, t6		# .. e1 : build bitmask of bytes <= zero
-	and	t6, t7, t8	# e0    :
+	negq	t8, t6		# .. e1 : build bitmask of bytes <= zero
+	and	t6, t8, t12	# e0    :
 	and	a1, 7, t5	# .. e1 :
-	subq	t8, 1, t6	# e0    :
-	or	t6, t8, t7	# e1    :
-	srl	t8, t5, t8	# e0    : adjust final null return value
+	subq	t12, 1, t6	# e0    :
+	or	t6, t12, t8	# e1    :
+	srl	t12, t5, t12	# e0    : adjust final null return value
 
-	zapnot	t2, t7, t2	# .. e1 : prepare source word; mirror changes
+	zapnot	t2, t8, t2	# .. e1 : prepare source word; mirror changes
 	and	t1, t2, t1	# e1    : to source validity mask
 	extql	t2, a1, t2	# .. e0 :
 	extql	t1, a1, t1	# e0    :

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov