From 51ddd2c01e0636f713417f30379b876e85558f61 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 13 Dec 2009 09:47:02 -0800 Subject: Define bit_XXX and index_XXX. This patch defines bit_XXX and index_XXX and use them to check processor feature in assembly code. It can prevent typos in processor feature check. --- sysdeps/x86_64/multiarch/strrchr.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/x86_64/multiarch/strrchr.S') diff --git a/sysdeps/x86_64/multiarch/strrchr.S b/sysdeps/x86_64/multiarch/strrchr.S index f6665f34b7..0d17fdb585 100644 --- a/sysdeps/x86_64/multiarch/strrchr.S +++ b/sysdeps/x86_64/multiarch/strrchr.S @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include -#include +#include /* Define multiple versions only for the definition in libc and for @@ -32,7 +32,7 @@ ENTRY(strrchr) jne 1f call __init_cpu_features 1: leaq __strrchr_sse2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) jz 2f leaq __strrchr_sse42(%rip), %rax 2: ret -- cgit 1.4.1