mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] arch/sh/atomic_arch.sh: add missing : in asm() statement
@ 2017-07-28 21:05 Thomas Petazzoni
  2017-08-12  0:55 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2017-07-28 21:05 UTC (permalink / raw)
  To: musl; +Cc: Thomas Petazzoni

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] arch/sh/atomic_arch.sh: add missing : in asm() statement
  2017-07-28 21:05 [PATCH] arch/sh/atomic_arch.sh: add missing : in asm() statement Thomas Petazzoni
@ 2017-08-12  0:55 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2017-08-12  0:55 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-12  0:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28 21:05 [PATCH] arch/sh/atomic_arch.sh: add missing : in asm() statement Thomas Petazzoni
2017-08-12  0:55 ` Rich Felker

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).