Index: src/core/SkOpts.cpp |
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp |
index 50659d4590fa95948b02cd1fea2e16afbe274528..950c987dd444807bbbf5f6e3cdd7a0dd6d75d2d4 100644 |
--- a/src/core/SkOpts.cpp |
+++ b/src/core/SkOpts.cpp |
@@ -64,6 +64,8 @@ namespace SK_OPTS_NS { |
namespace SkOpts { |
+ bool has_f16c = false; |
+ |
// Define default function pointer values here... |
// If our global compile options are set high enough, these defaults might even be |
// CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defaults. |
@@ -128,6 +130,10 @@ namespace SkOpts { |
(xgetbv(0) & 6 ) == 6 ){ // and check the OS supports XSAVE. |
Init_avx(); |
+ if (abcd[2] & (1<<29)) { |
+ has_f16c = true; |
+ } |
+ |
// AVX2 additionally needs bit 5 set on ebx after calling cpuid(7). |
uint32_t abcd7[] = {0,0,0,0}; |
cpuid7(abcd7); |