This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, libgcc] Bug fix in udivmodhi4.c
- From: Paul Koning <paulkoning at comcast dot net>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 5 Dec 2018 09:26:52 -0500
- Subject: [PATCH, libgcc] Bug fix in udivmodhi4.c
This fixes a cut & paste oversight in udivmodhi4 (which is currently used only by the pdp11 target) reported by Stefan Kanthak.
Committed as obvious.
paul
ChangeLog:
2018-12-05 Paul Koning <ni1d@arrl.net>
* udivmodhi4.c (__udivmodhi4): Fix loop end check.
Index: libgcc/udivmodhi4.c
===================================================================
--- libgcc/udivmodhi4.c (revision 266823)
+++ libgcc/udivmodhi4.c (working copy)
@@ -27,7 +27,7 @@ __udivmodhi4(unsigned short num, unsigned short de
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;