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: [Patch] aarch64: Fix tst-makecontext3 in ILP32 mode.


On Aug 15 2017, Steve Ellcey <sellcey@cavium.com> wrote:

> diff --git a/sysdeps/unix/sysv/linux/aarch64/makecontext.c b/sysdeps/unix/sysv/linux/aarch64/makecontext.c
> index f510f48..8e52b5d 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/makecontext.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/makecontext.c
> @@ -42,18 +42,18 @@ void
>  __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
>  {
>    extern void __startcontext (void);
> -  unsigned long int *sp;
> +  uint64_t *sp;
>    va_list ap;
>    int i;
>  
> -  sp = (unsigned long int *)
> +  sp = (uint64_t *)
>      ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
>  
>    /* Allocate stack arguments.  */
>    sp -= argc < 8 ? 0 : argc - 8;
>  
>    /* Keep the stack aligned.  */
> -  sp = (unsigned long int *) (((uintptr_t) sp) & -16L);
> +  sp = (uint64_t *) (((uintptr_t) sp) & -16L);
>  
>    ucp->uc_mcontext.regs[19] = (uintptr_t) ucp->uc_link;
>    ucp->uc_mcontext.sp = (uintptr_t) sp;
> @@ -66,7 +66,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
>      if (i < 8)
>        ucp->uc_mcontext.regs[i] = va_arg (ap, unsigned long int);

I think you want to use uint64_t here as well.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


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