From: Carl Nelson <carl.nelson@mcmail.maricopa.edu>
Subject: Re: Historical Question on Alpha 21064
Date: Fri, 01 Jun 2001 12:12:52 GMT [thread overview]
Message-ID: <3B1786C4.71BE2DA5@mcmail.maricopa.edu> (raw)
In-Reply-To: 3B11DC3F.469BC299@jetnet.ab.ca
Ben Franchuk wrote:
> John McCalpin wrote:
>
> > OK, so in a particularly contrived example you think that the write
> > allocate can cost a factor of four, or perhaps five if the bus loses
> > an additional cycle on the turnaround. I do have to wonder what sort
> > of application only writes data and never reads anything from memory....
>
> You do how ever often fill a block of memory with a constant.
>
> / clear video buffer
> mov a,#SPACE
> mov x,#video
> mov c,#80*24
> repeat c: mov.b x++,a
>
> --
> "We do not inherit our time on this planet from our parents...
> We borrow it from our children."
> "Luna family of Octal Computers" http://www.jetnet.ab.ca/users/bfranchuk
> Updated - Now with schematics.
Hmmm. Wouldn't a decent optimizing compiler turn that sequence into
something like:
load register x with 2020202020202020h (Eight space characters)
load register y with 1920 (80 * 24)
load register z with base address of video
loop:
store x at z (full 64 bit store)
increment z by 8
decrement y by 8
branch to loop if y not zero
This does assume that the base address of the array is aligned. If not, there
is a preamble and a postamble that would have to do some cleanup, but you'd
only have (at most) two out of 240 being fragments of full references. Also,
realistically, there would be some loop unrolling to boot.
It is also my understanding, from a general perusal of the alpha architecture
handbook & compiler design guideline handbook that if you have a partial word
to store that it is best to load the full word, mask off the portions you are
modifying, OR in the modified bytes and write the full word back out again.
IIRC there are alignment instructions particularly for this purpose, although
I may be thinking of instructions for unaligned load & stitch.
next prev parent reply other threads:[~2001-06-01 12:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-24 16:10 Historical Question on Alpha 21064 McCalpin
2001-05-24 18:40 ` David desJardins
2001-05-24 18:45 ` Eric C. Fromm
2001-05-24 20:04 ` McCalpin
2001-05-24 20:36 ` David desJardins
2001-05-24 23:06 ` McCalpin
2001-05-24 23:54 ` David desJardins
2001-05-25 23:11 ` Jay R. Ashworth
2001-05-28 14:44 ` John McCalpin
2001-05-28 5:03 ` Ben Franchuk
2001-05-29 7:00 ` jmfbahciv
2001-06-01 12:12 ` Carl Nelson [this message]
2001-05-29 16:41 ` Ben Franchuk
2001-06-01 14:26 ` Robert Deininger
2001-06-04 18:51 ` Compaq
2001-06-05 16:01 ` Maciej W. Rozycki
2001-06-05 22:59 ` Robert Deininger
2001-05-29 8:39 ` Jan Vorbrueggen
2001-05-29 8:45 ` Jan Vorbrueggen
2001-05-29 17:36 ` David desJardins
2001-05-25 8:57 ` Anton Ertl
2001-05-26 11:25 ` Jonathan Thornburg
2001-05-26 20:29 ` Terje Mathisen
2001-05-29 20:01 ` Eric C. Fromm
2001-05-24 21:02 ` Paul DeMone
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox