diff options
author | aurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-21 16:48:18 +0000 |
---|---|---|
committer | aurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-21 16:48:18 +0000 |
commit | 1f5ddaaa297d362387eea3b4ee6667125b326984 (patch) | |
tree | 6c91ba7d4a5eb5bc3280b12b7ffe341a9b78539b /postproc/swscale_template.c | |
parent | 4643b6100a1eb073f983d73a9c07598041321434 (diff) | |
download | mpv-1f5ddaaa297d362387eea3b4ee6667125b326984.tar.bz2 mpv-1f5ddaaa297d362387eea3b4ee6667125b326984.tar.xz |
fix few x86_64 registers handling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14557 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc/swscale_template.c')
-rw-r--r-- | postproc/swscale_template.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index 48a665895b..692a279a62 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -2271,13 +2271,27 @@ static inline void RENAME(hyscale)(uint16_t *dst, int dstWidth, uint8_t *src, in PREFETCH" 32(%%"REG_c") \n\t" PREFETCH" 64(%%"REG_c") \n\t" +#ifdef ARCH_X86_64 + +#define FUNNY_Y_CODE \ + "movl (%%"REG_b"), %%esi \n\t"\ + "call *%4 \n\t"\ + "movl (%%"REG_b", %%"REG_a"), %%esi\n\t"\ + "add %%"REG_S", %%"REG_c" \n\t"\ + "add %%"REG_a", %%"REG_D" \n\t"\ + "xor %%"REG_a", %%"REG_a" \n\t"\ + +#else + #define FUNNY_Y_CODE \ - "mov (%%"REG_b"), %%"REG_S" \n\t"\ + "movl (%%"REG_b"), %%esi \n\t"\ "call *%4 \n\t"\ - "addl (%%"REG_b", %%"REG_a"), %%ecx\n\t"\ + "addl (%%"REG_b", %%"REG_a"), %%"REG_c"\n\t"\ "add %%"REG_a", %%"REG_D" \n\t"\ "xor %%"REG_a", %%"REG_a" \n\t"\ +#endif + FUNNY_Y_CODE FUNNY_Y_CODE FUNNY_Y_CODE @@ -2440,13 +2454,27 @@ inline static void RENAME(hcscale)(uint16_t *dst, int dstWidth, uint8_t *src1, u PREFETCH" 32(%%"REG_c") \n\t" PREFETCH" 64(%%"REG_c") \n\t" +#ifdef ARCH_X86_64 + +#define FUNNY_UV_CODE \ + "movl (%%"REG_b"), %%esi \n\t"\ + "call *%4 \n\t"\ + "movl (%%"REG_b", %%"REG_a"), %%esi\n\t"\ + "add %%"REG_S", %%"REG_c" \n\t"\ + "add %%"REG_a", %%"REG_D" \n\t"\ + "xor %%"REG_a", %%"REG_a" \n\t"\ + +#else + #define FUNNY_UV_CODE \ "movl (%%"REG_b"), %%esi \n\t"\ "call *%4 \n\t"\ - "addl (%%"REG_b", %%"REG_a"), %%ecx\n\t"\ + "addl (%%"REG_b", %%"REG_a"), %%"REG_c"\n\t"\ "add %%"REG_a", %%"REG_D" \n\t"\ "xor %%"REG_a", %%"REG_a" \n\t"\ +#endif + FUNNY_UV_CODE FUNNY_UV_CODE FUNNY_UV_CODE @@ -2466,7 +2494,7 @@ FUNNY_UV_CODE :: "m" (src1), "m" (dst), "m" (mmx2Filter), "m" (mmx2FilterPos), "m" (funnyUVCode), "m" (src2) - : "%"REG_a, "%"REG_b, "%"REG_c, "%"REG_d, "%esi", "%"REG_D + : "%"REG_a, "%"REG_b, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D ); for(i=dstWidth-1; (i*xInc)>>16 >=srcW-1; i--) { |