svn commit: r284546 - head/contrib/gcc
Adrian Chadd
adrian at FreeBSD.org
Thu Jun 18 13:40:09 UTC 2015
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__ */
More information about the svn-src-head
mailing list