From: Seungdong Lee <sdlee@da-san.com>
To: Geir Frode Raanes <geirfrs@invalid.ed.ntnu.no>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: 8240 BogoMIPS
Date: Mon, 22 May 2000 20:19:30 +0900 [thread overview]
Message-ID: <392917C2.A43BDCAB@da-san.com> (raw)
In-Reply-To: Pine.BSF.4.21.0005221234370.87833-100000@invalid.ed.ntnu.no
Geir Frode Raanes wrote:
> On Mon, 22 May 2000, Seungdong Lee wrote:
>
> >
> > Marcus Sundberg wrote:
> > > Seungdong Lee <sdlee@da-san.com> writes:
> > > > Marcus Sundberg wrote:
> > > > > I'm not very familiar with 82x0 processors, but doesn't 8240 use a
> > > > > 603-core? When I worked with a 603ev running at 200 MHz I got
> > > > > something like 133 BogoMIPS, so then the above value would be correct.
> > >
> > > > I still think that the correct value is 400.
> > >
> > You are right, but you might think in other way if you read
> > instruction timing section in 603 manual.
> > Branch instruction needs only 1 CPU clock and test loop is as follows.
> >
> > extern __inline__ void __delay(unsigned int loops)
> > {
> > if (loops != 0)
> > __asm__ __volatile__("mtctr %0; 1: bdnz 1b" : :
> > "r" (loops) : "ctr");
> > }
> >
> > "bdnz" instruction is executed 'loops' times.
> > bdnz is the instruction which jumps to itself.
> > Loop count is controlled by CTR register.
>
> In this case you utilize the single dedicated loop HW resorce of
> the PowerPC architecture. I have at times had to resort to this
> kind of handassembling with addition of move-many instructions
> and cache nullify to eliminate copyback reading, simply because
> GCC _does not_ utilize this dedicated hardware on its own.
>
> > Please check the BogoMIPS algorithm.
>
> Rather check the implementation. If it is written in C then it
> will not result in the above assembly construct - it will use
> an ordinary register as loop counter instead.
>
Above inline assembly is not my own.
You can find it in official Linux/PowerPC distribution.
I don't think that compiler changes anything in loop itself.
Bye.
-- Seungdong Lee
>
> --
> ******************************************************
> Never ever underestimate the power of human stupidity.
> -Robert Anson Heinlein
>
> GeirFRS@invalid.and.so.forth
> ******************************************************
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-05-22 11:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-20 7:28 8240 BogoMIPS Seungdong Lee
2000-05-20 17:36 ` Dan Malek
2000-05-20 20:14 ` Marcus Sundberg
2000-05-22 2:38 ` Seungdong Lee
2000-05-22 9:34 ` Marcus Sundberg
2000-05-22 9:54 ` Seungdong Lee
2000-05-22 10:50 ` Geir Frode Raanes
2000-05-22 11:19 ` Seungdong Lee [this message]
2000-05-26 7:45 ` Seungdong Lee
2000-05-22 2:29 ` Seungdong Lee
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=392917C2.A43BDCAB@da-san.com \
--to=sdlee@da-san.com \
--cc=geirfrs@invalid.ed.ntnu.no \
--cc=linuxppc-embedded@lists.linuxppc.org \
/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;
as well as URLs for NNTP newsgroup(s).