diff options
author | David Henningsson <david.henningsson@canonical.com> | 2011-05-27 09:28:57 +0200 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-06-22 14:02:41 +0100 |
commit | c3bfcc9fdb0094a3e6276e948263a2e8e83534bb (patch) | |
tree | 1665080300e242bc8b342038af7bc09ff3e788e8 | |
parent | 22c0dcbc080699fb50409ed188a6f8169331d294 (diff) |
SSE/MMX: Fix problem with highpitched noise on i386
The "rm" basm constraint doesn't work with my version of gcc (4.5.2),
not even in a simple example. Since we usually only have 5 registers
available on i386, force it to be memory on that architecture.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r-- | src/pulsecore/svolume_mmx.c | 12 | ||||
-rw-r--r-- | src/pulsecore/svolume_sse.c | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c index a71a39ba..129d7f09 100644 --- a/src/pulsecore/svolume_mmx.c +++ b/src/pulsecore/svolume_mmx.c @@ -155,7 +155,11 @@ pa_volume_s16ne_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsi " emms \n\t" : "+r" (samples), "+r" (volumes), "+r" (length), "=D" ((pa_reg_x86)channel), "=&r" (temp) - : "rm" ((pa_reg_x86)channels) +#if defined (__i386__) + : "m" ((pa_reg_x86)channels) +#else + : "r" ((pa_reg_x86)channels) +#endif : "cc" ); } @@ -232,7 +236,11 @@ pa_volume_s16re_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsi " emms \n\t" : "+r" (samples), "+r" (volumes), "+r" (length), "=D" ((pa_reg_x86)channel), "=&r" (temp) - : "rm" ((pa_reg_x86)channels) +#if defined (__i386__) + : "m" ((pa_reg_x86)channels) +#else + : "r" ((pa_reg_x86)channels) +#endif : "cc" ); } diff --git a/src/pulsecore/svolume_sse.c b/src/pulsecore/svolume_sse.c index 5983164b..ccf45e77 100644 --- a/src/pulsecore/svolume_sse.c +++ b/src/pulsecore/svolume_sse.c @@ -154,7 +154,11 @@ pa_volume_s16ne_sse2 (int16_t *samples, int32_t *volumes, unsigned channels, uns "8: \n\t" : "+r" (samples), "+r" (volumes), "+r" (length), "=D" (channel), "=&r" (temp) - : "rm" ((pa_reg_x86)channels) +#if defined (__i386__) + : "m" ((pa_reg_x86)channels) +#else + : "r" ((pa_reg_x86)channels) +#endif : "cc" ); } @@ -244,7 +248,11 @@ pa_volume_s16re_sse2 (int16_t *samples, int32_t *volumes, unsigned channels, uns "8: \n\t" : "+r" (samples), "+r" (volumes), "+r" (length), "=D" (channel), "=&r" (temp) - : "rm" ((pa_reg_x86)channels) +#if defined (__i386__) + : "m" ((pa_reg_x86)channels) +#else + : "r" ((pa_reg_x86)channels) +#endif : "cc" ); } |