fix sqr_comba warnings for comba3&4

This commit is contained in:
Steffen Jaeckel 2019-11-07 20:37:42 +01:00
parent c82a774e4c
commit 55863ae1d9
15 changed files with 35 additions and 16 deletions

View File

@ -20,7 +20,14 @@ printf(
"#if defined(TFM_SQR%d) && FP_SIZE >= %d\n" "#if defined(TFM_SQR%d) && FP_SIZE >= %d\n"
"void fp_sqr_comba%d(fp_int *A, fp_int *B)\n" "void fp_sqr_comba%d(fp_int *A, fp_int *B)\n"
"{\n" "{\n"
" fp_digit *a, b[%d], c0, c1, c2, sc0, sc1, sc2;\n" " fp_digit *a, b[%d], c0, c1, c2;\n", N, N+N, N, N+N);
if (N > 4) {
printf(
" fp_digit sc0, sc1, sc2;\n");
}
printf(
"#ifdef TFM_ISO\n" "#ifdef TFM_ISO\n"
" fp_word tt;\n" " fp_word tt;\n"
"#endif\n" "#endif\n"
@ -33,7 +40,7 @@ printf(
"\n" "\n"
" /* output 0 */\n" " /* output 0 */\n"
" SQRADD(a[0],a[0]);\n" " SQRADD(a[0],a[0]);\n"
" COMBA_STORE(b[0]);\n", N, N+N, N, N+N); " COMBA_STORE(b[0]);\n");
for (x = 1; x < N+N-1; x++) { for (x = 1; x < N+N-1; x++) {
printf( printf(

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR12) && FP_SIZE >= 24 #if defined(TFM_SQR12) && FP_SIZE >= 24
void fp_sqr_comba12(fp_int *A, fp_int *B) void fp_sqr_comba12(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[24], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[24], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR17) && FP_SIZE >= 34 #if defined(TFM_SQR17) && FP_SIZE >= 34
void fp_sqr_comba17(fp_int *A, fp_int *B) void fp_sqr_comba17(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[34], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[34], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR20) && FP_SIZE >= 40 #if defined(TFM_SQR20) && FP_SIZE >= 40
void fp_sqr_comba20(fp_int *A, fp_int *B) void fp_sqr_comba20(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[40], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[40], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR24) && FP_SIZE >= 48 #if defined(TFM_SQR24) && FP_SIZE >= 48
void fp_sqr_comba24(fp_int *A, fp_int *B) void fp_sqr_comba24(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[48], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[48], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR28) && FP_SIZE >= 56 #if defined(TFM_SQR28) && FP_SIZE >= 56
void fp_sqr_comba28(fp_int *A, fp_int *B) void fp_sqr_comba28(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[56], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[56], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,7 @@
#if defined(TFM_SQR3) && FP_SIZE >= 6 #if defined(TFM_SQR3) && FP_SIZE >= 6
void fp_sqr_comba3(fp_int *A, fp_int *B) void fp_sqr_comba3(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[6], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[6], c0, c1, c2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR32) && FP_SIZE >= 64 #if defined(TFM_SQR32) && FP_SIZE >= 64
void fp_sqr_comba32(fp_int *A, fp_int *B) void fp_sqr_comba32(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[64], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[64], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,7 @@
#if defined(TFM_SQR4) && FP_SIZE >= 8 #if defined(TFM_SQR4) && FP_SIZE >= 8
void fp_sqr_comba4(fp_int *A, fp_int *B) void fp_sqr_comba4(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[8], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[8], c0, c1, c2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR48) && FP_SIZE >= 96 #if defined(TFM_SQR48) && FP_SIZE >= 96
void fp_sqr_comba48(fp_int *A, fp_int *B) void fp_sqr_comba48(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[96], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[96], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR6) && FP_SIZE >= 12 #if defined(TFM_SQR6) && FP_SIZE >= 12
void fp_sqr_comba6(fp_int *A, fp_int *B) void fp_sqr_comba6(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[12], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[12], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR64) && FP_SIZE >= 128 #if defined(TFM_SQR64) && FP_SIZE >= 128
void fp_sqr_comba64(fp_int *A, fp_int *B) void fp_sqr_comba64(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[128], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[128], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR7) && FP_SIZE >= 14 #if defined(TFM_SQR7) && FP_SIZE >= 14
void fp_sqr_comba7(fp_int *A, fp_int *B) void fp_sqr_comba7(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[14], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[14], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR8) && FP_SIZE >= 16 #if defined(TFM_SQR8) && FP_SIZE >= 16
void fp_sqr_comba8(fp_int *A, fp_int *B) void fp_sqr_comba8(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[16], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[16], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif

View File

@ -8,7 +8,8 @@
#if defined(TFM_SQR9) && FP_SIZE >= 18 #if defined(TFM_SQR9) && FP_SIZE >= 18
void fp_sqr_comba9(fp_int *A, fp_int *B) void fp_sqr_comba9(fp_int *A, fp_int *B)
{ {
fp_digit *a, b[18], c0, c1, c2, sc0, sc1, sc2; fp_digit *a, b[18], c0, c1, c2;
fp_digit sc0, sc1, sc2;
#ifdef TFM_ISO #ifdef TFM_ISO
fp_word tt; fp_word tt;
#endif #endif