summaryrefslogtreecommitdiff
path: root/volk
diff options
context:
space:
mode:
Diffstat (limited to 'volk')
-rw-r--r--volk/gen/archs.xml6
-rw-r--r--volk/tmpl/volk_cpu.tmpl.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/volk/gen/archs.xml b/volk/gen/archs.xml
index 134dfa2d9..ac4dd9f7f 100644
--- a/volk/gen/archs.xml
+++ b/volk/gen/archs.xml
@@ -160,6 +160,12 @@
<param>0x00000001</param>
<param>28</param>
</check>
+ <!-- check to make sure that xgetbv is enabled in OS -->
+ <check name="cpuid_x86_bit">
+ <param>2</param>
+ <param>0x00000001</param>
+ <param>27</param>
+ </check>
<!-- check to see that the OS has enabled AVX -->
<check name="get_avx_enabled"></check>
<flag>mavx</flag>
diff --git a/volk/tmpl/volk_cpu.tmpl.c b/volk/tmpl/volk_cpu.tmpl.c
index 94895a76f..e0a0e91de 100644
--- a/volk/tmpl/volk_cpu.tmpl.c
+++ b/volk/tmpl/volk_cpu.tmpl.c
@@ -90,8 +90,6 @@ static inline unsigned int check_extended_cpuid(unsigned int val) {
static inline unsigned int get_avx_enabled(void) {
#if defined(VOLK_CPU_x86)
- //check to make sure that xgetbv is enabled in OS
- if(!cpuid_x86_bit(2, 1, 27)) return 0;
return __xgetbv() & 0x6;
#else
return 0;