diff options
author | Zack Weinberg <zackw@panix.com> | 2017-06-08 15:39:03 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-06-08 15:39:03 -0400 |
commit | 5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch) | |
tree | 4470480d904b65cf14ca524f96f79eca818c3eaf /sysdeps/powerpc/powerpc32/405/strlen.S | |
parent | 199fc19d3aaaf57944ef036e15904febe877fc93 (diff) | |
download | glibc-zack/build-layout-experiment.tar glibc-zack/build-layout-experiment.tar.gz glibc-zack/build-layout-experiment.tar.bz2 glibc-zack/build-layout-experiment.zip |
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage
directory, REORG.TODO, except for files that will certainly still
exist in their current form at top level when we're done (COPYING,
COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which
are moved to the new directory OldChangeLogs, instead), and the
generated file INSTALL (which is just deleted; in the new order, there
will be no generated files checked into version control).
Diffstat (limited to 'sysdeps/powerpc/powerpc32/405/strlen.S')
-rw-r--r-- | sysdeps/powerpc/powerpc32/405/strlen.S | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/sysdeps/powerpc/powerpc32/405/strlen.S b/sysdeps/powerpc/powerpc32/405/strlen.S deleted file mode 100644 index 25e54dafc7..0000000000 --- a/sysdeps/powerpc/powerpc32/405/strlen.S +++ /dev/null @@ -1,75 +0,0 @@ -/* Optimized strlen implementation for PowerPC476. - Copyright (C) 2010-2017 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - -/* strlen - - Register Use - r3:source address and return length of string - r4:byte counter - - Implementation description - Load 2 words at a time and count bytes, if we find null we subtract one from - the count and return the count value. We need to subtract one because - we don't count the null character as a byte. */ - -EALIGN (strlen,5,0) - neg r7,r3 - clrlwi. r8,r7,29 - addi r4,0,0 - beq L(byte_count_loop) - mtctr r8 - -L(loop): - lbz r5,0(r3) - cmpi cr5,r5,0x0 - addi r3,r3,0x1 - addi r4,r4,0x1 - beq cr5,L(end_strlen) - bdnz L(loop) - -L(byte_count_loop): - lwz r5,0(r3) - lwz r6,4(r3) - dlmzb. r12,r5,r6 - add r4,r4,r12 - bne L(end_strlen) - lwz r5,8(r3) - lwz r6,12(r3) - dlmzb. r12,r5,r6 - add r4,r4,r12 - bne L(end_strlen) - lwz r5,16(r3) - lwz r6,20(r3) - dlmzb. r12,r5,r6 - add r4,r4,r12 - bne L(end_strlen) - lwz r5,24(r3) - lwz r6,28(r3) - addi r3,r3,0x20 - dlmzb. r12,r5,r6 - add r4,r4,r12 - bne L(end_strlen) - b L(byte_count_loop) - -L(end_strlen): - addi r3,r4,-1 - blr -END (strlen) -libc_hidden_builtin_def (strlen) |