mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-28 20:41:07 +00:00
tsan: add missing function for windows
llvm-svn: 167454
This commit is contained in:
parent
1d4120b210
commit
ee563c10c6
@ -191,5 +191,39 @@ void __tsan_finalizer_goroutine(int goid) {
|
||||
ThreadFinalizerGoroutine(thr);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// 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…
x
Reference in New Issue
Block a user