@@ -152,6 +152,7 @@ good_negative_offset:
152
152
153
153
// MOV Xd , Xm (which is an alias of ORR Xd , XZR , Xm) is handled as part of
154
154
// support for address arithmetics , but ORR in general is not .
155
+ // This restriction may be relaxed in the future.
155
156
156
157
.globl good_mov_reg
157
158
.type good_mov_reg , @function
@@ -176,6 +177,8 @@ bad_orr_not_xzr:
176
177
// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: orr x2 , x1 , x0
177
178
// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: br x2 # TAILCALL
178
179
adrp x0 , sym
180
+ // The generic case of "orr Xd, Xn, Xm" is not allowed so far ,
181
+ // even if Xn is known to be safe
179
182
movz x1 , # 0
180
183
orr x2 , x1 , x0
181
184
br x2
@@ -193,6 +196,8 @@ bad_orr_not_lsl0:
193
196
// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: orr x2 , xzr , x0 , lsl # 1
194
197
// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: br x2 # TAILCALL
195
198
adrp x0 , sym
199
+ // Currently , the only allowed form of "orr" is th at used by "mov Xd, Xn" alias.
200
+ // This can be relaxed in the future.
196
201
orr x2 , xzr , x0 , lsl # 1
197
202
br x2
198
203
.size bad_orr_not_lsl0 , . - bad_orr_not_lsl0
0 commit comments