summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2016-06-22 19:06:47 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-06-22 19:06:48 +0000
commit243029faff45872fa47d2053bf3375bcfee6dfd9 (patch)
treedae002f3b9b9f1261a480ebeb70826f40f49b7d9
parentef665996ae59a43575272449d0120a67457a7856 (diff)
parent8c29d332c9a0d9db19b916d4910935d5ee6b6338 (diff)
downloadlibvpx-243029faff45872fa47d2053bf3375bcfee6dfd9.tar
libvpx-243029faff45872fa47d2053bf3375bcfee6dfd9.tar.gz
libvpx-243029faff45872fa47d2053bf3375bcfee6dfd9.tar.bz2
libvpx-243029faff45872fa47d2053bf3375bcfee6dfd9.zip
Merge "win: Include <intrin.h> instead of manually declaring intrinsics."
-rw-r--r--vpx_ports/x86.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h
index 052f6188e..bae25ac34 100644
--- a/vpx_ports/x86.h
+++ b/vpx_ports/x86.h
@@ -12,6 +12,11 @@
#ifndef VPX_PORTS_X86_H_
#define VPX_PORTS_X86_H_
#include <stdlib.h>
+
+#if defined(_MSC_VER)
+#include <intrin.h> /* For __cpuidex, __rdtsc */
+#endif
+
#include "vpx_config.h"
#include "vpx/vpx_integer.h"
@@ -77,16 +82,12 @@ typedef enum {
#else /* end __SUNPRO__ */
#if ARCH_X86_64
#if defined(_MSC_VER) && _MSC_VER > 1500
-void __cpuidex(int CPUInfo[4], int info_type, int ecxvalue);
-#pragma intrinsic(__cpuidex)
#define cpuid(func, func2, a, b, c, d) do {\
int regs[4];\
__cpuidex(regs, func, func2); \
a = regs[0]; b = regs[1]; c = regs[2]; d = regs[3];\
} while(0)
#else
-void __cpuid(int CPUInfo[4], int info_type);
-#pragma intrinsic(__cpuid)
#define cpuid(func, func2, a, b, c, d) do {\
int regs[4];\
__cpuid(regs, func); \
@@ -212,10 +213,6 @@ x86_simd_caps(void) {
return flags & mask;
}
-#if ARCH_X86_64 && defined(_MSC_VER)
-unsigned __int64 __rdtsc(void);
-#pragma intrinsic(__rdtsc)
-#endif
// Note:
// 32-bit CPU cycle counter is light-weighted for most function performance
// measurement. For large function (CPU time > a couple of seconds), 64-bit