2014-05-07 07:54:11 +00:00
|
|
|
# RUN: llvm-mc %s -x86-asm-syntax=intel -triple=x86_64-unknown-linux-gnu -asm-instrumentation=address -asan-instrument-assembly | FileCheck %s
|
2014-04-24 09:56:15 +00:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl swap
|
|
|
|
.align 16, 0x90
|
|
|
|
.type swap,@function
|
|
|
|
# CHECK-LABEL: swap:
|
|
|
|
#
|
2014-05-08 09:55:24 +00:00
|
|
|
# CHECK: leaq -128(%rsp), %rsp
|
2014-07-07 13:57:37 +00:00
|
|
|
# CHECK: callq __asan_report_load8@PLT
|
|
|
|
# CHECK: leaq 128(%rsp), %rsp
|
2014-04-24 09:56:15 +00:00
|
|
|
#
|
|
|
|
# CHECK-NEXT: movq (%rcx), %rax
|
|
|
|
#
|
2014-05-08 09:55:24 +00:00
|
|
|
# CHECK-NEXT: leaq -128(%rsp), %rsp
|
2014-07-07 13:57:37 +00:00
|
|
|
# CHECK: callq __asan_report_load8@PLT
|
|
|
|
# CHECK: leaq 128(%rsp), %rsp
|
2014-04-24 09:56:15 +00:00
|
|
|
#
|
|
|
|
# CHECK-NEXT: movq (%rdx), %rbx
|
|
|
|
#
|
2014-07-07 13:57:37 +00:00
|
|
|
# CHECK-NEXT: leaq -128(%rsp), %rsp
|
|
|
|
# CHECK: callq __asan_report_store8@PLT
|
|
|
|
# CHECK: leaq 128(%rsp), %rsp
|
2014-04-24 09:56:15 +00:00
|
|
|
#
|
|
|
|
# CHECK-NEXT: movq %rbx, (%rcx)
|
|
|
|
#
|
2014-05-08 09:55:24 +00:00
|
|
|
# CHECK-NEXT: leaq -128(%rsp), %rsp
|
2014-07-07 13:57:37 +00:00
|
|
|
# CHECK: callq __asan_report_store8@PLT
|
|
|
|
# CHECK: leaq 128(%rsp), %rsp
|
2014-04-24 09:56:15 +00:00
|
|
|
#
|
|
|
|
# CHECK-NEXT: movq %rax, (%rdx)
|
|
|
|
swap: # @swap
|
|
|
|
.cfi_startproc
|
|
|
|
# BB#0:
|
|
|
|
push rbx
|
|
|
|
.Ltmp0:
|
|
|
|
.cfi_def_cfa_offset 16
|
|
|
|
.Ltmp1:
|
|
|
|
.cfi_offset rbx, -16
|
|
|
|
mov rcx, rdi
|
|
|
|
mov rdx, rsi
|
|
|
|
#APP
|
|
|
|
|
|
|
|
|
|
|
|
mov rax, qword ptr [rcx]
|
|
|
|
mov rbx, qword ptr [rdx]
|
|
|
|
mov qword ptr [rcx], rbx
|
|
|
|
mov qword ptr [rdx], rax
|
|
|
|
|
|
|
|
#NO_APP
|
|
|
|
pop rbx
|
|
|
|
ret
|
|
|
|
.Ltmp2:
|
|
|
|
.size swap, .Ltmp2-swap
|
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
|
|
|
|
.ident "clang version 3.5.0 "
|
|
|
|
.section ".note.GNU-stack","",@progbits
|