[mips][ias] Range check uimm4 operands and fixed a bug this revealed.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 6 Nov 2015 12:41:43 +0000 (12:41 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 6 Nov 2015 12:41:43 +0000 (12:41 +0000)
commit169bb7dc81b87638133a5ca7be3229ed071c45dc
tree6949886c3374e8dd674343f87ce602a44a96c405
parent4b305e4b192b332d8aaf99f9463aedd60b679d5c
[mips][ias] Range check uimm4 operands and fixed a bug this revealed.

Summary:
The bug was that the sldi instructions have immediate widths dependant on
their element size. So sldi.d has a 1-bit immediate and sldi.b has a 4-bit
immediate. All of these were using 4-bit immediates previously.

Reviewers: vkalintiris

Subscribers: llvm-commits, atanasyan, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252297 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsMSAInstrInfo.td
test/MC/Mips/micromips/invalid.s [new file with mode: 0644]
test/MC/Mips/msa/invalid-64.s
test/MC/Mips/msa/invalid.s