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: Integer moves for fp regs


Jeffrey A Law writes:
 >   >  > I believe it is still necessary if HARD_REGNO_MODE_OK allows floating
 >   >  > point registers to hold integer mode values.
 >   > 
 >   > Do you know which bits of GCC require this behaviour?
 > The register allocators & reload.  Sorry, hard to be more specific
 > than that.

I've never seen this on my travels through the register allocators or
reload, however, reload never ceases to surprise.  

The only place I've noticed this behaviour is with caller-save.  Since
the mode of a pseudo is always known, the correct move insn can be
generated.  However, caller-save chooses a mode for each hard register
which is not always appropriate for the C4x target.

 > Of course -- if HARD_REGNO_MODE_OK allows it, then caller-save.c knows
 > no reason why it can't use an integer mode load/store to save/restore
 > floating point registers.

With the C4x I had to say that caller save wasn't profitable to
disable this assumption.  The problem being that the data registers
use 40 bits when dealing with floats and that the wrong 32 bits are
accessed when copied with an integer move.

Michael.






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