[mips] Range check simm16
authorDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 31 Mar 2016 14:34:00 +0000 (14:34 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 31 Mar 2016 14:34:00 +0000 (14:34 +0000)
commit85fd10bd932f9d109d674f9553aabdc131cf31e5
tree3a88c99c39c11f26d266199a7083290c9b75cc85
parenteab314615663cae3b36469cc08fd2a8588e55d5b
[mips] Range check simm16

Summary:
There are too many instructions to exhaustively test so addiu and lwc2 are
used as representative examples.

It should be noted that many memory instructions that should have simm16
range checking do not because it is also necessary to support the macro
of the same name which accepts simm32. The range checks for these occur in
the macro expansion.

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D18437

llvm-svn: 265019
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
llvm/lib/Target/Mips/Mips64r6InstrInfo.td
llvm/lib/Target/Mips/MipsInstrInfo.td
llvm/test/MC/Mips/mips1/invalid-mips2-wrong-error.s
llvm/test/MC/Mips/mips1/invalid-mips3-wrong-error.s
llvm/test/MC/Mips/mips1/invalid-mips4-wrong-error.s
llvm/test/MC/Mips/mips32r2/invalid.s
llvm/test/MC/Mips/mips64r6/valid.s