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# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu -mc-relax-all %s -o - \
4# RUN:   | llvm-objdump -disassemble -no-show-raw-insn - | FileCheck %s
5
6# Test some variations of padding for bundle-locked groups.
7
8  .text
9foo:
10  .bundle_align_mode 4
11
12# Each of these callq instructions is 5 bytes long
13  callq   bar
14  callq   bar
15
16  .bundle_lock
17  callq   bar
18  callq   bar
19  .bundle_unlock
20# We'll need a 6-byte NOP before this group
21# CHECK:        a:  nop
22# CHECK-NEXT:   10: callq
23# CHECK-NEXT:   15: callq
24
25  .bundle_lock
26  callq   bar
27  callq   bar
28  .bundle_unlock
29# Same here
30# CHECK:        1a:  nop
31# CHECK-NEXT:   20: callq
32# CHECK-NEXT:   25: callq
33
34  .align 16, 0x90
35  callq   bar
36  .bundle_lock
37  callq   bar
38  callq   bar
39  callq   bar
40  .bundle_unlock
41# And here we'll need a 11-byte NOP
42# CHECK:        30: callq
43# CHECK:        35: nop
44# CHECK-NEXT:   40: callq
45# CHECK-NEXT:   45: callq
46
47
48
49