From: Philip Blundell <Philip.Blundell@pobox.com>
To: libc-hacker@sources.redhat.com
Subject: small optimisation patch
Date: Wed, 24 Jul 2002 05:15:00 -0000 [thread overview]
Message-ID: <1027512900.3528.9.camel@mill> (raw)
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.
Index: sysdeps/unix/arm/brk.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/arm/brk.S,v
retrieving revision 1.4
diff -u -p -r1.4 brk.S
--- sysdeps/unix/arm/brk.S 6 Jul 2001 04:56:07 -0000 1.4
+++ sysdeps/unix/arm/brk.S 24 Jul 2002 11:39:26 -0000
@@ -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
Index: sysdeps/unix/sysv/linux/arm/socket.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/socket.S,v
retrieving revision 1.8
diff -u -p -r1.8 socket.S
--- sysdeps/unix/sysv/linux/arm/socket.S 6 Jul 2001 04:56:13 -0000 1.8
+++ sysdeps/unix/sysv/linux/arm/socket.S 24 Jul 2002 11:39:30 -0000
@@ -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)
next reply other threads:[~2002-07-24 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-24 5:15 Philip Blundell [this message]
2002-07-24 10:37 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1027512900.3528.9.camel@mill \
--to=philip.blundell@pobox.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).