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

login
register
mail settings
Submitter Andreas Krebbel
Date June 6, 2011, 2:36 p.m.
Message ID <20110606143634.GA10946@bart>
Download mbox | patch
Permalink /patch/98935/
State New
Headers show

Comments

Andreas Krebbel - June 6, 2011, 2:36 p.m.
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.

Patch

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 {									\