Commit 2abe3cad authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarBernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)
parent 53ef3252
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)},
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+0 −60
Original line number Diff line number Diff line
@@ -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__