From: Paul Koning Date: Wed, 5 Dec 2018 14:25:11 +0000 (-0500) Subject: * udivmodhi4.c (__udivmodhi4): Fix loop end check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0c5112bcd9bd1b0846a2fc5593339a8bd690bd8;p=gcc.git * udivmodhi4.c (__udivmodhi4): Fix loop end check. From-SVN: r266826 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a4bce25cb23..39713edf01c 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2018-12-05 Paul Koning + + * udivmodhi4.c (__udivmodhi4): Fix loop end check. + 2018-11-27 Alan Modra * config/rs6000/morestack.S (__stack_split_initialize), diff --git a/libgcc/udivmodhi4.c b/libgcc/udivmodhi4.c index 551a135a255..d9ac8edd912 100644 --- a/libgcc/udivmodhi4.c +++ b/libgcc/udivmodhi4.c @@ -27,7 +27,7 @@ __udivmodhi4(unsigned short num, unsigned short den, int modwanted) unsigned short bit = 1; unsigned short res = 0; - while (den < num && bit && !(den & (1L<<31))) + while (den < num && bit && !(den & (1U<<15))) { den <<=1; bit <<=1;