Using longlong.h for wide-int.cc failed on 32-bit x86 because the 64-bit x86_64 patterns were being defined for i386 too. Specifically:
#define umul_ppmm(w1, w0, u, v) \ __asm__ ("mul{q} %3" \ : "=a" ((UDItype) (w0)), \ "=d" ((UDItype) (w1)) \ : "%0" ((UDItype) (u)), \ "rm" ((UDItype) (v))) was being used if __i386__ was defined. Tested on x86_64-linux-gnu and i686-linux-gnu. I put a: #if defined (__i386__) #error FOO #endif trap in the old block just to make sure that libgcc wasn't using any of the other macros. Approved by Richard B. on irc and applied. Thanks, Richard include/ * longlong.h (__i386__): Remove W_TYPE_SIZE==64 handling. Index: include/longlong.h =================================================================== --- include/longlong.h 2014-04-30 15:05:37.983489787 +0100 +++ include/longlong.h 2014-04-30 15:11:38.883697625 +0100 @@ -483,7 +483,7 @@ #define UMUL_TIME 40 #define UDIV_TIME 40 #endif /* 80x86 */ -#if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64 +#if defined (__x86_64__) && W_TYPE_SIZE == 64 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \ : "=r" ((UDItype) (sh)), \