summaryrefslogtreecommitdiff
path: root/vpx_ports
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2013-05-01 22:58:41 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-05-01 22:58:41 -0700
commita288c928aecb2d23a8045d341990468592ddb4dd (patch)
treeed069823d5bf8360a06f67b4043fa1cab2911ed8 /vpx_ports
parentb613525e44734a542dd7e134a46551ffe44ffac9 (diff)
parentc9a9905764ba04031fa2484895eb89e4a21de4fd (diff)
downloadlibvpx-a288c928aecb2d23a8045d341990468592ddb4dd.tar.gz
Merge "Add cpu detection for Android x86"
Diffstat (limited to 'vpx_ports')
-rw-r--r--vpx_ports/x86.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h
index f1cf6265e..a51cd2e01 100644
--- a/vpx_ports/x86.h
+++ b/vpx_ports/x86.h
@@ -33,7 +33,7 @@ typedef enum {
VPX_CPU_LAST
} vpx_cpu_t;
-#if defined(__GNUC__) && __GNUC__
+#if defined(__GNUC__) && __GNUC__ || defined(__ANDROID__)
#if ARCH_X86_64
#define cpuid(func,ax,bx,cx,dx)\
__asm__ __volatile__ (\
@@ -49,7 +49,7 @@ typedef enum {
: "=a" (ax), "=D" (bx), "=c" (cx), "=d" (dx) \
: "a" (func));
#endif
-#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* end __GNUC__ or __ANDROID__*/
#if ARCH_X86_64
#define cpuid(func,ax,bx,cx,dx)\
asm volatile (\
@@ -69,7 +69,7 @@ typedef enum {
: "=a" (ax), "=D" (bx), "=c" (cx), "=d" (dx) \
: "a" (func));
#endif
-#else
+#else /* end __SUNPRO__ */
#if ARCH_X86_64
void __cpuid(int CPUInfo[4], int info_type);
#pragma intrinsic(__cpuid)
@@ -86,7 +86,7 @@ void __cpuid(int CPUInfo[4], int info_type);
__asm mov c, ecx\
__asm mov d, edx
#endif
-#endif
+#endif /* end others */
#define HAS_MMX 0x01
#define HAS_SSE 0x02