From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: tiny memcpy_(to|from)io optimisation
Date: Sun, 31 May 2009 12:11:32 +0200 [thread overview]
Message-ID: <1243764699.3217.0@antares> (raw)
In-Reply-To: <OFC4733C3C.0E94C44D-ONC12575C5.00215A32-C12575C5.0023DB18@transmode.se> (from joakim.tjernlund@transmode.se on Fri May 29 08:31:39 2009)
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
Hi Jocke:
Am 29.05.09 08:31 schrieb(en) Joakim Tjernlund:
> > No (and I wasn't aware of the PPC pre-inc vs. post-inc stuff) - I
> just
>
> I think this is true for most RISC based CPU's. It is a pity as
> post ops are a lot more common. The do {} while(--chunks) is also
> better. Basically the "while(--chunks)" is free(but only if you don't
> use
> chunks inside the loop).
Just a side note: I looked at the assembly output of gcc 4.3.3 coming
with Ubuntu Jaunty/PowerPC for
<snip case="1">
n >>= 2;
do {
*++dst = *++src;
} while (--n);
<snip>
and
<snip case="2">
n >>= 2;
while (n--)
*dst++ = *src++;
</snip>
Using the gcc options "-O2 -mcpu=603e -mtune=603e" (same effect with
"-O3" instead of "-O2") the loop core is *exactly* the same in both
cases.
With gcc 4.2.2 (coming with ELDK 4.2) the loop core in case 2 is indeed
one statement longer, though...
Best, Albrecht.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2009-05-31 10:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 20:00 [PATCH] powerpc: tiny memcpy_(to|from)io optimisation Albrecht Dreß
2009-05-28 16:13 ` Joakim Tjernlund
2009-05-28 19:50 ` Albrecht Dreß
2009-05-29 6:31 ` Joakim Tjernlund
2009-05-31 10:11 ` Albrecht Dreß [this message]
2009-06-01 6:14 ` Joakim Tjernlund
2009-06-02 18:45 ` Albrecht Dreß
2009-06-02 22:51 ` Benjamin Herrenschmidt
2009-06-03 14:36 ` Kenneth Johansson
2009-06-03 18:35 ` Albrecht Dreß
2009-06-11 17:07 ` Wolfram Sang
2009-06-11 17:30 ` Grant Likely
2009-06-19 18:42 ` Lorenz Kolb
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=1243764699.3217.0@antares \
--to=albrecht.dress@arcor.de \
--cc=joakim.tjernlund@transmode.se \
--cc=linuxppc-dev@ozlabs.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).