Hi,
On Thu, 17 Apr 2014, Richard Sandiford wrote:
> > "The constraints on a ‘movm’ must permit moving any hard register to
> > any other hard register provided..."
> >
> > by providing a define_expand that assigns from a general_operand to a
> > nonimmediate_operand and ...
> >
> > *ldsi instruction that can load from a general_operand to a
> > nonimmediate_operand
> > and a
> > *storesi instruction that can store a register_operand to a
> > memory_operand
>
> Must admit I can't find where this is documented from a quick look.
> Like Jeff and Richard, I could swear it was documented somewhere...
--------------- snip ------------------
`movM'
...
This class of patterns is special in several ways. First of all,
each of these names up to and including full word size _must_ be
defined, because there is no other way to copy a datum from one
place to another. If there are patterns accepting operands in
larger modes, `movM' must be defined for integer modes of those
sizes.
Second, these patterns are not used solely in the RTL generation
pass. Even the reload pass can generate move insns to copy values
from stack slots into temporary registers. When it does so, one
of the operands is a hard register and the other is an operand
that can need to be reloaded into a register.
Therefore, when given such a pair of operands, the pattern must
generate RTL which needs no reloading and needs no temporary
registers--no registers other than the operands. For example, if
you support the pattern with a `define_expand', then in such a
case the `define_expand' mustn't call `force_reg' or any other such
function which might generate new pseudo registers.
--------------- snap ------------------
So, what's actually documented is a bit more relaxed than "movM must be
able to move around Mmode operands of all forms". And it's restricted to
patterns named 'movM', while in reality all patterns that look like (and
would match) a move are so constrained.
Ciao,
Michael.