From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9534 Path: news.gmane.org!not-for-mail From: Jaydeep Patil Newsgroups: gmane.linux.lib.musl.general Subject: RE: [PATCH] MIPS64 atomic_arch.h Clang complains about input type Date: Wed, 9 Mar 2016 05:00:42 +0000 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_BD7773622145634B952E5B54ACA8E349AA2460BBPUMAIL01puimgte_" X-Trace: ger.gmane.org 1457499667 9111 80.91.229.3 (9 Mar 2016 05:01:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2016 05:01:07 +0000 (UTC) Cc: "musl@lists.openwall.com" To: "Rich Felker (dalias@libc.org)" Original-X-From: musl-return-9547-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 09 06:01:07 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1adWF8-0003X5-Ke for gllmg-musl@m.gmane.org; Wed, 09 Mar 2016 06:01:06 +0100 Original-Received: (qmail 3716 invoked by uid 550); 9 Mar 2016 05:01:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3659 invoked from network); 9 Mar 2016 05:00:57 -0000 Thread-Topic: [PATCH] MIPS64 atomic_arch.h Clang complains about input type Thread-Index: AdF5G7qIkFypIa8RQVi9KYn0fxEezQABtEKgACd8/zA= Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.93.60] Xref: news.gmane.org gmane.linux.lib.musl.general:9534 Archived-At: --_000_BD7773622145634B952E5B54ACA8E349AA2460BBPUMAIL01puimgte_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 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" : "=3Dr"(r), "=3Dm"(*p) : "0"(v) : "memory"); -- 2.1.4 Regards, Jaydeep From: Jaydeep Patil Sent: 08 March 2016 PM 03:40 To: Rich Felker (dalias@libc.org) Cc: 'musl@lists.openwall.com' Subject: RE: [PATCH] MIPS64 atomic_arch.h Clang complains about input type Added musl@lists.openwall.com in Cc From: Jaydeep Patil Sent: 08 March 2016 PM 03:38 To: Rich Felker (dalias@libc.org) Subject: [PATCH] MIPS64 atomic_arch.h Clang complains about input type Hi Rich, Clang (3.9.0) generates following error for a_sc_p function in atomic_arch.= h: ./arch/mips64/atomic_arch.h:37:29: error: unsupported inline asm: input wit= h type 'long *' matching output with type 'int' Could you please consider this patch to fix it? ----- >From 3e64da8f5db923a919cd5600e8031c158a0368a2 Mon Sep 17 00:00:00 2001 From: Jaydeep Patil Date: Tue, 8 Mar 2016 10:06:38 +0000 Subject: [PATCH] [MIPS64] Fix Clang error --- 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 49d9884..8af6500 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 int a_sc_p(volatile long *p, void *v) +static inline void *a_sc_p(volatile long *p, void *v) { - int r; + void *r; __asm__ __volatile__ ( "scd %0, %1" : "=3Dr"(r), "=3Dm"(*p) : "0"(v) : "memory"); -- 2.1.4 Thanks, Jaydeep --_000_BD7773622145634B952E5B54ACA8E349AA2460BBPUMAIL01puimgte_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Rich,

 

> If simply using '= long' works, I think that's the cleanest/simplest

> solution. The uni= on is uglier and less obvious what it's doing so I'd

> rather avoid it i= f we can.

 

From e91d41f84822377ef= 14c675094ad904d89dbd927 Mon Sep 17 00:00:00 2001

From: Jaydeep Patil &l= t;jaydeep.patil@imgtec.com>

Date: Wed, 9 Mar 2016 = 04:56:50 +0000

Subject: [PATCH 2/2] [= MIPS64] Change a_sc_p for clang

 

---<= /p>

arch/mips64/atomic_arc= h.h | 4 ++--

1 file changed, 2 inse= rtions(+), 2 deletions(-)

 

diff --git a/arch/mips= 64/atomic_arch.h b/arch/mips64/atomic_arch.h

index 8af6500..df35cf6= 100644

--- a/arch/mips64/atom= ic_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<= o:p>

-static inline void *a= _sc_p(volatile long *p, void *v)

+static inline lon= g a_sc_p(volatile long *p, void *v)

{

-   &nb= sp;   void *r;

+   = ;    long r;

   &nbs= p;    __asm__ __volatile__ (

   &nbs= p;            "= scd %0, %1"

   &nbs= p;            : &quo= t;=3Dr"(r), "=3Dm"(*p) : "0"(v) : "memory&quo= t;);

--

2.1.4

 

Regards,

Jaydeep

 

From:= Jaydeep Patil
Sent: 08 March 2016 PM 03:40
To: Rich Felker (dalias@libc.org)
Cc: 'musl@lists.openwall.com'
Subject: RE: [PATCH] MIPS64 atomic_arch.h Clang complains about inpu= t type

 

Added musl@lists.openwall.com in Cc

 

From:= Jaydeep Patil
Sent: 08 March 2016 PM 03:38
To: Rich Felker (dalias@libc.org)
Subject: [PATCH] MIPS64 atomic_arch.h Clang complains about input ty= pe

 

Hi Rich,

 

Clang (3.9.0) generates following error for a_sc_p f= unction in atomic_arch.h:

 

./arch/mips64/atomic_arch.h:37:29: error: unsupporte= d inline asm: input with type 'long *' matching output with type 'int'=

 

Could you please consider this patch to fix it?=

-----

 

From 3e64da8f5db923a919cd5600e8031c158a0368a2 Mon Se= p 17 00:00:00 2001

From: Jaydeep Patil <jaydeep.patil@imgtec.com>=

Date: Tue, 8 Mar 2016 10:06:38 +0000<= /p>

Subject: [PATCH] [MIPS64] Fix Clang error=

 

---

arch/mips64/atomic_arch.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)<= o:p>

 

diff --git a/arch/mips64/atomic_arch.h b/arch/mips64= /atomic_arch.h

index 49d9884..8af6500 100644

--- a/arch/mips64/atomic_arch.h

+++ b/arch/mips64/atomic_arch.h

@@ -29,9 +29,9 @@ static inline void *a_ll_p(vol= atile long *p)

}

 

#define a_sc_p a_sc_p

-static inline int a_sc_p(volatile long *p, void *v)=

+static inline void *a_sc_p(volatile long *p, vo= id *v)

{

-       int r;

+       void *r;

        __asm__ _= _volatile__ (

        &nbs= p;       "scd %0, %1"

        &nbs= p;       : "=3Dr"(r), "=3Dm&qu= ot;(*p) : "0"(v) : "memory");

--

2.1.4

 

Thanks,

Jaydeep

 

--_000_BD7773622145634B952E5B54ACA8E349AA2460BBPUMAIL01puimgte_--