Shanks0224 commented on code in PR #22184:
URL: https://github.com/apache/nuttx/pull/22184#discussion_r4676161792


##########
libs/libc/machine/arm64/Kconfig:
##########
@@ -28,27 +28,28 @@ config ARM64_STRING_FUNCTION
        bool "Enable optimized ARM64 specific string function"
        default n
        depends on ARCH_TOOLCHAIN_GNU
-       select ARM64_MEMCHR
+       select ARM64_MEMCHR if ARCH_FPU
        select ARM64_MEMCMP
-       select ARM64_MEMCPY
-       select ARM64_MEMSET
+       select ARM64_MEMCPY if ARCH_FPU
+       select ARM64_MEMSET if ARCH_FPU
        select ARM64_MEMMOVE

Review Comment:
   Fixed as suggested: `select ARM64_MEMMOVE if ARCH_FPU`, and ARM64_MEMMOVE 
depends on ARM64_MEMCPY. A memmove() overlap test (39744 cases) passes with 
ARCH_FPU on and off.



##########
libs/libc/machine/arm64/arch_memcpy.S:
##########
@@ -102,137 +102,127 @@
 \f:
        .endm
 
-/* Copies are split into 3 main cases: small copies of up to 16 bytes,
-   medium copies of 17..96 bytes which are fully unrolled. Large copies
-   of more than 96 bytes align the destination and use an unrolled loop
-   processing 64 bytes per iteration.
-   Small and medium copies read all data before writing, allowing any
-   kind of overlap, and memmove tailcalls memcpy for these cases as
-   well as non-overlapping copies.
-*/
+/* Advanced SIMD memcpy.  memcpy assumes the source and destination regions

Review Comment:
   Fixed: the comment now says that memmove relies on this routine for 
overlapping moves, that copies up to 128 bytes load all data before they store, 
and that the forward loop is safe for dst < src.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to