diff options
author | Matt Caswell <matt@openssl.org> | 2018-02-12 14:38:13 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-02-20 12:59:31 +0000 |
commit | 2abe3cad23a12fb868ca469b8ce9a9f335c11e9d (patch) | |
tree | 308cef4cac8d4f7d4efc3ce3c9f2b0c053b9f655 /crypto | |
parent | 53ef3252fa3f7008feaf5696d24a05bef0efa676 (diff) |
Remove the curve448 vector code
We removed various platform specific optimisation files in an earlier
commit. The vector code was related to that and therefore is no longer
required. It may be resurrected at a later point if we reintroduce the
opimtisations.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ec/curve448/curve448_tables.c | 4 | ||||
-rw-r--r-- | crypto/ec/curve448/point_448.h | 2 | ||||
-rw-r--r-- | crypto/ec/curve448/word.h | 60 |
3 files changed, 3 insertions, 63 deletions
diff --git a/crypto/ec/curve448/curve448_tables.c b/crypto/ec/curve448/curve448_tables.c index 5f8c97e8ee..bc47ea9edd 100644 --- a/crypto/ec/curve448/curve448_tables.c +++ b/crypto/ec/curve448/curve448_tables.c @@ -13,7 +13,7 @@ #include "point_448.h" -const curve448_precomputed_s curve448_precomputed_base_table VECTOR_ALIGNED = { +const curve448_precomputed_s curve448_precomputed_base_table = { { {{ {FIELD_LITERAL(0x00cc3b062366f4cc,0x003d6e34e314aa3c,0x00d51c0a7521774d,0x0094e060eec6ab8b,0x00d21291b4d80082,0x00befed12b55ef1e,0x00c3dd2df5c94518,0x00e0a7b112b8d4e6)}, @@ -341,7 +341,7 @@ const curve448_precomputed_s curve448_precomputed_base_table VECTOR_ALIGNED = { const struct curve448_precomputed_s *curve448_precomputed_base = &curve448_precomputed_base_table; -const niels_t curve448_wnaf_base_table[32] VECTOR_ALIGNED = { +const niels_t curve448_wnaf_base_table[32] = { {{ {FIELD_LITERAL(0x00303cda6feea532,0x00860f1d5a3850e4,0x00226b9fa4728ccd,0x00e822938a0a0c0c,0x00263a61c9ea9216,0x001204029321b828,0x006a468360983c65,0x0002846f0a782143)}, {FIELD_LITERAL(0x00303cda6feea532,0x00860f1d5a3850e4,0x00226b9fa4728ccd,0x006822938a0a0c0c,0x00263a61c9ea9215,0x001204029321b828,0x006a468360983c65,0x0082846f0a782143)}, diff --git a/crypto/ec/curve448/point_448.h b/crypto/ec/curve448/point_448.h index 03af43b6c6..ed3920a848 100644 --- a/crypto/ec/curve448/point_448.h +++ b/crypto/ec/curve448/point_448.h @@ -28,7 +28,7 @@ typedef struct { typedef struct { niels_t n; gf z; -} VECTOR_ALIGNED pniels_t[1]; +} pniels_t[1]; /* Precomputed base */ struct curve448_precomputed_s { diff --git a/crypto/ec/curve448/word.h b/crypto/ec/curve448/word.h index 8a45e1e56f..01c9779938 100644 --- a/crypto/ec/curve448/word.h +++ b/crypto/ec/curve448/word.h @@ -61,66 +61,6 @@ typedef int64_t dsword_t; # error "For now we only support 32- and 64-bit architectures." # endif -# ifdef __ARM_NEON__ -typedef uint32x4_t vecmask_t; -# elif defined(__clang__) -typedef uint64_t uint64x2_t __attribute__ ((ext_vector_type(2))); -typedef int64_t int64x2_t __attribute__ ((ext_vector_type(2))); -typedef uint64_t uint64x4_t __attribute__ ((ext_vector_type(4))); -typedef int64_t int64x4_t __attribute__ ((ext_vector_type(4))); -typedef uint32_t uint32x4_t __attribute__ ((ext_vector_type(4))); -typedef int32_t int32x4_t __attribute__ ((ext_vector_type(4))); -typedef uint32_t uint32x2_t __attribute__ ((ext_vector_type(2))); -typedef int32_t int32x2_t __attribute__ ((ext_vector_type(2))); -typedef uint32_t uint32x8_t __attribute__ ((ext_vector_type(8))); -typedef int32_t int32x8_t __attribute__ ((ext_vector_type(8))); -typedef word_t vecmask_t __attribute__ ((ext_vector_type(4))); -# elif defined(__GNUC__) \ - && (__GNUC__ >= 4 || (__GNUC__== 3 && __GNUC_MINOR__ >= 1)) -typedef uint64_t uint64x2_t __attribute__ ((vector_size(16))); -typedef int64_t int64x2_t __attribute__ ((vector_size(16))); -typedef uint64_t uint64x4_t __attribute__ ((vector_size(32))); -typedef int64_t int64x4_t __attribute__ ((vector_size(32))); -typedef uint32_t uint32x4_t __attribute__ ((vector_size(16))); -typedef int32_t int32x4_t __attribute__ ((vector_size(16))); -typedef uint32_t uint32x2_t __attribute__ ((vector_size(8))); -typedef int32_t int32x2_t __attribute__ ((vector_size(8))); -typedef uint32_t uint32x8_t __attribute__ ((vector_size(32))); -typedef int32_t int32x8_t __attribute__ ((vector_size(32))); -typedef word_t vecmask_t __attribute__ ((vector_size(32))); -# endif - -# if defined(__AVX2__) -# define VECTOR_ALIGNED __attribute__((aligned(32))) -typedef uint64x4_t uint64xn_t; -typedef uint32x8_t uint32xn_t; -# elif defined(__SSE2__) -# define VECTOR_ALIGNED __attribute__((aligned(16))) -typedef uint64x2_t uint64xn_t; -typedef uint32x4_t uint32xn_t; -# elif defined(__ARM_NEON__) -# define VECTOR_ALIGNED __attribute__((aligned(16))) -typedef uint64x2_t uint64xn_t; -typedef uint32x4_t uint32xn_t; -# elif !defined(_MSC_VER) \ - && (defined(_WIN64) || defined(__amd64__) || defined(__X86_64__) \ - || defined(__aarch64__)) -# define VECTOR_ALIGNED __attribute__((aligned(8))) -typedef uint32_t uint32xn_t; -# else -# ifdef __GNUC__ -# define VECTOR_ALIGNED __attribute__((aligned(4))) -# else -/* - * This shouldn't be a problem because a big_register_t isn't actually a vector - * type anyway in this case. - */ -# define VECTOR_ALIGNED -# endif -typedef uint64_t uint64xn_t; -typedef uint32_t uint32xn_t; -# endif - /* PERF: vectorize vs unroll */ # ifdef __clang__ |