[mips] Use isInt<> call instead of explicit range checking. NFC

This commit is contained in:
Simon Atanasyan 2019-11-14 08:45:37 +03:00
parent 5d035c5d8f
commit c2292502d8
1 changed files with 1 additions and 2 deletions

View File

@ -2081,8 +2081,7 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
(OpInfo.OperandType == MCOI::OPERAND_UNKNOWN)) {
MCOperand &Op = Inst.getOperand(i);
if (Op.isImm()) {
int64_t MemOffset = Op.getImm();
if (MemOffset < -32768 || MemOffset > 32767) {
if (!isInt<16>(Op.getImm())) {
// Offset can't exceed 16bit value.
expandMemInst(Inst, IDLoc, Out, STI, MCID.mayLoad());
return getParser().hasPendingError();