Skip to content

Commit

Permalink
Upstream patch from Debian Bug 838557
Browse files Browse the repository at this point in the history
The patch fixes 128-bit multiply on mips64.

This corrects a previous incorrect patch upstreamed from Debian.
  • Loading branch information
knielsen committed Oct 21, 2016
1 parent 998f987 commit 7eb4bd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extra/yassl/taocrypt/src/integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7eb4bd3

Please sign in to comment.