xref: /aosp_15_r20/external/llvm/test/MC/ARM/AlignedBundling/pad-align-to-bundle-end.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -filetype=obj -triple armv7-linux-gnueabi %s -o - \
2*9880d681SAndroid Build Coastguard Worker# RUN:   | llvm-objdump -no-show-raw-insn -triple armv7 -disassemble - | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker	.syntax unified
5*9880d681SAndroid Build Coastguard Worker	.text
6*9880d681SAndroid Build Coastguard Worker  .bundle_align_mode 4
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker  bx lr
9*9880d681SAndroid Build Coastguard Worker  and r1, r1, r2
10*9880d681SAndroid Build Coastguard Worker  and r1, r1, r2
11*9880d681SAndroid Build Coastguard Worker  .bundle_lock align_to_end
12*9880d681SAndroid Build Coastguard Worker  bx r9
13*9880d681SAndroid Build Coastguard Worker  .bundle_unlock
14*9880d681SAndroid Build Coastguard Worker# No padding required here because bx just happens to be in the
15*9880d681SAndroid Build Coastguard Worker# right offset.
16*9880d681SAndroid Build Coastguard Worker# CHECK:      8:  and
17*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: c:  bx
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker  bx lr
20*9880d681SAndroid Build Coastguard Worker  and r1, r1, r2
21*9880d681SAndroid Build Coastguard Worker  .bundle_lock align_to_end
22*9880d681SAndroid Build Coastguard Worker  bx r9
23*9880d681SAndroid Build Coastguard Worker  .bundle_unlock
24*9880d681SAndroid Build Coastguard Worker# A 4-byte padding is needed here
25*9880d681SAndroid Build Coastguard Worker# CHECK:      18: nop
26*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: 1c: bx
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker  bx lr
29*9880d681SAndroid Build Coastguard Worker  and r1, r1, r2
30*9880d681SAndroid Build Coastguard Worker  .bundle_lock align_to_end
31*9880d681SAndroid Build Coastguard Worker  bx r9
32*9880d681SAndroid Build Coastguard Worker  bx r9
33*9880d681SAndroid Build Coastguard Worker  bx r9
34*9880d681SAndroid Build Coastguard Worker  .bundle_unlock
35*9880d681SAndroid Build Coastguard Worker# A 12-byte padding is needed here to push the group to the end of the next
36*9880d681SAndroid Build Coastguard Worker# bundle
37*9880d681SAndroid Build Coastguard Worker# CHECK:      28: nop
38*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: 2c: nop
39*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: 30: nop
40*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: 34: bx
41*9880d681SAndroid Build Coastguard Worker
42