[mips][ias] Range check uimm6 operands and fix a bug this revealed.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 8 Dec 2015 13:49:19 +0000 (13:49 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 8 Dec 2015 13:49:19 +0000 (13:49 +0000)
commit5a34e2eef2c83684f1220e3a38180b204a043f13
tree43351481919e3f91c4a62b73489e713a6a27ea36
parentc14af0e1c8aff647498cf5e21362fec267b983e7
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255015 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/MicroMips64r6InstrInfo.td
lib/Target/Mips/Mips64InstrInfo.td
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsMSAInstrInfo.td
test/MC/Mips/micromips64r6/invalid.s
test/MC/Mips/micromips64r6/valid.s
test/MC/Mips/mips32r2/invalid.s
test/MC/Mips/mips64r2/invalid.s
test/MC/Mips/msa/invalid-64.s
test/MC/Mips/msa/invalid.s