1# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \ 2# RUN: | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s 3 4# Will be bundle-aligning to 16 byte boundaries 5 .bundle_align_mode 4 6 .text 7# CHECK-LABEL: foo 8foo: 9# Test that bundle alignment mode can be set more than once. 10 .bundle_align_mode 4 11# Each of these callq instructions is 5 bytes long 12 callq bar 13 callq bar 14 .bundle_lock 15 .bundle_lock 16 callq bar 17 callq bar 18 .bundle_unlock 19 .bundle_unlock 20# CHECK: 10: callq 21# CHECK-NEXT: 15: callq 22 23 .p2align 4 24# CHECK-LABEL: bar 25bar: 26 callq foo 27 callq foo 28# Check that the callqs get bundled together, and that the whole group is 29# align_to_end 30 .bundle_lock 31 callq bar 32 .bundle_lock align_to_end 33 callq bar 34 .bundle_unlock 35 .bundle_unlock 36# CHECK: 36: callq 37# CHECK-NEXT: 3b: callq 38 39# CHECK-LABEL: baz 40baz: 41 callq foo 42 callq foo 43# Check that the callqs get bundled together, and that the whole group is 44# align_to_end (with the outer directive marked align_to_end) 45 .bundle_lock align_to_end 46 callq bar 47 .bundle_lock 48 callq bar 49 .bundle_unlock 50 .bundle_unlock 51# CHECK: 56: callq 52# CHECK-NEXT: 5b: callq 53 54# CHECK-LABEL: quux 55quux: 56 callq bar 57 callq bar 58 .bundle_lock 59 .bundle_lock 60 callq bar 61 .bundle_unlock 62 callq bar 63 .bundle_unlock 64# Check that the calls are bundled together when the second one is after the 65# inner nest is closed. 66# CHECK: 70: callq 67# CHECK-NEXT: 75: callq 68