http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56068



--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-21 
19:14:14 UTC ---

(In reply to comment #11)

> I will try 4.6 to prove that. Off to build 4.6...



Thanks for checking.  See http://gcc.gnu.org/wiki/InstallingGCC for the

foolproof way to do build it.



You could also try this with any GCC version on the KVM guest:



#include <stdio.h>

#include "cpuid.h"



int main()

{

      unsigned bit_osxsave = bit_AVX >> 1;



      unsigned int eax, ebx, ecx, edx;



      __cpuid (1, eax, ebx, ecx, edx);



      printf("bit_OSXSAVE (%u) = %u\n", bit_osxsave, ecx & bit_osxsave);

      printf("bit_AVX (%u) = %u\n", bit_AVX, ecx & bit_AVX);

}



If that prints 0 for OSXSAVE and non-zero for AVX then it's the same problem I

had.



Maybe GCC could work around it by checking both flags in the AVX detection

logic.

Reply via email to