fix compile errors

This commit is contained in:
Steffen Jaeckel 2015-02-15 14:50:20 +01:00
parent b1b9a82d97
commit 77be93c201
3 changed files with 9 additions and 4 deletions

View File

@ -349,7 +349,9 @@ void fp_mul_comba(fp_int *A, fp_int *B, fp_int *C)
/* execute loop */
COMBA_FORWARD;
for (iz = 0; iz < iy; ++iz) {
MULADD(*tmpx++, *tmpy--);
fp_digit _tmpx = *tmpx++;
fp_digit _tmpy = *tmpy--;
MULADD(_tmpx, _tmpy);
}
/* store term */

View File

@ -109,7 +109,7 @@ asm( \
"addq %%rax,%0 \n\t" \
"adcq %%rdx,%1 \n\t" \
"adcq $0,%2 \n\t" \
:"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "g"(i) :"%rax","%rdx","cc");
:"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "x"(i) :"%rax","%rdx","cc");
#define SQRADD2(i, j) \
asm( \

View File

@ -68,12 +68,15 @@ void fp_sqr_comba(fp_int *A, fp_int *B)
/* execute loop */
for (iz = 0; iz < iy; iz++) {
SQRADD2(*tmpx++, *tmpy--);
fp_digit _tmpx = *tmpx++;
fp_digit _tmpy = *tmpy--;
SQRADD2(_tmpx, _tmpy);
}
/* even columns have the square term in them */
if ((ix&1) == 0) {
SQRADD(A->dp[ix>>1], A->dp[ix>>1]);
fp_digit _a_dp = A->dp[ix>>1];
SQRADD(_a_dp, A->dp[ix>>1]);
}
/* store it */