xref: /freebsd/contrib/arm-optimized-routines/string/include/stringlib.h (revision ec0ea6efa1ad229d75c394c1a9b9cac33af2b1d3)
1 /*
2  * Public API.
3  *
4  * Copyright (c) 2019-2021, Arm Limited.
5  * SPDX-License-Identifier: MIT
6  */
7 
8 #include <stddef.h>
9 
10 /* restrict is not needed, but kept for documenting the interface contract.  */
11 #ifndef __restrict
12 # define __restrict
13 #endif
14 
15 #if __aarch64__
16 void *__memcpy_aarch64 (void *__restrict, const void *__restrict, size_t);
17 void *__memmove_aarch64 (void *, const void *, size_t);
18 void *__memset_aarch64 (void *, int, size_t);
19 void *__memchr_aarch64 (const void *, int, size_t);
20 void *__memrchr_aarch64 (const void *, int, size_t);
21 int __memcmp_aarch64 (const void *, const void *, size_t);
22 char *__strcpy_aarch64 (char *__restrict, const char *__restrict);
23 char *__stpcpy_aarch64 (char *__restrict, const char *__restrict);
24 int __strcmp_aarch64 (const char *, const char *);
25 char *__strchr_aarch64 (const char *, int);
26 char *__strrchr_aarch64 (const char *, int);
27 char *__strchrnul_aarch64 (const char *, int );
28 size_t __strlen_aarch64 (const char *);
29 size_t __strnlen_aarch64 (const char *, size_t);
30 int __strncmp_aarch64 (const char *, const char *, size_t);
31 void * __memchr_aarch64_mte (const void *, int, size_t);
32 char *__strcpy_aarch64_mte (char *__restrict, const char *__restrict);
33 char *__stpcpy_aarch64_mte (char *__restrict, const char *__restrict);
34 char *__strchr_aarch64_mte (const char *, int);
35 char * __strchrnul_aarch64_mte (const char *, int );
36 size_t __strlen_aarch64_mte (const char *);
37 char *__strrchr_aarch64_mte (const char *, int);
38 int __strcmp_aarch64_mte (const char *, const char *);
39 int __strncmp_aarch64_mte (const char *, const char *, size_t);
40 #if __ARM_NEON
41 void *__memcpy_aarch64_simd (void *__restrict, const void *__restrict, size_t);
42 void *__memmove_aarch64_simd (void *, const void *, size_t);
43 #endif
44 # if __ARM_FEATURE_SVE
45 void *__memchr_aarch64_sve (const void *, int, size_t);
46 int __memcmp_aarch64_sve (const void *, const void *, size_t);
47 char *__strchr_aarch64_sve (const char *, int);
48 char *__strrchr_aarch64_sve (const char *, int);
49 char *__strchrnul_aarch64_sve (const char *, int );
50 int __strcmp_aarch64_sve (const char *, const char *);
51 char *__strcpy_aarch64_sve (char *__restrict, const char *__restrict);
52 char *__stpcpy_aarch64_sve (char *__restrict, const char *__restrict);
53 size_t __strlen_aarch64_sve (const char *);
54 size_t __strnlen_aarch64_sve (const char *, size_t);
55 int __strncmp_aarch64_sve (const char *, const char *, size_t);
56 # endif
57 # if __ARM_FEATURE_MEMORY_TAGGING
58 void *__mtag_tag_region (void *, size_t);
59 void *__mtag_tag_zero_region (void *, size_t);
60 # endif
61 #elif __arm__
62 void *__memcpy_arm (void *__restrict, const void *__restrict, size_t);
63 void *__memset_arm (void *, int, size_t);
64 void *__memchr_arm (const void *, int, size_t);
65 char *__strcpy_arm (char *__restrict, const char *__restrict);
66 int __strcmp_arm (const char *, const char *);
67 int __strcmp_armv6m (const char *, const char *);
68 size_t __strlen_armv6t2 (const char *);
69 #endif
70