diff options
author | cvs2svn <> | 2014-12-18 23:30:28 +0300 |
---|---|---|
committer | cvs2svn <> | 2014-12-18 23:30:28 +0300 |
commit | 38b85aed54f123088f578c98ead9474c3237b913 (patch) | |
tree | e8fa66238e5382a18584e7637fb65278c99a565a /newlib/libc/machine/aarch64/strchrnul.S | |
parent | 7e72fffc61b29325ac5a875c5318cdf2f294ae28 (diff) |
This commit was manufactured by cvs2svn to create tag 'newlib-2_1_0'.newlib-2_1_0
Sprout from newlib-2_2_0 2014-12-18 20:30:12 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'newlib-2_2_0'.'
Cherrypick from master 2013-12-23 20:45:10 UTC Jeff Johnston <jjohnstn@redhat.com> '2013-12-23 Jeff Johnston <jjohnstn@redhat.com>':
COPYING.NEWLIB
ChangeLog
config.guess
config.sub
config/ChangeLog
configure
configure.ac
libgloss/ChangeLog
libgloss/README
libgloss/aarch64/Makefile.in
libgloss/aarch64/cpu-init/rdimon-aem-el3.S
libgloss/arm/Makefile.in
libgloss/arm/configure
libgloss/arm/configure.in
libgloss/arm/elf-aprofile-validation.specs
libgloss/arm/elf-aprofile-ve.specs
libgloss/arm/elf-rdimon.specs
libgloss/arm/syscalls.c
libgloss/bfin/Makefile.in
libgloss/configure
libgloss/configure.in
libgloss/libnosys/nosys.specs
libgloss/libnosys/sbrk.c
libgloss/mips/crt0.S
libgloss/mips/mti32.ld
libgloss/mips/mti64.ld
libgloss/mips/mti64_64.ld
libgloss/mips/mti64_n32.ld
libgloss/mips/regs.S
libgloss/moxie/Makefile.in
libgloss/moxie/configure
libgloss/moxie/configure.in
libgloss/msp430/Makefile.in
libgloss/msp430/crt0.S
libgloss/msp430/crtn.S
libgloss/msp430/msp430-sim.ld
libgloss/msp430/msp430.ld
libgloss/msp430/msp430xl-sim.ld
libgloss/msp430/nosyscalls.S
libgloss/nds32/Makefile.in
libgloss/nds32/crt0.S
libgloss/nds32/crt1.S
libgloss/nds32/syscall_argv.S
libgloss/nds32/syscall_argvlen.S
libgloss/nds32/syscall_chdir.S
libgloss/nds32/syscall_chmod.S
libgloss/nds32/syscall_close.S
libgloss/nds32/syscall_exit.S
libgloss/nds32/syscall_extra.h
libgloss/nds32/syscall_fstat.S
libgloss/nds32/syscall_getpid.S
libgloss/nds32/syscall_gettimeofday.S
libgloss/nds32/syscall_isatty.S
libgloss/nds32/syscall_kill.S
libgloss/nds32/syscall_link.S
libgloss/nds32/syscall_lseek.S
libgloss/nds32/syscall_open.S
libgloss/nds32/syscall_read.S
libgloss/nds32/syscall_rename.S
libgloss/nds32/syscall_sbrk.S
libgloss/nds32/syscall_stat.S
libgloss/nds32/syscall_system.S
libgloss/nds32/syscall_time.S
libgloss/nds32/syscall_times.S
libgloss/nds32/syscall_unlink.S
libgloss/nds32/syscall_utime.S
libgloss/nds32/syscall_write.S
ltmain.sh
newlib/ChangeLog
newlib/NEWS
newlib/README
newlib/acconfig.h
newlib/acinclude.m4
newlib/configure
newlib/configure.host
newlib/configure.in
newlib/doc/configure
newlib/iconvdata/configure
newlib/libc/argz/envz_merge.c
newlib/libc/configure
newlib/libc/configure.in
newlib/libc/ctype/iswalpha.c
newlib/libc/ctype/jp2uc.c
newlib/libc/include/_ansi.h
newlib/libc/include/grp.h
newlib/libc/include/inttypes.h
newlib/libc/include/machine/_default_types.h
newlib/libc/include/machine/ieeefp.h
newlib/libc/include/machine/setjmp.h
newlib/libc/include/math.h
newlib/libc/include/pwd.h
newlib/libc/include/setjmp.h
newlib/libc/include/stdint.h
newlib/libc/include/stdio.h
newlib/libc/include/stdio_ext.h
newlib/libc/include/stdlib.h
newlib/libc/include/string.h
newlib/libc/include/sys/_default_fcntl.h
newlib/libc/include/sys/config.h
newlib/libc/include/sys/errno.h
newlib/libc/include/sys/features.h
newlib/libc/include/sys/resource.h
newlib/libc/include/sys/signal.h
newlib/libc/include/sys/stat.h
newlib/libc/include/sys/time.h
newlib/libc/include/sys/unistd.h
newlib/libc/include/time.h
newlib/libc/include/wchar.h
newlib/libc/libc.texinfo
newlib/libc/locale/ldpart.c
newlib/libc/machine/a29k/configure
newlib/libc/machine/aarch64/Makefile.am
newlib/libc/machine/aarch64/Makefile.in
newlib/libc/machine/aarch64/configure
newlib/libc/machine/arm/Makefile.am
newlib/libc/machine/arm/Makefile.in
newlib/libc/machine/arm/arm_asm.h
newlib/libc/machine/arm/configure
newlib/libc/machine/arm/configure.in
newlib/libc/machine/arm/memchr-stub.c
newlib/libc/machine/arm/memchr.S
newlib/libc/machine/arm/memcpy-stub.c
newlib/libc/machine/arm/memcpy.S
newlib/libc/machine/arm/strcmp.S
newlib/libc/machine/arm/strlen.c
newlib/libc/machine/bfin/configure
newlib/libc/machine/configure
newlib/libc/machine/configure.in
newlib/libc/machine/cr16/configure
newlib/libc/machine/cris/configure
newlib/libc/machine/crx/configure
newlib/libc/machine/d10v/configure
newlib/libc/machine/d30v/configure
newlib/libc/machine/epiphany/configure
newlib/libc/machine/fr30/configure
newlib/libc/machine/frv/configure
newlib/libc/machine/h8300/configure
newlib/libc/machine/h8500/configure
newlib/libc/machine/hppa/configure
newlib/libc/machine/i386/configure
newlib/libc/machine/i960/configure
newlib/libc/machine/iq2000/configure
newlib/libc/machine/lm32/configure
newlib/libc/machine/m32c/configure
newlib/libc/machine/m32r/configure
newlib/libc/machine/m68hc11/configure
newlib/libc/machine/m68k/configure
newlib/libc/machine/m88k/configure
newlib/libc/machine/mep/configure
newlib/libc/machine/microblaze/configure
newlib/libc/machine/mips/Makefile.am
newlib/libc/machine/mips/Makefile.in
newlib/libc/machine/mips/configure
newlib/libc/machine/mips/setjmp.S
newlib/libc/machine/mips/strcmp.c
newlib/libc/machine/mn10200/configure
newlib/libc/machine/mn10300/configure
newlib/libc/machine/moxie/configure
newlib/libc/machine/msp430/configure
newlib/libc/machine/mt/configure
newlib/libc/machine/nds32/Makefile.am
newlib/libc/machine/nds32/Makefile.in
newlib/libc/machine/nds32/configure
newlib/libc/machine/nds32/configure.in
newlib/libc/machine/nds32/setjmp.S
newlib/libc/machine/necv70/configure
newlib/libc/machine/nios2/configure
newlib/libc/machine/powerpc/configure
newlib/libc/machine/rl78/configure
newlib/libc/machine/rl78/setjmp.S
newlib/libc/machine/rx/configure
newlib/libc/machine/sh/configure
newlib/libc/machine/sparc/configure
newlib/libc/machine/sparc/setjmp.S
newlib/libc/machine/spu/configure
newlib/libc/machine/spu/spu_timer_internal.h
newlib/libc/machine/tic4x/configure
newlib/libc/machine/tic6x/configure
newlib/libc/machine/tic80/configure
newlib/libc/machine/v850/configure
newlib/libc/machine/w65/configure
newlib/libc/machine/x86_64/configure
newlib/libc/machine/xc16x/configure
newlib/libc/machine/xscale/configure
newlib/libc/machine/xscale/machine/profile.h
newlib/libc/machine/xstormy16/configure
newlib/libc/machine/z8k/configure
newlib/libc/search/Makefile.am
newlib/libc/search/Makefile.in
newlib/libc/search/hash.c
newlib/libc/search/qsort.c
newlib/libc/stdio/Makefile.am
newlib/libc/stdio/Makefile.in
newlib/libc/stdio/asnprintf.c
newlib/libc/stdio/asprintf.c
newlib/libc/stdio/clearerr.c
newlib/libc/stdio/dprintf.c
newlib/libc/stdio/fclose.c
newlib/libc/stdio/feof.c
newlib/libc/stdio/ferror.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/fgetc.c
newlib/libc/stdio/fgets.c
newlib/libc/stdio/fgetwc.c
newlib/libc/stdio/fgetws.c
newlib/libc/stdio/fileno.c
newlib/libc/stdio/findfp.c
newlib/libc/stdio/fprintf.c
newlib/libc/stdio/fputc.c
newlib/libc/stdio/fputs.c
newlib/libc/stdio/fputwc.c
newlib/libc/stdio/fputws.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/fscanf.c
newlib/libc/stdio/fwalk.c
newlib/libc/stdio/fwrite.c
newlib/libc/stdio/getwchar.c
newlib/libc/stdio/local.h
newlib/libc/stdio/open_memstream.c
newlib/libc/stdio/printf.c
newlib/libc/stdio/putwchar.c
newlib/libc/stdio/scanf.c
newlib/libc/stdio/snprintf.c
newlib/libc/stdio/sprintf.c
newlib/libc/stdio/sscanf.c
newlib/libc/stdio/stdio.tex
newlib/libc/stdio/vasnprintf.c
newlib/libc/stdio/vasprintf.c
newlib/libc/stdio/vdprintf.c
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vprintf.c
newlib/libc/stdio/vscanf.c
newlib/libc/stdio/vsnprintf.c
newlib/libc/stdio/vsprintf.c
newlib/libc/stdio/vsscanf.c
newlib/libc/stdlib/Makefile.am
newlib/libc/stdlib/Makefile.in
newlib/libc/stdlib/gd_qnan.h
newlib/libc/stdlib/ldtoa.c
newlib/libc/stdlib/nano-mallocr.c
newlib/libc/stdlib/strtod.c
newlib/libc/stdlib/strtold.c
newlib/libc/string/local.h
newlib/libc/string/memccpy.c
newlib/libc/string/memchr.c
newlib/libc/string/memrchr.c
newlib/libc/string/memset.c
newlib/libc/string/rawmemchr.c
newlib/libc/string/strcasestr.c
newlib/libc/string/strerror.c
newlib/libc/string/u_strerr.c
newlib/libc/sys/a29khif/configure
newlib/libc/sys/arc/configure
newlib/libc/sys/arm/configure
newlib/libc/sys/arm/syscalls.c
newlib/libc/sys/configure
newlib/libc/sys/configure.in
newlib/libc/sys/d10v/configure
newlib/libc/sys/decstation/configure
newlib/libc/sys/epiphany/configure
newlib/libc/sys/h8300hms/configure
newlib/libc/sys/h8500hms/configure
newlib/libc/sys/linux/configure
newlib/libc/sys/linux/dl/atomicity.h
newlib/libc/sys/linux/dl/dynamic-link.h
newlib/libc/sys/linux/dl/ldsodefs.h
newlib/libc/sys/linux/iconv/gconv_charset.h
newlib/libc/sys/linux/include/resolv.h
newlib/libc/sys/linux/libc-symbols.h
newlib/libc/sys/linux/linuxthreads/configure
newlib/libc/sys/linux/linuxthreads/internals.h
newlib/libc/sys/linux/linuxthreads/libc-symbols.h
newlib/libc/sys/linux/linuxthreads/machine/configure
newlib/libc/sys/linux/linuxthreads/machine/i386/configure
newlib/libc/sys/linux/machine/configure
newlib/libc/sys/linux/machine/i386/configure
newlib/libc/sys/linux/machine/i386/dl-machine.h
newlib/libc/sys/linux/machine/i386/dl-procinfo.h
newlib/libc/sys/linux/machine/i386/weakalias.h
newlib/libc/sys/linux/shared.ld
newlib/libc/sys/linux/sys/unistd.h
newlib/libc/sys/m88kbug/configure
newlib/libc/sys/mmixware/configure
newlib/libc/sys/netware/configure
newlib/libc/sys/rdos/configure
newlib/libc/sys/rtems/configure
newlib/libc/sys/rtems/sys/cpuset.h
newlib/libc/sys/rtems/sys/syslimits.h
newlib/libc/sys/sh/configure
newlib/libc/sys/sparc64/configure
newlib/libc/sys/sun4/configure
newlib/libc/sys/sysmec/configure
newlib/libc/sys/sysnec810/configure
newlib/libc/sys/sysnecv850/configure
newlib/libc/sys/sysvi386/configure
newlib/libc/sys/sysvnecv70/configure
newlib/libc/sys/tic80/configure
newlib/libc/sys/w65/configure
newlib/libc/sys/z8ksim/configure
newlib/libc/time/Makefile.am
newlib/libc/time/Makefile.in
newlib/libc/time/clock.c
newlib/libc/time/gmtime_r.c
newlib/libc/time/lcltime_r.c
newlib/libc/time/local.h
newlib/libc/time/mktm_r.c
newlib/libc/time/strftime.c
newlib/libc/time/strptime.c
newlib/libc/unix/getcwd.c
newlib/libm/common/Makefile.am
newlib/libm/common/Makefile.in
newlib/libm/common/s_nan.c
newlib/libm/common/sf_nan.c
newlib/libm/complex/complex.tex
newlib/libm/configure
newlib/libm/libm.texinfo
newlib/libm/machine/aarch64/configure
newlib/libm/machine/arm/configure
newlib/libm/machine/configure
newlib/libm/machine/configure.in
newlib/libm/machine/i386/configure
newlib/libm/machine/spu/configure
newlib/libm/math/math.tex
newlib/libm/mathfp/sf_numtest.c
newlib/newlib.hin
Delete:
config/mt-nios2-elf
libgloss/arm/elf-nano.specs
libgloss/mips/abiflags.S
libgloss/moxie/moxiebox.ld
libgloss/msp430/ciosyscalls.S
libgloss/msp430/unlink.c
libgloss/nds32/_argv.S
libgloss/nds32/_argvlen.S
libgloss/nds32/_chdir.S
libgloss/nds32/_chmod.S
libgloss/nds32/_close.S
libgloss/nds32/_exit.S
libgloss/nds32/_fstat.S
libgloss/nds32/_getpid.S
libgloss/nds32/_gettimeofday.S
libgloss/nds32/_isatty.S
libgloss/nds32/_kill.S
libgloss/nds32/_link.S
libgloss/nds32/_lseek.S
libgloss/nds32/_open.S
libgloss/nds32/_read.S
libgloss/nds32/_rename.S
libgloss/nds32/_sbrk.S
libgloss/nds32/_stat.S
libgloss/nds32/_system.S
libgloss/nds32/_time.S
libgloss/nds32/_times.S
libgloss/nds32/_unlink.S
libgloss/nds32/_utime.S
libgloss/nds32/_write.S
libgloss/nds32/syscall_error_handler.S
libgloss/nds32/vh.h
libgloss/or1k/Makefile.in
libgloss/or1k/README
libgloss/or1k/aclocal.m4
libgloss/or1k/board.h
libgloss/or1k/boards/README
libgloss/or1k/boards/atlys.S
libgloss/or1k/boards/de0_nano.S
libgloss/or1k/boards/ml501.S
libgloss/or1k/boards/ml509.S
libgloss/or1k/boards/optimsoc.S
libgloss/or1k/boards/or1ksim-uart.S
libgloss/or1k/boards/or1ksim.S
libgloss/or1k/boards/ordb1a3pe1500.S
libgloss/or1k/boards/ordb2a.S
libgloss/or1k/boards/orpsocrefdesign.S
libgloss/or1k/boards/tmpl.S
libgloss/or1k/boards/tmpl.c
libgloss/or1k/caches-asm.S
libgloss/or1k/configure
libgloss/or1k/configure.in
libgloss/or1k/crt0.S
libgloss/or1k/exceptions-asm.S
libgloss/or1k/exceptions.c
libgloss/or1k/impure.c
libgloss/or1k/include/or1k-asm.h
libgloss/or1k/include/or1k-nop.h
libgloss/or1k/include/or1k-support.h
libgloss/or1k/interrupts-asm.S
libgloss/or1k/interrupts.c
libgloss/or1k/mmu-asm.S
libgloss/or1k/or1k-internals.h
libgloss/or1k/or1k_uart.c
libgloss/or1k/or1k_uart.h
libgloss/or1k/outbyte.S
libgloss/or1k/sbrk.c
libgloss/or1k/sync-asm.S
libgloss/or1k/syscalls.c
libgloss/or1k/timer.c
libgloss/or1k/util.c
newlib/libc/include/sys/_intsup.h
newlib/libc/machine/aarch64/memchr-stub.c
newlib/libc/machine/aarch64/memchr.S
newlib/libc/machine/aarch64/strchr-stub.c
newlib/libc/machine/aarch64/strchr.S
newlib/libc/machine/aarch64/strchrnul-stub.c
newlib/libc/machine/aarch64/strchrnul.S
newlib/libc/machine/aarch64/strcpy-stub.c
newlib/libc/machine/aarch64/strcpy.S
newlib/libc/machine/aarch64/strrchr-stub.c
newlib/libc/machine/aarch64/strrchr.S
newlib/libc/machine/arm/acle-compat.h
newlib/libc/machine/arm/aeabi_memcpy-armv7a.S
newlib/libc/machine/arm/aeabi_memcpy.c
newlib/libc/machine/arm/strcmp-arm-tiny.S
newlib/libc/machine/arm/strcmp-armv4.S
newlib/libc/machine/arm/strcmp-armv4t.S
newlib/libc/machine/arm/strcmp-armv6.S
newlib/libc/machine/arm/strcmp-armv6m.S
newlib/libc/machine/arm/strcmp-armv7.S
newlib/libc/machine/arm/strcmp-armv7m.S
newlib/libc/machine/mips/strcmp.S
newlib/libc/machine/or1k/Makefile.am
newlib/libc/machine/or1k/Makefile.in
newlib/libc/machine/or1k/aclocal.m4
newlib/libc/machine/or1k/configure
newlib/libc/machine/or1k/configure.in
newlib/libc/machine/or1k/setjmp.S
newlib/libc/search/bsd_qsort_r.c
newlib/libc/search/qsort_r.c
newlib/libc/stdio/clearerr_u.c
newlib/libc/stdio/feof_u.c
newlib/libc/stdio/ferror_u.c
newlib/libc/stdio/fflush_u.c
newlib/libc/stdio/fgetc_u.c
newlib/libc/stdio/fgets_u.c
newlib/libc/stdio/fgetwc_u.c
newlib/libc/stdio/fgetws_u.c
newlib/libc/stdio/fileno_u.c
newlib/libc/stdio/fputc_u.c
newlib/libc/stdio/fputs_u.c
newlib/libc/stdio/fputwc_u.c
newlib/libc/stdio/fputws_u.c
newlib/libc/stdio/fread_u.c
newlib/libc/stdio/fsetlocking.c
newlib/libc/stdio/fwrite_u.c
newlib/libc/stdio/getwc_u.c
newlib/libc/stdio/getwchar_u.c
newlib/libc/stdio/nano-vfprintf.c
newlib/libc/stdio/nano-vfprintf_float.c
newlib/libc/stdio/nano-vfprintf_i.c
newlib/libc/stdio/nano-vfprintf_local.h
newlib/libc/stdio/nano-vfscanf.c
newlib/libc/stdio/nano-vfscanf_float.c
newlib/libc/stdio/nano-vfscanf_i.c
newlib/libc/stdio/nano-vfscanf_local.h
newlib/libc/stdio/putwc_u.c
newlib/libc/stdio/putwchar_u.c
newlib/libc/stdio/stdio_ext.c
newlib/libc/stdlib/itoa.c
newlib/libc/stdlib/utoa.c
newlib/libc/sys/tirtos/Makefile.am
newlib/libc/sys/tirtos/Makefile.in
newlib/libc/sys/tirtos/aclocal.m4
newlib/libc/sys/tirtos/configure
newlib/libc/sys/tirtos/configure.in
newlib/libc/sys/tirtos/include/sys/lock.h
newlib/libc/sys/tirtos/lock.c
newlib/libc/time/month_lengths.c
newlib/libc/time/tzcalc_limits.c
newlib/libm/common/log2l.c
newlib/libm/common/logbl.c
newlib/libm/common/nexttoward.c
newlib/libm/common/nexttowardf.c
newlib/libm/common/nexttowardl.c
newlib/libm/machine/nds32/Makefile.am
newlib/libm/machine/nds32/Makefile.in
newlib/libm/machine/nds32/aclocal.m4
newlib/libm/machine/nds32/configure
newlib/libm/machine/nds32/configure.in
newlib/libm/machine/nds32/w_sqrt.S
newlib/libm/machine/nds32/wf_sqrt.S
newlib/testsuite/newlib.stdio/nulprintf.c
Diffstat (limited to 'newlib/libc/machine/aarch64/strchrnul.S')
-rw-r--r-- | newlib/libc/machine/aarch64/strchrnul.S | 149 |
1 files changed, 0 insertions, 149 deletions
diff --git a/newlib/libc/machine/aarch64/strchrnul.S b/newlib/libc/machine/aarch64/strchrnul.S deleted file mode 100644 index a0ac13b7f..000000000 --- a/newlib/libc/machine/aarch64/strchrnul.S +++ /dev/null @@ -1,149 +0,0 @@ -/* - strchrnul - find a character or nul in a string - - Copyright (c) 2014, ARM Limited - All rights Reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the company nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) -/* See strchrnul-stub.c */ -#else - -/* Assumptions: - * - * ARMv8-a, AArch64 - * Neon Available. - */ - -/* Arguments and results. */ -#define srcin x0 -#define chrin w1 - -#define result x0 - -#define src x2 -#define tmp1 x3 -#define wtmp2 w4 -#define tmp3 x5 - -#define vrepchr v0 -#define vdata1 v1 -#define vdata2 v2 -#define vhas_nul1 v3 -#define vhas_nul2 v4 -#define vhas_chr1 v5 -#define vhas_chr2 v6 -#define vrepmask v7 -#define vend1 v16 - -/* Core algorithm. - - For each 32-byte hunk we calculate a 64-bit syndrome value, with - two bits per byte (LSB is always in bits 0 and 1, for both big - and little-endian systems). For each tuple, bit 0 is set iff - the relevant byte matched the requested character or nul. Since the - bits in the syndrome reflect exactly the order in which things occur - in the original string a count_trailing_zeros() operation will - identify exactly which byte is causing the termination. */ - -/* Locals and temporaries. */ - - .macro def_fn f p2align=0 - .text - .p2align \p2align - .global \f - .type \f, %function -\f: - .endm - -def_fn strchrnul - /* Magic constant 0x40100401 to allow us to identify which lane - matches the termination condition. */ - mov wtmp2, #0x0401 - movk wtmp2, #0x4010, lsl #16 - dup vrepchr.16b, chrin - bic src, srcin, #31 /* Work with aligned 32-byte hunks. */ - dup vrepmask.4s, wtmp2 - ands tmp1, srcin, #31 - b.eq .Lloop - - /* Input string is not 32-byte aligned. Rather than forcing - the padding bytes to a safe value, we calculate the syndrome - for all the bytes, but then mask off those bits of the - syndrome that are related to the padding. */ - ld1 {vdata1.16b, vdata2.16b}, [src], #32 - neg tmp1, tmp1 - cmeq vhas_nul1.16b, vdata1.16b, #0 - cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b - cmeq vhas_nul2.16b, vdata2.16b, #0 - cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b - orr vhas_chr1.16b, vhas_chr1.16b, vhas_nul1.16b - orr vhas_chr2.16b, vhas_chr2.16b, vhas_nul2.16b - and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b - and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b - lsl tmp1, tmp1, #1 - addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 - mov tmp3, #~0 - addp vend1.16b, vend1.16b, vend1.16b // 128->64 - lsr tmp1, tmp3, tmp1 - - mov tmp3, vend1.2d[0] - bic tmp1, tmp3, tmp1 // Mask padding bits. - cbnz tmp1, .Ltail - -.Lloop: - ld1 {vdata1.16b, vdata2.16b}, [src], #32 - cmeq vhas_nul1.16b, vdata1.16b, #0 - cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b - cmeq vhas_nul2.16b, vdata2.16b, #0 - cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b - /* Use a fast check for the termination condition. */ - orr vhas_chr1.16b, vhas_nul1.16b, vhas_chr1.16b - orr vhas_chr2.16b, vhas_nul2.16b, vhas_chr2.16b - orr vend1.16b, vhas_chr1.16b, vhas_chr2.16b - addp vend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] - cbz tmp1, .Lloop - - /* Termination condition found. Now need to establish exactly why - we terminated. */ - and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b - and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b - addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 - addp vend1.16b, vend1.16b, vend1.16b // 128->64 - - mov tmp1, vend1.2d[0] -.Ltail: - /* Count the trailing zeros, by bit reversing... */ - rbit tmp1, tmp1 - /* Re-bias source. */ - sub src, src, #32 - clz tmp1, tmp1 /* ... and counting the leading zeros. */ - /* tmp1 is twice the offset into the fragment. */ - add result, src, tmp1, lsr #1 - ret - - .size strchrnul, . - strchrnul -#endif |