ec/curve25519.c: avoid 2^51 radix on SPARC.
authorAndy Polyakov <appro@openssl.org>
Sun, 31 Dec 2017 12:23:08 +0000 (13:23 +0100)
committerAndy Polyakov <appro@openssl.org>
Sun, 7 Jan 2018 20:40:31 +0000 (21:40 +0100)
SPARC ISA doesn't have provisions to back up 128-bit multiplications
and additions. And so multiplications are done with library calls
and carries with comparisons and conditional moves. As result base
2^51 code is >40% slower...

Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/ec/curve25519.c

index d1c725fa39749144626d3d2095055f6f7b698b85..f32fc04d6ae9e5ce222ea19fc95c7f22c4f12b19 100644 (file)
@@ -12,6 +12,7 @@
 #include <openssl/sha.h>
 
 #if !defined(PEDANTIC) && \
+    !defined(__sparc__) && \
     (defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16)
 /*
  * Base 2^51 implementation.