forked from OSchip/llvm-project
tsan: remove unneeded ___chkstk_ms function from Go runtime
llvm-svn: 191161
This commit is contained in:
parent
7e7eb8ce69
commit
2ea2d9cb29
|
@ -26,7 +26,7 @@ SRCS="
|
|||
|
||||
if [ "`uname -a | grep Linux`" != "" ]; then
|
||||
SUFFIX="linux_amd64"
|
||||
OSCFLAGS="-fPIC -ffreestanding -Wno-maybe-uninitialized"
|
||||
OSCFLAGS="-fPIC -ffreestanding -Wno-maybe-uninitialized -Werror"
|
||||
OSLDFLAGS="-lpthread -fPIC -fpie"
|
||||
SRCS+="
|
||||
../rtl/tsan_platform_linux.cc
|
||||
|
@ -65,7 +65,7 @@ for F in $SRCS; do
|
|||
cat $F >> gotsan.cc
|
||||
done
|
||||
|
||||
FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -m64 -Wall -Werror -fno-exceptions -fno-rtti -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4 $OSCFLAGS"
|
||||
FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -m64 -Wall -fno-exceptions -fno-rtti -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4 $OSCFLAGS"
|
||||
if [ "$DEBUG" == "" ]; then
|
||||
FLAGS+=" -DTSAN_DEBUG=0 -O3 -fomit-frame-pointer"
|
||||
else
|
||||
|
|
|
@ -186,40 +186,6 @@ void __tsan_finalizer_goroutine(ThreadState *thr) {
|
|||
AcquireGlobal(thr, 0);
|
||||
}
|
||||
|
||||
#if SANITIZER_WINDOWS
|
||||
// MinGW gcc emits calls to the function.
|
||||
void ___chkstk_ms(void) {
|
||||
// The implementation must be along the lines of:
|
||||
// .code64
|
||||
// PUBLIC ___chkstk_ms
|
||||
// //cfi_startproc()
|
||||
// ___chkstk_ms:
|
||||
// push rcx
|
||||
// //cfi_push(%rcx)
|
||||
// push rax
|
||||
// //cfi_push(%rax)
|
||||
// cmp rax, PAGE_SIZE
|
||||
// lea rcx, [rsp + 24]
|
||||
// jb l_LessThanAPage
|
||||
// .l_MoreThanAPage:
|
||||
// sub rcx, PAGE_SIZE
|
||||
// or rcx, 0
|
||||
// sub rax, PAGE_SIZE
|
||||
// cmp rax, PAGE_SIZE
|
||||
// ja l_MoreThanAPage
|
||||
// .l_LessThanAPage:
|
||||
// sub rcx, rax
|
||||
// or [rcx], 0
|
||||
// pop rax
|
||||
// //cfi_pop(%rax)
|
||||
// pop rcx
|
||||
// //cfi_pop(%rcx)
|
||||
// ret
|
||||
// //cfi_endproc()
|
||||
// END
|
||||
}
|
||||
#endif
|
||||
|
||||
} // extern "C"
|
||||
} // namespace __tsan
|
||||
|
||||
|
|
Loading…
Reference in New Issue