about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/bzero.S
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-10-11 13:58:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-10-11 13:58:16 -0700
commit9a387d1f787f764474943294024b02258f14e80a (patch)
tree3159228b99a2195dd1347a673a08efefce787ad3 /sysdeps/x86_64/multiarch/bzero.S
parent54a417345edca0015e70e8b360b7f83ade5a7507 (diff)
downloadglibc-9a387d1f787f764474943294024b02258f14e80a.tar.gz
glibc-9a387d1f787f764474943294024b02258f14e80a.tar.xz
glibc-9a387d1f787f764474943294024b02258f14e80a.zip
Use IFUNC memmove/memset in x86-64 bcopy/bzero
Also add separate tests for bcopy and bzero.
Diffstat (limited to 'sysdeps/x86_64/multiarch/bzero.S')
-rw-r--r--sysdeps/x86_64/multiarch/bzero.S35
1 files changed, 4 insertions, 31 deletions
diff --git a/sysdeps/x86_64/multiarch/bzero.S b/sysdeps/x86_64/multiarch/bzero.S
index 92e9fcfc76..23beab7a39 100644
--- a/sysdeps/x86_64/multiarch/bzero.S
+++ b/sysdeps/x86_64/multiarch/bzero.S
@@ -1,5 +1,5 @@
-/* Multiple versions of bzero
-   Copyright (C) 2010 Free Software Foundation, Inc.
+/* bzero.  x86-64 version.
+   Copyright (C) 2010-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,35 +21,8 @@
 
 	.text
 ENTRY(__bzero)
-	.type	__bzero, @gnu_indirect_function
-	cmpl	$0, __cpu_features+KIND_OFFSET(%rip)
-	jne	1f
-	call	__init_cpu_features
-1:	leaq	__bzero_x86_64(%rip), %rax
-	testl	$bit_Prefer_SSE_for_memop, __cpu_features+FEATURE_OFFSET+index_Prefer_SSE_for_memop(%rip)
-	jz	2f
-	leaq	__bzero_sse2(%rip), %rax
-2:	ret
-END(__bzero)
-
-	.type	__bzero_sse2, @function
-__bzero_sse2:
-	cfi_startproc
-	CALL_MCOUNT
 	mov	%rsi,%rdx	/* Adjust parameter.  */
 	xorl	%esi,%esi	/* Fill with 0s.  */
-	jmp	__memset_sse2
-	cfi_endproc
-	.size __bzero_sse2, .-__bzero_sse2
-
-	.type	__bzero_x86_64, @function
-__bzero_x86_64:
-	cfi_startproc
-	CALL_MCOUNT
-	mov	%rsi,%rdx	/* Adjust parameter.  */
-	xorl	%esi,%esi	/* Fill with 0s.  */
-	jmp	__memset_x86_64
-	cfi_endproc
-	.size __bzero_x86_64, .-__bzero_x86_64
-
+	jmp	__libc_memset	/* Branch to IFUNC memset.  */
+END(__bzero)
 weak_alias (__bzero, bzero)