]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Instrumentation/AddressSanitizer/X86/asm_swap_intel.s
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
[FreeBSD/FreeBSD.git] / test / Instrumentation / AddressSanitizer / X86 / asm_swap_intel.s
1 # RUN: llvm-mc %s -x86-asm-syntax=intel -triple=x86_64-unknown-linux-gnu -asm-instrumentation=address -asan-instrument-assembly | FileCheck %s
2
3         .text
4         .globl  swap
5         .align  16, 0x90
6         .type   swap,@function
7 # CHECK-LABEL: swap:
8 #
9 # CHECK: leaq -128(%rsp), %rsp
10 # CHECK: callq __asan_report_load8@PLT
11 # CHECK: leaq 128(%rsp), %rsp
12 #
13 # CHECK-NEXT: movq (%rcx), %rax
14 #
15 # CHECK-NEXT: leaq -128(%rsp), %rsp
16 # CHECK: callq __asan_report_load8@PLT
17 # CHECK: leaq 128(%rsp), %rsp
18 #
19 # CHECK-NEXT: movq (%rdx), %rbx
20 #
21 # CHECK-NEXT: leaq -128(%rsp), %rsp
22 # CHECK: callq __asan_report_store8@PLT
23 # CHECK: leaq 128(%rsp), %rsp
24 #
25 # CHECK-NEXT: movq %rbx, (%rcx)
26 #
27 # CHECK-NEXT: leaq -128(%rsp), %rsp
28 # CHECK: callq __asan_report_store8@PLT
29 # CHECK: leaq 128(%rsp), %rsp
30 #
31 # CHECK-NEXT: movq %rax, (%rdx)
32 swap:                                   # @swap
33         .cfi_startproc
34 # BB#0:
35         push    rbx
36 .Ltmp0:
37         .cfi_def_cfa_offset 16
38 .Ltmp1:
39         .cfi_offset rbx, -16
40         mov     rcx, rdi
41         mov     rdx, rsi
42         #APP
43
44
45         mov     rax, qword ptr [rcx]
46         mov     rbx, qword ptr [rdx]
47         mov     qword ptr [rcx], rbx
48         mov     qword ptr [rdx], rax
49
50         #NO_APP
51         pop     rbx
52         ret
53 .Ltmp2:
54         .size   swap, .Ltmp2-swap
55         .cfi_endproc
56
57
58         .ident  "clang version 3.5.0 "
59         .section        ".note.GNU-stack","",@progbits