From 9276bdddca3dba697ffead22ce591657b7b33e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20D=C3=B6nmez?= Date: Mon, 4 Oct 2010 13:08:13 +0000 Subject: [PATCH] snowdsp: Explicitly state the operand sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes compilation with clang's builtin assembler Patch by İsmail Dönmez, ismail at namtrac dot org Originally committed as revision 25331 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/x86/snowdsp_mmx.c | 2 +- libavutil/x86_cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/snowdsp_mmx.c b/libavcodec/x86/snowdsp_mmx.c index d9d589eb5a..9c1fa429a8 100644 --- a/libavcodec/x86/snowdsp_mmx.c +++ b/libavcodec/x86/snowdsp_mmx.c @@ -812,7 +812,7 @@ snow_inner_add_yblock_sse2_end_16 "add %%"REG_c", "PTR_SIZE"*2(%%"REG_a");\n\t"\ "add %%"REG_c", "PTR_SIZE"*1(%%"REG_a");\n\t"\ "add %%"REG_c", (%%"REG_a") \n\t"\ - "add $"PTR_SIZE"*1, %1 \n\t"\ + "add"OPSIZE " $"PTR_SIZE"*1, %1 \n\t"\ "add %%"REG_c", %0 \n\t"\ "dec %2 \n\t"\ "jnz 1b \n\t"\ diff --git a/libavutil/x86_cpu.h b/libavutil/x86_cpu.h index 08d31461fb..b1b7d8b978 100644 --- a/libavutil/x86_cpu.h +++ b/libavutil/x86_cpu.h @@ -25,6 +25,7 @@ #include "config.h" #if ARCH_X86_64 +# define OPSIZE "q" # define REG_a "rax" # define REG_b "rbx" # define REG_c "rcx" @@ -45,6 +46,7 @@ typedef int64_t x86_reg; #elif ARCH_X86_32 +# define OPSIZE "l" # define REG_a "eax" # define REG_b "ebx" # define REG_c "ecx"