diff options
author | lloyd <[email protected]> | 2010-06-17 06:29:23 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-17 06:29:23 +0000 |
commit | 3dde5683f69b9cb9f558bfb18087ce35fbbec78a (patch) | |
tree | 13a260c755e13c0eb93758ffc54389893ed04ad0 | |
parent | 5ddec21a98ba77698ac02c082eb3b44b50ec0929 (diff) |
Use mode(TI) operations to get access to MIPS 64-bit multiply.
Required after GCC 4.4
-rw-r--r-- | src/math/bigint/mp_asm64/mp_asm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/math/bigint/mp_asm64/mp_asm.h b/src/math/bigint/mp_asm64/mp_asm.h index c9159eaa7..b0906095d 100644 --- a/src/math/bigint/mp_asm64/mp_asm.h +++ b/src/math/bigint/mp_asm64/mp_asm.h @@ -47,7 +47,10 @@ namespace Botan { #elif defined(BOTAN_TARGET_ARCH_IS_MIPS64) #define BOTAN_WORD_MUL(a,b,z1,z0) do { \ - asm("dmultu %2,%3" : "=h" (z0), "=l" (z1) : "r" (a), "r" (b)); \ + typedef unsigned int uint128_t __attribute__((mode(TI))); \ + uint128_t r = (uint128_t)a * b; \ + z0 = (r >> 64) & 0xFFFFFFFFFFFFFFFF; \ + z1 = (r ) & 0xFFFFFFFFFFFFFFFF; \ } while(0); #else |