aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-06-23 11:28:23 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-06-23 11:28:23 +0200
commit2a649725b939fe8a50089cce9644b9649ef4fe43 (patch)
tree33b440f1c8d2d190471c91a602b85102a702dc0c
parentaf1bce34ef3ae8caa84214175e93d809c11a5ea4 (diff)
downloadglibc-2a649725b939fe8a50089cce9644b9649ef4fe43.zip
glibc-2a649725b939fe8a50089cce9644b9649ef4fe43.tar.gz
glibc-2a649725b939fe8a50089cce9644b9649ef4fe43.tar.bz2
SH: makecontext: Fix calculation of ARGC > 4.
stdlib/tst-setcontext and stdlib/tst-makecontext3 now pass.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/sh/makecontext.S2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ebc2ab..49c98fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
+ * sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext): Fix
+ calculation of ARGC > 4.
+
* sysdeps/unix/sysv/linux/sh/makecontext.S: Add comments and give more
meaningful names to some local labels.
diff --git a/sysdeps/unix/sysv/linux/sh/makecontext.S b/sysdeps/unix/sysv/linux/sh/makecontext.S
index 9e1358d..4a0207a 100644
--- a/sysdeps/unix/sysv/linux/sh/makecontext.S
+++ b/sysdeps/unix/sysv/linux/sh/makecontext.S
@@ -36,7 +36,7 @@ ENTRY(__makecontext)
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? */
+ cmp/gt r3, r6 /* argc > 4? */
bf/s 1f
shlr2 r2 /* r2 <- stack_top / 4 */
sub r6, r2