[mips][ias] Range check uimm2 operands and fix a bug this revealed.
[oota-llvm.git] / test / MC / Mips / msa / invalid.s
1 # Instructions that are invalid
2 #
3 # RUN: not llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r2 -mattr=+msa \
4 # RUN:     -show-encoding 2>%t1
5 # RUN: FileCheck %s < %t1
6
7     .set noat
8     insve.b $w25[3], $w9[1] # CHECK: :[[@LINE]]:26: error: expected '0'
9     insve.h $w24[2], $w2[1] # CHECK: :[[@LINE]]:26: error: expected '0'
10     insve.w $w0[2], $w13[1] # CHECK: :[[@LINE]]:26: error: expected '0'
11     insve.d $w3[0], $w18[1] # CHECK: :[[@LINE]]:26: error: expected '0'
12     lsa     $2, $3, $4, 0   # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 4
13     lsa     $2, $3, $4, 5   # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 4