Skip to content

Commit 7eb4bd3

Browse files
committed
Upstream patch from Debian Bug 838557
The patch fixes 128-bit multiply on mips64. This corrects a previous incorrect patch upstreamed from Debian.
1 parent 998f987 commit 7eb4bd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extra/yassl/taocrypt/src/integer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ DWord() {}
193193
"a" (a), "rm" (b) : "cc");
194194

195195
#elif defined(__mips64)
196-
__asm__("dmultu %2,%3" : "=d" (r.halfs_.high), "=l" (r.halfs_.low)
197-
: "r" (a), "r" (b));
196+
unsigned __int128 t = (unsigned __int128) a * b;
197+
r.halfs_.high = t >> 64;
198+
r.halfs_.low = (word) t;
198199

199200
#elif defined(_M_IX86)
200201
// for testing

0 commit comments

Comments
 (0)