diff options
| author | Zoran Jovanovic <zoran.jovanovic@imgtec.com> | 2015-06-11 09:51:58 +0000 |
|---|---|---|
| committer | Zoran Jovanovic <zoran.jovanovic@imgtec.com> | 2015-06-11 09:51:58 +0000 |
| commit | 6b0dcd7b8cd44576a1e8f3e5c70ae1235f1650c0 (patch) | |
| tree | 1536a96dca673ca24c5f24c9cc4547b4d7c7cb95 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | |
| parent | fcecf26092c47efb9254177ce5b60529ed414ce2 (diff) | |
| download | bcm5719-llvm-6b0dcd7b8cd44576a1e8f3e5c70ae1235f1650c0.tar.gz bcm5719-llvm-6b0dcd7b8cd44576a1e8f3e5c70ae1235f1650c0.zip | |
[mips] Change existing uimm10 operand to restrict the accepted immediates
http://reviews.llvm.org/D10312
llvm-svn: 239520
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 9c054e5ac23..70025663295 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -879,6 +879,9 @@ public: bool isConstantImm() const { return isImm() && dyn_cast<MCConstantExpr>(getImm()); } + template <unsigned Bits> bool isUImm() const { + return isImm() && isConstantImm() && isUInt<Bits>(getConstantImm()); + } bool isToken() const override { // Note: It's not possible to pretend that other operand kinds are tokens. // The matcher emitter checks tokens first. |

