https://git.reactos.org/?p=reactos.git;a=commitdiff;h=61175644d0b155eaff332a811427836f3599abcd

commit 61175644d0b155eaff332a811427836f3599abcd
Author:     Timo Kreuzer <timo.kreu...@reactos.org>
AuthorDate: Tue Oct 22 14:29:41 2024 +0300
Commit:     Timo Kreuzer <timo.kreu...@reactos.org>
CommitDate: Wed Jan 22 18:56:08 2025 +0200

    [UCRT] Add architecturally optimized code to build
---
 sdk/lib/ucrt/string/string.cmake | 66 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/sdk/lib/ucrt/string/string.cmake b/sdk/lib/ucrt/string/string.cmake
index 2935b353269..afd2ec57db6 100644
--- a/sdk/lib/ucrt/string/string.cmake
+++ b/sdk/lib/ucrt/string/string.cmake
@@ -56,3 +56,69 @@ list(APPEND UCRT_STRING_SOURCES
     string/wmemcpy_s.cpp
     string/wmemmove_s.cpp
 )
+
+if(${ARCH} STREQUAL "i386")
+    list(APPEND UCRT_STRING_ASM_SOURCES
+        string/i386/_memicmp.s
+        string/i386/_strnicm.s
+        string/i386/memccpy.s
+        string/i386/strcat.s
+        string/i386/strcmp.s
+        string/i386/strcspn.s
+        string/i386/strlen.s
+        string/i386/strncat.s
+        string/i386/strncmp.s
+        string/i386/strncpy.s
+        string/i386/strnset.s
+        string/i386/strpbrk.s
+        string/i386/strrev.s
+        string/i386/strset.s
+        string/i386/strspn.s
+    )
+elseif(${ARCH} STREQUAL "amd64")
+    list(APPEND UCRT_STRING_ASM_SOURCES
+        string/amd64/strcat.s
+        string/amd64/strcmp.s
+        string/amd64/strlen.s
+        string/amd64/strncat.s
+        string/amd64/strncmp.s
+        string/amd64/strncpy.s
+    )
+    list(APPEND UCRT_STRING_SOURCES
+        string/amd64/strcspn.c
+        string/amd64/strpbrk.c
+        string/amd64/strspn.c
+        string/memccpy.c
+        string/strnset.c
+        string/strrev.c
+        string/strset.c
+    )
+else()
+    if(${ARCH} STREQUAL "arm64")
+        list(APPEND UCRT_STRING_ASM_SOURCES
+            string/arm64/strlen.s
+            string/arm64/wcslen.s
+    )
+    else()
+        list(APPEND UCRT_STRING_SOURCES
+            string/arm/strlen.c
+        )
+    endif()
+    list(APPEND UCRT_STRING_SOURCES
+        string/memccpy.c
+        string/strcat.c
+        string/strcmp.c
+        string/strcspn.c
+        string/strncat.c
+        string/strncmp.c
+        string/strncpy.c
+        string/strnset.c
+        string/strpbrk.c
+        string/strrev.c
+        string/strset.c
+        string/strspn.c
+    )
+endif()
+
+add_asm_files(UCRT_STRING_ASM ${UCRT_STRING_ASM_SOURCES})
+list(APPEND UCRT_STRING_SOURCES ${UCRT_STRING_ASM})

Reply via email to