Skip to content

Commit

Permalink
SH: makecontext: Fix calculation of ARGC > 4.
Browse files Browse the repository at this point in the history
stdlib/tst-setcontext and stdlib/tst-makecontext3 now pass.
  • Loading branch information
Thomas Schwinge committed Jun 23, 2012
1 parent af1bce3 commit 2a64972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion sysdeps/unix/sysv/linux/sh/makecontext.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a64972

Please sign in to comment.