40 lines · plain
1# RUN: llvm-mc -triple x86_64-unknown-unknown %s --validate-cfi --filetype=null 2>&1 | FileCheck %s 2# RUN: llvm-mc -triple x86_64-unknown-unknown %s --filetype=asm 2>&1 | FileCheck %s -check-prefix=ASSEMBLER --implicit-check-not warning: --implicit-check-not error:3# ASSEMBLER: .text4 .text5 .globl f6 .type f,@function7f:8 .cfi_startproc9 10 ## TODO: Remove these lines when the initial frame directives set the callee saved registers11 .cfi_undefined %rax12 .cfi_undefined %flags13 14 pushq %rbp15 # CHECK: warning: CFA offset is changed from 8 to 17, and CFA register RSP is modified, but validating the modification amount is not implemented yet16 # CHECK: warning: validating changes happening to register RBP unwinding rule structure is not implemented yet17 .cfi_def_cfa_offset 1718 .cfi_offset %rbp, -1619 20 movq %rsp, %rbp21 # CHECK: warning: CFA register changed from register RSP to register RBP, validating this change is not implemented yet22 .cfi_def_cfa_register %rbp23 24 movl %edi, -4(%rbp)25 26 movl -4(%rbp), %eax27 28 addl $10, %eax29 30 popq %rbp31 # CHECK: warning: CFA register changed from register RBP to register RSP, validating this change is not implemented yet32 .cfi_def_cfa %rsp, 833 34 retq35 36.Lfunc_end0:37 .size f, .Lfunc_end0-f38 39 .cfi_endproc40