xref: /freebsd/contrib/arm-optimized-routines/string/include/stringlib.h (revision dd21556857e8d40f66bf5ad54754d9d52669ebf7)
1 /*
2  * Public API.
3  *
4  * Copyright (c) 2019-2023, Arm Limited.
5  * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
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 void *__memcpy_aarch64_simd (void *__restrict, const void *__restrict, size_t);
37 void *__memmove_aarch64_simd (void *, const void *, size_t);
38 # if __ARM_FEATURE_SVE
39 void *__memcpy_aarch64_sve (void *__restrict, const void *__restrict, size_t);
40 void *__memmove_aarch64_sve (void *__restrict, const void *__restrict, size_t);
41 void *__memset_aarch64_sve (void *, int, size_t);
42 void *__memchr_aarch64_sve (const void *, int, size_t);
43 int __memcmp_aarch64_sve (const void *, const void *, size_t);
44 char *__strchr_aarch64_sve (const char *, int);
45 char *__strrchr_aarch64_sve (const char *, int);
46 char *__strchrnul_aarch64_sve (const char *, int );
47 int __strcmp_aarch64_sve (const char *, const char *);
48 char *__strcpy_aarch64_sve (char *__restrict, const char *__restrict);
49 char *__stpcpy_aarch64_sve (char *__restrict, const char *__restrict);
50 size_t __strlen_aarch64_sve (const char *);
51 size_t __strnlen_aarch64_sve (const char *, size_t);
52 int __strncmp_aarch64_sve (const char *, const char *, size_t);
53 # endif
54 # if WANT_MOPS
55 void *__memcpy_aarch64_mops (void *__restrict, const void *__restrict, size_t);
56 void *__memmove_aarch64_mops (void *__restrict, const void *__restrict, size_t);
57 void *__memset_aarch64_mops (void *, int, size_t);
58 # endif
59 # if __ARM_FEATURE_MEMORY_TAGGING
60 void *__mtag_tag_region (void *, size_t);
61 void *__mtag_tag_zero_region (void *, size_t);
62 # endif
63 #elif __arm__
64 void *__memcpy_arm (void *__restrict, const void *__restrict, size_t);
65 void *__memset_arm (void *, int, size_t);
66 void *__memchr_arm (const void *, int, size_t);
67 char *__strcpy_arm (char *__restrict, const char *__restrict);
68 int __strcmp_arm (const char *, const char *);
69 int __strcmp_armv6m (const char *, const char *);
70 size_t __strlen_armv6t2 (const char *);
71 #endif
72