diff options
author | Tobias Anderberg <tobias.anderberg@axis.com> | 2005-04-07 13:32:05 +0000 |
---|---|---|
committer | Tobias Anderberg <tobias.anderberg@axis.com> | 2005-04-07 13:32:05 +0000 |
commit | b6f2c594dffc44b5a3a40f493a84850a30410879 (patch) | |
tree | 3cc3497d388332580e09dd780f99f9152300d4a8 | |
parent | af9db46889b17911938f6d98c857e5cc0dec13f3 (diff) |
Replaced modulo code with the modulo operator.
-rw-r--r-- | ldso/ldso/cris/dl-sysdep.h | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/ldso/ldso/cris/dl-sysdep.h b/ldso/ldso/cris/dl-sysdep.h index 364e8b516..b58f5e0a3 100644 --- a/ldso/ldso/cris/dl-sysdep.h +++ b/ldso/ldso/cris/dl-sysdep.h @@ -18,44 +18,7 @@ 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; - - 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)) +#define do_rem(result, n, base) ((result) = (n) % (base)) /* 8192 bytes alignment */ #define PAGE_ALIGN 0xffffe000 |