summaryrefslogtreecommitdiff
path: root/gcc/sanitizer.def
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2012-11-22 13:56:58 -0800
committerWei Mi <wmi@gcc.gnu.org>2012-11-22 21:56:58 +0000
commit32b4b7f53e341be663438f69fd6cb2f909427188 (patch)
tree368bbe384fc86dd4c4da764b1d83bb50a9b3ced8 /gcc/sanitizer.def
parentbdb6985c8782cdd91a637a6d36bab4ba561c3f9b (diff)
downloadgcc-32b4b7f53e341be663438f69fd6cb2f909427188.tar.gz
builtins.def (DEF_SANITIZER_BUILTIN): Define tsan builtins.
2012-11-22 Dmitry Vyukov <dvyukov@google.com> Wei Mi <wmi@google.com> * builtins.def (DEF_SANITIZER_BUILTIN): Define tsan builtins. * sanitizer.def: Ditto. * Makefile.in (tsan.o): Add tsan.o target. (BUILTINS_DEF): Add sanitizer.def. * passes.c (init_optimization_passes): Add tsan passes. * tree-pass.h (register_pass_info): Ditto. * toplev.c (compile_file): Ditto. * doc/invoke.texi: Document tsan related options. * gcc.c (LINK_COMMAND_SPEC): Add LIBTSAN_SPEC in link command if -fsanitize=thread. * tsan.c: New file about tsan. * tsan.h: Ditto. * common.opt: Add -fsanitize=thread. Co-Authored-By: Wei Mi <wmi@google.com> From-SVN: r193736
Diffstat (limited to 'gcc/sanitizer.def')
-rw-r--r--gcc/sanitizer.def28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/sanitizer.def b/gcc/sanitizer.def
new file mode 100644
index 00000000000..28518f3a977
--- /dev/null
+++ b/gcc/sanitizer.def
@@ -0,0 +1,28 @@
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT, "__tsan_init",
+ BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY, "__tsan_func_entry",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_EXIT, "__tsan_func_exit",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VPTR_UPDATE, "__tsan_vptr_update",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_1, "__tsan_read1",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_2, "__tsan_read2",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_4, "__tsan_read4",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_8, "__tsan_read8",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_16, "__tsan_read16",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_1, "__tsan_write1",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_2, "__tsan_write2",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_4, "__tsan_write4",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_8, "__tsan_write8",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_16, "__tsan_write16",
+ BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)