52 lines · plain
1# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=jcc+jmp+indirect+call+ret %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s2 3 # Exercise cases where mixed kinds of branch are asked to be aligned.4 5 .text6 .globl labeled_mixed_test17labeled_mixed_test1:8 .p2align 59 .rept 3010 int311 .endr12 # This call should have started at 0x1e and ends at 0x23, so two bytes of13 # padding are inserted before it.14 # CHECK: 20: callq15 call bar16 .rept 2817 int318 .endr19 # If the previous call was not aligned, this jmp should have started at 0x3f20 # and need two bytes of padding. After the two bytes of padding are inserted21 # for the call, this jmp starts at 0xa1 and does not need padding.22 # CHECK: 41: jmp23 jmp *%rax24 25 .globl labeled_mixed_test226labeled_mixed_test2:27 .p2align 528 .rept 3029 int330 .endr31 # This jne should have started at 0x7e, so two bytes of padding are inserted32 # before it.33 # CHECK: 80: jne34 jne bar35 .rept 2836 int337 .endr38 # If the previous jne was not aligned, this jmp should have started at 0x3c.39 # After the two bytes of padding are inserted for the jne, this jmp should40 # have started at 0x9e, so two bytes of padding are inserted and it starts at41 # 0xa0.42 # CHECK: a0: jmp43 jmp bar44 45 .globl labeled_mixed_test346labeled_mixed_test3:47 .p2align 548 .type bar,@function49bar:50 # CHECK: c0: retq51 retq52