This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SH: makecontext: Fix calculation of ARGC > 4


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]