SH: makecontext: Fix calculation of ARGC > 4

Kaz Kojima kkojima@rr.iij4u.or.jp
Thu Jun 14 10:47:00 GMT 2012


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



More information about the Libc-alpha mailing list