1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
| # RUN: llvm-mc -triple arm64-apple-darwin --disassemble < %s | FileCheck %s
#==---------------------------------------------------------------------------==
# 5.4.2 Logical (immediate)
#==---------------------------------------------------------------------------==
0x00 0x00 0x00 0x12
0x00 0x00 0x40 0x92
0x41 0x0c 0x00 0x12
0x41 0x0c 0x40 0x92
0xbf 0xec 0x7c 0x92
0x00 0x00 0x00 0x72
0x00 0x00 0x40 0xf2
0x41 0x0c 0x00 0x72
0x41 0x0c 0x40 0xf2
0x5f 0x0c 0x40 0xf2
# CHECK: and w0, w0, #0x1
# CHECK: and x0, x0, #0x1
# CHECK: and w1, w2, #0xf
# CHECK: and x1, x2, #0xf
# CHECK: and sp, x5, #0xfffffffffffffff0
# CHECK: ands w0, w0, #0x1
# CHECK: ands x0, x0, #0x1
# CHECK: ands w1, w2, #0xf
# CHECK: ands x1, x2, #0xf
# CHECK: tst x2, #0xf
0x41 0x00 0x12 0x52
0x41 0x00 0x71 0xd2
0x5f 0x00 0x71 0xd2
# CHECK: eor w1, w2, #0x4000
# CHECK: eor x1, x2, #0x8000
# CHECK: eor sp, x2, #0x8000
0x41 0x00 0x12 0x32
0x41 0x00 0x71 0xb2
0x5f 0x00 0x71 0xb2
# CHECK: orr w1, w2, #0x4000
# CHECK: orr x1, x2, #0x8000
# CHECK: orr sp, x2, #0x8000
#==---------------------------------------------------------------------------==
# 5.5.3 Logical (shifted register)
#==---------------------------------------------------------------------------==
0x41 0x00 0x03 0x0a
0x41 0x00 0x03 0x8a
0x41 0x08 0x03 0x0a
0x41 0x08 0x03 0x8a
0x41 0x08 0x43 0x0a
0x41 0x08 0x43 0x8a
0x41 0x08 0x83 0x0a
0x41 0x08 0x83 0x8a
0x41 0x08 0xc3 0x0a
0x41 0x08 0xc3 0x8a
# CHECK: and w1, w2, w3
# CHECK: and x1, x2, x3
# CHECK: and w1, w2, w3, lsl #2
# CHECK: and x1, x2, x3, lsl #2
# CHECK: and w1, w2, w3, lsr #2
# CHECK: and x1, x2, x3, lsr #2
# CHECK: and w1, w2, w3, asr #2
# CHECK: and x1, x2, x3, asr #2
# CHECK: and w1, w2, w3, ror #2
# CHECK: and x1, x2, x3, ror #2
0x41 0x00 0x03 0x6a
0x41 0x00 0x03 0xea
0x41 0x08 0x03 0x6a
0x41 0x08 0x03 0xea
0x41 0x08 0x43 0x6a
0x41 0x08 0x43 0xea
0x41 0x08 0x83 0x6a
0x41 0x08 0x83 0xea
0x41 0x08 0xc3 0x6a
0x41 0x08 0xc3 0xea
# CHECK: ands w1, w2, w3
# CHECK: ands x1, x2, x3
# CHECK: ands w1, w2, w3, lsl #2
# CHECK: ands x1, x2, x3, lsl #2
# CHECK: ands w1, w2, w3, lsr #2
# CHECK: ands x1, x2, x3, lsr #2
# CHECK: ands w1, w2, w3, asr #2
# CHECK: ands x1, x2, x3, asr #2
# CHECK: ands w1, w2, w3, ror #2
# CHECK: ands x1, x2, x3, ror #2
0x41 0x00 0x23 0x0a
0x41 0x00 0x23 0x8a
0x41 0x0c 0x23 0x0a
0x41 0x0c 0x23 0x8a
0x41 0x0c 0x63 0x0a
0x41 0x0c 0x63 0x8a
0x41 0x0c 0xa3 0x0a
0x41 0x0c 0xa3 0x8a
0x41 0x0c 0xe3 0x0a
0x41 0x0c 0xe3 0x8a
# CHECK: bic w1, w2, w3
# CHECK: bic x1, x2, x3
# CHECK: bic w1, w2, w3, lsl #3
# CHECK: bic x1, x2, x3, lsl #3
# CHECK: bic w1, w2, w3, lsr #3
# CHECK: bic x1, x2, x3, lsr #3
# CHECK: bic w1, w2, w3, asr #3
# CHECK: bic x1, x2, x3, asr #3
# CHECK: bic w1, w2, w3, ror #3
# CHECK: bic x1, x2, x3, ror #3
0x41 0x00 0x23 0x6a
0x41 0x00 0x23 0xea
0x41 0x0c 0x23 0x6a
0x41 0x0c 0x23 0xea
0x41 0x0c 0x63 0x6a
0x41 0x0c 0x63 0xea
0x41 0x0c 0xa3 0x6a
0x41 0x0c 0xa3 0xea
0x41 0x0c 0xe3 0x6a
0x41 0x0c 0xe3 0xea
# CHECK: bics w1, w2, w3
# CHECK: bics x1, x2, x3
# CHECK: bics w1, w2, w3, lsl #3
# CHECK: bics x1, x2, x3, lsl #3
# CHECK: bics w1, w2, w3, lsr #3
# CHECK: bics x1, x2, x3, lsr #3
# CHECK: bics w1, w2, w3, asr #3
# CHECK: bics x1, x2, x3, asr #3
# CHECK: bics w1, w2, w3, ror #3
# CHECK: bics x1, x2, x3, ror #3
0x41 0x00 0x23 0x4a
0x41 0x00 0x23 0xca
0x41 0x10 0x23 0x4a
0x41 0x10 0x23 0xca
0x41 0x10 0x63 0x4a
0x41 0x10 0x63 0xca
0x41 0x10 0xa3 0x4a
0x41 0x10 0xa3 0xca
0x41 0x10 0xe3 0x4a
0x41 0x10 0xe3 0xca
# CHECK: eon w1, w2, w3
# CHECK: eon x1, x2, x3
# CHECK: eon w1, w2, w3, lsl #4
# CHECK: eon x1, x2, x3, lsl #4
# CHECK: eon w1, w2, w3, lsr #4
# CHECK: eon x1, x2, x3, lsr #4
# CHECK: eon w1, w2, w3, asr #4
# CHECK: eon x1, x2, x3, asr #4
# CHECK: eon w1, w2, w3, ror #4
# CHECK: eon x1, x2, x3, ror #4
0x41 0x00 0x03 0x4a
0x41 0x00 0x03 0xca
0x41 0x14 0x03 0x4a
0x41 0x14 0x03 0xca
0x41 0x14 0x43 0x4a
0x41 0x14 0x43 0xca
0x41 0x14 0x83 0x4a
0x41 0x14 0x83 0xca
0x41 0x14 0xc3 0x4a
0x41 0x14 0xc3 0xca
# CHECK: eor w1, w2, w3
# CHECK: eor x1, x2, x3
# CHECK: eor w1, w2, w3, lsl #5
# CHECK: eor x1, x2, x3, lsl #5
# CHECK: eor w1, w2, w3, lsr #5
# CHECK: eor x1, x2, x3, lsr #5
# CHECK: eor w1, w2, w3, asr #5
# CHECK: eor x1, x2, x3, asr #5
# CHECK: eor w1, w2, w3, ror #5
# CHECK: eor x1, x2, x3, ror #5
0x41 0x00 0x03 0x2a
0x41 0x00 0x03 0xaa
0x41 0x18 0x03 0x2a
0x41 0x18 0x03 0xaa
0x41 0x18 0x43 0x2a
0x41 0x18 0x43 0xaa
0x41 0x18 0x83 0x2a
0x41 0x18 0x83 0xaa
0x41 0x18 0xc3 0x2a
0x41 0x18 0xc3 0xaa
# CHECK: orr w1, w2, w3
# CHECK: orr x1, x2, x3
# CHECK: orr w1, w2, w3, lsl #6
# CHECK: orr x1, x2, x3, lsl #6
# CHECK: orr w1, w2, w3, lsr #6
# CHECK: orr x1, x2, x3, lsr #6
# CHECK: orr w1, w2, w3, asr #6
# CHECK: orr x1, x2, x3, asr #6
# CHECK: orr w1, w2, w3, ror #6
# CHECK: orr x1, x2, x3, ror #6
0x41 0x00 0x23 0x2a
0x41 0x00 0x23 0xaa
0x41 0x1c 0x23 0x2a
0x41 0x1c 0x23 0xaa
0x41 0x1c 0x63 0x2a
0x41 0x1c 0x63 0xaa
0x41 0x1c 0xa3 0x2a
0x41 0x1c 0xa3 0xaa
0x41 0x1c 0xe3 0x2a
0x41 0x1c 0xe3 0xaa
# CHECK: orn w1, w2, w3
# CHECK: orn x1, x2, x3
# CHECK: orn w1, w2, w3, lsl #7
# CHECK: orn x1, x2, x3, lsl #7
# CHECK: orn w1, w2, w3, lsr #7
# CHECK: orn x1, x2, x3, lsr #7
# CHECK: orn w1, w2, w3, asr #7
# CHECK: orn x1, x2, x3, asr #7
# CHECK: orn w1, w2, w3, ror #7
# CHECK: orn x1, x2, x3, ror #7
|