forked from OSchip/llvm-project
[mips] Use isInt<> call instead of explicit range checking. NFC
This commit is contained in:
parent
5d035c5d8f
commit
c2292502d8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue