On May 16, 2010, at 1:23 PM, Carlos Sánchez de La Lama
wrote:>
> is it possible to define an instruction as always having a certain
> register as operand in XXXInstrInfo.td? I know I can do it defining a
> single-register register class, but I need that register also to be on
> a broader class for other operations (and it is not possible for a reg
> to be in several classes AFAIU).
A register can be in multiple register classes, no problem, but we try to avoid
single-register classes.
Look at how X86 handles the MUL and DIV instructions. There is some special code
in X86DAGToDAGISel::Select as well.
/jakob