summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-06-18 13:40:08 +0000
committeradrian <adrian@FreeBSD.org>2015-06-18 13:40:08 +0000
commit59940b0c9512717b13fb3a7c9916018b319d38b8 (patch)
tree95475c4f089cbb8191b6ff28eca31d3dc7caa991 /contrib/gcc
parent3fa6a8feeaba716c9a7f2857ae77f1109261f372 (diff)
downloadFreeBSD-src-59940b0c9512717b13fb3a7c9916018b319d38b8.zip
FreeBSD-src-59940b0c9512717b13fb3a7c9916018b319d38b8.tar.gz
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
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/longlong.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/gcc/longlong.h b/contrib/gcc/longlong.h
index 304ee8d..01f8885 100644
--- a/contrib/gcc/longlong.h
+++ b/contrib/gcc/longlong.h
@@ -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__ */
OpenPOWER on IntegriCloud