mul 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:34 +02:00
parent 8c8d763389
commit 3cabe12a21

View File

@ -21,7 +21,7 @@ printf(
"#define TFM_DEFINES\n" "#define TFM_DEFINES\n"
"#include \"fp_mul_comba.c\"\n" "#include \"fp_mul_comba.c\"\n"
"\n" "\n"
"#ifdef TFM_MUL%d\n" "#if defined(TFM_MUL%d) && FP_SIZE >= %d\n"
"void fp_mul_comba%d(fp_int *A, fp_int *B, fp_int *C)\n" "void fp_mul_comba%d(fp_int *A, fp_int *B, fp_int *C)\n"
"{\n" "{\n"
" fp_digit c0, c1, c2, at[%d];\n" " fp_digit c0, c1, c2, at[%d];\n"
@ -30,7 +30,7 @@ printf(
" memcpy(at+%d, B->dp, %d * sizeof(fp_digit));\n" " memcpy(at+%d, B->dp, %d * sizeof(fp_digit));\n"
" COMBA_START;\n" " COMBA_START;\n"
"\n" "\n"
" COMBA_CLEAR;\n", N, N, N+N, N, N, N); " COMBA_CLEAR;\n", N, N+N, N, N+N, N, N, N);
/* now do the rows */ /* now do the rows */
for (x = 0; x < (N+N-1); x++) { for (x = 0; x < (N+N-1); x++) {