This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] S/390: longlong.h fix smul_ppmm


Hi,

the attached patch fixed a failure with -mzarch -m31.  The smul_ppmm
implementation in longlong.h uses the registers of the result in the
wrong order.

A corresponding patch for glibc will be posted soon.

Committed to 4.6 and mainline.

Bye,

-Andreas-


2011-06-06  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* longlong.h (smul_ppmm): The resulting register pair contains the
	higher order word first.


Index: gcc-4.6/gcc/longlong.h
===================================================================
--- gcc-4.6.orig/gcc/longlong.h
+++ gcc-4.6/gcc/longlong.h
@@ -349,7 +349,7 @@ UDItype __umulsidi3 (USItype, USItype);
     __asm__ ("mr\t%%r0,%3"                                              \
              : "=r" (r0), "=r" (r1)                                     \
              : "r"  (r1),  "r" (m1));                                   \
-    (xh) = r1; (xl) = r0;                                               \
+    (xh) = r0; (xl) = r1;                                               \
   } while (0)
 #define sdiv_qrnnd(q, r, n1, n0, d) \
   do {									\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]