1// RUN: not llvm-mc -arch=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=SICI %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=SICI %s
3// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=VI --check-prefix=SICIVI %s
4// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN %s
5
6//===----------------------------------------------------------------------===//
7// sendmsg
8//===----------------------------------------------------------------------===//
9
10s_sendmsg sendmsg(MSG_INTERRUPTX)
11// GCN: error: expected absolute expression
12
13s_sendmsg sendmsg(1 -)
14// GCN: error: unknown token in expression
15
16s_sendmsg sendmsg(MSG_INTERRUPT, 0)
17// GCN: error: message does not support operations
18
19s_sendmsg sendmsg(MSG_INTERRUPT, 0, 0)
20// GCN: error: message does not support operations
21
22s_sendmsg sendmsg(MSG_GS)
23// GCN: error: missing message operation
24
25s_sendmsg sendmsg(MSG_GS, GS_OP_NOP)
26// GCN: error: invalid operation id
27
28s_sendmsg sendmsg(MSG_GS, SYSMSG_OP_ECC_ERR_INTERRUPT)
29// GCN: error: expected absolute expression
30
31s_sendmsg sendmsg(MSG_GS, 0)
32// GCN: error: invalid operation id
33
34s_sendmsg sendmsg(MSG_GS, -1)
35// GCN: error: invalid operation id
36
37s_sendmsg sendmsg(MSG_GS, 4)
38// GCN: error: invalid operation id
39
40s_sendmsg sendmsg(MSG_GS, 8)
41// GCN: error: invalid operation id
42
43s_sendmsg sendmsg(15, -1)
44// GCN: error: invalid operation id
45
46s_sendmsg sendmsg(15, 8)
47// GCN: error: invalid operation id
48
49s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 0, 0)
50// GCN: error: expected a closing parenthesis
51
52s_sendmsg sendmsg(MSG_GSX, GS_OP_CUT, 0)
53// GCN: error: expected absolute expression
54
55s_sendmsg sendmsg(MSG_GS, GS_OP_CUTX, 0)
56// GCN: error: expected absolute expression
57
58s_sendmsg sendmsg(MSG_GS, 1 -)
59// GCN: error: unknown token in expression
60
61s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 4)
62// GCN: error: invalid message stream id
63
64s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 1 -)
65// GCN: error: unknown token in expression
66
67s_sendmsg sendmsg(2, 3, 0, 0)
68// GCN: error: expected a closing parenthesis
69
70s_sendmsg sendmsg(2, 2, -1)
71// GCN: error: invalid message stream id
72
73s_sendmsg sendmsg(2, 2, 4)
74// GCN: error: invalid message stream id
75
76s_sendmsg sendmsg(2, 2, 0, 0)
77// GCN: error: expected a closing parenthesis
78
79s_sendmsg sendmsg(MSG_GS_DONE, GS_OP_NOP, 0)
80// GCN: error: message operation does not support streams
81
82s_sendmsg sendmsg(MSG_GS_DONE, 0, 0)
83// GCN: error: message operation does not support streams
84
85s_sendmsg sendmsg(MSG_GS_ALLOC_REQ)
86// SICIVI: error: invalid message id
87
88s_sendmsg sendmsg(MSG_GS_ALLOC_REQ, 0)
89// SICIVI: error: invalid message id
90
91s_sendmsg sendmsg(-1)
92// SICIVI: error: invalid message id
93
94s_sendmsg sendmsg(16)
95// SICIVI: error: invalid message id
96
97s_sendmsg sendmsg(MSG_SYSMSG)
98// GCN: error: missing message operation
99
100s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_ECC_ERR_INTERRUPT, 0)
101// GCN: error: message operation does not support streams
102
103s_sendmsg sendmsg(MSG_SYSMSG, 0)
104// GCN: error: invalid operation id
105
106s_sendmsg sendmsg(MSG_SYSMSG, 5)
107// GCN: error: invalid operation id
108
109//===----------------------------------------------------------------------===//
110// waitcnt
111//===----------------------------------------------------------------------===//
112
113s_waitcnt lgkmcnt(16)
114// SICIVI: error: too large value for lgkmcnt
115
116s_waitcnt lgkmcnt(64)
117// GCN: error: too large value for lgkmcnt
118
119s_waitcnt expcnt(8)
120// GCN: error: too large value for expcnt
121
122s_waitcnt vmcnt(16)
123// SICIVI: error: too large value for vmcnt
124
125s_waitcnt vmcnt(64)
126// GFX10: error: too large value for vmcnt
127
128s_waitcnt vmcnt(0xFFFFFFFFFFFF0000)
129// GCN: error: too large value for vmcnt
130
131s_waitcnt vmcnt(0), expcnt(0), lgkmcnt(0),
132// GCN: error: expected a counter name
133
134s_waitcnt vmcnt(0) & expcnt(0) & lgkmcnt(0)&
135// GCN: error: expected a counter name
136
137s_waitcnt vmcnt(0) & expcnt(0) & x
138// GCN: error: expected a left parenthesis
139
140s_waitcnt vmcnt(0) & expcnt(0) x
141// GCN: error: expected a left parenthesis
142
143s_waitcnt vmcnt(0) & expcnt(0) & 1
144// GCN: error: expected a counter name
145
146s_waitcnt vmcnt(0) & expcnt(0) 1
147// GCN: error: expected a counter name
148
149s_waitcnt vmcnt(0) & expcnt(0) x(0)
150// GCN: error: invalid counter name x
151
152s_waitcnt vmcnt(x)
153// GCN: error: expected absolute expression
154
155s_waitcnt x
156// GCN: error: expected absolute expression
157
158s_waitcnt vmcnt(0
159// GCN: error: expected a closing parenthesis
160
161s_branch 0x80000000ffff
162// GCN: error: expected a 16-bit signed jump offset
163
164s_branch 0x10000
165// GCN: error: expected a 16-bit signed jump offset
166
167s_branch -32769
168// GCN: error: expected a 16-bit signed jump offset
169
170s_branch 1.0
171// GCN: error: expected a 16-bit signed jump offset
172
173s_branch s0
174// GCN: error: invalid operand for instruction
175
176s_branch offset:1
177// GCN: error: not a valid operand
178