Inline assembly is not supported for msvc x64 instead use __rdtsc intrinsic.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> --- lib/eal/x86/include/rte_cycles.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/eal/x86/include/rte_cycles.h b/lib/eal/x86/include/rte_cycles.h index a461a4d..0c142ce 100644 --- a/lib/eal/x86/include/rte_cycles.h +++ b/lib/eal/x86/include/rte_cycles.h @@ -6,6 +6,10 @@ #ifndef _RTE_CYCLES_X86_64_H_ #define _RTE_CYCLES_X86_64_H_ +#ifdef RTE_TOOLCHAIN_MSVC +#include <intrin.h> +#endif + #ifdef __cplusplus extern "C" { #endif @@ -23,6 +27,7 @@ static inline uint64_t rte_rdtsc(void) { +#ifndef RTE_TOOLCHAIN_MSVC union { uint64_t tsc_64; RTE_STD_C11 @@ -47,6 +52,9 @@ "=a" (tsc.lo_32), "=d" (tsc.hi_32)); return tsc.tsc_64; +#else + return __rdtsc(); +#endif } static inline uint64_t -- 1.8.3.1