From: "Rich Felker (dalias@libc.org)" <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: RE: [PATCH] MIPS64 atomic_arch.h Clang complains about input type
Date: Fri, 11 Mar 2016 00:19:16 -0500 [thread overview]
Message-ID: <20160311051916.GW9349@brightrain.aerifal.cx> (raw)
In-Reply-To: <BD7773622145634B952E5B54ACA8E349AA2460BB@PUMAIL01.pu.imgtec.org>
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@imgtec.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
next prev parent reply other threads:[~2016-03-11 5:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 5:00 Jaydeep Patil
2016-03-11 5:19 ` Rich Felker (dalias@libc.org) [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-08 10:09 Jaydeep Patil
2016-03-08 11:26 ` Szabolcs Nagy
2016-03-08 17:26 ` Rich Felker (dalias@libc.org)
2016-03-08 18:11 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160311051916.GW9349@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).