improve ia-32 checks to include cpuid, bswap, sse3 and ssse3 support
[platform/upstream/flac.git] / src / libFLAC / include / private / cpu.h
index 092f20b..651bb22 100644 (file)
@@ -45,11 +45,15 @@ typedef enum {
 } FLAC__CPUInfo_Type;
 
 typedef struct {
+       FLAC__bool cpuid;
+       FLAC__bool bswap;
        FLAC__bool cmov;
        FLAC__bool mmx;
        FLAC__bool fxsr;
        FLAC__bool sse;
        FLAC__bool sse2;
+       FLAC__bool sse3;
+       FLAC__bool ssse3;
        FLAC__bool _3dnow;
        FLAC__bool ext3dnow;
        FLAC__bool extmmx;
@@ -60,16 +64,6 @@ typedef struct {
        FLAC__bool ppc64;
 } FLAC__CPUInfo_PPC;
 
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_CMOV;
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_MMX;
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_FXSR;
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_SSE;
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_SSE2;
-
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_3DNOW;
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXT3DNOW;
-extern const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXTMMX;
-
 typedef struct {
        FLAC__bool use_asm;
        FLAC__CPUInfo_Type type;
@@ -84,8 +78,9 @@ void FLAC__cpu_info(FLAC__CPUInfo *info);
 #ifndef FLAC__NO_ASM
 #ifdef FLAC__CPU_IA32
 #ifdef FLAC__HAS_NASM
-unsigned FLAC__cpu_info_asm_ia32(void);
-unsigned FLAC__cpu_info_extended_amd_asm_ia32(void);
+FLAC__uint32 FLAC__cpu_have_cpuid_asm_ia32(void);
+void         FLAC__cpu_info_asm_ia32(FLAC__uint32 *flags_edx, FLAC__uint32 *flags_ecx);
+FLAC__uint32 FLAC__cpu_info_extended_amd_asm_ia32(void);
 #endif
 #endif
 #endif