This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: SH: makecontext: Fix calculation of ARGC > 4
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: thomas at codesourcery dot com
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 14 Jun 2012 19:46:40 +0900 (JST)
- Subject: Re: SH: makecontext: Fix calculation of ARGC > 4
- References: <87pq925hux.fsf@schwinge.name>
Thomas Schwinge <thomas@codesourcery.com> wrote:
> With this patch, stdlib/tst-setcontext and stdlib/tst-makecontext3 now
> pass. Kaz, does this make sense?
>
> * sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext): Fix
> calculation of ARGC > 4.
>
> diff --git a/sysdeps/unix/sysv/linux/sh/makecontext.S b/sysdeps/unix/sysv/linux/sh/makecontext.S
> index 0a9e079..6132cf9 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
> mov.l @(oSS_SIZE,r4), r2
> add r1, r2
> - cmp/gt r6, r3
> + cmp/gt r3, r6
> bf/s 1f
> shlr2 r2
> sub r6, r2
>
>
> During review of that file, I annotated the assembler code as in the
> following -- enough to now have this in the mailing list archives or
> would that be worth committing, too?
Yes and yes. Thanks for the fix and nice annotations!
Regards,
kaz