History log of /external/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2d1fdb26e458c4ddc04155c1d421bced3ba90cd0 29-May-2014 Stephen Hines <srhines@google.com> Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
/external/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc
0c8af33262be025def2108352f9a720d9559ffdb 03-Oct-2013 Dmitry Vyukov <dvyukov@google.com> asan/msan/tsan: fix broken linux syscalls

Currently the following source code:

u64 NanoTime() {
kernel_timeval tv = {};
internal_syscall(__NR_gettimeofday, &tv, 0);
return (u64)tv.tv_sec * 1000*1000*1000 + tv.tv_usec * 1000;
}

generates the following assembly:

Dump of assembler code for function __sanitizer::NanoTime():
=> 0x00007ff30657d380 <+0>: lea -0x10(%rsp),%rdi
0x00007ff30657d385 <+5>: xor %esi,%esi
0x00007ff30657d387 <+7>: mov $0x60,%eax
0x00007ff30657d38c <+12>: syscall
0x00007ff30657d38e <+14>: mov $0,%eax
0x00007ff30657d393 <+19>: retq

with this change:

Dump of assembler code for function __sanitizer::NanoTime():
=> 0x00007faab834f380 <+0>: movq $0x0,-0x10(%rsp)
0x00007faab834f389 <+9>: movq $0x0,-0x8(%rsp)
0x00007faab834f392 <+18>: lea -0x10(%rsp),%rdi
0x00007faab834f397 <+23>: xor %esi,%esi
0x00007faab834f399 <+25>: mov $0x60,%eax
0x00007faab834f39e <+30>: syscall
0x00007faab834f3a0 <+32>: mov -0x8(%rsp),%rax
0x00007faab834f3a5 <+37>: mov -0x10(%rsp),%rcx
0x00007faab834f3aa <+42>: imul $0x3e8,%rax,%rdx
0x00007faab834f3b1 <+49>: imul $0x3b9aca00,%rcx,%rax
0x00007faab834f3b8 <+56>: add %rdx,%rax
0x00007faab834f3bb <+59>: retq




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc
9578a3ecfc35a264ede1135033398e2a77a6cad6 08-May-2013 Peter Collingbourne <peter@pcc.me.uk> [nolibc] Change internal syscall API to remove reliance on libc's errno.

This change moves to a model where the error value of a system call is
potentially contained in the return value itself rather than being
implicit in errno. The helper function internal_iserror can be used
to extract the error value from a return value. On platforms other
than Linux/x86_64 this still uses errno, but other platforms are free
to port their error handling to this new model.

Differential Revision: http://llvm-reviews.chandlerc.com/D756

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc