about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--sysdeps/unix/arm/brk.S6
-rw-r--r--sysdeps/unix/sysv/linux/arm/socket.S8
3 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e37d65cd2..e292f18d04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-07-24  Philip Blundell  <philb@gnu.org>
+
+	* sysdeps/unix/arm/brk.S: Improve schedule.
+	* sysdeps/unix/sysv/linux/arm/socket.S (PUSHARGS_1): Use more
+	efficient instruction.
+	(__socket): Optimize return sequence.
+
 2002-07-24  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/opensock.c (__opensock): Prefer inet
@@ -11,7 +18,7 @@
 
 2002-07-24  Ulrich Drepper  <drepper@redhat.com>
 
-	* locale/hashval.h: Make more self-containedby defining LONG_BITS.
+	* locale/hashval.h: Make more self-contained by defining LONG_BITS.
 	* locale/programs/simple-hash.c: Remove LONG_BITS definition.
 
 	* locale/programs/locarchive.c (add_locale_to_archive): Correct
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
index c68fec6266..9e20dc6932 100644
--- a/sysdeps/unix/arm/brk.S
+++ b/sysdeps/unix/arm/brk.S
@@ -35,8 +35,8 @@ C_LABEL(__curbrk)
 SYSCALL__ (brk, 1)
 #ifdef PIC
 	ldr r1, 1f
-	add r1, r1, pc
-2:	ldr r2, _cb_addr
+	ldr r2, _cb_addr
+2:	add r1, pc, r1
 	add r1, r1, r2
 #else
 	ldr r1, _cb_addr
@@ -45,7 +45,7 @@ SYSCALL__ (brk, 1)
 	mov r0, $0
 	RETINSTR(mov, pc, r14)
 #ifdef PIC
-1:	.long _GLOBAL_OFFSET_TABLE_ - 2b - 4
+1:	.long _GLOBAL_OFFSET_TABLE_ - 2b - 8
 _cb_addr:
 	.long C_SYMBOL_NAME(__curbrk)(GOTOFF)
 #else
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index a672413d12..2672de7b2c 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -35,7 +35,7 @@
 #define __socket P(__,socket)
 #endif
 
-#define PUSHARGS_1	stmfd sp!, {a1}
+#define PUSHARGS_1	str a1, [sp, $-4]!
 #define PUSHARGS_2	stmfd sp!, {a1, a2}
 #define PUSHARGS_3	stmfd sp!, {a1, a2, a3}
 #define PUSHARGS_4	stmfd sp!, {a1, a2, a3, a4}
@@ -78,10 +78,8 @@ ENTRY (__socket)
 
 	/* r0 is < 0 if there was an error.  */
 	cmn r0, $124
-	bhs PLTJMP(syscall_error)
-
-	/* Successful; return the syscall's value.  */
-	ret
+	RETINSTR(movcc, pc, r14)
+	b PLTJMP(syscall_error)
 
 PSEUDO_END (__socket)