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# Test some variations of padding to the end of a bundle. 5 6 .text 7foo: 8 .bundle_align_mode 4 9 10# Each of these callq instructions is 5 bytes long 11 callq bar 12 callq bar 13 .bundle_lock align_to_end 14 callq bar 15 .bundle_unlock 16# To align this group to a bundle end, we need a 1-byte NOP. 17# CHECK: a: nop 18# CHECK-NEXT: b: callq 19 20 callq bar 21 callq bar 22 .bundle_lock align_to_end 23 callq bar 24 callq bar 25 .bundle_unlock 26# Here we have to pad until the end of the *next* boundary because 27# otherwise the group crosses a boundary. 28# CHECK: 1a: nop 29# The nop sequence may be implemented as one instruction or many, but if 30# it's one instruction, that instruction cannot itself cross the boundary. 31# CHECK: 20: nop 32# CHECK-NEXT: 26: callq 33# CHECK-NEXT: 2b: callq 34