the unsigned 32x32 multiply really does work, just use it
Signed-off-by: Keith Packard <keithp@keithp.com>
}
ao_umul64(r, a, b);
if (negative)
}
ao_umul64(r, a, b);
if (negative)
}
void ao_umul64_16(ao_int64_t *r, ao_int64_t *a, uint16_t b) {
}
void ao_umul64_16(ao_int64_t *r, ao_int64_t *a, uint16_t b) {
- uint32_t low = a->low;
- ao_umul64(r, (uint32_t) low >> 1, (uint32_t) b << 1);
- if (low & 1) {
- if ((uint32_t) (r->low += b) < (uint32_t) b)
- r->high++;
- }
+ ao_umul64(r, a->low, b);
r->high += a->high * b;
}
r->high += a->high * b;
}