xref: /freebsd/contrib/arm-optimized-routines/string/include/stringlib.h (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
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 *__strchr_aarch64_mte (const char *, int);
33 char * __strchrnul_aarch64_mte (const char *, int );
34 size_t __strlen_aarch64_mte (const char *);
35 char *__strrchr_aarch64_mte (const char *, int);
36 #if __ARM_NEON
37 void *__memcpy_aarch64_simd (void *__restrict, const void *__restrict, size_t);
38 void *__memmove_aarch64_simd (void *, const void *, size_t);
39 #endif
40 # if __ARM_FEATURE_SVE
41 void *__memcpy_aarch64_sve (void *__restrict, const void *__restrict, size_t);
42 void *__memmove_aarch64_sve (void *__restrict, const void *__restrict, size_t);
43 void *__memchr_aarch64_sve (const void *, int, size_t);
44 int __memcmp_aarch64_sve (const void *, const void *, size_t);
45 char *__strchr_aarch64_sve (const char *, int);
46 char *__strrchr_aarch64_sve (const char *, int);
47 char *__strchrnul_aarch64_sve (const char *, int );
48 int __strcmp_aarch64_sve (const char *, const char *);
49 char *__strcpy_aarch64_sve (char *__restrict, const char *__restrict);
50 char *__stpcpy_aarch64_sve (char *__restrict, const char *__restrict);
51 size_t __strlen_aarch64_sve (const char *);
52 size_t __strnlen_aarch64_sve (const char *, size_t);
53 int __strncmp_aarch64_sve (const char *, const char *, size_t);
54 # endif
55 # if __ARM_FEATURE_MEMORY_TAGGING
56 void *__mtag_tag_region (void *, size_t);
57 void *__mtag_tag_zero_region (void *, size_t);
58 # endif
59 #elif __arm__
60 void *__memcpy_arm (void *__restrict, const void *__restrict, size_t);
61 void *__memset_arm (void *, int, size_t);
62 void *__memchr_arm (const void *, int, size_t);
63 char *__strcpy_arm (char *__restrict, const char *__restrict);
64 int __strcmp_arm (const char *, const char *);
65 int __strcmp_armv6m (const char *, const char *);
66 size_t __strlen_armv6t2 (const char *);
67 #endif
68