Some more cleanups of curve448 code
authorMatt Caswell <matt@openssl.org>
Fri, 16 Feb 2018 21:39:19 +0000 (21:39 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 20 Feb 2018 12:59:31 +0000 (12:59 +0000)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)

crypto/ec/curve448/curve448utils.h
crypto/ec/curve448/word.h

index 95b8c26da80b9dd750b41956e203f3e25c1102ea..4af2c3f12dfc8c94460f160629e82f5a5eae9ee4 100644 (file)
@@ -23,8 +23,7 @@
  * with arch_arm32.
  */
 # ifndef C448_WORD_BITS
-#  if (defined(__ILP64__) || defined(__amd64__) || defined(__x86_64__) \
-      || (((__UINT_FAST32_MAX__)>>30)>>30))
+#  if defined(__SIZEOF_INT128__) && (__SIZEOF_INT128__ == 16)
 #   define C448_WORD_BITS 64      /* The number of bits in a word */
 #  else
 #   define C448_WORD_BITS 32      /* The number of bits in a word */
index c739b70d51e18811299b7917548cf3ad8858b025..a48b9e053a5c9e29343ee92b2640ed98955b7d2a 100644 (file)
 # include "arch_intrinsics.h"
 # include "curve448utils.h"
 
-# if defined(__ARM_NEON__)
-#  include <arm_neon.h>
-# elif defined(__SSE2__)
-#  if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 5 \
-      || (__GNUC__==4 && __GNUC_MINOR__ >= 4)
-#   include <immintrin.h>
-#  else
-#   include <emmintrin.h>
-#  endif
-# endif
-
 # if (ARCH_WORD_BITS == 64)
 typedef uint64_t word_t, mask_t;
 typedef __uint128_t dword_t;