diff options
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap_neon-use-register-r12-instead-of-r7.patch')
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap_neon-use-register-r12-instead-of-r7.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap_neon-use-register-r12-instead-of-r7.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap_neon-use-register-r12-instead-of-r7.patch new file mode 100644 index 0000000000..aaa162f9b0 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap_neon-use-register-r12-instead-of-r7.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 4a1668f341f0228904105f77fe5871b9d59b2663 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tanu Kaskinen <tanuk@iki.fi> | ||
3 | Date: Mon, 13 Jul 2020 12:42:14 +0300 | ||
4 | Subject: [PATCH] remap_neon: use register r12 instead of r7 | ||
5 | |||
6 | When the Thumb instructions set is used and frame pointers are enabled | ||
7 | (-fno-omit-frame-pointer), r7 can't be used, because it's used for the | ||
8 | frame pointer. Trying to use r7 caused the compilation to fail. | ||
9 | |||
10 | Thanks to Andre McCurdy for suggesting[1] this fix, all I had to do was to | ||
11 | test that it works. The code builds now, and cpu-remap-test also | ||
12 | succeeds. | ||
13 | |||
14 | [1] https://lists.openembedded.org/g/openembedded-core/message/136786 | ||
15 | |||
16 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/324] | ||
17 | |||
18 | Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> | ||
19 | --- | ||
20 | src/pulsecore/remap_neon.c | 10 +++++++--- | ||
21 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/src/pulsecore/remap_neon.c b/src/pulsecore/remap_neon.c | ||
24 | index ca3b95b48..6f71345f8 100644 | ||
25 | --- a/src/pulsecore/remap_neon.c | ||
26 | +++ b/src/pulsecore/remap_neon.c | ||
27 | @@ -52,11 +52,15 @@ static void remap_mono_to_stereo_float32ne_generic_arm(pa_remap_t *m, float *dst | ||
28 | __asm__ __volatile__ ( | ||
29 | "ldm %[src]!, {r4,r6} \n\t" | ||
30 | "mov r5, r4 \n\t" | ||
31 | - "mov r7, r6 \n\t" | ||
32 | - "stm %[dst]!, {r4-r7} \n\t" | ||
33 | + | ||
34 | + /* We use r12 instead of r7 here, because r7 is reserved for the | ||
35 | + * frame pointer when using Thumb. */ | ||
36 | + "mov r12, r6 \n\t" | ||
37 | + | ||
38 | + "stm %[dst]!, {r4-r6,r12} \n\t" | ||
39 | : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ | ||
40 | : /* input operands */ | ||
41 | - : "memory", "r4", "r5", "r6", "r7" /* clobber list */ | ||
42 | + : "memory", "r4", "r5", "r6", "r12" /* clobber list */ | ||
43 | ); | ||
44 | } | ||
45 | |||
46 | -- | ||
47 | 2.20.1 | ||
48 | |||