[compiler-rt] r365230 - [TSan] Improve handling of stack pointer mangling in {set, long}jmp, pt.5
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 11:00:16 PDT 2019
Author: yln
Date: Fri Jul 5 11:00:16 2019
New Revision: 365230
URL: http://llvm.org/viewvc/llvm-project?rev=365230&view=rev
Log:
[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.5
Remove unnecessary computation of mangled SP for ARM64 architecture.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D64022
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_aarch64.S
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_aarch64.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_aarch64.S?rev=365230&r1=365229&r2=365230&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_aarch64.S (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_aarch64.S Fri Jul 5 11:00:16 2019
@@ -105,18 +105,8 @@ ASM_SYMBOL_INTERCEPTOR(setjmp):
CFI_OFFSET (19, -16)
mov x19, x0
-#if !defined(__APPLE__)
- // SP pointer mangling (see glibc setjmp)
- adrp x2, __tsan_pointer_chk_guard
- ldr x2, [x2, #:lo12:__tsan_pointer_chk_guard]
- add x0, x29, 32
- eor x1, x2, x0
-#else
- adrp x2, ___tsan_darwin_setjmp_xor_key at page
- ldr x2, [x2, ___tsan_darwin_setjmp_xor_key at pageoff]
+ // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
add x0, x29, 32
- eor x1, x2, x0
-#endif
// call tsan interceptor
bl ASM_SYMBOL(__tsan_setjmp)
@@ -165,18 +155,8 @@ ASM_SYMBOL_INTERCEPTOR(_setjmp):
CFI_OFFSET (19, -16)
mov x19, x0
-#if !defined(__APPLE__)
- // SP pointer mangling (see glibc setjmp)
- adrp x2, __tsan_pointer_chk_guard
- ldr x2, [x2, #:lo12:__tsan_pointer_chk_guard]
- add x0, x29, 32
- eor x1, x2, x0
-#else
- adrp x2, ___tsan_darwin_setjmp_xor_key at page
- ldr x2, [x2, ___tsan_darwin_setjmp_xor_key at pageoff]
+ // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
add x0, x29, 32
- eor x1, x2, x0
-#endif
// call tsan interceptor
bl ASM_SYMBOL(__tsan_setjmp)
@@ -227,18 +207,8 @@ ASM_SYMBOL_INTERCEPTOR(sigsetjmp):
mov w20, w1
mov x19, x0
-#if !defined(__APPLE__)
- // SP pointer mangling (see glibc setjmp)
- adrp x2, __tsan_pointer_chk_guard
- ldr x2, [x2, #:lo12:__tsan_pointer_chk_guard]
- add x0, x29, 32
- eor x1, x2, x0
-#else
- adrp x2, ___tsan_darwin_setjmp_xor_key at page
- ldr x2, [x2, ___tsan_darwin_setjmp_xor_key at pageoff]
+ // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
add x0, x29, 32
- eor x1, x2, x0
-#endif
// call tsan interceptor
bl ASM_SYMBOL(__tsan_setjmp)
@@ -292,13 +262,8 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp):
mov w20, w1
mov x19, x0
-#if !defined(__APPLE__)
- // SP pointer mangling (see glibc setjmp)
- adrp x2, __tsan_pointer_chk_guard
- ldr x2, [x2, #:lo12:__tsan_pointer_chk_guard]
+ // Obtain SP, first argument to `void __tsan_setjmp(uptr sp)`
add x0, x29, 32
- eor x1, x2, x0
-#endif
// call tsan interceptor
bl ASM_SYMBOL(__tsan_setjmp)
More information about the llvm-commits
mailing list