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=mips32r2 2>%t1
5 # RUN: FileCheck %s < %t1
9 addiu $
2, $
3, -32769 # CHECK: :[[@LINE]]:23: error: expected 16-bit signed immediate
10 addiu $
2, $
3, 65536 # CHECK: :[[@LINE]]:23: error: expected 16-bit signed immediate
11 andi $
2, $
3, -1 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate
12 andi $
2, $
3, 65536 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate
13 cache
-1, 255($
7) # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
14 cache
32, 255($
7) # CHECK: :[[@LINE]]:15: error: expected 5-bit unsigned immediate
15 # FIXME: Check '0 < pos + size <= 32' constraint on ext
16 ext $
2, $
3, -1, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
17 ext $
2, $
3, 32, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
18 ext $
2, $
3, 1, 0 # CHECK: :[[@LINE]]:24: error: expected immediate in range 1 .. 32
19 ext $
2, $
3, 1, 33 # CHECK: :[[@LINE]]:24: error: expected immediate in range 1 .. 32
20 # FIXME: Check size on ins
21 ins $
2, $
3, -1, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
22 ins $
2, $
3, 32, 1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
23 jalr.hb $
31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
24 jalr.hb $
31, $
31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
25 lwc2 $
2, -32769($
3) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
26 lwc2 $
2, 32768($
3) # CHECK: :[[@LINE]]:18: error: expected memory with 16-bit signed offset
27 ori $
2, $
3, -1 # CHECK: :[[@LINE]]:21: error: expected 16-bit unsigned immediate
28 ori $
2, $
3, 65536 # CHECK: :[[@LINE]]:21: error: expected 16-bit unsigned immediate
29 pref
-1, 255($
7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
30 pref
32, 255($
7) # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
31 sdbbp
-1 # CHECK: :[[@LINE]]:15: error: expected 20-bit unsigned immediate
32 sdbbp
1048576 # CHECK: :[[@LINE]]:15: error: expected 20-bit unsigned immediate
33 sll $
2, $
3, -1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
34 sll $
2, $
3, 32 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
35 srl $
2, $
3, -1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
36 srl $
2, $
3, 32 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
37 sra $
2, $
3, -1 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
38 sra $
2, $
3, 32 # CHECK: :[[@LINE]]:21: error: expected 5-bit unsigned immediate
39 sync -1 # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
40 sync 32 # CHECK: :[[@LINE]]:14: error: expected 5-bit unsigned immediate
41 syscall
-1 # CHECK: :[[@LINE]]:17: error: expected 20-bit unsigned immediate
42 syscall
1048576 # CHECK: :[[@LINE]]:17: error: expected 20-bit unsigned immediate
43 rotr $
2, $
3, -1 # CHECK: :[[@LINE]]:22: error: expected 5-bit unsigned immediate
44 rotr $
2, $
3, 32 # CHECK: :[[@LINE]]:22: error: expected 5-bit unsigned immediate
45 xori $
2, $
3, -1 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate
46 xori $
2, $
3, 65536 # CHECK: :[[@LINE]]:22: error: expected 16-bit unsigned immediate