From: "Kevin B. Hendricks" <khendricks@ivey.uwo.ca>
To: Ani Joshi <ajoshi@shell.unixbox.com>,
Ryuichi Oikawa <roikawa@rr.iij4u.or.jp>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Some issues to resolve with XFree 4.0 yet
Date: Mon, 27 Mar 2000 14:06:35 -0500 [thread overview]
Message-ID: <v03110706b505609771ce@[129.100.29.243]> (raw)
In-Reply-To: <Pine.LNX.4.10.10003270958530.10064-100000@shell.unixbox.com>
Hi Ani and Ryuichi,
>are you using the patch I posted last week? If not, then I suggest you
>do. I fixed the improper load/stores in r128 and it shows a 200% increase
>in almost all x11perf tests.
Actually, you might want to try Gabriel Paubert's patch which simply
removes the "volatile" from the base_addr parameter. The incirrectly
specified volatile on the parameter (which really makes no sense if you
think about it ;-)) is what was causing all the problems with inefficiency.
Interestingly, with this patch you can actually save one extra instruction
over Ani's patch but either one is a big big improvement.
Kevin
----snip-here-for Gabriel_Paubert's_e-mail_with_patch----
> Hi,
>
> >From comparing the performance of the XFree 4.0 r128 drivers across x86 and
> ppc we noticed that the ppc version was much slower. The following patch
> made a huge change in x11perf results (improivement). This is on a ppc
> with glibc 2.1.3 and the latest gcc 2.95.2 from Franz Sirl.
>
> Did I write the output constraint version incorrectly? Is this what you
> expected the generated code to look like?
I have just made a test with suppressing the volatile in the parameter to
the regr/regw/regr16/regw16 macros and the code is even better (one
instruction less than with the memory clobber):
000003d4 <R128Blank>:
3d4: 81 43 00 f8 lwz r10,248(r3)
3d8: 81 6a 00 24 lwz r11,36(r10)
3dc: 39 20 00 54 li r9,84
3e0: 7c 09 5c 2c lwbrx r0,r9,r11
3e4: 7c 00 06 ac eieio
3e8: 60 00 04 00 ori r0,r0,1024
3ec: 7c 09 5d 2c stwbrx r0,r9,r11
3f0: 7c 00 06 ac eieio
3f4: 4e 80 00 20 blr
the diff is:
--- r128_reg.h~ Sat Feb 26 06:38:43 2000
+++ r128_reg.h Fri Mar 24 23:47:31 2000
@@ -48,19 +48,19 @@
#if defined(__powerpc__)
-static inline void regw(volatile unsigned long base_addr, unsigned long
regindex, unsigned long regdata)
+static inline void regw(unsigned long base_addr, unsigned long regindex,
unsigned long regdata)
{
asm volatile ("stwbrx %1,%2,%3; eieio"
: "=m" (*(volatile unsigned *)(base_addr+regindex))
: "r" (regdata), "b" (regindex), "r" (base_addr));
}
-static inline void regw16(volatile unsigned long base_addr, unsigned long
regindex, unsigned short regdata)
+static inline void regw16(unsigned long base_addr, unsigned long regindex,
unsigned short regdata)
{
asm volatile ("sthbrx %0,%1,%2; eieio": : "r"(regdata), "b"(regindex),
"r"(base_addr));
}
-static inline unsigned long regr(volatile unsigned long base_addr,
unsigned long regindex)
+static inline unsigned long regr(unsigned long base_addr, unsigned long
regindex)
{
register unsigned long val;
asm volatile ("lwbrx %0,%1,%2; eieio"
@@ -70,7 +70,7 @@
return(val);
}
-static inline unsigned short regr16(volatile unsigned long base_addr,
unsigned long regindex)
+static inline unsigned short regr16(unsigned long base_addr, unsigned long
regindex)
{
register unsigned short val;
asm volatile ("lhbrx %0,%1,%2; eieio": "=r"(val):"b"(regindex),
"r"(base_addr));
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-03-27 19:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.10.10003230911180.6826-100000@shell.unixbox.com>
2000-03-23 18:16 ` Some issues to resolve with XFree 4.0 yet Kevin Hendricks
2000-03-25 3:54 ` Found bug in mode switching but who is at fault...XFree86 or aty128fb.c? Kevin Hendricks
2000-03-25 7:57 ` Michel Dänzer
2000-03-25 8:07 ` Michel Dänzer
2000-03-25 13:46 ` Geert Uytterhoeven
2000-03-25 23:50 ` Some issues to resolve with XFree 4.0 yet Kevin Hendricks
2000-03-27 11:09 ` Kostas Gewrgiou
2000-03-27 17:41 ` Ryuichi Oikawa
2000-03-27 18:05 ` Ani Joshi
2000-03-27 19:06 ` Kevin B. Hendricks [this message]
2000-03-27 19:13 ` David Edelsohn
2000-03-27 19:20 ` Kevin B. Hendricks
2000-03-27 19:25 ` Ani Joshi
2000-03-27 19:45 ` David Edelsohn
2000-03-27 19:38 ` Ani Joshi
2000-03-27 20:01 ` David Edelsohn
2000-03-27 19:48 ` Kevin B. Hendricks
2000-03-28 7:59 ` Geert Uytterhoeven
2000-03-29 10:45 ` Gabriel Paubert
2000-03-29 13:11 ` Franz Sirl
2000-03-29 14:58 ` Gabriel Paubert
2000-03-29 19:39 ` Franz Sirl
2000-03-28 16:51 ` Ryuichi Oikawa
2000-03-28 17:51 ` Geert Uytterhoeven
[not found] <Pine.LNX.4.05.10003240806290.5355-100000@callisto.of.borg>
2000-03-24 8:58 ` Michael Schmitz
2000-03-15 14:09 patch to get latest XFree 4.0 snapshot (xf3918) to workonppcwithr128 Kostas Gewrgiou
2000-03-23 4:46 ` Some issues to resolve with XFree 4.0 yet Kevin Hendricks
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='v03110706b505609771ce@[129.100.29.243]' \
--to=khendricks@ivey.uwo.ca \
--cc=ajoshi@shell.unixbox.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=roikawa@rr.iij4u.or.jp \
/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