summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2016-03-22 14:29:53 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2016-03-22 14:29:53 +0000
commit0f17d0da4a9c3da0e2488eab1aee63adfaf8504f (patch)
tree43a3f53e1a2b1bbb4902a20c2c03be5c163a8827 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
parent946dee3b5b5469ed4161efd63a0c44968b07fcf1 (diff)
downloadbcm5719-llvm-0f17d0da4a9c3da0e2488eab1aee63adfaf8504f.tar.gz
bcm5719-llvm-0f17d0da4a9c3da0e2488eab1aee63adfaf8504f.zip
[mips] Range check simm5.
Summary: We can't check the error message for this one because there's another lw/sw available that covers a larger range. We therefore check the transition between the two sizes. Reviewers: vkalintiris Subscribers: llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D18144 llvm-svn: 264054
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp3
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 32c6ffd3440..41d8d2484b8 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -3729,6 +3729,9 @@ bool MipsAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
case Match_UImm5_0:
return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
"expected 5-bit unsigned immediate");
+ case Match_SImm5_0:
+ return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
+ "expected 5-bit signed immediate");
case Match_UImm5_1:
return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
"expected immediate in range 1 .. 32");
OpenPOWER on IntegriCloud