Blame SOURCES/coreutils-aarch64-longlong.patch

47d86b
diff --git a/src/longlong.h b/src/longlong.h
47d86b
index e880587..023f47e 100644
47d86b
--- a/src/longlong.h
47d86b
+++ b/src/longlong.h
47d86b
@@ -530,23 +530,16 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
47d86b
 #endif /* __arm__ */
47d86b
 
47d86b
 #if defined (__aarch64__) && W_TYPE_SIZE == 64
47d86b
+/* FIXME: Extend the immediate range for the low word by using both
47d86b
+   ADDS and SUBS, since they set carry in the same way.  */
47d86b
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
47d86b
-  __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3"			\
47d86b
+  __asm__ ("adds\t%1, %x4, %5\n\tadc\t%0, %x2, %x3"                     \
47d86b
 	   : "=r" (sh), "=&r" (sl)					\
47d86b
-	   : "r" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
47d86b
+           : "rZ" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
47d86b
 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
47d86b
-  do {									\
47d86b
-    if (__builtin_constant_p (bl))					\
47d86b
-      {									\
47d86b
-	__asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3"			\
47d86b
-		 : "=r" (sh), "=&r" (sl)				\
47d86b
-		 : "r" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \
47d86b
-      }									\
47d86b
-    else /* only bh might be a constant */				\
47d86b
-      __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3"			\
47d86b
-	       : "=r" (sh), "=&r" (sl)					\
47d86b
-	       : "r" (ah), "rZ" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\
47d86b
-    } while (0)
47d86b
+  __asm__ ("subs\t%1, %x4, %5\n\tsbc\t%0, %x2, %x3"                     \
47d86b
+           : "=r,r" (sh), "=&r,&r" (sl)                                 \
47d86b
+           : "rZ,rZ" (ah), "rZ,rZ" (bh), "r,Z" (al), "rI,r" (bl) __CLOBBER_CC)
47d86b
 #define umul_ppmm(ph, pl, m0, m1) \
47d86b
   do {									\
47d86b
     UDItype __m0 = (m0), __m1 = (m1);					\