sqr generator: update preamble not to compile the code if it's not required

This commit is contained in:
Steffen Jaeckel 2014-06-12 18:08:10 +02:00
parent 2d5b8206fa
commit 8c8d763389

View File

@ -19,7 +19,7 @@ printf(
"#define TFM_DEFINES\n" "#define TFM_DEFINES\n"
"#include \"fp_sqr_comba.c\"\n" "#include \"fp_sqr_comba.c\"\n"
"\n" "\n"
"#ifdef TFM_SQR%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, sc0, sc1, sc2;\n"
@ -35,7 +35,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); " COMBA_STORE(b[0]);\n", N, N+N, N, N+N);
for (x = 1; x < N+N-1; x++) { for (x = 1; x < N+N-1; x++) {
printf( printf(