|
Lines 75-85
Link Here
|
| 75 |
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */ |
75 |
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */ |
| 76 |
static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2) |
76 |
static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2) |
| 77 |
{ |
77 |
{ |
| 78 |
asm volatile ("movl %1,%%edi; movl %2,%%esi; |
78 |
asm volatile ("movl %1,%%edi; movl %2,%%esi; " \ |
| 79 |
movl (%%esi),%%eax; addl %%eax,(%%edi); |
79 |
"movl (%%esi),%%eax; addl %%eax,(%%edi); " \ |
| 80 |
movl 4(%%esi),%%eax; adcl %%eax,4(%%edi); |
80 |
"movl 4(%%esi),%%eax; adcl %%eax,4(%%edi); " \ |
| 81 |
movl 8(%%esi),%%eax; adcl %%eax,8(%%edi);" |
81 |
"movl 8(%%esi),%%eax; adcl %%eax,8(%%edi); " \ |
| 82 |
:"=g" (*dest):"g" (dest), "g" (x2) |
82 |
:"=g" (*dest):"g" (dest), "g" (x2) \ |
| 83 |
:"ax","si","di"); |
83 |
:"ax","si","di"); |
| 84 |
} |
84 |
} |
| 85 |
|
85 |
|
|
Lines 90-107
Link Here
|
| 90 |
problem, but keep fingers crossed! */ |
90 |
problem, but keep fingers crossed! */ |
| 91 |
static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp) |
91 |
static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp) |
| 92 |
{ |
92 |
{ |
| 93 |
asm volatile ("movl %2,%%ecx; movl %3,%%esi; |
93 |
asm volatile ("movl %2,%%ecx; movl %3,%%esi; " \ |
| 94 |
movl (%%esi),%%eax; addl %%eax,(%%ecx); |
94 |
"movl (%%esi),%%eax; addl %%eax,(%%ecx); " \ |
| 95 |
movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx); |
95 |
"movl 4(%%esi),%%eax; adcl %%eax,4(%%ecx); " \ |
| 96 |
movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx); |
96 |
"movl 8(%%esi),%%eax; adcl %%eax,8(%%ecx); " \ |
| 97 |
jnc 0f; |
97 |
"jnc 0f; " \ |
| 98 |
rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx) |
98 |
"rcrl 8(%%ecx); rcrl 4(%%ecx); rcrl (%%ecx); " \ |
| 99 |
movl %4,%%ecx; incl (%%ecx) |
99 |
"movl %4,%%ecx; incl (%%ecx); " \ |
| 100 |
movl $1,%%eax; jmp 1f; |
100 |
"movl $1,%%eax; jmp 1f; " \ |
| 101 |
0: xorl %%eax,%%eax; |
101 |
"0: xorl %%eax,%%eax; " \ |
| 102 |
1:" |
102 |
"1: " \ |
| 103 |
:"=g" (*exp), "=g" (*dest) |
103 |
:"=g" (*exp), "=g" (*dest) \ |
| 104 |
:"g" (dest), "g" (x2), "g" (exp) |
104 |
:"g" (dest), "g" (x2), "g" (exp) \ |
| 105 |
:"cx","si","ax"); |
105 |
:"cx","si","ax"); |
| 106 |
} |
106 |
} |
| 107 |
|
107 |
|