altivec problem on x86

Christophe Massiot massiot at via.ecp.fr
Wed Nov 14 00:27:37 CET 2001


À (At) 23:17 +0100 13/11/01, Joakim Elofsson écrivait (wrote) :

>./configure thinks I got Altivec in my AMD Duron (don't think so:), 
>or gcc at least thinks so.
>but I think I found the problem, my CFLAGS/CXXFLAGS is usually set 
>to '-march=i686 -O6'
>and after some tests I found out that if using -Ox with x greater 
>than 2 gcc accepts this:
>  int main() {
>void quux(){asm volatile("vperm 0,1,2,3");}
>; return 0; }
>now I wonder, is this a gcc-bug? or is vperm some kind of hidden asm 
>stuff (guess not)

gcc just discards the function as it is used nowhere. It can discard 
it because you passed -Ox. We have found a fix, it is in the latest 
CVS. In the meanwhile, the workaround is to unset your CFLAGS (anyway 
I don't think you would see a difference between -O3 and -O6, except 
increased compilation time).


-- 
Christophe Massiot.




More information about the vlc mailing list