[uClibc-cvs] svn commit: trunk/uClibc/ldso/ldso/cris

tobiasa at uclibc.org tobiasa at uclibc.org
Thu Apr 7 13:32:06 UTC 2005


Author: tobiasa
Date: 2005-04-07 07:32:05 -0600 (Thu, 07 Apr 2005)
New Revision: 10076

Log:
Replaced modulo code with the modulo operator.


Modified:
   trunk/uClibc/ldso/ldso/cris/dl-sysdep.h


Changeset:
Modified: trunk/uClibc/ldso/ldso/cris/dl-sysdep.h
===================================================================
--- trunk/uClibc/ldso/ldso/cris/dl-sysdep.h	2005-04-07 00:25:21 UTC (rev 10075)
+++ trunk/uClibc/ldso/ldso/cris/dl-sysdep.h	2005-04-07 13:32:05 UTC (rev 10076)
@@ -18,45 +18,8 @@
 struct elf_resolve;
 extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry);
 
-/* Cheap modulo implementation, taken from arm/dl-sysdep.h. */
-static inline unsigned long
-cris_mod(unsigned long m, unsigned long p)
-{
-	unsigned long i, t, inc;
+#define do_rem(result, n, base) ((result) = (n) % (base))
 
-	i = p;
-	t = 0;
-
-	while (!(i & (1 << 31))) {
-		i <<= 1;
-		t++;
-	}
-
-	t--;
-
-	for (inc = t; inc > 2; inc--) {
-		i = p << inc;
-
-		if (i & (1 << 31))
-			break;
-
-		while (m >= i) {
-			m -= i;
-			i <<= 1;
-			if (i & (1 << 31))
-				break;
-			if (i < p)
-				break;
-		}
-	}
-
-	while (m >= p)
-		m -= p;
-
-	return m;
-}
-#define do_rem(result, n, base) ((result) = cris_mod(n, base))
-
 /* 8192 bytes alignment */
 #define PAGE_ALIGN 0xffffe000
 #define ADDR_ALIGN 0x1fff




More information about the uClibc-cvs mailing list