Upstream patch from Debian Bug 838557

The patch fixes 128-bit multiply on mips64.

This corrects a previous incorrect patch upstreamed from Debian.
This commit is contained in:
Kristian Nielsen 2016-10-21 22:43:46 +02:00
parent 998f987eda
commit 7eb4bd3f1d

View file

@ -193,8 +193,9 @@ DWord() {}
"a" (a), "rm" (b) : "cc");
#elif defined(__mips64)
__asm__("dmultu %2,%3" : "=d" (r.halfs_.high), "=l" (r.halfs_.low)
: "r" (a), "r" (b));
unsigned __int128 t = (unsigned __int128) a * b;
r.halfs_.high = t >> 64;
r.halfs_.low = (word) t;
#elif defined(_M_IX86)
// for testing