Re: Fwd: Re: still no accelerated X ($#!$*)
From: Gabriel Paubert <hidden>
Date: 2000-01-20 19:59:06
Hi,
In this particular case, the base address can change (but very very rarely such as writing to one Aperature or Another on the Rage 128 card) and all of the writes are made to either the card memory mapped io or the frame buffer itself.
Then the memory clobber would force the compiler to reload base_addr between 2 writes to the frame buffer.
Should I not include the : "memory" clobber in this case? Will it hurt performance much?
I think that it is not necessary: the best thing with a compiler which
performs alias analysis might be to tell the truth
asm ("stwbrx %1,%2,%3"
: "=m" (*(volatile unsigned *)(base_addr+regindex))
: "r" (regdata), "b" (base_addr), "r" (regindex));
Note we don't use %0, and it won't produce any aditional code. You may
want to check what the compiler would have generated as addressing mode
by appending " # %0" at the end of the code string.
I truly wish there were a constraint for indexed addressing modes (anyway
this will be necessary for proper Altivec support).
Gabriel.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/