Lines Matching refs:Imm
200 static DecodeStatus decodeUImmOperand(MCInst &Inst, uint64_t Imm,
202 assert(isUInt<N>(Imm) && "Invalid immediate");
204 Inst.addOperand(MCOperand::createImm(Imm));
209 static DecodeStatus decodeUImmNonZeroOperand(MCInst &Inst, uint64_t Imm,
212 if (Imm == 0)
214 return decodeUImmOperand<N>(Inst, Imm, Address, Decoder);
218 static DecodeStatus decodeSImmOperand(MCInst &Inst, uint64_t Imm,
220 assert(isUInt<N>(Imm) && "Invalid immediate");
222 // Sign-extend the number in the bottom N bits of Imm
223 Inst.addOperand(MCOperand::createImm(SignExtend64<N>(Imm)));
228 static DecodeStatus decodeSImmNonZeroOperand(MCInst &Inst, uint64_t Imm,
231 if (Imm == 0)
233 return decodeSImmOperand<N>(Inst, Imm, Address, Decoder);
237 static DecodeStatus decodeSImmOperandAndLsl1(MCInst &Inst, uint64_t Imm,
240 assert(isUInt<N>(Imm) && "Invalid immediate");
241 // Sign-extend the number in the bottom N bits of Imm after accounting for
244 Inst.addOperand(MCOperand::createImm(SignExtend64<N>(Imm << 1)));
248 static DecodeStatus decodeCLUIImmOperand(MCInst &Inst, uint64_t Imm,
251 assert(isUInt<6>(Imm) && "Invalid immediate");
252 if (Imm > 31) {
253 Imm = (SignExtend64<6>(Imm) & 0xfffff);
255 Inst.addOperand(MCOperand::createImm(Imm));
259 static DecodeStatus decodeFRMArg(MCInst &Inst, uint64_t Imm,
262 assert(isUInt<3>(Imm) && "Invalid immediate");
263 if (!llvm::RISCVFPRndMode::isValidRoundingMode(Imm))
266 Inst.addOperand(MCOperand::createImm(Imm));