[llvm-commits] [compiler-rt] r167454 - /compiler-rt/trunk/lib/tsan/go/tsan_go.cc
Dmitry Vyukov
dvyukov at google.com
Tue Nov 6 05:25:05 PST 2012
Author: dvyukov
Date: Tue Nov 6 07:25:05 2012
New Revision: 167454
URL: http://llvm.org/viewvc/llvm-project?rev=167454&view=rev
Log:
tsan: add missing function for windows
Modified:
compiler-rt/trunk/lib/tsan/go/tsan_go.cc
Modified: compiler-rt/trunk/lib/tsan/go/tsan_go.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/go/tsan_go.cc?rev=167454&r1=167453&r2=167454&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/go/tsan_go.cc (original)
+++ compiler-rt/trunk/lib/tsan/go/tsan_go.cc Tue Nov 6 07:25:05 2012
@@ -191,5 +191,39 @@
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
More information about the llvm-commits
mailing list