Skip to content

Commit 995a8af

Browse files
[SystemZ] Add extended mnemonics tests. (#91733)
This adds tests for some extended mnemonics of load, branch, and compare-and-trap instructions.
1 parent 9f80f43 commit 995a8af

File tree

4 files changed

+218
-0
lines changed

4 files changed

+218
-0
lines changed

llvm/test/MC/SystemZ/insn-good-z13.s

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,19 @@
156156
lochino %r11, 32512
157157
lochi %r11, 32512, 15
158158

159+
#CHECK: lochim %r10, 2766 # encoding: [0xec,0xa4,0x0a,0xce,0x00,0x42]
160+
#CHECK: lochinm %r11, 6862 # encoding: [0xec,0xbb,0x1a,0xce,0x00,0x42]
161+
#CHECK: lochip %r12, 10958 # encoding: [0xec,0xc2,0x2a,0xce,0x00,0x42]
162+
#CHECK: lochiz %r13, 15054 # encoding: [0xec,0xd8,0x3a,0xce,0x00,0x42]
163+
#CHECK: lochinp %r14, 19150 # encoding: [0xec,0xed,0x4a,0xce,0x00,0x42]
164+
#CHECK: lochinz %r15, 23246 # encoding: [0xec,0xf7,0x5a,0xce,0x00,0x42]
165+
lochim %r10, 2766
166+
lochinm %r11, 6862
167+
lochip %r12, 10958
168+
lochiz %r13, 15054
169+
lochinp %r14, 19150
170+
lochinz %r15, 23246
171+
159172
#CHECK: locghi %r11, 42, 0 # encoding: [0xec,0xb0,0x00,0x2a,0x00,0x46]
160173
#CHECK: locghio %r11, 42 # encoding: [0xec,0xb1,0x00,0x2a,0x00,0x46]
161174
#CHECK: locghih %r11, 42 # encoding: [0xec,0xb2,0x00,0x2a,0x00,0x46]
@@ -190,6 +203,19 @@
190203
locghino %r11, 32512
191204
locghi %r11, 32512, 15
192205

206+
#CHECK: locghim %r10, 2766 # encoding: [0xec,0xa4,0x0a,0xce,0x00,0x46]
207+
#CHECK: locghinm %r11, 6862 # encoding: [0xec,0xbb,0x1a,0xce,0x00,0x46]
208+
#CHECK: locghip %r12, 10958 # encoding: [0xec,0xc2,0x2a,0xce,0x00,0x46]
209+
#CHECK: locghiz %r13, 15054 # encoding: [0xec,0xd8,0x3a,0xce,0x00,0x46]
210+
#CHECK: locghinp %r14, 19150 # encoding: [0xec,0xed,0x4a,0xce,0x00,0x46]
211+
#CHECK: locghinz %r15, 23246 # encoding: [0xec,0xf7,0x5a,0xce,0x00,0x46]
212+
locghim %r10, 2766
213+
locghinm %r11, 6862
214+
locghip %r12, 10958
215+
locghiz %r13, 15054
216+
locghinp %r14, 19150
217+
locghinz %r15, 23246
218+
193219
#CHECK: lochhi %r11, 42, 0 # encoding: [0xec,0xb0,0x00,0x2a,0x00,0x4e]
194220
#CHECK: lochhio %r11, 42 # encoding: [0xec,0xb1,0x00,0x2a,0x00,0x4e]
195221
#CHECK: lochhih %r11, 42 # encoding: [0xec,0xb2,0x00,0x2a,0x00,0x4e]
@@ -224,6 +250,19 @@
224250
lochhino %r11, 32512
225251
lochhi %r11, 32512, 15
226252

253+
#CHECK: lochhim %r10, 2766 # encoding: [0xec,0xa4,0x0a,0xce,0x00,0x4e]
254+
#CHECK: lochhinm %r11, 6862 # encoding: [0xec,0xbb,0x1a,0xce,0x00,0x4e]
255+
#CHECK: lochhip %r12, 10958 # encoding: [0xec,0xc2,0x2a,0xce,0x00,0x4e]
256+
#CHECK: lochhiz %r13, 15054 # encoding: [0xec,0xd8,0x3a,0xce,0x00,0x4e]
257+
#CHECK: lochhinp %r14, 19150 # encoding: [0xec,0xed,0x4a,0xce,0x00,0x4e]
258+
#CHECK: lochhinz %r15, 23246 # encoding: [0xec,0xf7,0x5a,0xce,0x00,0x4e]
259+
lochhim %r10, 2766
260+
lochhinm %r11, 6862
261+
lochhip %r12, 10958
262+
lochhiz %r13, 15054
263+
lochhinp %r14, 19150
264+
lochhinz %r15, 23246
265+
227266
#CHECK: locfh %r0, 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0xe0]
228267
#CHECK: locfh %r0, 0, 15 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0xe0]
229268
#CHECK: locfh %r0, -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0xe0]

llvm/test/MC/SystemZ/insn-good-z14.s

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@
9696

9797
#CHECK: bic 2, 0(%r7) # encoding: [0xe3,0x20,0x70,0x00,0x00,0x47]
9898
#CHECK: bih 0(%r15) # encoding: [0xe3,0x20,0xf0,0x00,0x00,0x47]
99+
#CHECK: bip 0(%r14) # encoding: [0xe3,0x20,0xe0,0x00,0x00,0x47]
99100

100101
bic 2, 0(%r7)
101102
bih 0(%r15)
103+
bip 0(%r14)
102104

103105
#CHECK: bic 3, 0(%r7) # encoding: [0xe3,0x30,0x70,0x00,0x00,0x47]
104106
#CHECK: binle 0(%r15) # encoding: [0xe3,0x30,0xf0,0x00,0x00,0x47]
@@ -108,9 +110,11 @@
108110

109111
#CHECK: bic 4, 0(%r7) # encoding: [0xe3,0x40,0x70,0x00,0x00,0x47]
110112
#CHECK: bil 0(%r15) # encoding: [0xe3,0x40,0xf0,0x00,0x00,0x47]
113+
#CHECK: bim 0(%r13) # encoding: [0xe3,0x40,0xd0,0x00,0x00,0x47]
111114

112115
bic 4, 0(%r7)
113116
bil 0(%r15)
117+
bim 0(%r13)
114118

115119
#CHECK: bic 5, 0(%r7) # encoding: [0xe3,0x50,0x70,0x00,0x00,0x47]
116120
#CHECK: binhe 0(%r15) # encoding: [0xe3,0x50,0xf0,0x00,0x00,0x47]
@@ -126,15 +130,19 @@
126130

127131
#CHECK: bic 7, 0(%r7) # encoding: [0xe3,0x70,0x70,0x00,0x00,0x47]
128132
#CHECK: bine 0(%r15) # encoding: [0xe3,0x70,0xf0,0x00,0x00,0x47]
133+
#CHECK: binz 0(%r12) # encoding: [0xe3,0x70,0xc0,0x00,0x00,0x47]
129134

130135
bic 7, 0(%r7)
131136
bine 0(%r15)
137+
binz 0(%r12)
132138

133139
#CHECK: bic 8, 0(%r7) # encoding: [0xe3,0x80,0x70,0x00,0x00,0x47]
134140
#CHECK: bie 0(%r15) # encoding: [0xe3,0x80,0xf0,0x00,0x00,0x47]
141+
#CHECK: biz 0(%r11) # encoding: [0xe3,0x80,0xb0,0x00,0x00,0x47]
135142

136143
bic 8, 0(%r7)
137144
bie 0(%r15)
145+
biz 0(%r11)
138146

139147
#CHECK: bic 9, 0(%r7) # encoding: [0xe3,0x90,0x70,0x00,0x00,0x47]
140148
#CHECK: binlh 0(%r15) # encoding: [0xe3,0x90,0xf0,0x00,0x00,0x47]
@@ -150,9 +158,11 @@
150158

151159
#CHECK: bic 11, 0(%r7) # encoding: [0xe3,0xb0,0x70,0x00,0x00,0x47]
152160
#CHECK: binl 0(%r15) # encoding: [0xe3,0xb0,0xf0,0x00,0x00,0x47]
161+
#CHECK: binm 0(%r10) # encoding: [0xe3,0xb0,0xa0,0x00,0x00,0x47]
153162

154163
bic 11, 0(%r7)
155164
binl 0(%r15)
165+
binm 0(%r10)
156166

157167
#CHECK: bic 12, 0(%r7) # encoding: [0xe3,0xc0,0x70,0x00,0x00,0x47]
158168
#CHECK: bile 0(%r15) # encoding: [0xe3,0xc0,0xf0,0x00,0x00,0x47]
@@ -162,9 +172,11 @@
162172

163173
#CHECK: bic 13, 0(%r7) # encoding: [0xe3,0xd0,0x70,0x00,0x00,0x47]
164174
#CHECK: binh 0(%r15) # encoding: [0xe3,0xd0,0xf0,0x00,0x00,0x47]
175+
#CHECK: binp 0(%r9) # encoding: [0xe3,0xd0,0x90,0x00,0x00,0x47]
165176

166177
bic 13, 0(%r7)
167178
binh 0(%r15)
179+
binp 0(%r9)
168180

169181
#CHECK: bic 14, 0(%r7) # encoding: [0xe3,0xe0,0x70,0x00,0x00,0x47]
170182
#CHECK: bino 0(%r15) # encoding: [0xe3,0xe0,0xf0,0x00,0x00,0x47]

llvm/test/MC/SystemZ/insn-good-zEC12.s

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@
149149
#CHECK: cltne %r0, 0(%r15) # encoding: [0xeb,0x06,0xf0,0x00,0x00,0x23]
150150
#CHECK: cltnl %r0, 0(%r15) # encoding: [0xeb,0x0a,0xf0,0x00,0x00,0x23]
151151
#CHECK: cltnh %r0, 0(%r15) # encoding: [0xeb,0x0c,0xf0,0x00,0x00,0x23]
152+
#CHECK: cltnle %r0, 0(%r15) # encoding: [0xeb,0x02,0xf0,0x00,0x00,0x23]
153+
#CHECK: cltnhe %r0, 0(%r15) # encoding: [0xeb,0x04,0xf0,0x00,0x00,0x23]
154+
#CHECK: cltnlh %r0, 0(%r15) # encoding: [0xeb,0x08,0xf0,0x00,0x00,0x23]
155+
#CHECK: cltlh %r0, 0(%r15) # encoding: [0xeb,0x06,0xf0,0x00,0x00,0x23]
156+
#CHECK: clthe %r0, 0(%r15) # encoding: [0xeb,0x0a,0xf0,0x00,0x00,0x23]
157+
#CHECK: cltle %r0, 0(%r15) # encoding: [0xeb,0x0c,0xf0,0x00,0x00,0x23]
152158

153159
clt %r0, 12, -524288
154160
clt %r0, 12, -1
@@ -165,6 +171,12 @@
165171
cltne %r0, 0(%r15)
166172
cltnl %r0, 0(%r15)
167173
cltnh %r0, 0(%r15)
174+
cltnle %r0, 0(%r15)
175+
cltnhe %r0, 0(%r15)
176+
cltnlh %r0, 0(%r15)
177+
cltlh %r0, 0(%r15)
178+
clthe %r0, 0(%r15)
179+
cltle %r0, 0(%r15)
168180

169181
#CHECK: clgt %r0, 12, -524288 # encoding: [0xeb,0x0c,0x00,0x00,0x80,0x2b]
170182
#CHECK: clgt %r0, 12, -1 # encoding: [0xeb,0x0c,0x0f,0xff,0xff,0x2b]
@@ -181,6 +193,12 @@
181193
#CHECK: clgtne %r0, 0(%r15) # encoding: [0xeb,0x06,0xf0,0x00,0x00,0x2b]
182194
#CHECK: clgtnl %r0, 0(%r15) # encoding: [0xeb,0x0a,0xf0,0x00,0x00,0x2b]
183195
#CHECK: clgtnh %r0, 0(%r15) # encoding: [0xeb,0x0c,0xf0,0x00,0x00,0x2b]
196+
#CHECK: clgtnle %r0, 0(%r15) # encoding: [0xeb,0x02,0xf0,0x00,0x00,0x2b]
197+
#CHECK: clgtnhe %r0, 0(%r15) # encoding: [0xeb,0x04,0xf0,0x00,0x00,0x2b]
198+
#CHECK: clgtnlh %r0, 0(%r15) # encoding: [0xeb,0x08,0xf0,0x00,0x00,0x2b]
199+
#CHECK: clgtlh %r0, 0(%r15) # encoding: [0xeb,0x06,0xf0,0x00,0x00,0x2b]
200+
#CHECK: clgthe %r0, 0(%r15) # encoding: [0xeb,0x0a,0xf0,0x00,0x00,0x2b]
201+
#CHECK: clgtle %r0, 0(%r15) # encoding: [0xeb,0x0c,0xf0,0x00,0x00,0x2b]
184202

185203
clgt %r0, 12, -524288
186204
clgt %r0, 12, -1
@@ -197,6 +215,12 @@
197215
clgtne %r0, 0(%r15)
198216
clgtnl %r0, 0(%r15)
199217
clgtnh %r0, 0(%r15)
218+
clgtnle %r0, 0(%r15)
219+
clgtnhe %r0, 0(%r15)
220+
clgtnlh %r0, 0(%r15)
221+
clgtlh %r0, 0(%r15)
222+
clgthe %r0, 0(%r15)
223+
clgtle %r0, 0(%r15)
200224

201225
#CHECK: crdte %r0, %r0, %r0 # encoding: [0xb9,0x8f,0x00,0x00]
202226
#CHECK: crdte %r0, %r0, %r14 # encoding: [0xb9,0x8f,0x00,0x0e]

0 commit comments

Comments
 (0)