Update how CPU family and model are computed for x86 architectures, using
the specifications in the Intel and AMD manuals.
In particular, the old code didn't take into account the extended family
when computing the display family. This computed an incorrect family for
AMD devices, because the common Intel microarchitectures have extended
family 0.
Also compute an extended model only for families where it is defined.
Moved the computation to a separate function, so it can be tested.
The family is used only in three places in the Chromium code base.
The use in chrome/browser/metrics/perf/cpu_identity.cc is what motivated
this change. The other two uses are used in logging.
BUG=b:128528055
Change-Id: I04de6c6cf22e0637246f89cfe0d1538bba194696
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758824
Reviewed-by: Gabriel Marin <gmx@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687903}
Detect popcount from cpuid and add feature flag in
pnacl.
BUG=660673
Review-Url: https://codereview.chromium.org/2458333002
Cr-Commit-Position: refs/heads/master@{#428632}
clangcl supports Visual C (Intel) syntax for inline assembly for 64 bit,
as well as 32 bit. Enable the existing instruction set test when built
with clangcl.
R=brucedawson@chromium.org
BUG=chromium:168866
Review URL: https://codereview.chromium.org/1385093002
Cr-Commit-Position: refs/heads/master@{#352629}
Update unittest to test avx and avx2, including for win64 with clangcl.
Add AVX2 to uma for histograms.
BUG=chromium:537916,chromium:168866
Review URL: https://codereview.chromium.org/1380943002
Cr-Commit-Position: refs/heads/master@{#351949}
ARCH_CPU_X86_FAMILY was never being defined, causing base::CPU::Initialize to be a no-op.
BUG=
TEST=
Review URL: http://codereview.chromium.org/9836125
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130046 0039d316-1c4b-4281-b951-d872f2087c98
This change prevents compiling cpu_unittest on 32-bit GCC since some builders does not compile with SSE support.
TBR=jiesun
BUG=none
TEST=fix build.
Review URL: http://codereview.chromium.org/6581032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75872 0039d316-1c4b-4281-b951-d872f2087c98
This change prevents compiling cpu_unittest on 32-bit GCC since some builders does not compile with SSE support.
TBR=jiesun
BUG=none
TEST=fix build.
Review URL: http://codereview.chromium.org/6578017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75871 0039d316-1c4b-4281-b951-d872f2087c98
This change just adds a unit test "CPU.RunExtendedInstructions" to base_unittests, which runs extended instructions for each CPU member function.
BUG=none
TEST=CPU.RunExtendedInstructions
Review URL: http://codereview.chromium.org/6548003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75861 0039d316-1c4b-4281-b951-d872f2087c98