Date: Thu, 18 Jun 2015 13:40:09 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284546 - head/contrib/gcc Message-ID: <201506181340.t5IDe9Rk017924@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Jun 18 13:40:08 2015 New Revision: 284546 URL: https://svnweb.freebsd.org/changeset/base/284546 Log: Fix compilation of this macro under gcc-4.9 for MIPS32. Some point after gcc-4.2 the MIPS inline assembly restrictions changed - =h (hi register) disappeared from the list of restrictions and can no longer be used. So, until someone requires an assembly version of this function, just use a non-assembly version and let the compiler sort it out. Suggested by: kan Modified: head/contrib/gcc/longlong.h Modified: head/contrib/gcc/longlong.h ============================================================================== --- head/contrib/gcc/longlong.h Thu Jun 18 13:23:52 2015 (r284545) +++ head/contrib/gcc/longlong.h Thu Jun 18 13:40:08 2015 (r284546) @@ -584,11 +584,11 @@ UDItype __umulsidi3 (USItype, USItype); #if defined (__mips__) && W_TYPE_SIZE == 32 #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3" \ - : "=l" ((USItype) (w0)), \ - "=h" ((USItype) (w1)) \ - : "d" ((USItype) (u)), \ - "d" ((USItype) (v))) + do { \ + UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \ + w1 = __x >> 32; \ + w0 = __x; \ + } while (0) #define UMUL_TIME 10 #define UDIV_TIME 100 #endif /* __mips__ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506181340.t5IDe9Rk017924>