[U-Boot] [PATCH] arm: add 64-64 bit divider

Marek Vasut marek.vasut at gmail.com
Wed Aug 31 13:56:23 CEST 2011


On Wednesday, August 31, 2011 12:38:50 PM Che-Liang Chiou wrote:
> This patch adds a 64-64 bit divider that supports ARMv4 and above.
> 
> Because clz (count leading zero) instruction is added until ARMv5, the
> divider implements a clz function for ARMv4 targets.
> 
> The divider was tested with the following test driver code ran by
> qemu-arm:
> 
>   int main(void)
>   {
>     uint64_t a, b, q, r;
>     while (scanf("%llx %llx %llx %llx", &a, &b, &q, &r) > 0)
>       printf("%016llx %016llx %016llx %016llx\n", a, b, a / b, a % b);
>     return 0;
>   }
> 
> Signed-off-by: Che-Liang Chiou <clchiou at chromium.org>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> ---

Hi,

do you see any kind of a performance hit so you can't use the default "C" 
version?

Cheers


More information about the U-Boot mailing list