From: Andreas Schwab <schwab@linux-m68k.org>
To: Luis Alves <ljalvs@gmail.com>
Cc: linux-m68k@vger.kernel.org
Subject: Re: __udivsi3: coldfire vs non-coldfire implementation
Date: Tue, 24 Apr 2012 17:39:15 +0200 [thread overview]
Message-ID: <m2wr55jg0s.fsf@igel.home> (raw)
In-Reply-To: <CAGj5WxCrOC-SKUjrv=3RTTjx7F5n4+vLhH_7HRS1crVSnf6RuA@mail.gmail.com> (Luis Alves's message of "Tue, 24 Apr 2012 15:14:17 +0100")
Luis Alves <ljalvs@gmail.com> writes:
> What's the reason for having two different algorithms for this function?
> The coldfire version seems faster since it doesn't perform any div/mul
> opcodes. Or am I wrong?
The coldfire version would require a minimum of 1800 cycles on a 68000.
The 68000 version is dominated by either two divu (max 140 cycles each)
or an lsr loop of max 900 cycles plus divu and two mulu (max 70 cycles
each) plus some 100 cycles for the rest. That should make it better for
all inputs.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2012-04-24 15:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 14:14 __udivsi3: coldfire vs non-coldfire implementation Luis Alves
2012-04-24 15:39 ` Andreas Schwab [this message]
2012-04-24 16:29 ` Luis Alves
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=m2wr55jg0s.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=ljalvs@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox