commit | 34611bd818cf556a651aff7727b5bda8344391c5 | [log] [tgz] |
---|---|---|
author | Wan-Teh Chang <wtc@google.com> | Thu Dec 20 13:39:09 2018 -0800 |
committer | Wan-Teh Chang <wtc@google.com> | Thu Dec 20 22:57:26 2018 +0000 |
tree | 01c649978a19aee294b1d783a7a2bb2a43e94ee4 | |
parent | 7e113a08e6fca31eb1e566878d7b8d55dd71e927 [diff] |
__rdtscp() in Visual Studio takes one argument. Fix a compilaton error under Visual Studio. See https://docs.microsoft.com/en-us/cpp/intrinsics/rdtscp?view=vs-2015 Change-Id: I04c37aac3fea75e88db6ca2a51c2b4e570b83ed1
diff --git a/aom_ports/x86.h b/aom_ports/x86.h index ebaf813..7c9790d 100644 --- a/aom_ports/x86.h +++ b/aom_ports/x86.h
@@ -288,6 +288,9 @@ unsigned int tscp; asm volatile("rdtscp\n\t" : "=a"(tscp) :); return tscp; +#elif defined(_MSC_VER) + unsigned int ui; + return (unsigned int)__rdtscp(&ui); #else #if ARCH_X86_64 return (unsigned int)__rdtscp();