| [libc] add an SVE implementation of strlen (#167259) This PR creates an SVE-based implementation for strlen by translating from the AOR code in tree. Microbenchmark shows improvements against NEON when N>=64. Although both implementations fall behind glibc by a large margin, this may be a good start point to explore SVE implementations. Together with the PR: 1. Added two more tests of strlen with special nul symbols. 2. Added strlen's fuzzer and fix a typo in previous heap fuzzer. === strlen(16 bytes) === libc: 1.56115 ns/call, 9.54499 GiB/s neon: 1.59393 ns/call, 9.34867 GiB/s sve: 1.66097 ns/call, 8.97134 GiB/s === strlen(64 bytes) === libc: 2.06967 ns/call, 28.7991 GiB/s neon: 2.59914 ns/call, 22.9325 GiB/s sve: 2.58628 ns/call, 23.0465 GiB/s === strlen(256 bytes) === libc: 3.74165 ns/call, 63.7202 GiB/s neon: 8.98243 ns/call, 26.5428 GiB/s sve: 7.36426 ns/call, 32.3751 GiB/s === strlen(1024 bytes) === libc: 10.5327 ns/call, 90.5438 GiB/s neon: 34.363 ns/call, 27.7529 GiB/s sve: 26.9329 ns/call, 35.4092 GiB/s === strlen(4096 bytes) === libc: 37.7304 ns/call, 101.104 GiB/s neon: 145.911 ns/call, 26.144 GiB/s sve: 103.208 ns/call, 36.9612 GiB/s === strlen(1048576 bytes) === libc: 9623.4 ns/call, 101.478 GiB/s neon: 36138.2 ns/call, 27.023 GiB/s sve: 26605.6 ns/call, 36.7051 GiB/s | 8 个月前 |
| Move LIBC_CONF_STRING_UNSAFE_WIDE_READ to top-level libc-configuration (#165046) This options sets a compile option when building sources inside the string directory, and this option affects string_utils.h. But string_utils.h is #included from more places than just the string directory (such as from __support/CPP/string.h), leading to both narrow-reads in those cases, but more seriously, ODR violations when the two different string_length implementations are included int he same program. Having this option at the top level avoids this problem. | 9 个月前 |
| [libc] Implemented wcsdup libc function (#150453) Implemented wcsdup by templating internal strdup function | 1 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Change __builtin_memcpy to inline_memcpy. (#158345) | 10 个月前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate ctype_utils to use char instead of int where applicable. (#166225) Functions like isalpha / tolower can operate on chars internally. This allows us to get rid of unnecessary casts and open a way to creating wchar_t overloads with the same names (e.g. for isalpha), that would simplify templated code for conversion functions (see 315dfe5865962d8a3d60e21d1fffce5214fe54ef). Add the int->char converstion to public entrypoints implementation instead. We also need to introduce bounds check on the input argument values - these functions' behavior is unspecified if the argument is neither EOF nor fits in "unsigned char" range, but the tests we've had verified that they always return false for small negative values. To preserve this behavior, cover it explicitly. | 8 个月前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Independent strcat/strncat/stpcpy (#142643) The previous implementations called other entrypoints. This patch fixes strcat, strncat, and stpcpy to be properly independent. | 1 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Add support for 'string.h' locale variants (#105719) Summary: This adds the locale variants of the string functions. As previously, these do not use the locale information at all and simply copy the non-locale version which expects the "C" locale. | 1 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| | 1 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Fix stale char_ptr for find_first_character_wide read (#166594) On exit from the loop, char_ptr had not been updated to match block_ptr, resulting in erroneous results. Moving all updates out of the loop fixes that. Adjust derefences to always be inside bounds checks. | 8 个月前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Independent strcat/strncat/stpcpy (#142643) The previous implementations called other entrypoints. This patch fixes strcat, strncat, and stpcpy to be properly independent. | 1 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Remove the <string.h> header in libc/src and libc/test (#113076) | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] clean up string_utils memory functions (#143031) The string_utils.h file previously included both memcpy and bzero. There were no uses of bzero, and only one use of memcpy which was replaced with __builtin_memcpy. Also fix strsep which was broken by this change, fix a useless assert of "sizeof(char) == sizeof(cpp::byte)", and update the bazel. | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Expand usage of libc null checks. (#116262) Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com> | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Add support for 'string.h' locale variants (#105719) Summary: This adds the locale variants of the string functions. As previously, these do not use the locale information at all and simply copy the non-locale version which expects the "C" locale. | 1 年前 |
| [libc] Add support for 'string.h' locale variants (#105719) Summary: This adds the locale variants of the string functions. As previously, these do not use the locale information at all and simply copy the non-locale version which expects the "C" locale. | 1 年前 |