Patchwork Fix bug added to sparc 64-bit sub_ddmmss() implementation.

login
register
mail settings
Submitter David Miller
Date June 4, 2012, 1:54 a.m.
Message ID <20120603.215448.448452917473689283.davem@davemloft.net>
Download mbox | patch
Permalink /patch/162613/
State New
Headers show

Comments

David Miller - June 4, 2012, 1:54 a.m.
Testing in glibc found a bug in one of my longlong.h sparc changes,
fixed thusly and committed to master.

libgcc/

	* longlong.h [SPARC] (sub_ddmmss): Fix thinko in previous 64-bit
	change.
---
 libgcc/ChangeLog  |    5 +++++
 libgcc/longlong.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 9b4491c..bad8ec0 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2012-06-03  David S. Miller  <davem@davemloft.net>
+
+	* longlong.h [SPARC] (sub_ddmmss): Fix thinko in previous 64-bit
+	change.
+
 2012-05-31  David S. Miller  <davem@davemloft.net>
 
 	* longlong.h [SPARC] (umul_ppmm, udiv_qrnnd): Use hardware integer
diff --git a/libgcc/longlong.h b/libgcc/longlong.h
index ad42907..0427718 100644
--- a/libgcc/longlong.h
+++ b/libgcc/longlong.h
@@ -1343,7 +1343,7 @@  UDItype __umulsidi3 (USItype, USItype);
     __asm__ ("subcc\t%r5,%6,%1\n\t"					\
 	     "sub\t%r3,%4,%0\n\t"					\
 	     "movcs\t%%xcc, 1, %2\n\t"					\
-	     "add\t%0, %2, %0"						\
+	     "sub\t%0, %2, %0"						\
 	     : "=r" ((UDItype)(sh)),				      	\
 	       "=&r" ((UDItype)(sl)),				      	\
 	       "+r" (__carry)				      		\