95 lines · plain
1# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=jcc %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=JCC 2# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=jmp %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=JMP3# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=indirect %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=IND4# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=call %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=CAL5# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=ret %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=RET6# RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 --x86-align-branch-boundary=32 --x86-align-branch=ret %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=RET7 8 # Exercise cases where only one kind of instruction is asked to be aligned.9 # Fused instruction cases are excluded.10 11 .text12 .globl foo13 .p2align 514foo:15 .p2align 516 .rept 3017 int318 .endr19 # JCC: 20: jne20 # JMP: 1e: jne21 # IND: 1e: jne22 # CAL: 1e: jne23 # RET: 1e: jne24 jne foo25 int326 27 .p2align 528 .rept 3029 int330 .endr31 # JCC: 5e: jmp32 # JMP: 60: jmp33 # IND: 5e: jmp34 # CAL: 5e: jmp35 # RET: 5e: jmp36 jmp foo37 int338 39 .p2align 540 .rept 3041 int342 .endr43 # JCC: 9e: jmpq *%rax44 # JMP: 9e: jmpq *%rax45 # IND: a0: jmpq *%rax46 # CAL: 9e: jmpq *%rax47 # RET: 9e: jmpq *%rax48 jmp *%rax49 int350 51 52 .p2align 553 .rept 3054 int355 .endr56 # JCC: de: callq *%rax57 # JMP: de: callq *%rax58 # IND: de: callq *%rax59 # CAL: e0: callq *%rax60 # RET: de: callq *%rax61 call *%rax62 int363 64 65 .p2align 566 .rept 3067 int368 .endr69 # JCC: 11e: retq70 # JMP: 11e: retq71 # IND: 11e: retq72 # CAL: 11e: retq73 # RET: 120: retq74 ret $075 int376 77 78 .p2align 579 .rept 2980 int381 .endr82 # JCC: 15d: cmpq %rax, %rbp83 # JCC: 160: je84 # JMP: 15d: cmpq %rax, %rbp85 # JMP: 160: je86 # IND: 15d: cmpq %rax, %rbp87 # IND: 160: je88 # CAL: 15d: cmpq %rax, %rbp89 # CAL: 160: je90 # RET: 15d: cmpq %rax, %rbp91 # RET: 160: je92 cmp %rax, %rbp93 je foo94 int395