mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] arch/sh/atomic_arch.sh: add missing : in asm() statement
Date: Fri, 11 Aug 2017 20:55:05 -0400	[thread overview]
Message-ID: <20170812005505.GQ1627@brightrain.aerifal.cx> (raw)
In-Reply-To: <20170728210554.6391-1-thomas.petazzoni@free-electrons.com>

On Fri, Jul 28, 2017 at 11:05:54PM +0200, Thomas Petazzoni wrote:
> Due to a missing ":" in an asm() statement, the "memory" statement is
> considered by gcc as input operands and not clobbers, which causes a
> build failure:
> 
> In file included from ./src/internal/atomic.h:6:0,
>                  from ./src/internal/pthread_impl.h:10,
>                  from src/ldso/dlerror.c:4:
> ../arch/sh/atomic_arch.h: In function 'a_barrier':
> ../arch/sh/atomic_arch.h:24:44: error: expected '(' before ')' token
>   __asm__ __volatile__ ("synco" : : "memory");
>                                             ^
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/sh/atomic_arch.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sh/atomic_arch.h b/arch/sh/atomic_arch.h
> index 74444d5..d48a765 100644
> --- a/arch/sh/atomic_arch.h
> +++ b/arch/sh/atomic_arch.h
> @@ -21,7 +21,7 @@ static inline int a_sc(volatile int *p, int v)
>  #define a_barrier a_barrier
>  static inline void a_barrier()
>  {
> -	__asm__ __volatile__ ("synco" : : "memory");
> +	__asm__ __volatile__ ("synco" ::: "memory");
>  }
>  
>  #define a_pre_llsc a_barrier
> -- 
> 2.9.4

Thanks! Applying.

Rich


      reply	other threads:[~2017-08-12  0:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 21:05 Thomas Petazzoni
2017-08-12  0:55 ` Rich Felker [this message]

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=20170812005505.GQ1627@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).