aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/x86
diff options
context:
space:
mode:
authorNick Lewycky <nlewycky@google.com>2015-05-12 18:08:45 -0700
committerMichael Niedermayer <michaelni@gmx.at>2015-05-13 11:59:30 +0200
commit891df2a1ae8d54d43288eba41bad653230f4e8df (patch)
tree24700cb0185d7fa5a834270fe5dac623d7b1ba26 /libswscale/x86
parent48e9f68384a2af257b9ca7633bf14f0c2748edc6 (diff)
downloadffmpeg-891df2a1ae8d54d43288eba41bad653230f4e8df.tar.gz
libswscale/x86/hscale_fast_bilinear_simd.c: There's no need to save BX if it's in the clobber list.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/x86')
-rw-r--r--libswscale/x86/hscale_fast_bilinear_simd.c61
1 files changed, 24 insertions, 37 deletions
diff --git a/libswscale/x86/hscale_fast_bilinear_simd.c b/libswscale/x86/hscale_fast_bilinear_simd.c
index 3954fff27c..b37b63c3ec 100644
--- a/libswscale/x86/hscale_fast_bilinear_simd.c
+++ b/libswscale/x86/hscale_fast_bilinear_simd.c
@@ -196,24 +196,21 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
int16_t *filter = c->hLumFilter;
void *mmxextFilterCode = c->lumMmxextFilterCode;
int i;
+#if ARCH_X86_64
+ uint64_t retsave;
+#else
#if defined(PIC)
uint64_t ebxsave;
#endif
-#if ARCH_X86_64
- uint64_t retsave;
#endif
__asm__ volatile(
-#if defined(PIC)
- "mov %%"REG_b", %5 \n\t"
#if ARCH_X86_64
"mov -8(%%rsp), %%"REG_a" \n\t"
- "mov %%"REG_a", %6 \n\t"
-#endif
+ "mov %%"REG_a", %5 \n\t" // retsave
#else
-#if ARCH_X86_64
- "mov -8(%%rsp), %%"REG_a" \n\t"
- "mov %%"REG_a", %5 \n\t"
+#if defined(PIC)
+ "mov %%"REG_b", %5 \n\t" // ebxsave
#endif
#endif
"pxor %%mm7, %%mm7 \n\t"
@@ -254,25 +251,22 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
-#if defined(PIC)
- "mov %5, %%"REG_b" \n\t"
-#if ARCH_X86_64
- "mov %6, %%"REG_a" \n\t"
- "mov %%"REG_a", -8(%%rsp) \n\t"
-#endif
-#else
#if ARCH_X86_64
"mov %5, %%"REG_a" \n\t"
"mov %%"REG_a", -8(%%rsp) \n\t"
+#else
+#if defined(PIC)
+ "mov %5, %%"REG_b" \n\t"
#endif
#endif
:: "m" (src), "m" (dst), "m" (filter), "m" (filterPos),
"m" (mmxextFilterCode)
+#if ARCH_X86_64
+ ,"m"(retsave)
+#else
#if defined(PIC)
,"m" (ebxsave)
#endif
-#if ARCH_X86_64
- ,"m"(retsave)
#endif
: "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
#if ARCH_X86_64 || !defined(PIC)
@@ -292,24 +286,20 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,
int16_t *filter = c->hChrFilter;
void *mmxextFilterCode = c->chrMmxextFilterCode;
int i;
+#if ARCH_X86_64
+ DECLARE_ALIGNED(8, uint64_t, retsave);
+#else
#if defined(PIC)
DECLARE_ALIGNED(8, uint64_t, ebxsave);
#endif
-#if ARCH_X86_64
- DECLARE_ALIGNED(8, uint64_t, retsave);
#endif
-
__asm__ volatile(
-#if defined(PIC)
- "mov %%"REG_b", %7 \n\t"
#if ARCH_X86_64
"mov -8(%%rsp), %%"REG_a" \n\t"
- "mov %%"REG_a", %8 \n\t"
-#endif
+ "mov %%"REG_a", %7 \n\t" // retsave
#else
-#if ARCH_X86_64
- "mov -8(%%rsp), %%"REG_a" \n\t"
- "mov %%"REG_a", %7 \n\t"
+#if defined(PIC)
+ "mov %%"REG_b", %7 \n\t" // ebxsave
#endif
#endif
"pxor %%mm7, %%mm7 \n\t"
@@ -338,25 +328,22 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
-#if defined(PIC)
- "mov %7, %%"REG_b" \n\t"
-#if ARCH_X86_64
- "mov %8, %%"REG_a" \n\t"
- "mov %%"REG_a", -8(%%rsp) \n\t"
-#endif
-#else
#if ARCH_X86_64
"mov %7, %%"REG_a" \n\t"
"mov %%"REG_a", -8(%%rsp) \n\t"
+#else
+#if defined(PIC)
+ "mov %7, %%"REG_b" \n\t"
#endif
#endif
:: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos),
"m" (mmxextFilterCode), "m" (src2), "m"(dst2)
+#if ARCH_X86_64
+ ,"m"(retsave)
+#else
#if defined(PIC)
,"m" (ebxsave)
#endif
-#if ARCH_X86_64
- ,"m"(retsave)
#endif
: "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
#if ARCH_X86_64 || !defined(PIC)