From fccf38c51746e0817c2409bb361398f9465e0760 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 3 Oct 2023 09:22:45 -0300 Subject: string: Add internal memswap implementation The prototype is: void __memswap (void *restrict p1, void *restrict p2, size_t n) The function swaps the content of two memory blocks P1 and P2 of len N. Memory overlap is NOT handled. It will be used on qsort optimization. Checked on x86_64-linux-gnu and aarch64-linux-gnu. Reviewed-by: Noah Goldstein --- string/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'string/Makefile') diff --git a/string/Makefile b/string/Makefile index 040a38dbf6..850bfbab56 100644 --- a/string/Makefile +++ b/string/Makefile @@ -211,6 +211,18 @@ tests := \ tst-xbzero-opt \ # tests +tests-static-internal := \ + test-memswap \ +# tests-static-internal + +tests-internal := \ + $(tests-static-internal) \ + # tests-internal + +tests-static := \ + $(tests-static-internal) \ + # tests-static + # Both tests require the .mo translation files generated by msgfmt. tests-translation := \ tst-strerror \ -- cgit v1.2.3