aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkOpts.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-11-09 07:08:32 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-09 07:08:32 -0800
commit953549235ddaaf4e670b44bd69efa1ac1c835be0 (patch)
tree91fa68c20d1fbb35be4652746182a18110b2cd22 /src/core/SkOpts.cpp
parent417011c80c1fc4cef69cfb64122257194fd261ca (diff)
sse 4.2 detection
While we're detecting instruction sets, let's fill in this hole too. BUG=skia: Review URL: https://codereview.chromium.org/1419553007
Diffstat (limited to 'src/core/SkOpts.cpp')
-rw-r--r--src/core/SkOpts.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp
index 57c387a619..99ffc1b7f3 100644
--- a/src/core/SkOpts.cpp
+++ b/src/core/SkOpts.cpp
@@ -83,9 +83,10 @@ namespace SkOpts {
// Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
void Init_ssse3();
void Init_sse41();
- void Init_neon();
+ void Init_sse42() { SkDEBUGCODE( SkDebugf("sse 4.2 detected\n"); ) }
void Init_avx() { SkDEBUGCODE( SkDebugf("avx detected\n"); ) }
void Init_avx2() { SkDEBUGCODE( SkDebugf("avx2 detected\n"); ) }
+ void Init_neon();
//TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, ... ?
static void init() {
@@ -95,6 +96,7 @@ namespace SkOpts {
cpuid(abcd);
if (abcd[2] & (1<< 9)) { Init_ssse3(); }
if (abcd[2] & (1<<19)) { Init_sse41(); }
+ if (abcd[2] & (1<<20)) { Init_sse42(); }
// AVX detection's kind of a pain. This is cribbed from Chromium.
if ( ( abcd[2] & (7<<26)) == (7<<26) && // Check bits 26-28 of ecx are all set,