From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 31 Aug 2011 13:56:23 +0200 Subject: [U-Boot] [PATCH] arm: add 64-64 bit divider In-Reply-To: <1314787130-1043-1-git-send-email-clchiou@chromium.org> References: <1314787130-1043-1-git-send-email-clchiou@chromium.org> Message-ID: <201108311356.23919.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Albert Aribaud > --- Hi, do you see any kind of a performance hit so you can't use the default "C" version? Cheers