diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-12-17 16:58:26 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-12-17 16:58:26 +0000 |
commit | f741312c6f290a3ff83d09ab13cbb77fef69fdd3 (patch) | |
tree | b594c8963298cbd7a958c8721bd3f3659ba64768 /openmp/runtime/src | |
parent | 87323da6eb2e49d8b34d8e2697fcee3799d42679 (diff) | |
download | bcm5719-llvm-f741312c6f290a3ff83d09ab13cbb77fef69fdd3.tar.gz bcm5719-llvm-f741312c6f290a3ff83d09ab13cbb77fef69fdd3.zip |
[STATS] replace __cpuid() intrinsic with already existing __kmp_x86_cpuid() function
llvm-svn: 255907
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/kmp_stats_timing.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/openmp/runtime/src/kmp_stats_timing.cpp b/openmp/runtime/src/kmp_stats_timing.cpp index 08263670ea4..2b5049a4091 100644 --- a/openmp/runtime/src/kmp_stats_timing.cpp +++ b/openmp/runtime/src/kmp_stats_timing.cpp @@ -20,6 +20,7 @@ #include <iomanip> #include <sstream> +#include "kmp.h" #include "kmp_stats_timing.h" using namespace std; @@ -40,15 +41,15 @@ double tsc_tick_count::tick_time() if (result == 0.0) { - int cpuinfo[4]; + kmp_cpuid_t cpuinfo; char brand[256]; - __cpuid(cpuinfo, 0x80000000); + __kmp_x86_cpuid(0x80000000, 0, &cpuinfo); memset(brand, 0, sizeof(brand)); - int ids = cpuinfo[0]; + int ids = cpuinfo.eax; for (unsigned int i=2; i<(ids^0x80000000)+2; i++) - __cpuid(brand+(i-2)*sizeof(cpuinfo), i | 0x80000000); + __kmp_x86_cpuid(i | 0x80000000, 0, (kmp_cpuid_t*)(brand+(i-2)*sizeof(kmp_cpuid_t))); char * start = &brand[0]; for (;*start == ' '; start++) |