diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll')
-rw-r--r-- | test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll b/test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll new file mode 100644 index 0000000..6bfb153 --- /dev/null +++ b/test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll @@ -0,0 +1,54 @@ +; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2 -asm-instrumentation=address -asan-instrument-assembly | FileCheck %s + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +; CHECK-LABEL: mov8b_rbp +; CHECK: pushq %rbp +; CHECK-NOT: .cfi_adjust_cfa_offset 8 +; CHECK: movq %rbp, %rbp +; CHECK: .cfi_remember_state +; CHECK: .cfi_def_cfa_register %rbp +; CHECK: leaq -128(%rsp) +; CHECK: callq __asan_report_load8@PLT +; CHECK: leaq 128(%rsp) +; CHECK: popq %rbp +; CHECK: .cfi_restore_state +; CHECK-NOT: .cfi_adjust_cfa_offset -8 +; CHECK: retq +define void @mov8b_rbp(i64* %dst, i64* %src) #0 { +entry: + tail call void asm sideeffect "movq ($0), %rax \0A\09movq %rax, ($1) \0A\09", "r,r,~{rax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* %src, i64* %dst) + ret void +} + +; CHECK-LABEL: mov8b_rsp +; CHECK: pushq %rbp +; CHECK: .cfi_adjust_cfa_offset 8 +; CHECK: movq %rsp, %rbp +; CHECK: .cfi_remember_state +; CHECK: .cfi_def_cfa_register %rbp +; CHECK: leaq -128(%rsp) +; CHECK: callq __asan_report_load8@PLT +; CHECK: leaq 128(%rsp) +; CHECK: popq %rbp +; CHECK: .cfi_restore_state +; CHECK: .cfi_adjust_cfa_offset -8 +; CHECK: retq +define void @mov8b_rsp(i64* %dst, i64* %src) #1 { +entry: + tail call void asm sideeffect "movq ($0), %rax \0A\09movq %rax, ($1) \0A\09", "r,r,~{rax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* %src, i64* %dst) + ret void +} + +; CHECK-LABEL: mov8b_rsp_no_cfi +; CHECK-NOT: .cfi{{[a-z_]+}} +define void @mov8b_rsp_no_cfi(i64* %dst, i64* %src) #2 { +entry: + tail call void asm sideeffect "movq ($0), %rax \0A\09movq %rax, ($1) \0A\09", "r,r,~{rax},~{memory},~{dirflag},~{fpsr},~{flags}"(i64* %src, i64* %dst) + ret void +} + +attributes #0 = { nounwind sanitize_address uwtable "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" } +attributes #1 = { nounwind sanitize_address uwtable "no-frame-pointer-elim"="false" } +attributes #2 = { nounwind sanitize_address "no-frame-pointer-elim"="false" } |