summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/ifunc-defines.sym
diff options
context:
space:
mode:
authorSihai Yao <sihai.ysh@alibaba-inc.com>2014-04-17 08:00:21 -0700
committerH.J. Lu <hjl.tools@gmail.com>2014-04-17 08:00:21 -0700
commitf9281df9955fdd11799041ebebd7dc6e4870449a (patch)
treebfd7b1a7e35688d8d0bd6ef90dc84dbe3fb641aa /sysdeps/x86_64/multiarch/ifunc-defines.sym
parent7c6776620db8e48fca492dbcac88d1c0f239dcde (diff)
downloadglibc-f9281df9955fdd11799041ebebd7dc6e4870449a.tar.gz
glibc-f9281df9955fdd11799041ebebd7dc6e4870449a.tar.xz
glibc-f9281df9955fdd11799041ebebd7dc6e4870449a.zip
Detect if AVX2 is usable
This patch checks and sets bit_AVX2_Usable in __cpu_features.feature.

	* sysdeps/x86_64/multiarch/ifunc-defines.sym (COMMON_CPUID_INDEX_7):
	New.
	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
	Check and set bit_AVX2_Usable.
	* sysdeps/x86_64/multiarch/init-arch.h (bit_AVX2_Usable): New
	macro.
	(bit_AVX2): Likewise.
	(index_AVX2_Usable): Likewise.
	(CPUID_AVX2): Likewise.
	(HAS_AVX2): Likewise.
Diffstat (limited to 'sysdeps/x86_64/multiarch/ifunc-defines.sym')
-rw-r--r--sysdeps/x86_64/multiarch/ifunc-defines.sym1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/ifunc-defines.sym b/sysdeps/x86_64/multiarch/ifunc-defines.sym
index eb1538abcc..a410d8808f 100644
--- a/sysdeps/x86_64/multiarch/ifunc-defines.sym
+++ b/sysdeps/x86_64/multiarch/ifunc-defines.sym
@@ -17,4 +17,5 @@ FEATURE_OFFSET		offsetof (struct cpu_features, feature)
 FEATURE_SIZE		sizeof (unsigned int)
 
 COMMON_CPUID_INDEX_1
+COMMON_CPUID_INDEX_7
 FEATURE_INDEX_1