This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-1203-gaf1bce3
- From: tschwinge at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 23 Jun 2012 09:23:30 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-1203-gaf1bce3
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via af1bce34ef3ae8caa84214175e93d809c11a5ea4 (commit)
from d230f50a0639b9bda8562fda3c905a964e371a38 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af1bce34ef3ae8caa84214175e93d809c11a5ea4
commit af1bce34ef3ae8caa84214175e93d809c11a5ea4
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Sat Jun 23 11:22:47 2012 +0200
SH: makecontext: Improve understandability.
diff --git a/ChangeLog b/ChangeLog
index 455c3cc..3ebc2ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/sh/makecontext.S: Add comments and give more
+ meaningful names to some local labels.
+
2012-06-22 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Kaz Kojima <kkojima@rr.iij4u.or.jp>
diff --git a/sysdeps/unix/sysv/linux/sh/makecontext.S b/sysdeps/unix/sysv/linux/sh/makecontext.S
index 0a9e079..9e1358d 100644
--- a/sysdeps/unix/sysv/linux/sh/makecontext.S
+++ b/sysdeps/unix/sysv/linux/sh/makecontext.S
@@ -1,5 +1,5 @@
/* Create new context.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-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
@@ -33,44 +33,44 @@
.align 5
ENTRY(__makecontext)
mov #4, r3
- mov.l @(oSS_SP,r4), r1
- mov.l @(oSS_SIZE,r4), r2
- add r1, r2
- cmp/gt r6, r3
+ mov.l @(oSS_SP,r4), r1 /* r1 <- ucb->stack_base */
+ mov.l @(oSS_SIZE,r4), r2 /* r2 <- ucb->stack_size */
+ add r1, r2 /* r2 <- stack_top */
+ cmp/gt r6, r3 /* 4 > argc? */
bf/s 1f
- shlr2 r2
+ shlr2 r2 /* r2 <- stack_top / 4 */
sub r6, r2
add r3, r2
1:
- shll2 r2
+ shll2 r2 /* r2 <- stack_top - ((argc > 4) ? 4 * (argc - 4) : 0 */
mov #oR15, r0
mov.l @(oLINK,r4), r1
- mov.l r2, @(r0,r4)
- mov.l r1, @(oR8,r4)
+ mov.l r2, @(r0,r4) /* ucp->r15 <- r2 */
+ mov.l r1, @(oR8,r4) /* ucp->r8 <- ucp->uc_link */
mov #oPC, r0
- mov.l r5, @(r0,r4)
+ mov.l r5, @(r0,r4) /* ucp->PC <- func */
- cmp/pl r6
+ cmp/pl r6 /* argc > 0? */
bf/s .L1
dt r6
- mov.l r7, @(oR4,r4)
- cmp/pl r6
+ mov.l r7, @(oR4,r4) /* ucp->r4 <- argv[0] */
+ cmp/pl r6 /* argc > 1? */
bf/s .L1
dt r6
mov.l @(0,r15), r1
- mov.l r1, @(oR5,r4)
- cmp/pl r6
+ mov.l r1, @(oR5,r4) /* ucp->r5 <- argv[1] */
+ cmp/pl r6 /* argc > 2? */
bf/s .L1
dt r6
mov.l @(4,r15), r1
- mov.l r1, @(oR6,r4)
- cmp/pl r6
+ mov.l r1, @(oR6,r4) /* ucp->r6 <- argv[2] */
+ cmp/pl r6 /* argc > 3? */
bf/s .L1
dt r6
mov.l @(8,r15), r1
- mov.l r1, @(oR7,r4)
+ mov.l r1, @(oR7,r4) /* ucp->r7 <- argv[3] */
mov #12,r0
-.L0:
+.L0: /* Save remaining argv[] on the stack. */
cmp/pl r6
bf/s .L1
dt r6
@@ -87,7 +87,7 @@ ENTRY(__makecontext)
#endif
add #oPR, r4
rts
- mov.l r0, @r4
+ mov.l r0, @r4 /* ucp->pr <- exitcode */
#ifndef PIC
.align 2
.L2:
@@ -97,24 +97,24 @@ ENTRY(__makecontext)
.align 5
.Lexitcode:
- tst r8, r8
+ tst r8, r8 /* ucb->uc_link == NULL? */
bt/s 2f
- mov r8, r4
+ mov r8, r4 /* r4 <- ucb->uc_link */
#ifdef PIC
mova .Lgot, r0
mov.l .Lgot, r12
add r0, r12
- mov.l .L3, r1
+ mov.l .Lsetcontext, r1
bsrf r1
.LPCS0:
nop
#else
- mov.l .L3, r1
+ mov.l .Lsetcontext, r1
jsr @r1
nop
#endif
2:
- mov.l .L4, r1
+ mov.l .Lexit, r1
#ifdef PIC
add r12, r1
#endif
@@ -128,14 +128,14 @@ ENTRY(__makecontext)
#ifdef PIC
.Lgot:
.long _GLOBAL_OFFSET_TABLE_
-.L3:
+.Lsetcontext:
.long __setcontext@PLT-(.LPCS0+2-(.))
-.L4:
+.Lexit:
.long HIDDEN_JUMPTARGET(exit)@GOTOFF
#else
-.L3:
+.Lsetcontext:
.long __setcontext
-.L4:
+.Lexit:
.long HIDDEN_JUMPTARGET(exit)
#endif
cfi_startproc
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++
sysdeps/unix/sysv/linux/sh/makecontext.S | 58 +++++++++++++++---------------
2 files changed, 34 insertions(+), 29 deletions(-)
hooks/post-receive
--
GNU C Library master sources