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=mips64-unknown-linux -mcpu=mips64r5 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 drotr32 $
2, $
3, -1 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate
12 drotr32 $
2, $
3, 32 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate
13 jalr.hb $
31 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: source and destination must be different
14 jalr.hb $
31, $
31 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: source and destination must be different
15 pref
-1, 255($
7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
16 pref
32, 255($
7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
17 dmtc0 $
4, $
3, -1 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate
18 dmtc0 $
4, $
3, 8 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate
19 dmfc0 $
4, $
3, -1 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate
20 dmfc0 $
4, $
3, 8 # CHECK: :[[@LINE]]:24: error: expected 3-bit unsigned immediate
21 sd $
32, 65536($
32) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid register number
22 lb $
32, 8($
5) # CHECK: :[[@LINE]]:12: error: invalid register number
23 lb $
4, 8($
32) # CHECK: :[[@LINE]]:18: error: invalid register number
24 lbu $
32, 8($
5) # CHECK: :[[@LINE]]:13: error: invalid register number
25 lbu $
4, 8($
32) # CHECK: :[[@LINE]]:19: error: invalid register number
26 ldc1 $f32
, 300($
10) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
27 ldc1 $
f7, -32769($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
28 ldc1 $
f7, 32768($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
29 ldc1 $
f7, 300($
32) # CHECK: :[[@LINE]]:23: error: invalid register number
30 sdc1 $f32
, 64($
10) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
31 sdc1 $
f7, -32769($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
32 sdc1 $
f7, 32768($
10) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
33 sdc1 $
f7, 64($
32) # CHECK: :[[@LINE]]:22: error: invalid register number
34 lwc1 $f32
, 32($
5) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
35 lwc1 $
f2, -32769($
5) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
36 lwc1 $
f2, 32768($
5) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
37 lwc1 $
f2, 32($
32) # CHECK: :[[@LINE]]:22: error: invalid register number
38 swc1 $f32
, 369($
13) # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
39 swc1 $
f6, -32769($
13) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
40 swc1 $
f6, 32768($
13) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
41 swc1 $
f6, 369($
32) # CHECK: :[[@LINE]]:23: error: invalid register number
42 ldc2 $
32, 1023($
12) # CHECK: :[[@LINE]]:14: error: invalid register number
43 ldc2 $
1, -32769($
12) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
44 ldc2 $
1, 32768($
12) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
45 ldc2 $
1, 1023($
32) # CHECK: :[[@LINE]]:23: error: invalid register number
46 sdc2 $
32, 8($
16) # CHECK: :[[@LINE]]:14: error: invalid register number
47 sdc2 $
1, -32769($
16) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
48 sdc2 $
1, 32768($
16) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
49 sdc2 $
1, 8($
32) # CHECK: :[[@LINE]]:20: error: invalid register number
50 lwc2 $
32, 16($
4) # CHECK: :[[@LINE]]:14: error: invalid register number
51 lwc2 $
1, -32769($
4) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
52 lwc2 $
1, 32768($
4) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
53 lwc2 $
1, 16($
32) # CHECK: :[[@LINE]]:21: error: invalid register number
54 swc2 $
32, 777($
17) # CHECK: :[[@LINE]]:14: error: invalid register number
55 swc2 $
1, -32769($
17) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
56 swc2 $
1, 32768($
17) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
57 swc2 $
1, 777($
32) # CHECK: :[[@LINE]]:22: error: invalid register number
58 lwc2 $
11, -32769($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
59 lwc2 $
11, 32768($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
60 sdc2 $
11, -32769($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
61 sdc2 $
11, 32768($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
62 swc2 $
11, -32769($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset
63 swc2 $
11, 32768($
12) # CHECK: :[[@LINE]]:19: error: expected memory with 16-bit signed offset