diff options
author | Juergen Gross <jgross@suse.com> | 2018-01-29 15:54:46 +0100 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2018-01-29 15:54:46 +0100 |
commit | ddb9e13af3bba3f8c36ccee0eb9563a82b425c12 (patch) | |
tree | b0ad38578f597063b61a849965dfaaae7927829e /lib/mpi/longlong.h | |
parent | 3a485c2be49dde899e506684bb5f06d5b3f73e82 (diff) | |
parent | d8a5b80568a9cb66810e75b182018e9edb68e8ff (diff) |
Merge branch 'master' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Diffstat (limited to 'lib/mpi/longlong.h')
-rw-r--r-- | lib/mpi/longlong.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index 57fd45ab7af1..08c60d10747f 100644 --- a/lib/mpi/longlong.h +++ b/lib/mpi/longlong.h @@ -671,7 +671,23 @@ do { \ ************** MIPS/64 ************** ***************************************/ #if (defined(__mips) && __mips >= 3) && W_TYPE_SIZE == 64 -#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#if defined(__mips_isa_rev) && __mips_isa_rev >= 6 +/* + * GCC ends up emitting a __multi3 intrinsic call for MIPS64r6 with the plain C + * code below, so we special case MIPS64r6 until the compiler can do better. + */ +#define umul_ppmm(w1, w0, u, v) \ +do { \ + __asm__ ("dmulu %0,%1,%2" \ + : "=d" ((UDItype)(w0)) \ + : "d" ((UDItype)(u)), \ + "d" ((UDItype)(v))); \ + __asm__ ("dmuhu %0,%1,%2" \ + : "=d" ((UDItype)(w1)) \ + : "d" ((UDItype)(u)), \ + "d" ((UDItype)(v))); \ +} while (0) +#elif (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) #define umul_ppmm(w1, w0, u, v) \ do { \ typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ |