From c0c5112bcd9bd1b0846a2fc5593339a8bd690bd8 Mon Sep 17 00:00:00 2001 From: Paul Koning Date: Wed, 5 Dec 2018 09:25:11 -0500 Subject: [PATCH] * udivmodhi4.c (__udivmodhi4): Fix loop end check. From-SVN: r266826 --- libgcc/ChangeLog | 4 ++++ libgcc/udivmodhi4.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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; -- 2.30.2