Re: Division involving u64 : undefined reference to __udivdi3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 6, 2009 at 7:08 PM, Vivek Kumar Gupta <gkvivek@xxxxxxxxx> wrote:
> 1. Try upgrading your GCC compiler to 4.3.2

Ok

> 2. To avoid Division in code: try using shift operation instead of div.
>
> E.g. "c = c >> x" instead of "c = c / x;"

But that holds true only when the divisor is a power of 2.
i.e.  if,  x = 2^a   then   "c = c / x"  is same as  "c = c >> a".

What if that is not the case ?



Regards
Sukanto

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux