From: Wei Liu Date: Wed, 9 Aug 2017 12:15:48 +0000 (+0100) Subject: lib/math.c: implement __udivmoddi4 X-Git-Tag: xen-4.10.0-rc1~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d991bdbc062248221511ecb795617c36b37e1d2e;p=mini-os.git lib/math.c: implement __udivmoddi4 Some code compiled by gcc 7 requires this. Signed-off-by: Wei Liu Reviewed-by: Samuel Thibault --- diff --git a/lib/math.c b/lib/math.c index 561393e..b98cc1d 100644 --- a/lib/math.c +++ b/lib/math.c @@ -6,6 +6,7 @@ * File: math.c * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk) * Changes: + * Implement __udivmoddi4 (Wei Liu ) * * Date: Aug 2003 * @@ -396,6 +397,15 @@ __umoddi3(u_quad_t a, u_quad_t b) return (r); } +/* + * Returns the quotient and places remainder in r + */ +u_quad_t +__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *r) +{ + return __qdivrem(a, b, r); +} + /* * From * moddi3.c