more alloca fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user