Current implementation of c.cond.fmt instructions only accept default cc0 register. This patch enables the instruction to accept other fcc registers. The aliases with default fcc0 registers are also defined.
Given that CC is always FCCRegsOpnd do we really need it to be an argument? I think we could just use it directly.
You need to update ISA_MIPS* adverbs. Support for multiple $fcc registers was added in MIPS-IV and MIPS32. Prior to that only the form without $fcc registers was permitted.
Nit: space after comma
This was introduced to enable alias definitions that use FCC0 as a default value.
That would mean that we need two separated definitions for c.cond.fmt instructions, one for Mips-IV and Mips32 that allows $fcc registers and one for prior architectures that doesn't. Is that right?
I mean the argument for the class not the operand. Your definition will look like this:
class C_COND_FT<string CondStr, string Typestr, RegisterOperand RC, InstrItinClass itin> : InstSE<(outs), (ins FCCRegOpnd:$cc, RC:$fs, RC:$ft), !strconcat("c.", CondStr, ".", Typestr, "\t $cc, $fs, $ft"), , itin, FrmFR>;
You should only need the definitions you have now but with corrected adverbs. It's possible to have an InstAlias enabled even when the Instruction it aliases is disabled.
LGTM with a whitespace nit. Could you align the start of the operands to match the neighbouring instructions in each of the test files?
It's not necessary for this commit but we ought to start checking that the encodings are correct soon. Most instructions only test that the parser accepts the syntax at the moment
This patch fixes the failing tests that caused the initial patch to be reverted. Instruction formats for assembler and code gen versions of conditional instructions have been separated, so at the moment fcc0-fcc7 registers are allowed for assembler while on code gen it will be still fixed to fcc0.