Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 11 Mar 2016 00:19:16 -0500
From: "Rich Felker (dalias@...c.org)" <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: RE: [PATCH] MIPS64 atomic_arch.h Clang complains about
 input type

On Wed, Mar 09, 2016 at 05:00:42AM +0000, Jaydeep Patil wrote:
> Hi Rich,
> 
> > If simply using 'long' works, I think that's the cleanest/simplest
> > solution. The union is uglier and less obvious what it's doing so I'd
> > rather avoid it if we can.
> 
> >From e91d41f84822377ef14c675094ad904d89dbd927 Mon Sep 17 00:00:00 2001
> From: Jaydeep Patil <jaydeep.patil@...tec.com>
> Date: Wed, 9 Mar 2016 04:56:50 +0000
> Subject: [PATCH 2/2] [MIPS64] Change a_sc_p for clang
> 
> ---
> arch/mips64/atomic_arch.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips64/atomic_arch.h b/arch/mips64/atomic_arch.h
> index 8af6500..df35cf6 100644
> --- a/arch/mips64/atomic_arch.h
> +++ b/arch/mips64/atomic_arch.h
> @@ -29,9 +29,9 @@ static inline void *a_ll_p(volatile long *p)
> }
> 
> #define a_sc_p a_sc_p
> -static inline void *a_sc_p(volatile long *p, void *v)
> +static inline long a_sc_p(volatile long *p, void *v)
> {
> -       void *r;
> +       long r;
>         __asm__ __volatile__ (
>                 "scd %0, %1"
>                 : "=r"(r), "=m"(*p) : "0"(v) : "memory");

I've committed this fix and also fixed the pointer types to match the
actual types they operate on.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.