summaryrefslogtreecommitdiff
path: root/libc/test/src/string/memmove_test.cpp
AgeCommit message (Collapse)Author
2025-06-04[libc] Expand usage of libc null checks. (#116262)Aly ElAshram
Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com>
2025-03-10[libc] Add `-Wno-sign-conversion` & re-attempt `-Wconversion` (#129811)Vinay Deshmukh
Relates to https://github.com/llvm/llvm-project/issues/119281#issuecomment-2699470459
2025-03-05Revert "[libc] Enable -Wconversion for tests. (#127523)"Augie Fackler
This reverts commit 1e6e845d49a336e9da7ca6c576ec45c0b419b5f6 because it changed the 1st parameter of adjust() to be unsigned, but libc itself calls adjust() with a negative argument in align_backward() in op_generic.h.
2025-03-04[libc] Enable -Wconversion for tests. (#127523)Vinay Deshmukh
Relates to: #119281
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-06-14[libc] Enable custom logging in LibcTestGuillaume Chatelet
This patch mimics the behavior of Google Test and allow users to log custom messages after all flavors of ASSERT_ / EXPECT_. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D152630
2023-06-14Revert D152630 "[libc] Enable custom logging in LibcTest"Guillaume Chatelet
Failing buildbot https://lab.llvm.org/buildbot/#/builders/73/builds/49707 This reverts commit 9a7b4c934893d6bc571e1ce8efab2127ae5f4e45.
2023-06-14[libc] Enable custom logging in LibcTestGuillaume Chatelet
This patch mimics the behavior of Google Test and allow users to log custom messages after all flavors of ASSERT_ / EXPECT_. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D152630
2023-05-25[libc][test] Drastically reduce mem test runtimeGuillaume Chatelet
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D151450
2023-03-20[libc] Make string tests compatible with the Fuchsia buildRoland McGrath
Some test code was doing loose conversions caught by compiler warnings in the Fuchsia build. This included duplicated code in a few tests that was reconsolidated with the existing header file copy of the same functions. The MemoryMatcher abstraction presumes gtest-style matcher support, which is not available in Fuchsia's zxtest library. It's avoided in favor of simpler memory-comparing assertions. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D146343
2023-02-07[libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory.Siva Chandra Reddy
This part of the effort to make all test related pieces into the `test` directory. This helps is excluding test related pieces in a straight forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move the MPFR wrapper and testutils into the 'test' directory.
2022-11-02[libc] Improve testing of mem functionsGuillaume Chatelet
This patch extracts the testing logic from `op_tests.cpp` into `memory_check_utils.h` so we can reuse it for mem* function integration tests. This makes testing consistent and thorough. For instance this catches a bug that got unnoticed during submission of D136595 and D135134. Integration test for memcmp was only testing a single size. This also leverages ASAN to make sure that data is not read / written outside permitted boundaries Differential Revision: https://reviews.llvm.org/D136865
2022-10-18[libc][NFC] Use ASSERT instead of EXPECT in testsGuillaume Chatelet
2022-10-14Revert "[libc] New version of the mem* framework"Sterling Augustine
This reverts commit https://reviews.llvm.org/D135134 (b3f1d58a131eb546aaf1ac165c77ccb89c40d758) That revision appears to have broken Arm memcpy in some subtle ways. Am communicating with the original author to get a good reproduction.
2022-10-14[libc] New version of the mem* frameworkGuillaume Chatelet
This version is more composable and also simpler at the expense of being more explicit and more verbose. It also provides minimal implementations for ARM platforms. Codegen can be checked here https://godbolt.org/z/chf1Y6eGM Differential Revision: https://reviews.llvm.org/D135134
2022-10-14Revert "[libc] New version of the mem* framework"Guillaume Chatelet
This reverts commit 9721687835a7df5da0c9482cf684c11b8ba97f75.
2022-10-14[libc] New version of the mem* frameworkGuillaume Chatelet
This version is more composable and also simpler at the expense of being more explicit and more verbose. It also provides minimal implementations for ARM platforms. Codegen can be checked here https://godbolt.org/z/x19zvE59v Differential Revision: https://reviews.llvm.org/D135134
2022-10-14Revert "[libc] New version of the mem* framework"Guillaume Chatelet
This reverts commit 98bf836f3127a346a81da5ae3e27246935298de4.
2022-10-14[libc] New version of the mem* frameworkGuillaume Chatelet
This version is more composable and also simpler at the expense of being more explicit and more verbose. It also provides minimal implementations for ARM platforms. Codegen can be checked here https://godbolt.org/z/x19zvE59v Differential Revision: https://reviews.llvm.org/D135134
2022-10-13Revert "[libc] New version of the mem* framework"Guillaume Chatelet
This reverts commit d55f2d8ab076298cfd745c05c1b4dfd5583f8b9e.
2022-10-13[libc] New version of the mem* frameworkGuillaume Chatelet
This version is more composable and also simpler at the expense of being more explicit and more verbose. It also provides minimal implementations for ARM platforms. Codegen can be checked here https://godbolt.org/z/x19zvE59v Differential Revision: https://reviews.llvm.org/D135134
2022-10-12Revert "[libc] New version of the mem* framework"Guillaume Chatelet
This reverts commit 4c19439d249256db720e323a446e39d05496732f.
2022-10-12[libc] New version of the mem* frameworkGuillaume Chatelet
This version is more composable and also simpler at the expense of being more explicit and more verbose. This patch is not meant to be submitted but gives an idea of the change. Codegen can be checked in https://godbolt.org/z/6z1dEoWbs by removing the "static inline" before individual functions. Unittests are coming. Suggested review order: - utils - op_base - op_builtin - op_generic - op_x86 / op_aarch64 - *_implementations.h Differential Revision: https://reviews.llvm.org/D135134
2022-08-22[NFC][libc] Switch mem* tests from ArrayRef to spanGuillaume Chatelet
2022-08-01Reland [libc][NFC] Use STL case for arrayGuillaume Chatelet
This is a reland of https://reviews.llvm.org/D130773
2022-08-01Revert "[libc][NFC] Use STL case for array"Guillaume Chatelet
This reverts commit 7add0e5fdc5c7cb6f59f60cd436bf161cf9f9eb7.
2022-08-01[libc][NFC] Use STL case for arrayGuillaume Chatelet
Migrating all private STL code to the standard STL case but keeping it under the CPP namespace to avoid confusion. Differential Revision: https://reviews.llvm.org/D130773
2022-02-08[libc] Optimized version of memmoveGuillaume Chatelet
This implementation relies on storing data in registers for sizes up to 128B. Then depending on whether `dst` is less (resp. greater) than `src` we move data forward (resp. backward) by chunks of 32B. We first make sure one of the pointers is aligned to increase performance on large move sizes. Differential Revision: https://reviews.llvm.org/D114637
2021-10-28[libc][NFC] Move utils/CPP to src/__support/CPP.Siva Chandra Reddy
The idea is to move all pieces related to the actual libc sources to the "src" directory. This allows downstream users to ship and build just the "src" directory. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D112653
2021-09-14[libc][Obvious] Some clean work with memmove.Cheng Wang
2021-09-13Revert "[libc] Some clean work with memmove."Guillaume Chatelet
This reverts commit b659b789c03ac339e28d7b91406b67bb887a426d.
2021-09-10[libc] Some clean work with memmove.Cheng Wang
- Replace `move_byte_forward()` with `memcpy`. In `memcpy` implementation, it copies bytes forward from beginning to end. Otherwise, `memmove` unit tests will break. - Make `memmove` unit tests work. Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D109316
2021-01-20[libc][NFC] add "LlvmLibc" as a prefix to all test namesMichael Jones
Summary: Having a consistent prefix makes selecting all of the llvm libc tests easier on any platform that is also using the gtest framework. This also modifies the TEST and TEST_F macros to enforce this change moving forward. Reviewers: sivachandra Subscribers:
2021-01-15[libc] Add memmove implementation.Cheng Wang
Use `memcpy` rather than copying bytes one by one, for there might be large size structs to move. Reviewed By: gchatelet, sivachandra Differential Revision: https://reviews.llvm.org/D93195