fix obvious bugs in some cairo exotic functions
This commit is contained in:
@@ -666,7 +666,7 @@ _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num,
|
||||
cairo_uint64_t den)
|
||||
{
|
||||
cairo_uquorem64_t result;
|
||||
uint64_t B = _cairo_uint32s_to_uint64 (1, 0);
|
||||
cairo_uint64_t B = _cairo_uint32s_to_uint64 (1, 0);
|
||||
|
||||
/* These are the high 64 bits of the *96* bit numerator. We're
|
||||
* going to represent the numerator as xB + y, where x is a 64,
|
||||
@@ -696,7 +696,7 @@ _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num,
|
||||
* den = uB + v u, v : 32 bits
|
||||
*/
|
||||
uint32_t y = _cairo_uint128_to_uint32 (num);
|
||||
uint32_t u = uint64_hi (den);
|
||||
uint32_t u = uint64_hi32 (den);
|
||||
uint32_t v = _cairo_uint64_to_uint32 (den);
|
||||
|
||||
/* Compute a lower bound approximate quotient of num/den
|
||||
@@ -733,7 +733,7 @@ _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num,
|
||||
r = _cairo_uint64_to_uint32 (quorem.rem);
|
||||
}
|
||||
else {
|
||||
q = uint64_hi (x);
|
||||
q = uint64_hi32 (x);
|
||||
r = _cairo_uint64_to_uint32 (x);
|
||||
}
|
||||
quotient = q;
|
||||
|
||||
Reference in New Issue
Block a user