Skip to content

Commit

Permalink
[RISCV] Added missing ImmLeaf predicates
Browse files Browse the repository at this point in the history
simm9_lsb0 and simm12_lsb0 operand types were missing predicates.

llvm-svn: 373812
  • Loading branch information
apazos committed Oct 4, 2019
1 parent 50afaa9 commit ea835f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/Target/RISCV/RISCVInstrInfoC.td
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def uimm8_lsb000 : Operand<XLenVT>,
}

// A 9-bit signed immediate where the least significant bit is zero.
def simm9_lsb0 : Operand<OtherVT> {
def simm9_lsb0 : Operand<OtherVT>,
ImmLeaf<XLenVT, [{return isShiftedInt<8, 1>(Imm);}]> {
let ParserMatchClass = SImmAsmOperand<9, "Lsb0">;
let EncoderMethod = "getImmOpValueAsr1";
let DecoderMethod = "decodeSImmOperandAndLsl1<9>";
Expand Down Expand Up @@ -196,7 +197,8 @@ def simm10_lsb0000nonzero : Operand<XLenVT>,
}

// A 12-bit signed immediate where the least significant bit is zero.
def simm12_lsb0 : Operand<XLenVT> {
def simm12_lsb0 : Operand<XLenVT>,
ImmLeaf<XLenVT, [{return isShiftedInt<11, 1>(Imm);}]> {
let ParserMatchClass = SImmAsmOperand<12, "Lsb0">;
let EncoderMethod = "getImmOpValueAsr1";
let DecoderMethod = "decodeSImmOperandAndLsl1<12>";
Expand Down

0 comments on commit ea835f5

Please sign in to comment.