From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] ARM missing __udivdi3 in lib_arm or fix 64bit division in nand_util.c?
Date: Tue, 31 Jul 2007 21:26:40 +0200 [thread overview]
Message-ID: <46AF8CF0.7090600@googlemail.com> (raw)
In-Reply-To: <1defaf580707310117y20a64a5cl7f6f2f6c6c6747c2@mail.gmail.com>
H?vard Skinnemoen wrote:
> On 7/31/07, Dirk Behme <dirk.behme@googlemail.com> wrote:
>
>>In lib_arm __udivsi3 and friends are available, but __udivdi3 is
>>missing. There is a fix by modifying nand_util.c
>>
>>http://sourceforge.net/mailarchive/forum.php?thread_name=468D2650.10603%40rfo.atmel.com&forum_name=u-boot-users
>>
>>to not do any 64bit divisions any more. Now, I wonder what is the
>>correct fix for this? Should lib_arm provide __udivdi3 as well or
>>should nand_util.c be fixed as in above link to avoid 64bit divisions?
>
> I can't speak for ARM, but I believe this is a problem for most
> architectures. In general, I think we should seriously consider moving
> lib_avr32/div64.c into lib_generic and start to use it for 64-bit
> division instead of relying on libgcc. U-Boot NG has already done
> this.
Something like in attachment?
> In this particular case, I think it's just ridiculously expensive to
> do _three_ 64-bit divisions just to implement a simple progress bar
> and they should all go away. It looks like Patrice's patch might give
> a bit weird results when crossing a 4G boundary but I don't see any
> easy way around it. Perhaps we should just drop the whole percentage
> complete thing and just show a nice N / M fraction?
Sounds good! Do you have some code for this?
Dirk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: div64_generic_patch.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20070731/30b15fe6/attachment.txt
next prev parent reply other threads:[~2007-07-31 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 5:38 [U-Boot-Users] ARM missing __udivdi3 in lib_arm or fix 64bit division in nand_util.c? Dirk Behme
2007-07-31 8:17 ` Håvard Skinnemoen
2007-07-31 19:26 ` Dirk Behme [this message]
2007-07-31 20:27 ` Wolfgang Denk
2007-08-01 17:55 ` Dirk Behme
2007-08-01 20:14 ` Wolfgang Denk
2007-08-01 20:15 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46AF8CF0.7090600@googlemail.com \
--to=dirk.behme@googlemail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.