1# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=call+jmp+indirect+ret+jcc+fused %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s 2 3 # This file includes cases which are problematic to apply automatic padding 4 # in the assembler. These are the examples brought up in review and 5 # discussion which motivate the need for a assembler directive to 6 # selectively enable/disable. 7 # FIXME: the checks are checking current *incorrect* behavior 8 9 .text 10 11 # In the first test, we have a label which is expected to be bound to the 12 # start of the call. For instance, we want to associate a fault on the call 13 # target with some bit of higher level sementic. 14 # CHECK-LABEL: <labeled_call_test1>: 15 # CHECK: 1f <label_before>: 16 # CHECK: 1f: nop 17 # CHECK: 20: callq 18 .globl labeled_call_test1 19 .p2align 5 20labeled_call_test1: 21 .rept 31 22 int3 23 .endr 24label_before: 25 callq bar 26 27 # Our second test is like the first w/a labeled fault, but specifically to 28 # a fused memory comparison. This is the form produced by implicit null 29 # checks for instance. 30 # CHECK-LABEL: <implicit_null_check>: 31 # CHECK: 5f <fault_addr>: 32 # CHECK: 5f: nop 33 # CHECK: 60: cmpq 34 .globl implicit_null_check 35 .p2align 5 36implicit_null_check: 37 .rept 31 38 int3 39 .endr 40fault_addr: 41 cmpq (%rsi), %rdi 42 jne bar 43 44 .p2align 4 45 .type bar,@function 46bar: 47 retq 48