diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-12-08 13:49:19 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-12-08 13:49:19 +0000 |
commit | 59d092f883a44c35822f3038128a11452801c7a4 (patch) | |
tree | ff655e712741631e44ac643851bfaf3bb01dc508 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | |
parent | 4fbd67ac11c224059724be0b8e0fbba8662c06de (diff) | |
download | bcm5719-llvm-59d092f883a44c35822f3038128a11452801c7a4.tar.gz bcm5719-llvm-59d092f883a44c35822f3038128a11452801c7a4.zip |
[mips][ias] Range check uimm6 operands and fix a bug this revealed.
Summary:
We don't check the size operand on ext/dext*/ins/dins* yet because the
permitted range depends on the pos argument and we can't check that using
this mechanism.
The bug was that dextu/dinsu accepted 0..31 in the pos operand instead of 32..63.
Reviewers: vkalintiris
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D15190
llvm-svn: 255015
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 44f665a86c6..ac32a25a8b3 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -3647,6 +3647,9 @@ bool MipsAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, case Match_UImm5_Lsl2: return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected both 7-bit unsigned immediate and multiple of 4"); + case Match_UImm6_0: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), + "expected 6-bit unsigned immediate"); } llvm_unreachable("Implement any new match types added!"); |