about summary refs log tree commit diff
path: root/sysdeps/powerpc/strchr.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-11 22:31:36 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-11 22:31:36 +0000
commit217eb19b6f28429aa02792764bfd7b9f51743be2 (patch)
tree8889fa7ed4cc9b561e2fc8372b604cbd55eb2402 /sysdeps/powerpc/strchr.S
parentdf08cc56eb0a050bd1d7cf569d78d4f9d2a20964 (diff)
downloadglibc-217eb19b6f28429aa02792764bfd7b9f51743be2.tar.gz
glibc-217eb19b6f28429aa02792764bfd7b9f51743be2.tar.xz
glibc-217eb19b6f28429aa02792764bfd7b9f51743be2.zip
Update.
1999-10-11  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/powerpc/Makefile [math] (libm-support): Remove t_sqrt.

	* sysdeps/powerpc/e_sqrt.c: Moved to...
	* sysdeps/powerpc/fpu/e_sqrt.c: ...here.
	* sysdeps/powerpc/e_sqrtf.c: Moved to...
	* sysdeps/powerpc/fpu/e_sqrtf.c: ...here.

	* sysdeps/powerpc/submul_1.S: Adjust asm syntax.
	* sysdeps/powerpc/sub_n.S: Likewise.
	* sysdeps/powerpc/strlen.S: Likewise.
	* sysdeps/powerpc/strcpy.S: Likewise.
	* sysdeps/powerpc/strcmp.S: Likewise.
	* sysdeps/powerpc/strchr.S: Likewise.
	* sysdeps/powerpc/stpcpy.S: Likewise.
	* sysdeps/powerpc/setjmp.S: Likewise.
	* sysdeps/powerpc/rshift.S: Likewise.
	* sysdeps/powerpc/ppc-mcount.S: Likewise.
	* sysdeps/powerpc/mul_1.S: Likewise.
	* sysdeps/powerpc/memset.S: Likewise.
	* sysdeps/powerpc/lshift.S: Likewise.
	* sysdeps/powerpc/dl-start.S: Likewise.
	* sysdeps/powerpc/bzero.S: Likewise.
	* sysdeps/powerpc/bsd-setjmp.S: Likewise.
	* sysdeps/powerpc/bsd-_setjmp.S: Likewise.
	* sysdeps/powerpc/addmul_1.S: Likewise.
	* sysdeps/powerpc/add_n.S: Likewise.
	* sysdeps/powerpc/__longjmp.S: Likewise.
	* sysdeps/powerpc/elf/start.S: Likewise.

1999-10-11  Cristian Gafton  <gafton@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Declare
Diffstat (limited to 'sysdeps/powerpc/strchr.S')
-rw-r--r--sysdeps/powerpc/strchr.S96
1 files changed, 48 insertions, 48 deletions
diff --git a/sysdeps/powerpc/strchr.S b/sysdeps/powerpc/strchr.S
index 156d4d155c..5367a5a4fe 100644
--- a/sysdeps/powerpc/strchr.S
+++ b/sysdeps/powerpc/strchr.S
@@ -1,5 +1,5 @@
 /* Optimized strchr implementation for PowerPC.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,76 +35,76 @@
    r11:	a mask with the bits to ignore set to 0
    r12:	a temporary  */
 ENTRY(strchr)
-	rlwimi %r4,%r4,8,16,23
-	li   %r11,-1
-	rlwimi %r4,%r4,16,0,15
-	lis  %r6,0xfeff
-	lis  %r7,0x7f7f
-	clrrwi %r8,%r3,2
-	addi %r7,%r7,0x7f7f
-	addi %r6,%r6,0xfffffeff
-	rlwinm %r10,%r3,3,27,28
+	rlwimi r4,r4,8,16,23
+	li   r11,-1
+	rlwimi r4,r4,16,0,15
+	lis  r6,0xfeff
+	lis  r7,0x7f7f
+	clrrwi r8,r3,2
+	addi r7,r7,0x7f7f
+	addi r6,r6,0xfffffeff
+	rlwinm r10,r3,3,27,28
 /* Test the first (partial?) word.  */
-	lwz  %r5,0(%r8)
-	srw  %r11,%r11,%r10
-	orc  %r5,%r5,%r11
-	add  %r0,%r6,%r5
-	nor  %r9,%r7,%r5
-	and. %r0,%r0,%r9
-	xor  %r12,%r4,%r5
-	orc  %r12,%r12,%r11
+	lwz  r5,0(r8)
+	srw  r11,r11,r10
+	orc  r5,r5,r11
+	add  r0,r6,r5
+	nor  r9,r7,r5
+	and. r0,r0,r9
+	xor  r12,r4,r5
+	orc  r12,r12,r11
 	b    L(loopentry)
 
 /* The loop.  */
 
-L(loop):lwzu %r5,4(%r8)
-	and. %r0,%r0,%r9
+L(loop):lwzu r5,4(r8)
+	and. r0,r0,r9
 /* Test for 0.  */
-	add  %r0,%r6,%r5
-	nor  %r9,%r7,%r5
+	add  r0,r6,r5
+	nor  r9,r7,r5
 	bne  L(foundit)
-	and. %r0,%r0,%r9
+	and. r0,r0,r9
 /* Start test for the bytes we're looking for.  */
-	xor  %r12,%r4,%r5
+	xor  r12,r4,r5
 L(loopentry):
-	add  %r0,%r6,%r12
-	nor  %r9,%r7,%r12
+	add  r0,r6,r12
+	nor  r9,r7,r12
 	beq  L(loop)
 /* There is a zero byte in the word, but may also be a matching byte (either
    before or after the zero byte).  In fact, we may be looking for a
    zero byte, in which case we return a match.  We guess that this hasn't
    happened, though.  */
 L(missed):
-	and. %r0,%r0,%r9
-	li   %r3,0
+	and. r0,r0,r9
+	li   r3,0
 	beqlr
 /* It did happen. Decide which one was first...
    I'm not sure if this is actually faster than a sequence of
    rotates, compares, and branches (we use it anyway because it's shorter).  */
-	and  %r6,%r7,%r5
-	or   %r11,%r7,%r5
-	and  %r0,%r7,%r12
-	or   %r10,%r7,%r12
-	add  %r6,%r6,%r7
-	add  %r0,%r0,%r7
-	nor  %r5,%r11,%r6
-	nor  %r9,%r10,%r0
-	cmplw %r5,%r9
+	and  r6,r7,r5
+	or   r11,r7,r5
+	and  r0,r7,r12
+	or   r10,r7,r12
+	add  r6,r6,r7
+	add  r0,r0,r7
+	nor  r5,r11,r6
+	nor  r9,r10,r0
+	cmplw r5,r9
 	bgtlr
-	cntlzw %r4,%r9
-	srwi %r4,%r4,3
-	add  %r3,%r8,%r4
+	cntlzw r4,r9
+	srwi r4,r4,3
+	add  r3,r8,r4
 	blr
 
 L(foundit):
-	and  %r0,%r7,%r12
-	or   %r10,%r7,%r12
-	add  %r0,%r0,%r7
-	nor  %r9,%r10,%r0
-	cntlzw %r4,%r9
-	subi %r8,%r8,4
-	srwi %r4,%r4,3
-	add  %r3,%r8,%r4
+	and  r0,r7,r12
+	or   r10,r7,r12
+	add  r0,r0,r7
+	nor  r9,r10,r0
+	cntlzw r4,r9
+	subi r8,r8,4
+	srwi r4,r4,3
+	add  r3,r8,r4
 	blr
 END(strchr)