The octeon CPU has special bit extraction and insertion instructions.
This patch adds a custom combiner to match these instructions.
I also tried to use a pattern, e.g. something like
let Predicates = [HasMips64, HasCnMips] in { def : MipsPat<(shl (and i64:$lhs, BitMaskLO:$mask), uimm5_64:$pos), (CINS i64:$lhs, immZExt5_64:$pos, (BitMaskLen BitMaskLO:$mask))>; }
but this will never match because the immediate of shl is always of type i32 (in the DAG).
In the pattern both operands must have the same type - i64 in this case.
The two isCodeGenOnly's are to resolve the decoder conflict aren't they?
If you set 'DecoderNamespace = "Mips64"' on EXTS, EXTS32, CINS, and CINS32 then you'll resolve the decoder conflict and the disassembly will still disassemble all six cases.