This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: powerpc & unaligned block moves with fp registers
- To: David Edelsohn <dje at watson dot ibm dot com>, Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: powerpc & unaligned block moves with fp registers
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 09 Nov 2001 01:59:42 -0800
- cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
> I believe that GCC should use a block move for this type of
> unaligned copy. IBM's compiler uses a block move. The question is where
> to hook this in.
Exactly.
I would prefer to see GCC just ask the back end "How do you want to
perform a memory-to-memory copy of thus and such many bits, knowing
thus and such about the current alignment of the memory?"
If many back ends want to handle this similarly, and they probably
do, there could always be a common routine that the back ends call
back to.
My mental model is that:
1. Deciding how to do the copy is inherently machine-dependent, so
it should be an operation on an object corresponding to the machine.
2. If there is commonality among machines, they should inherit from
a common base class.
I believe that the more we try to go to this model, the cleaner our
code will become. As opposed to trying to make the generic code
be smart based on things like SLOW_UNALIGNED_ACCESS.
My two cents,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com