From 51e3296fd598810a6528f8dc0b01c350fdf423c9 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Tue, 2 May 2017 17:22:03 -0700 Subject: [PATCH] aligned(32) -> VECTOR_ALIGNED internally; still need (32) in interfaces, at least for now, because the library might have been compiled with eg avx2 but the caller might be compiled without --- src/GENERATED/c/curve25519/decaf_gen_tables.c | 4 ++-- src/GENERATED/c/curve25519/decaf_tables.c | 4 ++-- src/GENERATED/c/ed448goldilocks/decaf_gen_tables.c | 4 ++-- src/GENERATED/c/ed448goldilocks/decaf_tables.c | 4 ++-- src/per_curve/decaf_gen_tables.tmpl.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/GENERATED/c/curve25519/decaf_gen_tables.c b/src/GENERATED/c/curve25519/decaf_gen_tables.c index 7cbf5ed..f1e3843 100644 --- a/src/GENERATED/c/curve25519/decaf_gen_tables.c +++ b/src/GENERATED/c/curve25519/decaf_gen_tables.c @@ -94,7 +94,7 @@ int main(int argc, char **argv) { output = (const gf_s *)pre; printf("const gf API_NS(precomputed_base_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_s) / sizeof(gf))); - printf("__attribute__((aligned(%d),visibility(\"hidden\"))) = {\n ", (int)API_NS(alignof_precomputed_s)); + printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); for (i=0; i < API_NS(sizeof_precomputed_s); i+=sizeof(gf)) { if (i) printf(",\n "); @@ -105,7 +105,7 @@ int main(int argc, char **argv) { output = (const gf_s *)pre_wnaf; printf("const gf API_NS(precomputed_wnaf_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_wnafs) / sizeof(gf))); - printf("__attribute__((aligned(%d),visibility(\"hidden\"))) = {\n ", (int)API_NS(alignof_precomputed_s)); + printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); for (i=0; i < API_NS(sizeof_precomputed_wnafs); i+=sizeof(gf)) { if (i) printf(",\n "); field_print(output++); diff --git a/src/GENERATED/c/curve25519/decaf_tables.c b/src/GENERATED/c/curve25519/decaf_tables.c index 29ac8c4..cc56be5 100644 --- a/src/GENERATED/c/curve25519/decaf_tables.c +++ b/src/GENERATED/c/curve25519/decaf_tables.c @@ -11,7 +11,7 @@ const API_NS(point_t) API_NS(point_base) = {{ {FIELD_LITERAL(0x00064dd34108cd8b,0x00074d6a76c1aa17,0x0007ee5469f0a08a,0x0007eb4b28e92c93,0x00076326b6a09052)} }}; const gf API_NS(precomputed_base_as_fe)[144] -__attribute__((aligned(32),visibility("hidden"))) = { +VECTOR_ALIGNED __attribute__((visibility("hidden"))) = { {FIELD_LITERAL(0x00074308734f7d55,0x000380ac08a23a96,0x00024b4b5cef028b,0x000632cbb8646ab5,0x00075516b5681530)}, {FIELD_LITERAL(0x0005729461e535df,0x0004a8e85565dffb,0x000246a85e49fde1,0x000285c20023113d,0x00028a44366a7a53)}, {FIELD_LITERAL(0x0007900f448afdf1,0x0003b19d978aa5b4,0x00001f24c6a6a64c,0x0002087f8eafcb75,0x0002908747e585e7)}, @@ -158,7 +158,7 @@ __attribute__((aligned(32),visibility("hidden"))) = { {FIELD_LITERAL(0x0004ef6dec07d978,0x0001814721d17298,0x0002f3010824e385,0x0004dec0df1030ea,0x000732ccad416ca1)} }; const gf API_NS(precomputed_wnaf_as_fe)[96] -__attribute__((aligned(32),visibility("hidden"))) = { +VECTOR_ALIGNED __attribute__((visibility("hidden"))) = { {FIELD_LITERAL(0x000743d2369750f6,0x000698b734af8c74,0x0003c7e6ca7de989,0x0004137b677d5a14,0x000602a70a1dd604)}, {FIELD_LITERAL(0x000620e9c96ce4a2,0x000718e799056806,0x0003bdec5bbc2429,0x0003ca0864fd880d,0x00013df868873a16)}, {FIELD_LITERAL(0x0005ac6e48dfc457,0x0004b83cf2fa3b88,0x000036ccd665d9e2,0x0003eb7fcdb11759,0x0001b35e6ddb1020)}, diff --git a/src/GENERATED/c/ed448goldilocks/decaf_gen_tables.c b/src/GENERATED/c/ed448goldilocks/decaf_gen_tables.c index b41c8c5..92fb26a 100644 --- a/src/GENERATED/c/ed448goldilocks/decaf_gen_tables.c +++ b/src/GENERATED/c/ed448goldilocks/decaf_gen_tables.c @@ -94,7 +94,7 @@ int main(int argc, char **argv) { output = (const gf_s *)pre; printf("const gf API_NS(precomputed_base_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_s) / sizeof(gf))); - printf("__attribute__((aligned(%d),visibility(\"hidden\"))) = {\n ", (int)API_NS(alignof_precomputed_s)); + printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); for (i=0; i < API_NS(sizeof_precomputed_s); i+=sizeof(gf)) { if (i) printf(",\n "); @@ -105,7 +105,7 @@ int main(int argc, char **argv) { output = (const gf_s *)pre_wnaf; printf("const gf API_NS(precomputed_wnaf_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_wnafs) / sizeof(gf))); - printf("__attribute__((aligned(%d),visibility(\"hidden\"))) = {\n ", (int)API_NS(alignof_precomputed_s)); + printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); for (i=0; i < API_NS(sizeof_precomputed_wnafs); i+=sizeof(gf)) { if (i) printf(",\n "); field_print(output++); diff --git a/src/GENERATED/c/ed448goldilocks/decaf_tables.c b/src/GENERATED/c/ed448goldilocks/decaf_tables.c index b7854de..53fc0e2 100644 --- a/src/GENERATED/c/ed448goldilocks/decaf_tables.c +++ b/src/GENERATED/c/ed448goldilocks/decaf_tables.c @@ -11,7 +11,7 @@ const API_NS(point_t) API_NS(point_base) = {{ {FIELD_LITERAL(0x008f205b70660415,0x00881c60cfd3824f,0x00377a638d08500d,0x008c66d5d4672615,0x00e52fa558e08e13,0x0087770ae1b6983d,0x004388f55a0aa7ff,0x00b4d9a785cf1a91)} }}; const gf API_NS(precomputed_base_as_fe)[240] -__attribute__((aligned(32),visibility("hidden"))) = { +VECTOR_ALIGNED __attribute__((visibility("hidden"))) = { {FIELD_LITERAL(0x00e614a9f7278dc5,0x002e454ad04c5124,0x00d8f58cee1436f3,0x00c83ed46e4180ec,0x00a41e93274a38fa,0x00c1e7e53257771e,0x0043e0ff03c0392f,0x002c7c6405ce61df)}, {FIELD_LITERAL(0x0033c4f9dc990b33,0x00c291cb1ceb55c3,0x002ae3f58ade88b2,0x006b1f9f11395474,0x002ded6e4b27ff7c,0x0041012ed4aa10e1,0x003c22d20a36bae7,0x001f584eed472b19)}, {FIELD_LITERAL(0x00c3514779ee6f60,0x001574c873b20c2b,0x004cd6a46a5a5e65,0x0059a068aeb4204a,0x004c610458bc354d,0x00e94567479d02d2,0x00feaf77ed118e28,0x00f58a8bf115eeb5)}, @@ -254,7 +254,7 @@ __attribute__((aligned(32),visibility("hidden"))) = { {FIELD_LITERAL(0x00bba0ed9c67c41f,0x00b30c8e225ba195,0x008bb5762a5cef18,0x00e0df31b06fb7cc,0x0018b912141991d5,0x00f6ed54e093eac2,0x0009e288264dbbb3,0x00feb663299b89ef)} }; const gf API_NS(precomputed_wnaf_as_fe)[96] -__attribute__((aligned(32),visibility("hidden"))) = { +VECTOR_ALIGNED __attribute__((visibility("hidden"))) = { {FIELD_LITERAL(0x00cfc32590115acd,0x0079f0e2a5c7af1b,0x00dd94605b8d7332,0x0097dd6c75f5f3f3,0x00d9c59e36156de9,0x00edfbfd6cde47d7,0x0095b97c9f67c39a,0x007d7b90f587debc)}, {FIELD_LITERAL(0x00cfc32590115acd,0x0079f0e2a5c7af1b,0x00dd94605b8d7332,0x0017dd6c75f5f3f3,0x00d9c59e36156de8,0x00edfbfd6cde47d7,0x0095b97c9f67c39a,0x00fd7b90f587debc)}, {FIELD_LITERAL(0x001071dd4d8ae672,0x004f14ebe5f4f174,0x00e0987625c34c73,0x0092d00712c6f8c1,0x009ef424965e980b,0x00a8e0cf9369764b,0x000aa81907b4d207,0x00d5002c74d37924)}, diff --git a/src/per_curve/decaf_gen_tables.tmpl.c b/src/per_curve/decaf_gen_tables.tmpl.c index e93606c..3b4b719 100644 --- a/src/per_curve/decaf_gen_tables.tmpl.c +++ b/src/per_curve/decaf_gen_tables.tmpl.c @@ -83,7 +83,7 @@ int main(int argc, char **argv) { output = (const gf_s *)pre; printf("const gf API_NS(precomputed_base_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_s) / sizeof(gf))); - printf("__attribute__((aligned(%d),visibility(\"hidden\"))) = {\n ", (int)API_NS(alignof_precomputed_s)); + printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); for (i=0; i < API_NS(sizeof_precomputed_s); i+=sizeof(gf)) { if (i) printf(",\n "); @@ -94,7 +94,7 @@ int main(int argc, char **argv) { output = (const gf_s *)pre_wnaf; printf("const gf API_NS(precomputed_wnaf_as_fe)[%d]\n", (int)(API_NS(sizeof_precomputed_wnafs) / sizeof(gf))); - printf("__attribute__((aligned(%d),visibility(\"hidden\"))) = {\n ", (int)API_NS(alignof_precomputed_s)); + printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n "); for (i=0; i < API_NS(sizeof_precomputed_wnafs); i+=sizeof(gf)) { if (i) printf(",\n "); field_print(output++);