Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Joachim Wesner <joachim.wesner@frankfurt.netsurf.de>
Subject: Re: assembly programming on alphas
Date: 1998/12/12	[thread overview]
Message-ID: <36729BEF.36CA000C@frankfurt.netsurf.de> (raw)
In-Reply-To: 36704B54.55298E9F@xs4all.nl

Bram wrote:
> 
> I've been reading DEC's Assembly Language Programmer's Guide.
> But I have a couple of questions.
> 
> How can I have egcs generate more verbose assembly output?
> The samples in the guide show the C-source as comments in
> the assembly file.
> The output from egcc -S does not give these.

To my knowledge, there is no way to have the assembly output mixed with
the C-source on gcc/egcs. I would love to hear about any possibility.


> Also, isn't there a more convenient method for memory
> to memory copying? It seems that the only way to move
> data from memory to memory, is by loading, and then
> storing registers.
> On Intel, I use movsb/movsw/movsl a lot, but there
> does not seem to be an alpha-equivalent.

NOPE, there is none. This is RISC philosophy, resp, the "load & store"
architecture. Basically, the idea is to use the multiple issue
possiblities, branch prediction etc. to emulate the x86 instructions at
the same speed. Also, x86 mov** does no real memory to memory copy (some
DMA controllers allow this if your memory subsystem can handle it), but
instead feed it in parts through a temporary processor register.


> I am curious how memcpy is implemented on the alpha.
> What is the fastest way to copy, say, 32 bytes or more
> from one location to another? And what if the data
> is not alligned?

If it's not aligned, you will get a slowdown due to the need to copy in
smaller bunches. HOWEVER, the very same happens on x86, even if it is
all handled in hardware/microcode. Alpha philosphy again is to avoid (if
possible) any "non naturally" aligned data like "the plague".

Actually, I do not know the source for memcpy on Linux/AXP.
You could assemble/compile a simple program that uses it and look inside
with gdb to get an idea how it is implemented.


Joachim



  reply	other threads:[~1998-12-12  5:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-10  5:00 assembly programming on alphas Bram
1998-12-12  5:00 ` Joachim Wesner [this message]
1998-12-12  5:00   ` Clifford T. Matthews
1998-12-12  5:00     ` Joachim Wesner
1998-12-19  5:00   ` Toon Moene
1999-01-05  5:00     ` Alex Rhomberg
1999-01-06  5:00       ` Bram Stolk
1998-12-12  5:00 ` Bradley DeJong
1998-12-12  5:00   ` Reginald Beardsley
1998-12-16  5:00     ` Paul Repacholi
1998-12-12  5:00 ` Raymond Doetjes
1998-12-11  5:00   ` Bram
1998-12-13  5:00 ` dontspam_esci
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