Commit 6e2ce520 authored by Michael Hamburg's avatar Michael Hamburg

internal VECTOR_ALIGNED instead of __attribute((aligned(32))), thanks Olivier

parent beba3700
......@@ -80,8 +80,7 @@ extern const point_t API_NS(point_base);
/* Projective Niels coordinates */
typedef struct { gf a, b, c; } niels_s, niels_t[1];
typedef struct { niels_t n; gf z; } __attribute__((aligned(sizeof(big_register_t))))
pniels_s, pniels_t[1];
typedef struct { niels_t n; gf z; } VECTOR_ALIGNED pniels_s, pniels_t[1];
/* Precomputed base */
struct precomputed_s { niels_t table [COMBS_N<<(COMBS_T-1)]; };
......
......@@ -80,8 +80,7 @@ extern const point_t API_NS(point_base);
/* Projective Niels coordinates */
typedef struct { gf a, b, c; } niels_s, niels_t[1];
typedef struct { niels_t n; gf z; } __attribute__((aligned(sizeof(big_register_t))))
pniels_s, pniels_t[1];
typedef struct { niels_t n; gf z; } VECTOR_ALIGNED pniels_s, pniels_t[1];
/* Precomputed base */
struct precomputed_s { niels_t table [COMBS_N<<(COMBS_T-1)]; };
......
......@@ -11,7 +11,7 @@ void gf_mul (gf_s *__restrict__ cs, const gf as, const gf bs) {
__uint128_t accum0 = 0, accum1 = 0, accum2;
uint64_t mask = (1ull<<56) - 1;
uint64_t aa[4] __attribute__((aligned(32))), bb[4] __attribute__((aligned(32))), bbb[4] __attribute__((aligned(32)));
uint64_t aa[4] VECTOR_ALIGNED, bb[4] VECTOR_ALIGNED, bbb[4] VECTOR_ALIGNED;
/* For some reason clang doesn't vectorize this without prompting? */
unsigned int i;
......@@ -186,7 +186,7 @@ void gf_sqr (gf_s *__restrict__ cs, const gf as) {
__uint128_t accum0 = 0, accum1 = 0, accum2;
uint64_t mask = (1ull<<56) - 1;
uint64_t aa[4] __attribute__((aligned(32)));
uint64_t aa[4] VECTOR_ALIGNED;
/* For some reason clang doesn't vectorize this without prompting? */
unsigned int i;
......
......@@ -69,8 +69,7 @@ extern const point_t API_NS(point_base);
/* Projective Niels coordinates */
typedef struct { gf a, b, c; } niels_s, niels_t[1];
typedef struct { niels_t n; gf z; } __attribute__((aligned(sizeof(big_register_t))))
pniels_s, pniels_t[1];
typedef struct { niels_t n; gf z; } VECTOR_ALIGNED pniels_s, pniels_t[1];
/* Precomputed base */
struct precomputed_s { niels_t table [COMBS_N<<(COMBS_T-1)]; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment