[FFmpeg-devel] [PATCH] Fix compilation on clang 2.8, which doesn't support 3dnow inline asm.

Måns Rullgård mans
Fri Feb 11 19:01:16 CET 2011


Justin Ruggles <justin.ruggles at gmail.com> writes:

> On 02/11/2011 12:40 PM, Ronald S. Bultje wrote:
>
>> ---
>>  configure                       |    8 +++++---
>>  libavcodec/x86/cavsdsp_mmx.c    |    4 ++++
>>  libavcodec/x86/dsputil_mmx.c    |   39 ++++++++++++++++++++++++++++++++-------
>>  libavcodec/x86/dsputilenc_mmx.c |    4 ++++
>>  libavcodec/x86/fmtconvert_mmx.c |   10 ++++++++++
>>  libavcodec/x86/h264_qpel_mmx.c  |    2 ++
>>  libswscale/rgb2rgb.c            |    4 ++++
>>  7 files changed, 61 insertions(+), 10 deletions(-)
>> 
>> diff --git a/configure b/configure
>> index a3ca15d..48e7d60 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2649,9 +2649,11 @@ int main(void) {
>>  }
>>  EOF
>>  
>> -    # check whether binutils is new enough to compile SSSE3/MMX2
>> -    enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
>> -    enabled mmx2  && check_asm mmx2  '"pmaxub %mm0, %mm1"'
>> +    # check whether binutils is new enough to compile SSSE3/MMX2/3dnow
>> +    enabled ssse3    && check_asm ssse3    '"pabsw  %xmm0, %xmm0"'
>> +    enabled mmx2     && check_asm mmx2     '"pmaxub  %mm0, %mm1"'
>> +    enabled amd3dnow && check_asm amd3dnow '"pavgusb %mm0, %mm1"'
>> +    enabled amd3dnowext && enabled amd3dnow || disable amd3dnowext
>
> why not also check for amd3dnowext with an instruction? like pswapd.

That's also a good idea.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list