This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] operands_match_p for multiple hard registers


On Thu, 2005-02-24 at 09:32, Richard Henderson wrote:
> On Wed, Feb 23, 2005 at 08:36:54PM -0500, David Edelsohn wrote:
> > 	This behavior only seems to make sense for scalar integers...
> 
> I don't agree.  It could easily make sense for fp single to fp double
> extension.  Would you like to describe the actual problem?
> 
> 
> r~

Thinking about this, I suspect it's a classic 'mixed-endian' type
problem.  Not everything is 'big-endian' or 'little-endian'.  Sometimes
things are a mixture of both.

In this particular case it seems that we need a new macro that replaces
the use of WORDS_BIG_ENDIAN that takes the CLASS into account. 
Something like

CLASS_MODE_SUBWORDS_BIG_ENDIAN(CLASS, MODE)

Where a subword defines the amount that fits into a single register of
CLASS when holding values of mode MODE.

A default definition would probably be something like

GET_MODE_CLASS (MODE) == CLASS_FLOAT \
  ? FLOAT_WORDS_BIG_ENDIAN : WORDS_BIG_ENDIAN

But machines could vary that as required.

R.


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