diff options
author | Nitin A Kamble <nitin.a.kamble@intel.com> | 2011-12-03 18:53:16 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-12 21:50:17 +0000 |
commit | 8ae6359650a004b7e108c33f38823395ab3761e4 (patch) | |
tree | 58f06d0fe1f039c25d4f8274e98c0e34143f1340 /meta/recipes-multimedia | |
parent | cd044f6adb25005313497c5f47f07ac7d13ac6c8 (diff) | |
download | poky-8ae6359650a004b7e108c33f38823395ab3761e4.tar.gz |
pulseaudio: fix compilation with x32 toolchain
This commit makes assembly syntax compatible with x32 toolchain
to avoid these x32 gcc errors:
| pulsecore/svolume_mmx.c: Assembler messages:
| pulsecore/svolume_mmx.c:107: Error: `(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:135: Error: `(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:161: Error: `(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:162: Error: `8(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:180: Error: `(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:210: Error: `(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:244: Error: `(%esi,%rdi,4)' is not a valid
base/index expression
| pulsecore/svolume_mmx.c:245: Error: `8(%esi,%rdi,4)' is not a valid
base/index expression
| make[3]: *** [libpulsecore_1.1_la-svolume_mmx.lo] Error 1
Orignally these assembly lines are written for x86_64 ABI, now they are
also compatible with
X32 ABI.
(From OE-Core rev: ccf01c858218ae67d609ced3a05d9a93a6ffc5d4)
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudo_fix_for_x32.patch | 238 | ||||
-rw-r--r-- | meta/recipes-multimedia/pulseaudio/pulseaudio_1.1.bb | 3 |
2 files changed, 240 insertions, 1 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudo_fix_for_x32.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudo_fix_for_x32.patch new file mode 100644 index 0000000000..39dad32e06 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/pulseaudo_fix_for_x32.patch | |||
@@ -0,0 +1,238 @@ | |||
1 | UpstreamStatus: Pending | ||
2 | |||
3 | This patch makes assembly syntax compatible to the x32 toolchain. | ||
4 | |||
5 | This fixes these kinds of compilations errors with x32 gcc. | ||
6 | | pulsecore/svolume_mmx.c: Assembler messages: | ||
7 | | pulsecore/svolume_mmx.c:107: Error: `(%esi,%rdi,4)' is not a valid base/index expression | ||
8 | | pulsecore/svolume_mmx.c:135: Error: `(%esi,%rdi,4)' is not a valid base/index expression | ||
9 | | pulsecore/svolume_mmx.c:161: Error: `(%esi,%rdi,4)' is not a valid base/index expression | ||
10 | | pulsecore/svolume_mmx.c:162: Error: `8(%esi,%rdi,4)' is not a valid base/index expression | ||
11 | | pulsecore/svolume_mmx.c:180: Error: `(%esi,%rdi,4)' is not a valid base/index expression | ||
12 | | pulsecore/svolume_mmx.c:210: Error: `(%esi,%rdi,4)' is not a valid base/index expression | ||
13 | | pulsecore/svolume_mmx.c:244: Error: `(%esi,%rdi,4)' is not a valid base/index expression | ||
14 | | pulsecore/svolume_mmx.c:245: Error: `8(%esi,%rdi,4)' is not a valid base/index expression | ||
15 | | make[3]: *** [libpulsecore_1.1_la-svolume_mmx.lo] Error 1 | ||
16 | |||
17 | Orignally these assembly lines are written for x86_64 ABI, now they are also compatible with | ||
18 | X32 ABI. | ||
19 | |||
20 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/03 | ||
21 | Index: pulseaudio-1.1/src/pulsecore/svolume_mmx.c | ||
22 | =================================================================== | ||
23 | --- pulseaudio-1.1.orig/src/pulsecore/svolume_mmx.c | ||
24 | +++ pulseaudio-1.1/src/pulsecore/svolume_mmx.c | ||
25 | @@ -107,7 +107,7 @@ static void pa_volume_s16ne_mmx(int16_t | ||
26 | " test $1, %2 \n\t" /* check for odd samples */ | ||
27 | " je 2f \n\t" | ||
28 | |||
29 | - " movd (%1, %3, 4), %%mm0 \n\t" /* | v0h | v0l | */ | ||
30 | + " movd (%q1, %3, 4), %%mm0 \n\t" /* | v0h | v0l | */ | ||
31 | " movw (%0), %w4 \n\t" /* .. | p0 | */ | ||
32 | " movd %4, %%mm1 \n\t" | ||
33 | VOLUME_32x16 (%%mm1, %%mm0) | ||
34 | @@ -122,7 +122,7 @@ static void pa_volume_s16ne_mmx(int16_t | ||
35 | " je 4f \n\t" | ||
36 | |||
37 | "3: \n\t" /* do samples in groups of 2 */ | ||
38 | - " movq (%1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
39 | + " movq (%q1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
40 | " movd (%0), %%mm1 \n\t" /* .. | p1 | p0 | */ | ||
41 | VOLUME_32x16 (%%mm1, %%mm0) | ||
42 | " movd %%mm0, (%0) \n\t" /* .. | p1*v1 | p0*v0 | */ | ||
43 | @@ -135,8 +135,8 @@ static void pa_volume_s16ne_mmx(int16_t | ||
44 | " je 6f \n\t" | ||
45 | |||
46 | "5: \n\t" /* do samples in groups of 4 */ | ||
47 | - " movq (%1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
48 | - " movq 8(%1, %3, 4), %%mm2 \n\t" /* | v3h | v3l | v2h | v2l | */ | ||
49 | + " movq (%q1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
50 | + " movq 8(%q1, %3, 4), %%mm2 \n\t" /* | v3h | v3l | v2h | v2l | */ | ||
51 | " movd (%0), %%mm1 \n\t" /* .. | p1 | p0 | */ | ||
52 | " movd 4(%0), %%mm3 \n\t" /* .. | p3 | p2 | */ | ||
53 | VOLUME_32x16 (%%mm1, %%mm0) | ||
54 | @@ -180,7 +180,7 @@ static void pa_volume_s16re_mmx(int16_t | ||
55 | " test $1, %2 \n\t" /* check for odd samples */ | ||
56 | " je 2f \n\t" | ||
57 | |||
58 | - " movd (%1, %3, 4), %%mm0 \n\t" /* | v0h | v0l | */ | ||
59 | + " movd (%q1, %3, 4), %%mm0 \n\t" /* | v0h | v0l | */ | ||
60 | " movw (%0), %w4 \n\t" /* .. | p0 | */ | ||
61 | " rorw $8, %w4 \n\t" | ||
62 | " movd %4, %%mm1 \n\t" | ||
63 | @@ -197,7 +197,7 @@ static void pa_volume_s16re_mmx(int16_t | ||
64 | " je 4f \n\t" | ||
65 | |||
66 | "3: \n\t" /* do samples in groups of 2 */ | ||
67 | - " movq (%1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
68 | + " movq (%q1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
69 | " movd (%0), %%mm1 \n\t" /* .. | p1 | p0 | */ | ||
70 | SWAP_16 (%%mm1) | ||
71 | VOLUME_32x16 (%%mm1, %%mm0) | ||
72 | @@ -212,8 +212,8 @@ static void pa_volume_s16re_mmx(int16_t | ||
73 | " je 6f \n\t" | ||
74 | |||
75 | "5: \n\t" /* do samples in groups of 4 */ | ||
76 | - " movq (%1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
77 | - " movq 8(%1, %3, 4), %%mm2 \n\t" /* | v3h | v3l | v2h | v2l | */ | ||
78 | + " movq (%q1, %3, 4), %%mm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
79 | + " movq 8(%q1, %3, 4), %%mm2 \n\t" /* | v3h | v3l | v2h | v2l | */ | ||
80 | " movd (%0), %%mm1 \n\t" /* .. | p1 | p0 | */ | ||
81 | " movd 4(%0), %%mm3 \n\t" /* .. | p3 | p2 | */ | ||
82 | SWAP_16_2 (%%mm1, %%mm3) | ||
83 | Index: pulseaudio-1.1/src/pulsecore/svolume_sse.c | ||
84 | =================================================================== | ||
85 | --- pulseaudio-1.1.orig/src/pulsecore/svolume_sse.c | ||
86 | +++ pulseaudio-1.1/src/pulsecore/svolume_sse.c | ||
87 | @@ -92,7 +92,7 @@ static void pa_volume_s16ne_sse2(int16_t | ||
88 | " test $1, %2 \n\t" /* check for odd samples */ | ||
89 | " je 2f \n\t" | ||
90 | |||
91 | - " movd (%1, %3, 4), %%xmm0 \n\t" /* | v0h | v0l | */ | ||
92 | + " movd (%q1, %3, 4), %%xmm0 \n\t" /* | v0h | v0l | */ | ||
93 | " movw (%0), %w4 \n\t" /* .. | p0 | */ | ||
94 | " movd %4, %%xmm1 \n\t" | ||
95 | VOLUME_32x16 (%%xmm1, %%xmm0) | ||
96 | @@ -107,7 +107,7 @@ static void pa_volume_s16ne_sse2(int16_t | ||
97 | " je 4f \n\t" | ||
98 | |||
99 | "3: \n\t" /* do samples in groups of 2 */ | ||
100 | - " movq (%1, %3, 4), %%xmm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
101 | + " movq (%q1, %3, 4), %%xmm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
102 | " movd (%0), %%xmm1 \n\t" /* .. | p1 | p0 | */ | ||
103 | VOLUME_32x16 (%%xmm1, %%xmm0) | ||
104 | " movd %%xmm0, (%0) \n\t" /* .. | p1*v1 | p0*v0 | */ | ||
105 | @@ -123,7 +123,7 @@ static void pa_volume_s16ne_sse2(int16_t | ||
106 | * that the array is 16 bytes aligned, we probably have to do the odd values | ||
107 | * after this then. */ | ||
108 | "5: \n\t" /* do samples in groups of 4 */ | ||
109 | - " movdqu (%1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
110 | + " movdqu (%q1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
111 | " movq (%0), %%xmm1 \n\t" /* .. | p3 .. p0 | */ | ||
112 | VOLUME_32x16 (%%xmm1, %%xmm0) | ||
113 | " movq %%xmm0, (%0) \n\t" /* .. | p3*v3 .. p0*v0 | */ | ||
114 | @@ -136,8 +136,8 @@ static void pa_volume_s16ne_sse2(int16_t | ||
115 | " je 8f \n\t" | ||
116 | |||
117 | "7: \n\t" /* do samples in groups of 8 */ | ||
118 | - " movdqu (%1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
119 | - " movdqu 16(%1, %3, 4), %%xmm2 \n\t" /* | v7h | v7l .. v4h | v4l | */ | ||
120 | + " movdqu (%q1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
121 | + " movdqu 16(%q1, %3, 4), %%xmm2 \n\t" /* | v7h | v7l .. v4h | v4l | */ | ||
122 | " movq (%0), %%xmm1 \n\t" /* .. | p3 .. p0 | */ | ||
123 | " movq 8(%0), %%xmm3 \n\t" /* .. | p7 .. p4 | */ | ||
124 | VOLUME_32x16 (%%xmm1, %%xmm0) | ||
125 | @@ -176,7 +176,7 @@ static void pa_volume_s16re_sse2(int16_t | ||
126 | " test $1, %2 \n\t" /* check for odd samples */ | ||
127 | " je 2f \n\t" | ||
128 | |||
129 | - " movd (%1, %3, 4), %%xmm0 \n\t" /* | v0h | v0l | */ | ||
130 | + " movd (%q1, %3, 4), %%xmm0 \n\t" /* | v0h | v0l | */ | ||
131 | " movw (%0), %w4 \n\t" /* .. | p0 | */ | ||
132 | " rorw $8, %w4 \n\t" | ||
133 | " movd %4, %%xmm1 \n\t" | ||
134 | @@ -193,7 +193,7 @@ static void pa_volume_s16re_sse2(int16_t | ||
135 | " je 4f \n\t" | ||
136 | |||
137 | "3: \n\t" /* do samples in groups of 2 */ | ||
138 | - " movq (%1, %3, 4), %%xmm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
139 | + " movq (%q1, %3, 4), %%xmm0 \n\t" /* | v1h | v1l | v0h | v0l | */ | ||
140 | " movd (%0), %%xmm1 \n\t" /* .. | p1 | p0 | */ | ||
141 | SWAP_16 (%%xmm1) | ||
142 | VOLUME_32x16 (%%xmm1, %%xmm0) | ||
143 | @@ -211,7 +211,7 @@ static void pa_volume_s16re_sse2(int16_t | ||
144 | * that the array is 16 bytes aligned, we probably have to do the odd values | ||
145 | * after this then. */ | ||
146 | "5: \n\t" /* do samples in groups of 4 */ | ||
147 | - " movdqu (%1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
148 | + " movdqu (%q1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
149 | " movq (%0), %%xmm1 \n\t" /* .. | p3 .. p0 | */ | ||
150 | SWAP_16 (%%xmm1) | ||
151 | VOLUME_32x16 (%%xmm1, %%xmm0) | ||
152 | @@ -226,8 +226,8 @@ static void pa_volume_s16re_sse2(int16_t | ||
153 | " je 8f \n\t" | ||
154 | |||
155 | "7: \n\t" /* do samples in groups of 8 */ | ||
156 | - " movdqu (%1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
157 | - " movdqu 16(%1, %3, 4), %%xmm2 \n\t" /* | v7h | v7l .. v4h | v4l | */ | ||
158 | + " movdqu (%q1, %3, 4), %%xmm0 \n\t" /* | v3h | v3l .. v0h | v0l | */ | ||
159 | + " movdqu 16(%q1, %3, 4), %%xmm2 \n\t" /* | v7h | v7l .. v4h | v4l | */ | ||
160 | " movq (%0), %%xmm1 \n\t" /* .. | p3 .. p0 | */ | ||
161 | " movq 8(%0), %%xmm3 \n\t" /* .. | p7 .. p4 | */ | ||
162 | SWAP_16_2 (%%xmm1, %%xmm3) | ||
163 | Index: pulseaudio-1.1/src/pulsecore/sconv_sse.c | ||
164 | =================================================================== | ||
165 | --- pulseaudio-1.1.orig/src/pulsecore/sconv_sse.c | ||
166 | +++ pulseaudio-1.1/src/pulsecore/sconv_sse.c | ||
167 | @@ -54,8 +54,8 @@ static void pa_sconv_s16le_from_f32ne_ss | ||
168 | " je 2f \n\t" | ||
169 | |||
170 | "1: \n\t" | ||
171 | - " movups (%2, %0, 2), %%xmm0 \n\t" /* read 8 floats */ | ||
172 | - " movups 16(%2, %0, 2), %%xmm2 \n\t" | ||
173 | + " movups (%q2, %0, 2), %%xmm0 \n\t" /* read 8 floats */ | ||
174 | + " movups 16(%q2, %0, 2), %%xmm2 \n\t" | ||
175 | " minps %%xmm5, %%xmm0 \n\t" /* clamp to 1.0 */ | ||
176 | " minps %%xmm5, %%xmm2 \n\t" | ||
177 | " maxps %%xmm6, %%xmm0 \n\t" /* clamp to -1.0 */ | ||
178 | @@ -72,8 +72,8 @@ static void pa_sconv_s16le_from_f32ne_ss | ||
179 | |||
180 | " packssdw %%mm1, %%mm0 \n\t" /* pack parts */ | ||
181 | " packssdw %%mm3, %%mm2 \n\t" | ||
182 | - " movq %%mm0, (%3, %0) \n\t" | ||
183 | - " movq %%mm2, 8(%3, %0) \n\t" | ||
184 | + " movq %%mm0, (%q3, %0) \n\t" | ||
185 | + " movq %%mm2, 8(%q3, %0) \n\t" | ||
186 | |||
187 | " add $16, %0 \n\t" | ||
188 | " dec %1 \n\t" | ||
189 | @@ -85,12 +85,12 @@ static void pa_sconv_s16le_from_f32ne_ss | ||
190 | " je 4f \n\t" | ||
191 | |||
192 | "3: \n\t" | ||
193 | - " movss (%2, %0, 2), %%xmm0 \n\t" | ||
194 | + " movss (%q2, %0, 2), %%xmm0 \n\t" | ||
195 | " minss %%xmm5, %%xmm0 \n\t" | ||
196 | " maxss %%xmm6, %%xmm0 \n\t" | ||
197 | " mulss %%xmm7, %%xmm0 \n\t" | ||
198 | " cvtss2si %%xmm0, %4 \n\t" | ||
199 | - " movw %w4, (%3, %0) \n\t" | ||
200 | + " movw %w4, (%q3, %0) \n\t" | ||
201 | " add $2, %0 \n\t" | ||
202 | " dec %1 \n\t" | ||
203 | " jne 3b \n\t" | ||
204 | @@ -119,8 +119,8 @@ static void pa_sconv_s16le_from_f32ne_ss | ||
205 | " je 2f \n\t" | ||
206 | |||
207 | "1: \n\t" | ||
208 | - " movups (%2, %0, 2), %%xmm0 \n\t" /* read 8 floats */ | ||
209 | - " movups 16(%2, %0, 2), %%xmm2 \n\t" | ||
210 | + " movups (%q2, %0, 2), %%xmm0 \n\t" /* read 8 floats */ | ||
211 | + " movups 16(%q2, %0, 2), %%xmm2 \n\t" | ||
212 | " minps %%xmm5, %%xmm0 \n\t" /* clamp to 1.0 */ | ||
213 | " minps %%xmm5, %%xmm2 \n\t" | ||
214 | " maxps %%xmm6, %%xmm0 \n\t" /* clamp to -1.0 */ | ||
215 | @@ -132,7 +132,7 @@ static void pa_sconv_s16le_from_f32ne_ss | ||
216 | " cvtps2dq %%xmm2, %%xmm2 \n\t" | ||
217 | |||
218 | " packssdw %%xmm2, %%xmm0 \n\t" | ||
219 | - " movdqu %%xmm0, (%3, %0) \n\t" | ||
220 | + " movdqu %%xmm0, (%q3, %0) \n\t" | ||
221 | |||
222 | " add $16, %0 \n\t" | ||
223 | " dec %1 \n\t" | ||
224 | @@ -144,12 +144,12 @@ static void pa_sconv_s16le_from_f32ne_ss | ||
225 | " je 4f \n\t" | ||
226 | |||
227 | "3: \n\t" | ||
228 | - " movss (%2, %0, 2), %%xmm0 \n\t" | ||
229 | + " movss (%q2, %0, 2), %%xmm0 \n\t" | ||
230 | " minss %%xmm5, %%xmm0 \n\t" | ||
231 | " maxss %%xmm6, %%xmm0 \n\t" | ||
232 | " mulss %%xmm7, %%xmm0 \n\t" | ||
233 | " cvtss2si %%xmm0, %4 \n\t" | ||
234 | - " movw %w4, (%3, %0) \n\t" | ||
235 | + " movw %w4, (%q3, %0) \n\t" | ||
236 | " add $2, %0 \n\t" | ||
237 | " dec %1 \n\t" | ||
238 | " jne 3b \n\t" | ||
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_1.1.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_1.1.bb index 4c8b46f0c5..93db7825ea 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_1.1.bb +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_1.1.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require pulseaudio.inc | 1 | require pulseaudio.inc |
2 | 2 | ||
3 | PR = "r4" | 3 | PR = "r5" |
4 | 4 | ||
5 | DEPENDS += "libjson gdbm speex libxml-parser-perl-native" | 5 | DEPENDS += "libjson gdbm speex libxml-parser-perl-native" |
6 | 6 | ||
@@ -8,6 +8,7 @@ inherit gettext perlnative | |||
8 | 8 | ||
9 | SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz \ | 9 | SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz \ |
10 | file://volatiles.04_pulse \ | 10 | file://volatiles.04_pulse \ |
11 | file://pulseaudo_fix_for_x32.patch \ | ||
11 | " | 12 | " |
12 | 13 | ||
13 | SRC_URI[md5sum] = "17d21df798cee407b769c6355fae397a" | 14 | SRC_URI[md5sum] = "17d21df798cee407b769c6355fae397a" |