@@ -152,6 +152,7 @@ good_negative_offset:
152152
153153// MOV Xd , Xm (which is an alias of ORR Xd , XZR , Xm) is handled as part of
154154// support for address arithmetics , but ORR in general is not .
155+ // This restriction may be relaxed in the future.
155156
156157 .globl good_mov_reg
157158 .type good_mov_reg , @function
@@ -176,6 +177,8 @@ bad_orr_not_xzr:
176177// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: orr x2 , x1 , x0
177178// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: br x2 # TAILCALL
178179 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
179182 movz x1 , # 0
180183 orr x2 , x1 , x0
181184 br x2
@@ -193,6 +196,8 @@ bad_orr_not_lsl0:
193196// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: orr x2 , xzr , x0 , lsl # 1
194197// CHECK - NEXT: {{ [ 0 - 9a - f ]+ }}: br x2 # TAILCALL
195198 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.
196201 orr x2 , xzr , x0 , lsl # 1
197202 br x2
198203 .size bad_orr_not_lsl0 , . - bad_orr_not_lsl0
0 commit comments