[vlc-devel] VLC_MMX and VLC_SSE function attribute macros breaks outside GCC

Rafaël Carré funman at videolan.org
Mon Mar 5 02:54:17 CET 2012


Le 2012-03-04 19:34, Francois Cartegnie a écrit :
> Le 04/03/2012 23:55, Rafaël Carré a écrit :
>> Wouldn't the asm code fail to build if MMX was not enabled ?
>>
>> Compiler wouldn't know what are xmm* in the constraint.
>> That mean at least compiler would choke on those functions until user
>> adds the correct flags:
>>
>> #elif defined(__SUNPRO_C)
>> # define VLC_MMX
> 
> It's probably better to rely on CAN_COMPILE_MMX && HAVE_MMX set by
> autoconf, but...
> 
> fcartegn at opensolaris:~/vlc$ isainfo -x
> amd64: tscp ahf sse3 sse2 sse fxsr amd_3dnowx amd_3dnow mmx cmov
> amd_sysc cx8 tsc fpu
> i386: tscp ahf sse3 sse2 sse fxsr amd_3dnowx amd_3dnow mmx cmov amd_sysc
> cx8 tsc fpu
> 
> For -xtarget=native cpu flags (should enable everything), I have from
> autoconf:
> fcartegn at opensolaris:~/vlc$ grep -E "MMX|SSE" config.h | grep -v "/\*"
> #define CAN_COMPILE_MMX 1
> #define CAN_COMPILE_MMXEXT 1
> #define CAN_COMPILE_SSE3 1
> #define CAN_COMPILE_SSE4A 1
> #define CAN_COMPILE_SSE4_1 1
> #define CAN_COMPILE_SSE4_2 1
> #define CAN_COMPILE_SSSE3 1
> 
> Missing the HAVE_MMX && HAVE_SSE :/

Those 2 are automake defines (Makefile.am only)



More information about the vlc-devel mailing list