[FFmpeg-cvslog] r12375 - in trunk: configure libavutil/bswap.h

Måns Rullgård mans
Sat Mar 8 23:07:11 CET 2008


Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:

> On Sat, Mar 08, 2008 at 07:33:08PM +0100, mru wrote:
>> Modified: trunk/libavutil/bswap.h
>> ==============================================================================
>> --- trunk/libavutil/bswap.h	(original)
>> +++ trunk/libavutil/bswap.h	Sat Mar  8 19:33:07 2008
>> @@ -56,7 +56,7 @@ static av_always_inline uint16_t bswap_1
>>  static av_always_inline uint32_t bswap_32(uint32_t x)
>>  {
>>  #if defined(ARCH_X86)
>> -#if __CPU__ != 386
>> +#ifdef HAVE_BSWAP
>>      __asm("bswap   %0":
>>            "=r" (x)    :
>>  #else
>
> Wouldn't then
> #ifdef HAVE_BSWAP
> ..
> #elif defined(ARCH_X86)
> ...
>
> Be even a bit simpler?

bswap is an x86 instruction.  If it exists on some other CPU, there's
no telling what it will do.

All the architecture-specific HAVE_* settings should probably be
renamed to include the architecture in the name, e.g. HAVE_X86_BSWAP.

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




More information about the ffmpeg-cvslog mailing list