asm: ARMv7-M: replace unity-gain write_samples() asm with memcpy

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Wed, 15 Jul 2026 22:56:06 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit f20086c91aa2c9e2f20b4f7e34c96b34347fcaa1
Author: Aidan MacDonald <[email protected]>
Date:   Sat Jun 6 16:11:27 2026 +0100

    asm: ARMv7-M: replace unity-gain write_samples() asm with memcpy
    
    Change-Id: I164894d944136474b1b6ba1ce106f163a5db9642

diff --git a/firmware/asm/arm/pcm-mixer-armv6.c b/firmware/asm/arm/pcm-mixer-armv6.c
index 613a9ed25a..450a285689 100644
--- a/firmware/asm/arm/pcm-mixer-armv6.c
+++ b/firmware/asm/arm/pcm-mixer-armv6.c
@@ -76,25 +76,7 @@ static FORCE_INLINE void write_samples(void *out,
     {
         /* Channel is unity amplitude */
 #if defined(CPU_ARM_MICRO) && ARCH_VERSION >= 7
-        asm volatile (
-            "ands       r4, %2, #0x1f   \n"
-            "beq        2f              \n"
-        "1:                             \n"
-            "ldr        r3, [%1], #4    \n"
-            "subs       r4, r4, #4      \n"
-            "str        r3, [%0], #4    \n"
-            "bne        1b              \n"
-            "bics       %2, %2, #0x1f   \n"
-            "beq        3f              \n"
-        "2:                             \n"
-            "ldmia      %1!, { r3-r10 } \n"
-            "subs       %2, %2, #32     \n"
-            "stmia      %0!, { r3-r10 } \n"
-            "bhi        2b              \n"
-        "3:                             \n"
-            : "+lr"(out), "+lr"(src), "+r"(size)
-            :
-            : "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10");
+        memcpy(out, src, size);
 #else
         asm volatile (
             "ands       r1, %2, #0x1f  \n"
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs