Skip to content

Commit

Permalink
[mips] Range check vsplat_simm5 and vsplat_simm10
Browse files Browse the repository at this point in the history
Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

Differential Revision: http://reviews.llvm.org/D18177


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264287 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dsandersllvm committed Mar 24, 2016
1 parent 84db1cc commit f7a0761
Show file tree
Hide file tree
Showing 3 changed files with 262 additions and 213 deletions.
6 changes: 6 additions & 0 deletions lib/Target/Mips/MipsInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,12 @@ foreach I = {10} in
!cast<AsmOperandClass>("ConstantSImm" # I # "AsmOperandClass");
}

foreach I = {5, 10} in
def vsplat_simm # I : Operand<vAny> {
let ParserMatchClass =
!cast<AsmOperandClass>("ConstantSImm" # I # "AsmOperandClass");
}

def simm7_lsl2 : Operand<OtherVT> {
let EncoderMethod = "getSImm7Lsl2Encoding";
let DecoderMethod = "DecodeSImmWithOffsetAndScale<" # I # ", 0, 4>";
Expand Down
5 changes: 0 additions & 5 deletions lib/Target/Mips/MipsMSAInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ def immZExt4Ptr : ImmLeaf<iPTR, [{return isUInt<4>(Imm);}]>;

// Operands


def vsplat_simm5 : Operand<vAny>;

def vsplat_simm10 : Operand<vAny>;

def immZExt2Lsa : ImmLeaf<i32, [{return isUInt<2>(Imm - 1);}]>;

// Pattern fragments
Expand Down
Loading

0 comments on commit f7a0761

Please sign in to comment.