[vlc-devel] [PATCH] configure: Fix illegal instructions on PPC when --enable-altivec used

Rémi Denis-Courmont remi at remlab.net
Tue Nov 8 21:59:10 CET 2016

Le tiistaina 8. marraskuuta 2016, 15.48.12 EET Lennart Sorensen a écrit :
> From: Len Sorensen <lsorense at csclub.uwaterloo.ca>
> When --enable-altivec is used on powerpc, -maltivec is passed to gcc
> along with -O4.  When -O3 or higher is used along with -maltivec, gcc
> enabled -ftree-vectorize, which generates vector instructions from C
> code.

Hmm well, as far as I can tell, there are no warranties that disabling tree 
vectorization will disable emission of Altivec opcodes. It is just the most 
obvious use case.

It would not be unheard of for the compiler to employ SIMD instructions for 
single (useful) data operations. It is definitely supported on some 

So it seems to me that this is just moving the problem (again). Instead, -
matltivec should not be passed at all. Depending on the case, that might 
- building Altivec functions in a separate static library,
- passing -maltivec only to the assembler,
- using the target function attribute (like VLC_SSE and VLC_MMX).

Rémi Denis-Courmont

More information about the vlc-devel mailing list