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]
Other format: [Raw text]

Re: Help with constraint for single register


On 24 Dec 2004 20:55:32 -0500, Ian Lance Taylor <ian@airs.com> wrote:

> 
> What is your definition of REGISTER_MOVE_COST?  If reload sees a
> register to register move for which REGISTER_MOVE_COST is 2, it does
> not bother to verify the constraints.  (I believe this is intended to
> be an efficiency hack.)

Here it is, which didn't help at all:

#define REGISTER_MOVE_COST(mode, from, to)
pic_register_move_cost(mode, from, to)

int pic_register_move_cost(enum machine_mode mode, 
	enum reg_class from, enum reg_class to)
{
  if (from == W_REG || to == W_REG)
    return 2;
  else
    return 6;
}

I think I may have to use some kind of define_expand, which accepts
any operands, and have it emit RTL to convert to operations the
processor can handle...

--Rob


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