1# Instructions that are invalid 2# 3# RUN: not llvm-mc %s -triple=mips-unknown-linux -mcpu=mips64r2 -mattr=+msa \ 4# RUN: -show-encoding 2>%t1 5# RUN: FileCheck %s < %t1 6 7 .set noat 8 dlsa $2, $3, $4, 0 # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 4 9 dlsa $2, $3, $4, 5 # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 4 10 insve.b $w25[-1], $w9[0] # CHECK: :[[@LINE]]:18: error: expected 4-bit unsigned immediate 11 insve.b $w25[16], $w9[0] # CHECK: :[[@LINE]]:18: error: expected 4-bit unsigned immediate 12 insve.h $w24[-1], $w2[0] # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate 13 insve.h $w24[8], $w2[0] # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate 14 insve.w $w0[-1], $w13[0] # CHECK: :[[@LINE]]:17: error: expected 2-bit unsigned immediate 15 insve.w $w0[4], $w13[0] # CHECK: :[[@LINE]]:17: error: expected 2-bit unsigned immediate 16 insve.d $w3[-1], $w18[0] # CHECK: :[[@LINE]]:17: error: expected 1-bit unsigned immediate 17 insve.d $w3[2], $w18[0] # CHECK: :[[@LINE]]:17: error: expected 1-bit unsigned immediate 18 insve.b $w25[3], $w9[1] # CHECK: :[[@LINE]]:26: error: expected '0' 19 insve.h $w24[2], $w2[1] # CHECK: :[[@LINE]]:26: error: expected '0' 20 insve.w $w0[2], $w13[1] # CHECK: :[[@LINE]]:26: error: expected '0' 21 insve.d $w3[0], $w18[1] # CHECK: :[[@LINE]]:26: error: expected '0' 22 lsa $2, $3, $4, 0 # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 4 23 lsa $2, $3, $4, 5 # CHECK: :[[@LINE]]:25: error: expected immediate in range 1 .. 4 24 sat_s.b $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 3-bit unsigned immediate 25 sat_s.b $w31, $w31, 8 # CHECK: :[[@LINE]]:25: error: expected 3-bit unsigned immediate 26 sat_s.h $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 4-bit unsigned immediate 27 sat_s.h $w31, $w31, 16 # CHECK: :[[@LINE]]:25: error: expected 4-bit unsigned immediate 28 sat_s.w $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate 29 sat_s.w $w31, $w31, 32 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate 30 sat_s.d $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate 31 sat_s.d $w31, $w31, 64 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate 32 sat_u.b $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 3-bit unsigned immediate 33 sat_u.b $w31, $w31, 8 # CHECK: :[[@LINE]]:25: error: expected 3-bit unsigned immediate 34 sat_u.h $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 4-bit unsigned immediate 35 sat_u.h $w31, $w31, 16 # CHECK: :[[@LINE]]:25: error: expected 4-bit unsigned immediate 36 sat_u.w $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate 37 sat_u.w $w31, $w31, 32 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate 38 sat_u.d $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate 39 sat_u.d $w31, $w31, 64 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate 40 shf.b $w19, $w30, -1 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate 41 shf.h $w17, $w8, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate 42 shf.w $w14, $w3, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate 43 sldi.b $w0, $w29[-1] # CHECK: :[[@LINE]]:22: error: expected 4-bit unsigned immediate 44 sldi.b $w0, $w29[16] # CHECK: :[[@LINE]]:22: error: expected 4-bit unsigned immediate 45 sldi.d $w4, $w12[-1] # CHECK: :[[@LINE]]:22: error: expected 1-bit unsigned immediate 46 sldi.d $w4, $w12[2] # CHECK: :[[@LINE]]:22: error: expected 1-bit unsigned immediate 47 sldi.h $w8, $w17[-1] # CHECK: :[[@LINE]]:22: error: expected 3-bit unsigned immediate 48 sldi.h $w8, $w17[8] # CHECK: :[[@LINE]]:22: error: expected 3-bit unsigned immediate 49 sldi.w $w20, $w27[-1] # CHECK: :[[@LINE]]:23: error: expected 2-bit unsigned immediate 50 sldi.w $w20, $w27[4] # CHECK: :[[@LINE]]:23: error: expected 2-bit unsigned immediate 51 srari.b $w5, $w25, -1 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate 52 srari.b $w5, $w25, 8 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate 53 srari.h $w5, $w25, -1 # CHECK: :[[@LINE]]:24: error: expected 4-bit unsigned immediate 54 srari.h $w5, $w25, 16 # CHECK: :[[@LINE]]:24: error: expected 4-bit unsigned immediate 55 srari.w $w5, $w25, -1 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 56 srari.w $w5, $w25, 32 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 57 srari.d $w5, $w25, -1 # CHECK: :[[@LINE]]:24: error: expected 6-bit unsigned immediate 58 srari.d $w5, $w25, 64 # CHECK: :[[@LINE]]:24: error: expected 6-bit unsigned immediate 59 srlri.b $w18, $w3, -1 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate 60 srlri.b $w18, $w3, 8 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate 61 srlri.h $w18, $w3, -1 # CHECK: :[[@LINE]]:24: error: expected 4-bit unsigned immediate 62 srlri.h $w18, $w3, 16 # CHECK: :[[@LINE]]:24: error: expected 4-bit unsigned immediate 63 srlri.w $w18, $w3, -1 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 64 srlri.w $w18, $w3, 32 # CHECK: :[[@LINE]]:24: error: expected 5-bit unsigned immediate 65 srlri.d $w18, $w3, -1 # CHECK: :[[@LINE]]:24: error: expected 6-bit unsigned immediate 66 srlri.d $w18, $w3, 64 # CHECK: :[[@LINE]]:24: error: expected 6-bit unsigned immediate 67