#define FP_SIZE \ ((4096+(4*(int)((8) * sizeof(fp_digit))))/(int)((8) * sizeof(fp_digit))) typedef unsigned long fp_digit; typedef struct { fp_digit dp[FP_SIZE]; int used, sign; } fp_int; #define MULADD(i, j) \ asm( \ "movl %6,%%eax \n\t" \ "mull %7 \n\t" \ "addl %%eax,%0 \n\t" \ "adcl %%edx,%1 \n\t" \ "adcl $0,%2 \n\t" \ :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc"); void fp_mul_comba(fp_int *A, fp_int *B, fp_int *C) { int ix, iy, iz, tx, ty, pa; fp_digit c0, c1, c2, *tmpx, *tmpy; fp_int tmp, *dst; for (ix = 0; ix < pa; ix++) for (iz = 0; iz < iy; ++iz) MULADD(*tmpx++, *tmpy--); }