libFLAC: CPUID detecion improvements.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 28 Jun 2014 11:50:09 +0000 (21:50 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 28 Jun 2014 12:25:18 +0000 (22:25 +1000)
commit2c15052550528415139fa37a121030d777bc630f
treed9dfd2e5b6bee4d2d4968bb804d9a6c026e1c3df
parent99257e177eac96fa41a107b423080232f59ebe45
libFLAC: CPUID detecion improvements.

According to docs, it's incorrect to just call CPUID with EAX=1.
One must to ensure that this value is supported.

CPUs that don't support CPUID level 1 are very old, but...
if FLAC tests CPUID presence it should also test CPUID level support.

Also the function FLAC__cpu_have_cpuid_asm_ia32 was simplified
according to the docs at Intel website and in Wikipedia.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
src/libFLAC/cpu.c
src/libFLAC/ia32/cpu_asm.nasm