Commit 078c631d authored by Julian Calaby's avatar Julian Calaby Committed by Erik de Castro Lopo
Browse files

libFLAC/cpu.c: Get rid of OS_IS_ANDROID function

parent 828e33b3
...@@ -63,12 +63,6 @@ ...@@ -63,12 +63,6 @@
# include <cpuid.h> /* for __get_cpuid() and __get_cpuid_max() */ # include <cpuid.h> /* for __get_cpuid() and __get_cpuid_max() */
#endif #endif
#if defined(__ANDROID__) || defined(ANDROID)
#define OS_IS_ANDROID 1
#else
#define OS_IS_ANDROID 0
#endif
#ifdef DEBUG #ifdef DEBUG
#include <stdio.h> #include <stdio.h>
...@@ -176,18 +170,15 @@ ia32_cpu_info (FLAC__CPUInfo *info) ...@@ -176,18 +170,15 @@ ia32_cpu_info (FLAC__CPUInfo *info)
#if !defined FLAC__CPU_IA32 #if !defined FLAC__CPU_IA32
(void) info; (void) info;
return; return;
#elif defined(__ANDROID__) || defined(ANDROID)
/* no need to check OS SSE support */
info->use_asm = true;
return;
#else #else
FLAC__bool ia32_fxsr = false; FLAC__bool ia32_fxsr = false;
FLAC__bool ia32_osxsave = false; FLAC__bool ia32_osxsave = false;
FLAC__uint32 flags_eax, flags_ebx, flags_ecx, flags_edx; FLAC__uint32 flags_eax, flags_ebx, flags_ecx, flags_edx;
if (OS_IS_ANDROID) {
/* no need to check OS SSE support */
info->use_asm = true;
return;
}
#if !defined FLAC__NO_ASM && (defined FLAC__HAS_NASM || FLAC__HAS_X86INTRIN) #if !defined FLAC__NO_ASM && (defined FLAC__HAS_NASM || FLAC__HAS_X86INTRIN)
info->use_asm = true; /* we assume a minimum of 80386 with FLAC__CPU_IA32 */ info->use_asm = true; /* we assume a minimum of 80386 with FLAC__CPU_IA32 */
#if !FLAC__HAS_X86INTRIN #if !FLAC__HAS_X86INTRIN
...@@ -367,17 +358,14 @@ x86_64_cpu_info (FLAC__CPUInfo *info) ...@@ -367,17 +358,14 @@ x86_64_cpu_info (FLAC__CPUInfo *info)
#if !defined FLAC__CPU_X86_64 #if !defined FLAC__CPU_X86_64
(void) info; (void) info;
return; return;
#elif defined(__ANDROID__) || defined(ANDROID)
/* no need to check OS SSE support */
info->use_asm = true;
return;
#else #else
FLAC__bool x86_osxsave = false; FLAC__bool x86_osxsave = false;
FLAC__uint32 flags_eax, flags_ebx, flags_ecx, flags_edx; FLAC__uint32 flags_eax, flags_ebx, flags_ecx, flags_edx;
if (OS_IS_ANDROID) {
/* no need to check OS SSE support */
info->use_asm = true;
return;
}
#if !defined FLAC__NO_ASM && FLAC__HAS_X86INTRIN #if !defined FLAC__NO_ASM && FLAC__HAS_X86INTRIN
info->use_asm = true; info->use_asm = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment