This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: powerpc & unaligned block moves with fp registers


> 	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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]