Home | History | Annotate | Download | only in AlignedBundling
      1 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu -mcpu=pentiumpro %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 -mcpu=pentiumpro -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 two 10-byte NOPs and a 7-byte NOP.
     17 # CHECK:        0:  nop
     18 # CHECK-NEXT:   a:  nop
     19 # CHECK-NEXT:   14: nop
     20 # CHECK:   1b: callq
     21 
     22 # This push instruction is 1 byte long
     23   .bundle_lock align_to_end
     24   push %rax
     25   .bundle_unlock
     26 # To align this group to a bundle end, we need three 10-byte NOPs, and a 1-byte.
     27 # CHECK:        20:  nop
     28 # CHECK-NEXT:   2a:  nop
     29 # CHECK-NEXT:   34:  nop
     30 # CHECK-NEXT:   3e:  nop
     31 # CHECK-NEXT:   3f: pushq
     32