]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/remap_mmx.c
remap: cleanup assembler a little
[pulseaudio] / src / pulsecore / remap_mmx.c
index bfcae6c53fc0c2b72493d2ce94821114c5215f1e..b5fe82ee7799205b11ff3dd0d2b98495da864470 100644 (file)
@@ -51,7 +51,7 @@
                 " punpckl"#s" %%mm4, %%mm4      \n\t"  \
                 " punpckh"#s" %%mm5, %%mm5      \n\t"  \
                 " punpckl"#s" %%mm6, %%mm6      \n\t"  \
-                " punpckh"#s" %%mm7, %%mm7      \n\t"  \
+                " punpckh"#s" %%mm7, %%mm7      \n\t"
 
 #define STORE_SAMPLES                                  \
                 " movq %%mm0, (%0)              \n\t"  \
 
 #define HANDLE_SINGLE(s)                               \
                 " movd (%1), %%mm0              \n\t"  \
-                " movq %%mm0, %%mm1             \n\t"  \
                 " punpckl"#s" %%mm0, %%mm0      \n\t"  \
                 " movq %%mm0, (%0)              \n\t"  \
                 " add $4, %1                    \n\t"  \
                 " add $8, %0                    \n\t"
 
-#define MONO_TO_STEREO(s)                               \
-                " mov %3, %2                    \n\t"   \
-                " sar $3, %2                    \n\t"   \
-                " cmp $0, %2                    \n\t"   \
-                " je 2f                         \n\t"   \
-                "1:                             \n\t"   \
-                LOAD_SAMPLES                            \
-                UNPACK_SAMPLES(s)                       \
-                STORE_SAMPLES                           \
-                " dec %2                        \n\t"   \
-                " jne 1b                        \n\t"   \
-                "2:                             \n\t"   \
-                " mov %3, %2                    \n\t"   \
-                " and $7, %2                    \n\t"   \
-                " je 4f                         \n\t"   \
-                "3:                             \n\t"   \
-                HANDLE_SINGLE(s)                        \
-                " dec %2                        \n\t"   \
-                " jne 3b                        \n\t"   \
-                "4:                             \n\t"   \
+#define MONO_TO_STEREO(s)                              \
+                " mov %3, %2                    \n\t"  \
+                " sar $3, %2                    \n\t"  \
+                " cmp $0, %2                    \n\t"  \
+                " je 2f                         \n\t"  \
+                "1:                             \n\t"  \
+                LOAD_SAMPLES                           \
+                UNPACK_SAMPLES(s)                      \
+                STORE_SAMPLES                          \
+                " dec %2                        \n\t"  \
+                " jne 1b                        \n\t"  \
+                "2:                             \n\t"  \
+                " mov %3, %2                    \n\t"  \
+                " and $7, %2                    \n\t"  \
+                " je 4f                         \n\t"  \
+                "3:                             \n\t"  \
+                HANDLE_SINGLE(s)                       \
+                " dec %2                        \n\t"  \
+                " jne 3b                        \n\t"  \
+                "4:                             \n\t"  \
                 " emms                          \n\t"
 
+#if defined (__i386__) || defined (__amd64__)
 static void remap_mono_to_stereo_mmx (pa_remap_t *m, void *dst, const void *src, unsigned n) {
     pa_reg_x86 temp;
 
@@ -138,6 +138,7 @@ static void init_remap_mmx (pa_remap_t *m) {
         pa_log_info("Using MMX mono to stereo remapping");
     }
 }
+#endif /* defined (__i386__) || defined (__amd64__) */
 
 void pa_remap_func_init_mmx (pa_cpu_x86_flag_t flags) {
 #if defined (__i386__) || defined (__amd64__)