summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-14 09:58:43 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-06-14 10:00:28 -0700
commit49bdf4c19d35c8ae4070699dc0267db3b9a7d79c (patch)
tree613c60ef2119a3984f2aedeb399c3b278653b1d7 /sysdeps/x86_64
parent834f9b8d3cda2cc81084d0913bcefc7683bb9194 (diff)
downloadglibc-49bdf4c19d35c8ae4070699dc0267db3b9a7d79c.tar.gz
glibc-49bdf4c19d35c8ae4070699dc0267db3b9a7d79c.tar.xz
glibc-49bdf4c19d35c8ae4070699dc0267db3b9a7d79c.zip
Use RAX_LP/RDX_LP on SAVE_PTR in x86_64 strtok.S
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/strtok.S17
1 files changed, 8 insertions, 9 deletions
diff --git a/sysdeps/x86_64/strtok.S b/sysdeps/x86_64/strtok.S
index 150f4d642a..fe4a9475b3 100644
--- a/sysdeps/x86_64/strtok.S
+++ b/sysdeps/x86_64/strtok.S
@@ -1,6 +1,6 @@
 /* strtok (str, delim) -- Return next DELIM separated token from STR.
    For AMD x86-64.
-   Copyright (C) 1998,2000-2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1998-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on i686 version contributed by Ulrich Drepper
    <drepper@cygnus.com>, 1998.
@@ -45,9 +45,9 @@
 	.bss
 	.local save_ptr
 	ASM_TYPE_DIRECTIVE (save_ptr, @object)
-	.size save_ptr, 8
+	.size save_ptr, LP_SIZE
 save_ptr:
-	.space 8
+	.space LP_SIZE
 
 # ifdef PIC
 #  define SAVE_PTR save_ptr(%rip)
@@ -79,13 +79,12 @@ ENTRY (BP_SYM (FUNCTION))
 
 #ifdef USE_AS_STRTOK_R
 	/* The value is stored in the third argument.  */
-	movq %rdx, %rax
-	movq %rdx, %r9		/* Save value - see def. of SAVE_PTR.  */
-	movq (%rax), %rax
+	mov %RDX_LP, %R9_LP	/* Save value - see def. of SAVE_PTR.  */
+	mov (%rdx), %RAX_LP
 #else
 	/* The value is in the local variable defined above.  But
 	   we have to take care for PIC code.  */
-	movq SAVE_PTR, %rax
+	mov SAVE_PTR, %RAX_LP
 #endif
 	movq %r8, %rdx		/* Get start of string.  */
 
@@ -194,7 +193,7 @@ L(8):	cmpq %rax, %rdx
 	cmovne %rcx, %rdx
 
 	/* Store the pointer to the next character.  */
-	movq %rdx, SAVE_PTR
+	mov %RDX_LP, SAVE_PTR
 
 L(epilogue):
 	/* Remove the stopset table.  */
@@ -205,7 +204,7 @@ L(epilogue):
 L(returnNULL):
 	xorl %eax, %eax
 	/* Store the pointer to the next character.  */
-	movq %rdx, SAVE_PTR
+	mov %RDX_LP, SAVE_PTR
 	jmp L(epilogue)
 
 END (BP_SYM (FUNCTION))