Home | History | Annotate | Download | only in AlignedBundling
      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 that long nops are generated for padding where possible.
      7 
      8   .text
      9 foo:
     10   .bundle_align_mode 5
     11 
     12 # This callq instruction is 5 bytes long
     13   .bundle_lock align_to_end
     14   callq   bar
     15   .bundle_unlock
     16 # To align this group to a bundle end, we need a 15-byte NOP and a 12-byte NOP.
     17 # CHECK:        0:  nop
     18 # CHECK-NEXT:   f:  nop
     19 # CHECK:   1b: callq
     20 
     21 # This push instruction is 1 byte long
     22   .bundle_lock align_to_end
     23   push %rax
     24   .bundle_unlock
     25 # To align this group to a bundle end, we need two 15-byte NOPs, and a 1-byte.
     26 # CHECK:        20:  nop
     27 # CHECK-NEXT:   2f:  nop
     28 # CHECK-NEXT:   3e:  nop
     29 # CHECK-NEXT:   3f: pushq
     30