summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/svolume_mmx.c
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-05-27 09:28:57 +0200
committerColin Guthrie <colin@mageia.org>2011-06-22 13:45:55 +0100
commit42bcb418aed1ab94c56c09a6b31bac05c08ac04a (patch)
tree14f7fdd1fc0d91c711e1223a580664c2cdce4e15 /src/pulsecore/svolume_mmx.c
parent257bdcafe3d8253bb9a6ffbeb7123968ea74aafb (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>
Diffstat (limited to 'src/pulsecore/svolume_mmx.c')
-rw-r--r--src/pulsecore/svolume_mmx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c
index 7286b4a2..28bbfdd3 100644
--- a/src/pulsecore/svolume_mmx.c
+++ b/src/pulsecore/svolume_mmx.c
@@ -155,7 +155,11 @@ static void pa_volume_s16ne_mmx(int16_t *samples, int32_t *volumes, unsigned cha
" emms \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"
);
}
@@ -230,7 +234,11 @@ static void pa_volume_s16re_mmx(int16_t *samples, int32_t *volumes, unsigned cha
" emms \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"
);
}