about summary refs log tree commit diff
path: root/sysdeps/i386/strrchr.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-03-31 22:56:24 +0000
committerUlrich Drepper <drepper@redhat.com>1997-03-31 22:56:24 +0000
commit5929563ff20245bbaa1b3ca2f4bfcee623ac6fb5 (patch)
tree15b1ff0a40462018402078788148c0c99d188429 /sysdeps/i386/strrchr.S
parent3075e0e37c0e7cc2e6eb518c409e0769d058ed4b (diff)
downloadglibc-5929563ff20245bbaa1b3ca2f4bfcee623ac6fb5.tar.gz
glibc-5929563ff20245bbaa1b3ca2f4bfcee623ac6fb5.tar.xz
glibc-5929563ff20245bbaa1b3ca2f4bfcee623ac6fb5.zip
1997-04-01 00:37  Ulrich Drepper  <drepper@cygnus.com>

	* math/Makefile: Prevent inlining for test-{float,double,longdouble}.
	* math/libm-test.c (initialize): Make strings unique and force
	values to memory.

	* posix/regex.c: Debug debugging code.

	* sysdeps/i386/asm-syntax.h: Define `L' macro to emit correct
	syntax for local label.
	* sysdeps/i386/add_n.S: Use correct local label syntax for the
	binary format.
	* sysdeps/i386/addmul_1.S: Likewise.
	* sysdeps/i386/lshift.S: Likewise.
	* sysdeps/i386/memchr.S: Likewise.
	* sysdeps/i386/memset.S: Likewise.
	* sysdeps/i386/mul_1.S: Likewise.
	* sysdeps/i386/rshift.S: Likewise.
	* sysdeps/i386/stpcpy.S: Likewise.
	* sysdeps/i386/stpncpy.S: Likewise.
	* sysdeps/i386/strchr.S: Likewise.
	* sysdeps/i386/strcspn.S: Likewise.
	* sysdeps/i386/strlen.S: Likewise.
	* sysdeps/i386/strpbrk.S: Likewise.
	* sysdeps/i386/strrchr.S: Likewise.
	* sysdeps/i386/strspn.S: Likewise.
	* sysdeps/i386/strtok.S: Likewise.
	* sysdeps/i386/sub_n.S: Likewise.
	* sysdeps/i386/submul_1.S: Likewise.
	* sysdeps/i386/i486/strcat.S: Likewise.
	* sysdeps/i386/i486/strlen.S: Likewise.
	* sysdeps/i386/i586/add_n.S: Likewise.
	* sysdeps/i386/i586/addmul_1.S: Likewise.
	* sysdeps/i386/i586/lshift.S: Likewise.
	* sysdeps/i386/i586/memset.S: Likewise.
	* sysdeps/i386/i586/mul_1.S: Likewise.
	* sysdeps/i386/i586/rshift.S: Likewise.
	* sysdeps/i386/i586/strchr.S: Likewise.
	* sysdeps/i386/i586/strlen.S: Likewise.
	* sysdeps/i386/i586/sub_n.S: Likewise.
	* sysdeps/i386/i586/submul_1.S: Likewise.

	* sysdeps/stub/s_log2l.c: Correct function name.

	* time/africa: Updated from ADO tzdata1997e.
	* time/aantarctica: Likewise.
	* time/asia: Likewise.
	* time/australia: Likewise.
	* time/europe: Likewise.
	* time/northamerica: Likewise.
	* time/southamerica: Likewise.
	* time/private.h: Updated from ADO tzcode1997d.
	* time/scheck.c: Likewise.

1997-03-31 12:42  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/powerpc/Dist: Add kernel_*.h files.

1997-03-23 01:41  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/powerpc/strlen.s: Rewrote for more speed.
	* string/tst-strlen.c: Also test various string alignments.

1997-03-19 06:11  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/unix/sysv/linux/powerpc/statbuf.h: Removed.
	* sysdeps/unix/sysv/linux/powerpc/kernel_stat.h: Added.

	* sysdeps/powerpc/dl-machine.h (ELF_PREFERRED_ADDRESS): Assume
	program base address is 0x01800000 if we can't otherwise tell what
	it is.
	(elf_machine_rela): Replace `assertion failed' with real error
	messages.

	* sysdeps/powerpc/dl-machine.h: More comments, more GNU indenting.
	Put in extra parentheses to make explicit the relative precedence
	of + and >>.

	* sysdeps/powerpc/bsd-setjmp.S: Add `__setjmp' symbol so the tests
	pass.
	* sysdeps/powerpc/clone.S: Rewrite.  Probably still doesn't work.

	* sysdeps/unix/sysv/linux/powerpc/sys/sysdep.h: Use .section "text"
	instead of .text.

1997-03-31 02:28  Ulrich Drepper  <drepper@cygnus.com>

	* misc/tst-tsearch.c: Don't write to stderr, write to stdout
	instead.

	* inet/inet_ntoa.c (inet_ntoa): Complete rewrite.  Now uses
	thread-specific memory in multi-threaded programs.

	* sysdeps/stub/s_exp2.c: New file.  Stub version for exp2 function.
	* sysdeps/stub/s_exp2f.c: New file.
	* sysdeps/stub/s_exp2l.c: New file.
	Reported by a sun <asun@zoology.washington.edu>.

	* sysdeps/unix/sysv/linux/netatalk/atalk.h: Rename to...
	* sysdeps/unix/sysv/linux/netatalk/at.h: ...this.
	Suggested by a sun <asun@zoology.washington.edu>.

1997-03-30 14:53  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/netinet/ip_icmp.h: Add former contents
	of <netinet/icmp.h>.
	Patch by a sun <asun@zoology.washington.edu>.

	* sysdeps/powerpc/strlen.S: Added.
Diffstat (limited to 'sysdeps/i386/strrchr.S')
-rw-r--r--sysdeps/i386/strrchr.S124
1 files changed, 62 insertions, 62 deletions
diff --git a/sysdeps/i386/strrchr.S b/sysdeps/i386/strrchr.S
index 3786d3f690..111f986dd8 100644
--- a/sysdeps/i386/strrchr.S
+++ b/sysdeps/i386/strrchr.S
@@ -1,6 +1,6 @@
 /* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR.
    For Intel 80x86, x>=3.
-   Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
    Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -59,37 +59,37 @@ ENTRY (strrchr)
 	      boundaries are multiples of 4.  */
 
 	testl $3, %esi		/* correctly aligned ? */
-	jz L19			/* yes => begin loop */
+	jz L(19)		/* yes => begin loop */
 	movb (%esi), %dl	/* load byte in question (we need it twice) */
 	cmpb %dl, %cl		/* compare byte */
-	jne L11			/* target found => return */
+	jne L(11)			/* target found => return */
 	movl %esi, %eax		/* remember pointer as possible result */
-L11:	orb %dl, %dl		/* is NUL? */
-	jz L2			/* yes => return NULL */
+L(11):	orb %dl, %dl		/* is NUL? */
+	jz L(2)			/* yes => return NULL */
 	incl %esi		/* increment pointer */
 
 	testl $3, %esi		/* correctly aligned ? */
-	jz L19			/* yes => begin loop */
+	jz L(19)		/* yes => begin loop */
 	movb (%esi), %dl	/* load byte in question (we need it twice) */
 	cmpb %dl, %cl		/* compare byte */
-	jne L12			/* target found => return */
+	jne L(12)			/* target found => return */
 	movl %esi, %eax		/* remember pointer as result */
-L12:	orb %dl, %dl		/* is NUL? */
-	jz L2			/* yes => return NULL */
+L(12):	orb %dl, %dl		/* is NUL? */
+	jz L(2)			/* yes => return NULL */
 	incl %esi		/* increment pointer */
 
 	testl $3, %esi		/* correctly aligned ? */
-	jz L19			/* yes => begin loop */
+	jz L(19)		/* yes => begin loop */
 	movb (%esi), %dl	/* load byte in question (we need it twice) */
 	cmpb %dl, %cl		/* compare byte */
-	jne L13			/* target found => return */
+	jne L(13)			/* target found => return */
 	movl %esi, %eax		/* remember pointer as result */
-L13:	orb %dl, %dl		/* is NUL? */
-	jz L2			/* yes => return NULL */
+L(13):	orb %dl, %dl		/* is NUL? */
+	jz L(2)			/* yes => return NULL */
 	incl %esi		/* increment pointer */
 
 	/* No we have reached alignment.  */
-	jmp L19			/* begin loop */
+	jmp L(19)		/* begin loop */
 
       /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
 	 change any of the hole bits of LONGWORD.
@@ -140,34 +140,34 @@ L13:	orb %dl, %dl		/* is NUL? */
 	.byte 0
 #endif
 
-L4:	subl $4, %esi		/* adjust pointer */
-L41:	subl $4, %esi
-L42:	subl $4, %esi
-L43:	testl $0xff000000, %edx	/* is highest byte == C? */
-	jnz L33			/* no => try other bytes */
+L(4):	subl $4, %esi		/* adjust pointer */
+L(41):	subl $4, %esi
+L(42):	subl $4, %esi
+L(43):	testl $0xff000000, %edx	/* is highest byte == C? */
+	jnz L(33)		/* no => try other bytes */
 	leal 15(%esi), %eax	/* store address as result */
-	jmp L1			/* and start loop again */
+	jmp L(1)		/* and start loop again */
 
-L3:	subl $4, %esi		/* adjust pointer */
-L31:	subl $4, %esi
-L32:	subl $4, %esi
-L33:	testl $0xff0000, %edx	/* is C in third byte? */
-	jnz L51			/* no => try other bytes */
+L(3):	subl $4, %esi		/* adjust pointer */
+L(31):	subl $4, %esi
+L(32):	subl $4, %esi
+L(33):	testl $0xff0000, %edx	/* is C in third byte? */
+	jnz L(51)		/* no => try other bytes */
 	leal 14(%esi), %eax	/* store address as result */
-	jmp L1			/* and start loop again */
+	jmp L(1)		/* and start loop again */
 
-L51:
+L(51):
 	/* At this point we know that the byte is in one of the lower bytes.
 	   We make a guess and correct it if necessary.  This reduces the
 	   number of necessary jumps.  */
 	leal 12(%esi), %eax	/* guess address of lowest byte as result */
 	testb %dh, %dh		/* is guess correct? */
-	jnz L1			/* yes => start loop */
+	jnz L(1)		/* yes => start loop */
 	leal 13(%esi), %eax	/* correct guess to second byte */
 
-L1:	addl $16, %esi		/* increment pointer for full round */
+L(1):	addl $16, %esi		/* increment pointer for full round */
 
-L19:	movl (%esi), %edx	/* get word (= 4 bytes) in question */
+L(19):	movl (%esi), %edx	/* get word (= 4 bytes) in question */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
@@ -180,7 +180,7 @@ L19:	movl (%esi), %edx	/* get word (= 4 bytes) in question */
 	   overflow, we can now test this condition.  If no carry is signaled
 	   no overflow must have occurred in the last byte => it was 0.	*/
 
-	jnc L20			/* found NUL => check last word */
+	jnc L(20)			/* found NUL => check last word */
 
 	/* We are only interested in carry bits that change due to the
 	   previous add, so remove original bits */
@@ -192,7 +192,7 @@ L19:	movl (%esi), %edx	/* get word (= 4 bytes) in question */
 				   the addition will not result in 0.  */
 
 	/* If at least one byte of the word is C we don't get 0 in %edi.  */
-	jnz L20			/* found NUL => check last word */
+	jnz L(20)			/* found NUL => check last word */
 
 	/* Now we made sure the dword does not contain the character we are
 	   looking for.  But because we deal with strings we have to check
@@ -204,89 +204,89 @@ L19:	movl (%esi), %edx	/* get word (= 4 bytes) in question */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L4			/* highest byte is C => examine dword */
+	jnc L(4)		/* highest byte is C => examine dword */
 	xorl %edx, %edi		/* ((word^charmask)+magic)^(word^charmask) */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jnz L3			/* C is detected in the word => examine it */
+	jnz L(3)		/* C is detected in the word => examine it */
 
 	movl 4(%esi), %edx	/* get word (= 4 bytes) in question */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L21			/* found NUL => check last word */
+	jnc L(21)		/* found NUL => check last word */
 	xorl %edx, %edi		/* (word+magic)^word */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jnz L21			/* found NUL => check last word */
+	jnz L(21)		/* found NUL => check last word */
 	xorl %ecx, %edx		/* XOR with word c|c|c|c => bytes of str == c
 				   are now 0 */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L41			/* highest byte is C => examine dword */
+	jnc L(41)		/* highest byte is C => examine dword */
 	xorl %edx, %edi		/* ((word^charmask)+magic)^(word^charmask) */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jnz L31			/* C is detected in the word => examine it */
+	jnz L(31)		/* C is detected in the word => examine it */
 
 	movl 8(%esi), %edx	/* get word (= 4 bytes) in question */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L22			/* found NUL => check last word */
+	jnc L(22)		/* found NUL => check last word */
 	xorl %edx, %edi		/* (word+magic)^word */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jnz L22			/* found NUL => check last word */
+	jnz L(22)		/* found NUL => check last word */
 	xorl %ecx, %edx		/* XOR with word c|c|c|c => bytes of str == c
 				   are now 0 */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L42			/* highest byte is C => examine dword */
+	jnc L(42)		/* highest byte is C => examine dword */
 	xorl %edx, %edi		/* ((word^charmask)+magic)^(word^charmask) */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jnz L32			/* C is detected in the word => examine it */
+	jnz L(32)		/* C is detected in the word => examine it */
 
 	movl 12(%esi), %edx	/* get word (= 4 bytes) in question */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L23			/* found NUL => check last word */
+	jnc L(23)		/* found NUL => check last word */
 	xorl %edx, %edi		/* (word+magic)^word */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jnz L23			/* found NUL => check last word */
+	jnz L(23)		/* found NUL => check last word */
 	xorl %ecx, %edx		/* XOR with word c|c|c|c => bytes of str == c
 				   are now 0 */
 	movl $0xfefefeff, %edi	/* magic value */
 	addl %edx, %edi		/* add the magic value to the word.  We get
 				   carry bits reported for each byte which
 				   is *not* 0 */
-	jnc L43			/* highest byte is C => examine dword */
+	jnc L(43)		/* highest byte is C => examine dword */
 	xorl %edx, %edi		/* ((word^charmask)+magic)^(word^charmask) */
 	orl $0xfefefeff, %edi	/* set all non-carry bits */
 	incl %edi		/* add 1: if one carry bit was *not* set
 				   the addition will not result in 0.  */
-	jz L1			/* C is not detected => restart loop */
-	jmp L33			/* examine word */
+	jz L(1)			/* C is not detected => restart loop */
+	jmp L(33)		/* examine word */
 
-L23:	addl $4, %esi		/* adjust pointer */
-L22:	addl $4, %esi
-L21:	addl $4, %esi
+L(23):	addl $4, %esi		/* adjust pointer */
+L(22):	addl $4, %esi
+L(21):	addl $4, %esi
 
 	/* What remains to do is to test which byte the NUL char is and
 	   whether the searched character appears in one of the bytes
@@ -294,30 +294,30 @@ L21:	addl $4, %esi
 	   In this case a pointer to the terminating NUL char has to be
 	   returned.  */
 
-L20:	cmpb %cl, %dl		/* is first byte == C? */
-	jne L24			/* no => skip */
+L(20):	cmpb %cl, %dl		/* is first byte == C? */
+	jne L(24)			/* no => skip */
 	movl %esi, %eax		/* store address as result */
-L24:	testb %dl, %dl		/* is first byte == NUL? */
-	jz L2			/* yes => return */
+L(24):	testb %dl, %dl		/* is first byte == NUL? */
+	jz L(2)			/* yes => return */
 
 	cmpb %cl, %dh		/* is second byte == C? */
-	jne L25			/* no => skip */
+	jne L(25)			/* no => skip */
 	leal 1(%esi), %eax	/* store address as result */
-L25:	testb %dh, %dh		/* is second byte == NUL? */
-	jz L2			/* yes => return */
+L(25):	testb %dh, %dh		/* is second byte == NUL? */
+	jz L(2)			/* yes => return */
 
 	shrl $16,%edx		/* make upper bytes accessible */
 	cmpb %cl, %dl		/* is third byte == C */
-	jne L26			/* no => skip */
+	jne L(26)			/* no => skip */
 	leal 2(%esi), %eax	/* store address as result */
-L26:	testb %dl, %dl		/* is third byte == NUL */
-	jz L2			/* yes => return */
+L(26):	testb %dl, %dl		/* is third byte == NUL */
+	jz L(2)			/* yes => return */
 
 	cmpb %cl, %dh		/* is fourth byte == C */
-	jne L2			/* no => skip */
+	jne L(2)		/* no => skip */
 	leal 3(%esi), %eax	/* store address as result */
 
-L2:	popl %esi		/* restore saved register content */
+L(2):	popl %esi		/* restore saved register content */
 	popl %edi
 
 	ret