[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / Mips / micromips / invalid.s
blob4fba3d437f2a6e7c5b0187a3efc9eee8e9e8312c
1 # RUN: not llvm-mc %s -triple=mips -show-encoding -mattr=micromips,eva 2>%t1
2 # RUN: FileCheck %s < %t1
4 addiur1sp $7, 260 # CHECK: :[[@LINE]]:17: error: expected both 8-bit unsigned immediate and multiple of 4
5 addiur1sp $7, 241 # CHECK: :[[@LINE]]:17: error: expected both 8-bit unsigned immediate and multiple of 4
6 addiur1sp $8, 240 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
7 addius5 $2, -9 # CHECK: :[[@LINE]]:15: error: expected 4-bit signed immediate
8 addius5 $2, 8 # CHECK: :[[@LINE]]:15: error: expected 4-bit signed immediate
9 break -1 # CHECK: :[[@LINE]]:9: error: expected 10-bit unsigned immediate
10 break 1024 # CHECK: :[[@LINE]]:9: error: expected 10-bit unsigned immediate
11 break -1, 5 # CHECK: :[[@LINE]]:9: error: expected 10-bit unsigned immediate
12 break 1024, 5 # CHECK: :[[@LINE]]:9: error: expected 10-bit unsigned immediate
13 break 7, -1 # CHECK: :[[@LINE]]:12: error: expected 10-bit unsigned immediate
14 break 7, 1024 # CHECK: :[[@LINE]]:12: error: expected 10-bit unsigned immediate
15 break16 -1 # CHECK: :[[@LINE]]:11: error: expected 4-bit unsigned immediate
16 break16 16 # CHECK: :[[@LINE]]:11: error: expected 4-bit unsigned immediate
17 cache -1, 255($7) # CHECK: :[[@LINE]]:9: error: expected 5-bit unsigned immediate
18 cache 32, 255($7) # CHECK: :[[@LINE]]:9: error: expected 5-bit unsigned immediate
19 cachee 0, -513($7) # CHECK: :[[@LINE]]:13: error: expected memory with 9-bit signed offset
20 cachee 0, 512($7) # CHECK: :[[@LINE]]:13: error: expected memory with 9-bit signed offset
21 # FIXME: Check '0 < pos + size <= 32' constraint on ext
22 ext $2, $3, -1, 31 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
23 ext $2, $3, 32, 31 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
24 ext $2, $3, 1, 0 # CHECK: :[[@LINE]]:18: error: expected immediate in range 1 .. 32
25 ext $2, $3, 1, 33 # CHECK: :[[@LINE]]:18: error: expected immediate in range 1 .. 32
26 ins $2, $3, -1, 31 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
27 ins $2, $3, 32, 31 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
28 ins $2, $3, -1, 1 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
29 ins $2, $3, 32, 1 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
30 ins $2, $3, 0, -1 # CHECK: :[[@LINE]]:18: error: expected immediate in range 1 .. 32
31 ins $2, $3, 0, 33 # CHECK: :[[@LINE]]:18: error: expected immediate in range 1 .. 32
32 jraddiusp -1 # CHECK: :[[@LINE]]:13: error: expected both 7-bit unsigned immediate and multiple of 4
33 jraddiusp -4 # CHECK: :[[@LINE]]:13: error: expected both 7-bit unsigned immediate and multiple of 4
34 jraddiusp 125 # CHECK: :[[@LINE]]:13: error: expected both 7-bit unsigned immediate and multiple of 4
35 jraddiusp 128 # CHECK: :[[@LINE]]:13: error: expected both 7-bit unsigned immediate and multiple of 4
36 li16 $4, -2 # CHECK: :[[@LINE]]:12: error: expected immediate in range -1 .. 126
37 li16 $4, 127 # CHECK: :[[@LINE]]:12: error: expected immediate in range -1 .. 126
38 pref -1, 255($7) # CHECK: :[[@LINE]]:8: error: expected 5-bit unsigned immediate
39 pref 32, 255($7) # CHECK: :[[@LINE]]:8: error: expected 5-bit unsigned immediate
40 prefe 0, -513($7) # CHECK: :[[@LINE]]:12: error: expected memory with 9-bit signed offset
41 prefe 0, 512($7) # CHECK: :[[@LINE]]:12: error: expected memory with 9-bit signed offset
42 rotr $2, -1 # CHECK: :[[@LINE]]:12: error: expected 5-bit unsigned immediate
43 rotr $2, 32 # CHECK: :[[@LINE]]:12: error: expected 5-bit unsigned immediate
44 rotr $2, $3, -1 # CHECK: :[[@LINE]]:16: error: expected 5-bit unsigned immediate
45 rotr $2, $3, 32 # CHECK: :[[@LINE]]:16: error: expected 5-bit unsigned immediate
46 rotrv $9, $6, 5 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
47 sdbbp16 -1 # CHECK: :[[@LINE]]:11: error: expected 4-bit unsigned immediate
48 sdbbp16 16 # CHECK: :[[@LINE]]:11: error: expected 4-bit unsigned immediate
49 sll $2, $3, -1 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
50 sll $2, $3, 32 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
51 sra $2, $3, -1 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
52 sra $2, $3, 32 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
53 srl $2, $3, -1 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
54 srl $2, $3, 32 # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
55 sync -1 # CHECK: :[[@LINE]]:8: error: expected 5-bit unsigned immediate
56 sync 32 # CHECK: :[[@LINE]]:8: error: expected 5-bit unsigned immediate
57 swe $2, -513($gp) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
58 swe $2, 512($gp) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
59 swe $33, 8($gp) # CHECK: :[[@LINE]]:7: error: invalid register number
60 swe $2, 8($33) # CHECK: :[[@LINE]]:13: error: invalid register number
61 sll $3, -1 # CHECK: :[[@LINE]]:11: error: expected 5-bit unsigned immediate
62 sll $3, 32 # CHECK: :[[@LINE]]:11: error: expected 5-bit unsigned immediate
63 sra $3, -1 # CHECK: :[[@LINE]]:11: error: expected 5-bit unsigned immediate
64 sra $3, 32 # CHECK: :[[@LINE]]:11: error: expected 5-bit unsigned immediate
65 srl $3, -1 # CHECK: :[[@LINE]]:11: error: expected 5-bit unsigned immediate
66 lle $33, 8($5) # CHECK: :[[@LINE]]:7: error: invalid register number
67 lle $4, 8($33) # CHECK: :[[@LINE]]:13: error: invalid register number
68 lle $4, 512($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
69 lle $4, -513($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
70 lwe $33, 8($5) # CHECK: :[[@LINE]]:7: error: invalid register number
71 lwe $4, 8($33) # CHECK: :[[@LINE]]:13: error: invalid register number
72 lwe $4, 512($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
73 lwe $4, -513($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
74 sbe $33, 8($5) # CHECK: :[[@LINE]]:7: error: invalid register number
75 sbe $4, 8($33) # CHECK: :[[@LINE]]:13: error: invalid register number
76 sbe $4, 512($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
77 sbe $4, -513($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
78 sce $33, 8($5) # CHECK: :[[@LINE]]:7: error: invalid register number
79 sce $4, 8($33) # CHECK: :[[@LINE]]:13: error: invalid register number
80 sce $4, 512($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
81 sce $4, -513($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
82 she $33, 8($5) # CHECK: :[[@LINE]]:7: error: invalid register number
83 she $4, 8($33) # CHECK: :[[@LINE]]:13: error: invalid register number
84 she $4, 512($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
85 she $4, -513($5) # CHECK: :[[@LINE]]:11: error: expected memory with 9-bit signed offset
86 lh $33, 8($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
87 lhe $34, 8($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
88 lhu $35, 8($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
89 lhue $36, 8($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
90 lh $2, 8($34) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
91 lhe $4, 8($33) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
92 lhu $4, 8($35) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
93 lhue $4, 8($37) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
94 lh $2, -2147483649($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 32-bit signed offset
95 lh $2, 2147483648($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 32-bit signed offset
96 lhe $4, -512($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 9-bit signed offset
97 lhe $4, 512($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 9-bit signed offset
98 lhu $4, -2147483649($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 32-bit signed offset
99 lhu $4, 2147483648($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 32-bit signed offset
100 lhue $4, -512($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 9-bit signed offset
101 lhue $4, 512($2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 9-bit signed offset
102 lwp $31, 8($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
103 # FIXME: This ought to point at the $34 but memory is treated as one operand.
104 lwp $16, 8($34) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
105 lwp $16, 4096($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 12-bit signed offset
106 lwp $16, 8($16) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: source and destination must be different
107 swp $31, 8($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
108 swp $16, 8($34) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
109 swp $16, 4096($4) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected memory with 12-bit signed offset
110 andi $3, $4, -1 # CHECK: :[[@LINE]]:16: error: expected 16-bit unsigned immediate
111 andi $3, $4, 65536 # CHECK: :[[@LINE]]:16: error: expected 16-bit unsigned immediate
112 andi $3, -1 # CHECK: :[[@LINE]]:12: error: expected 16-bit unsigned immediate
113 andi $3, 65536 # CHECK: :[[@LINE]]:12: error: expected 16-bit unsigned immediate
114 ori $3, $4, -1 # CHECK: :[[@LINE]]:15: error: expected 16-bit unsigned immediate
115 ori $3, $4, 65536 # CHECK: :[[@LINE]]:15: error: expected 16-bit unsigned immediate
116 ori $3, -1 # CHECK: :[[@LINE]]:11: error: expected 16-bit unsigned immediate
117 ori $3, 65536 # CHECK: :[[@LINE]]:11: error: expected 16-bit unsigned immediate
118 xori $3, $4, -1 # CHECK: :[[@LINE]]:16: error: expected 16-bit unsigned immediate
119 xori $3, $4, 65536 # CHECK: :[[@LINE]]:16: error: expected 16-bit unsigned immediate
120 xori $3, -1 # CHECK: :[[@LINE]]:12: error: expected 16-bit unsigned immediate
121 xori $3, 65536 # CHECK: :[[@LINE]]:12: error: expected 16-bit unsigned immediate
122 not $3, 4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
123 lb $32, 8($5) # CHECK: :[[@LINE]]:6: error: invalid register number
124 lb $4, -2147483649($5) # CHECK: :[[@LINE]]:10: error: expected memory with 16-bit signed offset
125 lb $4, 2147483648($5) # CHECK: :[[@LINE]]:10: error: expected memory with 16-bit signed offset
126 lb $4, 8($32) # CHECK: :[[@LINE]]:12: error: invalid register number
127 lbu $32, 8($5) # CHECK: :[[@LINE]]:7: error: invalid register number
128 lbu $4, -2147483649($5) # CHECK: :[[@LINE]]:11: error: expected memory with 16-bit signed offset
129 lbu $4, 2147483648($5) # CHECK: :[[@LINE]]:11: error: expected memory with 16-bit signed offset
130 lbu $4, 8($32) # CHECK: :[[@LINE]]:13: error: invalid register number