remap_neon: use register r12 instead of r7

When the Thumb instructions set is used and frame pointers are enabled
(-fno-omit-frame-pointer), r7 can't be used, because it's used for the
frame pointer. Trying to use r7 caused the compilation to fail.

Thanks to Andre McCurdy for suggesting[1] this fix, all I had to do was to
test that it works. The code builds now, and cpu-remap-test also
succeeds.

[1] https://lists.openembedded.org/g/openembedded-core/message/136786
This commit is contained in:
Tanu Kaskinen 2020-07-13 12:42:14 +03:00 committed by Arun Raghavan
parent b5a6365f18
commit 5c0ad422a8

View file

@ -52,11 +52,15 @@ static void remap_mono_to_stereo_float32ne_generic_arm(pa_remap_t *m, float *dst
__asm__ __volatile__ (
"ldm %[src]!, {r4,r6} \n\t"
"mov r5, r4 \n\t"
"mov r7, r6 \n\t"
"stm %[dst]!, {r4-r7} \n\t"
/* We use r12 instead of r7 here, because r7 is reserved for the
* frame pointer when using Thumb. */
"mov r12, r6 \n\t"
"stm %[dst]!, {r4-r6,r12} \n\t"
: [dst] "+r" (dst), [src] "+r" (src) /* output operands */
: /* input operands */
: "memory", "r4", "r5", "r6", "r7" /* clobber list */
: "memory", "r4", "r5", "r6", "r12" /* clobber list */
);
}