1 # RUN: not llvm-mc -triple xtensa %s 2>&1 | FileCheck %s
5 # Out of range immediates
9 # CHECK: :[[#@LINE-1]]:10: error: expected immediate in range [-2048, 2047]
13 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [-128, 127]
17 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [-128, 127]
21 # CHECK: :[[#@LINE-1]]:15: error: expected immediate in range [-32768, 32512], first 8 bits should be zero
25 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [1, 31]
29 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [0, 15]
33 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [0, 31]
37 # CHECK: :[[#@LINE-1]]:18: error: expected immediate in range [1, 16]
41 # CHECK: :[[#@LINE-1]]:13: error: expected immediate in range [0, 255]
45 # CHECK: :[[#@LINE-1]]:15: error: expected immediate in range [0, 510], first bit should be zero
49 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [0, 1020], first 2 bits should be zero
53 # CHECK: :[[#@LINE-1]]:10: error: expected b4const immediate
57 # CHECK: :[[#@LINE-1]]:11: error: expected b4constu immediate
59 # Invalid number of operands
61 # CHECK: :[[#@LINE-1]]:1: error: too few operands for instruction
63 # CHECK: :[[#@LINE-1]]:17: error: invalid operand for instruction
67 # CHECK: :[[#@LINE-1]]:1: error: unrecognized instruction mnemonic
69 # Invalid operand types
71 # CHECK: :[[#@LINE-1]]:13: error: invalid operand for instruction
73 # CHECK: :[[#@LINE-1]]:14: error: expected immediate in range [-128, 127]
75 # Check invalid register names for different formats
76 # Instruction format RRR
78 # CHECK: :[[#@LINE-1]]:4: error: invalid operand for instruction
80 # CHECK: :[[#@LINE-1]]:9: error: invalid operand for instruction
82 # CHECK: :[[#@LINE-1]]:13: error: invalid operand for instruction
84 # Instruction format RRI8
86 # CHECK: :[[#@LINE-1]]:6: error: invalid operand for instruction
88 # CHECK: :[[#@LINE-1]]:10: error: invalid operand for instruction
90 # Instruction format RSR
92 # CHECK: :[[#@LINE-1]]:1: error: invalid register name
94 # CHECK: :[[#@LINE-1]]:9: error: invalid operand for instruction
96 # Instruction format BRI12
98 # CHECK: :[[#@LINE-1]]:6: error: invalid operand for instruction
99 # Instruction format BRI8
101 # CHECK: :[[#@LINE-1]]:7: error: invalid operand for instruction
103 # Instruction format CALLX
105 # CHECK: :[[#@LINE-1]]:8: error: invalid operand for instruction
107 # Check invalid operands order for different formats
108 # Instruction format RRI8
110 # CHECK: :[[#@LINE-1]]:10: error: invalid operand for instruction
112 # Instruction format RSR
114 # CHECK: :[[#@LINE-1]]:5: error: invalid operand for instruction
116 # Instruction format BRI12
118 # CHECK: :[[#@LINE-1]]:6: error: invalid operand for instruction
120 # Instruction format BRI8
122 # CHECK: :[[#@LINE-1]]:7: error: invalid operand for instruction
124 # CHECK: :[[#@LINE-1]]:19: error: unknown operand