[RFC,2/6] ARC: Fixed inline asm contraints to gcc 6.x

Submitted by Vineet Gupta on June 27, 2017, 8 a.m.

Details

Message ID 1498550454-3560-3-git-send-email-vgupta@synopsys.com
State New
Headers show

Commit Message

Vineet Gupta June 27, 2017, 8 a.m.
From: Cupertino Miranda <cmiranda@synopsys.com>

It seems glibc had some ancient ARC bits, added as part of some header
sync up back in 1999 (I was still in college)

That code obviously doesn't build with modern compilers.

Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 stdlib/longlong.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Joseph S. Myers June 27, 2017, 11:47 a.m.
longlong.h should be kept in sync with GCC.  If the GCC version has been 
fixed we can copy the updated version verbatim from GCC.
Vineet Gupta June 27, 2017, 4:40 p.m.
On 06/27/2017 02:47 PM, Joseph Myers wrote:
> longlong.h should be kept in sync with GCC.  If the GCC version has been
> fixed we can copy the updated version verbatim from GCC.

Indeed it is fixed in upstream gcc.

	commit 608e1e3746f5242f0b0987ce64ca99969c33fb48
	Author: claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
	Date:   Fri Apr 29 10:11:25 2016 +0000

	    [ARC] Fix obsolete constrain


So I drop this patch from my series and rely on glibc upstream to have this fixed ?
Zack Weinberg June 27, 2017, 4:53 p.m.
On Tue, Jun 27, 2017 at 12:40 PM, Vineet Gupta
<Vineet.Gupta1@synopsys.com> wrote:
> On 06/27/2017 02:47 PM, Joseph Myers wrote:
>>
>> longlong.h should be kept in sync with GCC.  If the GCC version has been
>> fixed we can copy the updated version verbatim from GCC.
>
>
> Indeed it is fixed in upstream gcc.
>
>         commit 608e1e3746f5242f0b0987ce64ca99969c33fb48
>         Author: claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4>
>         Date:   Fri Apr 29 10:11:25 2016 +0000
>
>             [ARC] Fix obsolete constrain
>
> So I drop this patch from my series and rely on glibc upstream to have this
> fixed ?

Don't drop the patch; replace it with a patch that copies the file
verbatim from the GCC source tree.

zw

Patch hide | download patch | download mbox

diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 0ec11c5056bf..fb6557272fa0 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -197,17 +197,17 @@  extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
 	   : "=r" ((USItype) (sh)),					\
 	     "=&r" ((USItype) (sl))					\
 	   : "%r" ((USItype) (ah)),					\
-	     "rIJ" ((USItype) (bh)),					\
+	     "rICal" ((USItype) (bh)),					\
 	     "%r" ((USItype) (al)),					\
-	     "rIJ" ((USItype) (bl)))
+	     "rICal" ((USItype) (bl)))
 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
   __asm__ ("sub.f	%1, %4, %5\n\tsbc	%0, %2, %3"		\
 	   : "=r" ((USItype) (sh)),					\
 	     "=&r" ((USItype) (sl))					\
 	   : "r" ((USItype) (ah)),					\
-	     "rIJ" ((USItype) (bh)),					\
+	     "rICal" ((USItype) (bh)),					\
 	     "r" ((USItype) (al)),					\
-	     "rIJ" ((USItype) (bl)))
+	     "rICal" ((USItype) (bl)))
 
 #define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
 #ifdef __ARC_NORM__