[mips] Add INSN_<name> adverbs and start using them instead of AdditionalPredicates overrides
Summary: No functional change Depends on D3641 Reviewers: vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3642 llvm-svn: 208212
This commit is contained in:
parent
c14fc42137
commit
3872b47231
|
@ -195,12 +195,16 @@ def IsBE : Predicate<"!Subtarget.isLittle()">;
|
||||||
def IsNotNaCl : Predicate<"!Subtarget.isTargetNaCl()">;
|
def IsNotNaCl : Predicate<"!Subtarget.isTargetNaCl()">;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Mips ISA membership adjectives.
|
// Mips ISA/ASE membership and instruction group membership adjectives.
|
||||||
|
// They are mutually exclusive.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
class ISA_MIPS32R2 { list<Predicate> InsnPredicates = [HasMips32r2]; }
|
class ISA_MIPS32R2 { list<Predicate> InsnPredicates = [HasMips32r2]; }
|
||||||
class ISA_MIPS64R2 { list<Predicate> InsnPredicates = [HasMips64r2]; }
|
class ISA_MIPS64R2 { list<Predicate> InsnPredicates = [HasMips64r2]; }
|
||||||
|
|
||||||
|
class INSN_SWAP { list<Predicate> InsnPredicates = [HasSwap]; }
|
||||||
|
class INSN_SEINREG { list<Predicate> InsnPredicates = [HasSEInReg]; }
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
class MipsPat<dag pattern, dag result> : Pat<pattern, result>, PredicateControl {
|
class MipsPat<dag pattern, dag result> : Pat<pattern, result>, PredicateControl {
|
||||||
|
@ -811,15 +815,13 @@ class CountLeading1<string opstr, RegisterOperand RO>:
|
||||||
class SignExtInReg<string opstr, ValueType vt, RegisterOperand RO,
|
class SignExtInReg<string opstr, ValueType vt, RegisterOperand RO,
|
||||||
InstrItinClass itin> :
|
InstrItinClass itin> :
|
||||||
InstSE<(outs RO:$rd), (ins RO:$rt), !strconcat(opstr, "\t$rd, $rt"),
|
InstSE<(outs RO:$rd), (ins RO:$rt), !strconcat(opstr, "\t$rd, $rt"),
|
||||||
[(set RO:$rd, (sext_inreg RO:$rt, vt))], itin, FrmR, opstr> {
|
[(set RO:$rd, (sext_inreg RO:$rt, vt))], itin, FrmR, opstr>,
|
||||||
let AdditionalPredicates = [HasSEInReg];
|
INSN_SEINREG;
|
||||||
}
|
|
||||||
|
|
||||||
// Subword Swap
|
// Subword Swap
|
||||||
class SubwordSwap<string opstr, RegisterOperand RO>:
|
class SubwordSwap<string opstr, RegisterOperand RO>:
|
||||||
InstSE<(outs RO:$rd), (ins RO:$rt), !strconcat(opstr, "\t$rd, $rt"), [],
|
InstSE<(outs RO:$rd), (ins RO:$rt), !strconcat(opstr, "\t$rd, $rt"), [],
|
||||||
NoItinerary, FrmR, opstr> {
|
NoItinerary, FrmR, opstr>, INSN_SWAP {
|
||||||
let AdditionalPredicates = [HasSwap];
|
|
||||||
let neverHasSideEffects = 1;
|
let neverHasSideEffects = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue