more alloca fixes

This commit is contained in:
leitner
2004-01-06 23:35:06 +00:00
parent 60d00ede11
commit f52aa87441
15 changed files with 23 additions and 14 deletions

View File

@@ -2,9 +2,10 @@
int imult16(int16 a,int16 b,int16* c) {
int neg=(a<0);
uint16 d;
if (neg) a=-a;
if (b<0) { neg^=1; b=-b; }
if (umult16(a,b,c)) return 0;
if (neg) *c=-*c;
if (umult16(a,b,&d)) return 0;
*c=(neg?-d:d);
return 1;
}

View File

@@ -2,9 +2,10 @@
int imult32(int32 a,int32 b,int32* c) {
int neg=(a<0);
uint32 d;
if (neg) a=-a;
if (b<0) { neg^=1; b=-b; }
if (umult32(a,b,c)) return 0;
if (neg) *c=-*c;
if (umult32(a,b,&d)) return 0;
*c=(neg?-d:d);
return 1;
}

View File

@@ -2,10 +2,11 @@
int imult64(int64 a,int64 b,int64* c) {
int neg=(a<0);
uint64 d;
if (neg) a=-a;
if (b<0) { neg^=1; b=-b; }
if (umult64(a,b,c)) return 0;
if (neg) *c=-*c;
if (umult64(a,b,&d)) return 0;
*c=(neg?-d:d);
return 1;
}