brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 598fe19 Raw
48 lines · plain
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 %s2 3  # This file includes cases which are problematic to apply automatic padding4  # in the assembler.  These are the examples brought up in review and5  # discussion which motivate the need for a assembler directive to6  # selectively enable/disable.7  # FIXME: the checks are checking current *incorrect* behavior8 9  .text10 11  # In the first test, we have a label which is expected to be bound to the12  # start of the call.  For instance, we want to associate a fault on the call13  # target with some bit of higher level sementic.14  # CHECK-LABEL: <labeled_call_test1>:15  # CHECK: 1f <label_before>:16  # CHECK: 1f: nop17  # CHECK: 20: callq18  .globl  labeled_call_test119  .p2align  520labeled_call_test1:21  .rept 3122  int323  .endr24label_before:25  callq bar26 27  # Our second test is like the first w/a labeled fault, but specifically to28  # a fused memory comparison.  This is the form produced by implicit null29  # checks for instance.30  # CHECK-LABEL: <implicit_null_check>:31  # CHECK: 5f <fault_addr>:32  # CHECK: 5f: nop33  # CHECK: 60: cmpq34  .globl  implicit_null_check35  .p2align  536implicit_null_check:37  .rept 3138  int339  .endr40fault_addr:41  cmpq (%rsi), %rdi42  jne bar43 44  .p2align 445  .type   bar,@function46bar:47  retq48