This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]