Hi Jeff,

> Can you describe exactly why you made those movXX changes?  This is 
> mostly so I can ponder if we have a more general problem, particularly 
> with the scaled/unscaled indexed addressing modes available on the thead 
> designs and soon with Zilx.

After the legality change, FPR registers can be allocated to integer modes,
and with xtheadmemidx enabled, the "m,f" alternative was matched, and the
current `th_output_move` generates a `th.srd` instruction with an FPR
operand, which is illegal.  The fix contains two parts.  First, the
instruction mnenomic should be based on the register class instead of the
mode class.  Second, when only xtheadmemidx is available while
xtheadfmemidx is not, since the src is an FPR now, such addressing mode
should not be allowed.  Even when both extensions are available,
post-add addressing modes like that of th.sdia are only supported when
the src is a GPR as xtheadfmemidx doesn't have such instructions.  The
current address legality hook does not have the register class as an input,
and cannot handle this well enough.

Thanks,
Bohan

Reply via email to