[MPlayer-dev-eng] [PATCH] fix compilation on intel mac

Rich Felker dalias at aerifal.cx
Tue Apr 4 23:45:24 CEST 2006


On Wed, Mar 22, 2006 at 07:58:33AM -0500, Nicolas Plourde wrote:
> +#ifdef MACOSX
> +    ".align 4\n\t"
> +#elif
>  	".balign 16\n\t"
> +#endif
>  	"1:				\n\t"
>  	"movaps (%0, %%"REG_S"), %%xmm0	\n\t" 
>  	"movaps 16(%0, %%"REG_S"), %%xmm1\n\t" 
> @@ -714,7 +718,11 @@
>  	"movlps %1, %%xmm7		\n\t"
>  	"shufps $0x00, %%xmm7, %%xmm7	\n\t"
>  	"mov $-1024, %%"REG_S"		\n\t"
> +#ifdef MACOSX
> +    ".align 4\n\t"
> +#elif
>  	".balign 16\n\t"
> +#endif

Repeating this nonsense over and over is absolutely incorrect. I'm
slightly against the patch in general, but if you want to do something
like this, you must:

1. Test in configure to see if the assembler supports .balign.
2. #define a macro ALIGN_16_ASM to ".align 4" or ".balign 16"
   depending on the results of the test from 1.
3. Replace all occurrances of ".balign 16" with ALIGN_16_ASM.

Both OS-specific ifdefs (rather than feature-specific ones) and
repeated redundant ifdefs are disgusting and unacceptable from a code
maintainence standpoint.

Rich




More information about the MPlayer-dev-eng mailing list