diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2019-11-14 08:45:37 +0300 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2019-11-14 09:29:31 +0300 |
| commit | c2292502d896ee8d9a5d034ffede8f43c5e03b33 (patch) | |
| tree | 7fc1bd5f64f408138e766f3b3a3b868400182a0c /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | |
| parent | 5d035c5d8fe6f8a20ba8d1b749f0f91100ae347a (diff) | |
| download | bcm5719-llvm-c2292502d896ee8d9a5d034ffede8f43c5e03b33.tar.gz bcm5719-llvm-c2292502d896ee8d9a5d034ffede8f43c5e03b33.zip | |
[mips] Use isInt<> call instead of explicit range checking. NFC
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index c69b5deed82..94004d3df04 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -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(); |

