diff options
| author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2016-08-05 15:59:11 +0000 |
|---|---|---|
| committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2016-08-05 15:59:11 +0000 |
| commit | 5bf494e73d8e6bbde9eee09e3acd0fb38e8b7330 (patch) | |
| tree | 76d00b583f581556a42a691af6e000d441f88b36 /openmp | |
| parent | 91c8450967805db88c3e511760c1e71f1d54c353 (diff) | |
| download | bcm5719-llvm-5bf494e73d8e6bbde9eee09e3acd0fb38e8b7330.tar.gz bcm5719-llvm-5bf494e73d8e6bbde9eee09e3acd0fb38e8b7330.zip | |
Fixed x2APIC discovery for 256-processor architectures.
Mask for value read from ebx register returned by CPUID expanded to 0xFFFF.
Differential Revision: https://reviews.llvm.org/D23203
llvm-svn: 277825
Diffstat (limited to 'openmp')
| -rw-r--r-- | openmp/runtime/src/kmp_affinity.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp index 5745f1eab6f..594d8e45cd1 100644 --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -1429,7 +1429,7 @@ __kmp_affinity_create_x2apicid_map(AddrUnsPair **address2os, threadLevel = level; coreLevel = -1; pkgLevel = -1; - __kmp_nThreadsPerCore = buf.ebx & 0xff; + __kmp_nThreadsPerCore = buf.ebx & 0xffff; if (__kmp_nThreadsPerCore == 0) { *msg_id = kmp_i18n_str_InvalidCpuidInfo; return -1; @@ -1441,7 +1441,7 @@ __kmp_affinity_create_x2apicid_map(AddrUnsPair **address2os, // coreLevel = level; pkgLevel = -1; - nCoresPerPkg = buf.ebx & 0xff; + nCoresPerPkg = buf.ebx & 0xffff; if (nCoresPerPkg == 0) { *msg_id = kmp_i18n_str_InvalidCpuidInfo; return -1; @@ -1456,7 +1456,7 @@ __kmp_affinity_create_x2apicid_map(AddrUnsPair **address2os, continue; } pkgLevel = level; - nPackages = buf.ebx & 0xff; + nPackages = buf.ebx & 0xffff; if (nPackages == 0) { *msg_id = kmp_i18n_str_InvalidCpuidInfo; return -1; |

