1 # Instructions that are valid for the current ISA but should be rejected by the assembler (e.g.
2 # invalid set of operands or operand's restrictions not met).
4 # RUN: not llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r5 2>%t1
5 # RUN: FileCheck %s < %t1
9 cache
-1, 255($
7) # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
10 cache
32, 255($
7) # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
11 jalr.hb $
31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
12 jalr.hb $
31, $
31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
13 pref
-1, 255($
7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
14 pref
32, 255($
7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
15 mtc0 $
4, $
3, -1 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
16 mtc0 $
4, $
3, 8 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
17 mtc2 $
4, $
3, -1 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
18 mtc2 $
4, $
3, 8 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
19 mfc0 $
4, $
3, -1 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
20 mfc0 $
4, $
3, 8 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
21 mfc2 $
4, $
3, -1 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
22 mfc2 $
4, $
3, 8 # CHECK: :[[@LINE]]:23: error: expected 3-bit unsigned immediate
23 lb $
32, 8($
5) # CHECK: :[[@LINE]]:12: error: invalid register number
24 lb $
4, -2147483649($
5) # CHECK: :[[@LINE]]:16: error: expected memory with 32-bit signed offset
25 lb $
4, 2147483648($
5) # CHECK: :[[@LINE]]:16: error: expected memory with 32-bit signed offset
26 lb $
4, 8($
32) # CHECK: :[[@LINE]]:18: error: invalid register number
27 lbu $
32, 8($
5) # CHECK: :[[@LINE]]:13: error: invalid register number
28 lbu $
4, -2147483649($
5) # CHECK: :[[@LINE]]:17: error: expected memory with 32-bit signed offset
29 lbu $
4, 2147483648($
5) # CHECK: :[[@LINE]]:17: error: expected memory with 32-bit signed offset
30 lbu $
4, 8($
32) # CHECK: :[[@LINE]]:19: error: invalid register number
31 ldc1 $f32
, 300($
10) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
32 ldc1 $
f7, -32769($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
33 ldc1 $
f7, 32768($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
34 ldc1 $
f7, 300($
32) # CHECK: :[[@LINE]]:23: error: invalid register number
35 sdc1 $f32
, 64($
10) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
36 sdc1 $
f7, -32769($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
37 sdc1 $
f7, 32768($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
38 sdc1 $
f7, 64($
32) # CHECK: :[[@LINE]]:22: error: invalid register number
39 lwc1 $f32
, 32($
5) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
40 lwc1 $
f2, -32769($
5) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
41 lwc1 $
f2, 32768($
5) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
42 lwc1 $
f2, 32($
32) # CHECK: :[[@LINE]]:22: error: invalid register number
43 swc1 $f32
, 369($
13) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
44 swc1 $
f6, -32769($
13) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
45 swc1 $
f6, 32768($
13) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
46 swc1 $
f6, 369($
32) # CHECK: :[[@LINE]]:23: error: invalid register number
47 ldc2 $
32, 1023($
12) # CHECK: :[[@LINE]]:14: error: invalid register number
48 ldc2 $
1, -32769($
12) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
49 ldc2 $
1, 32768($
12) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
50 ldc2 $
1, 1023($
32) # CHECK: :[[@LINE]]:23: error: invalid register number
51 sdc2 $
32, 8($
16) # CHECK: :[[@LINE]]:14: error: invalid register number
52 sdc2 $
1, -32769($
16) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
53 sdc2 $
1, 32768($
16) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
54 sdc2 $
1, 8($
32) # CHECK: :[[@LINE]]:20: error: invalid register number
55 lwc2 $
32, 16($
4) # CHECK: :[[@LINE]]:14: error: invalid register number
56 lwc2 $
1, -32769($
4) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
57 lwc2 $
1, 32768($
4) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
58 lwc2 $
1, 16($
32) # CHECK: :[[@LINE]]:21: error: invalid register number
59 swc2 $
32, 777($
17) # CHECK: :[[@LINE]]:14: error: invalid register number
60 swc2 $
1, -32769($
17) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
61 swc2 $
1, 32768($
17) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
62 swc2 $
1, 777($
32) # CHECK: :[[@LINE]]:22: error: invalid register number
63 lwc2 $
11, -32769($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
64 lwc2 $
11, 32768($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
65 sdc2 $
11, -32769($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
66 sdc2 $
11, 32768($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
67 swc2 $
11, -32769($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
68 swc2 $
11, 32768($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset