initial import
[ICEs.git] / 152043 / fp_mul_comba.c
1 long fp_mul_comba(unsigned long *tmpx, unsigned long *tmpy)
2 {
3 unsigned long c0, c1, c2;
4 #if 0
5 asm(
6 "movl %6,%%eax \n\t"
7 "mull %7 \n\t"
8 "addl %%eax,%0 \n\t"
9 "adcl %%edx,%1 \n\t"
10 "adcl $0,%2 \n\t"
11 : "=r"(c0), "=r"(c1), "=r"(c2)
12 : "0"(c0), "1"(c1), "2"(c2), "m"(*tmpx++), "m"(*tmpy--)
13 : "%eax","%edx","%cc"
14 );
15 #else
16 asm(
17 "foo_start:\n\t"
18 "movl %6,%%eax \n\t"
19 "mull %7 \n\t"
20 "addl %%eax,%0 \n\t"
21 "adcl %%edx,%1 \n\t"
22 "adcl $0,%2 \n\t"
23 "foo_end:\n\t"
24 : "=r"(c0), "=r"(c1), "=r"(c2)
25 : "0"(c0), "1"(c1), "2"(c2), "g"(*tmpx++), "g"(*tmpy--)
26 : "%eax","%edx","%cc"
27 );
28 return c0 + c1 + c2;
29 /*
30 asm(
31 "foo:\n\t"
32 "movl %6,%%eax \n\t"
33 "mull %7 \n\t"
34 "addl %%eax,%0 \n\t"
35 "adcl %%edx,%1 \n\t"
36 "adcl $0,%2 \n\t"
37 : "=r"(c0), "=r"(c1), "=r"(c2)
38 : "0"(c0), "1"(c1), "2"(c2), "eax"(*tmpx++), "m"(*tmpy--)
39 : "%edx", "%cc");
40 */
41 #endif
42 }