diff options
author | fbarchard <fbarchard@google.com> | 2015-10-06 10:26:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-06 17:27:19 +0000 |
commit | 20028e68089da9762bfd62a6dedf167f3f017222 (patch) | |
tree | f95cb756d0b0e5bc0b0d3cc549d8887f788c085d /base/cpu_unittest.cc | |
parent | 485dc8c5bc564ce29b8641c9bb740db9f86c9c4c (diff) | |
download | chromium_src-20028e68089da9762bfd62a6dedf167f3f017222.zip chromium_src-20028e68089da9762bfd62a6dedf167f3f017222.tar.gz chromium_src-20028e68089da9762bfd62a6dedf167f3f017222.tar.bz2 |
Enable CPU.RunExtendedInstructions test for win64 with clangcl
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}
Diffstat (limited to 'base/cpu_unittest.cc')
-rw-r--r-- | base/cpu_unittest.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/cpu_unittest.cc b/base/cpu_unittest.cc index 9315097..ec14620 100644 --- a/base/cpu_unittest.cc +++ b/base/cpu_unittest.cc @@ -26,7 +26,7 @@ TEST(CPU, RunExtendedInstructions) { ASSERT_TRUE(cpu.has_sse()); ASSERT_TRUE(cpu.has_sse2()); -// TODO(fbarchard): consider enabling for clangcl. +// GCC and clang instruction test. #if defined(COMPILER_GCC) // Execute an MMX instruction. __asm__ __volatile__("emms\n" : : : "mm0"); @@ -67,8 +67,9 @@ TEST(CPU, RunExtendedInstructions) { __asm__ __volatile__("vpunpcklbw %%ymm0, %%ymm0, %%ymm0\n" : : : "xmm0"); } -// TODO(jschuh): crbug.com/168866 Find a way to enable this on Win64. -#elif defined(COMPILER_MSVC) && defined(ARCH_CPU_32_BITS) +// Visual C 32 bit and ClangCL 32/64 bit test. +#elif defined(COMPILER_MSVC) && (defined(ARCH_CPU_32_BITS) || \ + (defined(ARCH_CPU_64_BITS) && defined(__clang__))) // Execute an MMX instruction. __asm emms; |