version 1.7, 2005/02/13 16:01:02 |
version 1.10, 2007/09/15 10:17:08 |
|
|
INLINE void _addz(Z n1,Z n2,Z nr); |
INLINE void _addz(Z n1,Z n2,Z nr); |
INLINE void _subz(Z n1,Z n2,Z nr); |
INLINE void _subz(Z n1,Z n2,Z nr); |
INLINE void _mulz(Z n1,Z n2,Z nr); |
INLINE void _mulz(Z n1,Z n2,Z nr); |
INLINE int _addz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr); |
int _addz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr); |
INLINE int _subz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr); |
int _subz_main(unsigned int *m1,int d1,unsigned int *m2,int d2,unsigned int *mr); |
|
|
/* immediate int -> Z */ |
/* immediate int -> Z */ |
#define UTOZ(c,n) (n)=(!((unsigned int)(c))?0:(((unsigned int)(c))<=IMM_MAX?((Z)((((unsigned int)(c))<<1)|1)):utoz((unsigned int)(c)))) |
#define UTOZ(c,n) (n)=(!((unsigned int)(c))?0:(((unsigned int)(c))<=IMM_MAX?((Z)((((unsigned int)(c))<<1)|1)):utoz((unsigned int)(c)))) |
Line 704 int _addz_main(unsigned int *m1,int d1,unsigned int *m |
|
Line 704 int _addz_main(unsigned int *m1,int d1,unsigned int *m |
|
} |
} |
#elif defined(i386) |
#elif defined(i386) |
asm volatile("\ |
asm volatile("\ |
|
pushl %%ebx;\ |
movl %1,%%esi;\ |
movl %1,%%esi;\ |
movl %2,%%edi;\ |
movl %2,%%edi;\ |
movl %3,%%ebx;\ |
movl %3,%%ebx;\ |
Line 721 int _addz_main(unsigned int *m1,int d1,unsigned int *m |
|
Line 722 int _addz_main(unsigned int *m1,int d1,unsigned int *m |
|
jnz Lstart__addz;\ |
jnz Lstart__addz;\ |
movl $0,%%eax;\ |
movl $0,%%eax;\ |
adcl %%eax,%%eax;\ |
adcl %%eax,%%eax;\ |
movl %%eax,%0"\ |
movl %%eax,%0;\ |
|
popl %%ebx"\ |
:"=m"(c)\ |
:"=m"(c)\ |
:"m"(m1),"m"(m2),"m"(mr),"m"(d2)\ |
:"m"(m1),"m"(m2),"m"(mr),"m"(d2)\ |
:"eax","ebx","ecx","edx","esi","edi"); |
:"eax","ecx","edx","esi","edi"); |
#else |
#else |
for ( i = 0, c = 0; i < d2; i++, m1++, m2++, mr++ ) { |
for ( i = 0, c = 0; i < d2; i++, m1++, m2++, mr++ ) { |
tmp = *m1 + *m2; |
tmp = *m1 + *m2; |
Line 794 int _subz_main(unsigned int *m1,int d1,unsigned int *m |
|
Line 796 int _subz_main(unsigned int *m1,int d1,unsigned int *m |
|
} |
} |
#elif defined(i386) |
#elif defined(i386) |
asm volatile("\ |
asm volatile("\ |
|
pushl %%ebx;\ |
movl %1,%%esi;\ |
movl %1,%%esi;\ |
movl %2,%%edi;\ |
movl %2,%%edi;\ |
movl %3,%%ebx;\ |
movl %3,%%ebx;\ |
Line 811 int _subz_main(unsigned int *m1,int d1,unsigned int *m |
|
Line 814 int _subz_main(unsigned int *m1,int d1,unsigned int *m |
|
jnz Lstart__subz;\ |
jnz Lstart__subz;\ |
movl $0,%%eax;\ |
movl $0,%%eax;\ |
adcl %%eax,%%eax;\ |
adcl %%eax,%%eax;\ |
movl %%eax,%0"\ |
movl %%eax,%0;\ |
|
popl %%ebx"\ |
:"=m"(br)\ |
:"=m"(br)\ |
:"m"(m1),"m"(m2),"m"(mr),"m"(d2)\ |
:"m"(m1),"m"(m2),"m"(mr),"m"(d2)\ |
:"eax","ebx","ecx","edx","esi","edi"); |
:"eax","ecx","edx","esi","edi"); |
#else |
#else |
for ( i = 0, br = 0; i < d2; i++, mr++ ) { |
for ( i = 0, br = 0; i < d2; i++, mr++ ) { |
t = *m1++; |
t = *m1++; |