summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-03 12:07:01 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-03 12:07:01 +0000
commitecdd1a316035312a0565a64011520819ff36ae11 (patch)
tree592feec09cb2886c1f5420472e36d06aaaf531b3 /sysdeps
parentcab24c3767986d0c4c336634756b4de5aee3a797 (diff)
downloadglibc-ecdd1a316035312a0565a64011520819ff36ae11.tar.gz
glibc-ecdd1a316035312a0565a64011520819ff36ae11.tar.xz
glibc-ecdd1a316035312a0565a64011520819ff36ae11.zip
Update.
1998-04-03 16:29  Philip Blundell  <pb@nexus.co.uk>

	Based on patch from Pat Beirne:
	* sysdeps/unix/sysv/linux/arm/sysdep.S (__syscall_error): Same for
	PIC and non-PIC now.  Correctly negate error number.
	(errno): Use `%' not `@' in .type directives.

1998-04-03  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/i386/strtok.S: Change to use single exit point.
	* sysdeps/i386/i686/strtok.S: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/i686/strtok.S16
-rw-r--r--sysdeps/i386/strtok.S18
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep.S22
3 files changed, 12 insertions, 44 deletions
diff --git a/sysdeps/i386/i686/strtok.S b/sysdeps/i386/i686/strtok.S
index 62d54c4e1a..c7a058eb41 100644
--- a/sysdeps/i386/i686/strtok.S
+++ b/sysdeps/i386/i686/strtok.S
@@ -207,6 +207,7 @@ L(8):	/* Remove the stopset table.  */
 	leal 1(%edx), %ecx
 	cmovne %ecx, %edx
 
+L(return):
 	/* Store the pointer to the next character.  */
 #ifdef USE_AS_STRTOK_R
 	movl 12(%esp), %ecx
@@ -223,18 +224,5 @@ L(8):	/* Remove the stopset table.  */
 
 L(returnNULL):
 	xorl %eax, %eax
-
-	/* Store current pointer for next round.  */
-#ifdef USE_AS_STRTOK_R
-	movl 12(%esp), %ecx
-	movl %edx, (%ecx)
-#else
-# ifndef PIC
-	movl %edx, save_ptr
-# else
-	movl %edx, save_ptr@GOTOFF(%ebx)
-	popl %ebx
-# endif
-#endif
-	ret
+	jmp L(return)
 END (FUNCTION)
diff --git a/sysdeps/i386/strtok.S b/sysdeps/i386/strtok.S
index 3d09dd7406..c6469e8ecf 100644
--- a/sysdeps/i386/strtok.S
+++ b/sysdeps/i386/strtok.S
@@ -1,6 +1,6 @@
 /* strtok (str, delim) -- Return next DELIM separated token from STR.
    For Intel 80x86, x>=3.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -254,6 +254,7 @@ L(8):	/* Remove the stopset table.  */
 	incl %edx
 L(11):
 
+L(return):
 	/* Store the pointer to the next character.  */
 #ifdef USE_AS_STRTOK_R
 	movl 12(%esp), %ecx
@@ -270,18 +271,5 @@ L(11):
 
 L(returnNULL):
 	xorl %eax, %eax
-
-	/* Store current pointer for next round.  */
-#ifdef USE_AS_STRTOK_R
-	movl 12(%esp), %ecx
-	movl %edx, (%ecx)
-#else
-# ifndef PIC
-	movl %edx, save_ptr
-# else
-	movl %edx, save_ptr@GOTOFF(%ebx)
-	popl %ebx
-# endif
-#endif
-	ret
+	jmp L(return)
 END (FUNCTION)
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index a71181c911..482535bea5 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 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,31 +21,23 @@
 /* We define errno here, to be consistent with Linux/i386.  */
 	.bss
 	.globl errno
-	.type errno,@object
+	.type errno,%object
 	.size errno,4
 errno:	.zero 4
 	.globl _errno
-	.type _errno,@object
+	.type _errno,%object
 _errno = errno	/* This name is expected by hj's libc.so.5 startup code.  */
 	.text
 
-/* The following code is only used in the shared library when we
-   compile the reentrant version.  Otherwise each system call defines
-   each own version.  */
-
-#ifndef PIC
-
 /* The syscall stubs jump here when they detect an error.
-   The code for Linux is almost identical to the canonical Unix/i386
-   code, except that the error number in %eax is negated.  */
+   The code for Linux is almost identical to the canonical Unix
+   code, except that the error number in R0 is negated.  */
 
 #undef CALL_MCOUNT
-#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax.  */
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers R0.  */
 
 ENTRY (__syscall_error)
-	mvn r0, r0
+	rsb r0, r0, $0
 
 #define __syscall_error __syscall_error_1
 #include <sysdeps/unix/arm/sysdep.S>
-
-#endif	/* !PIC */