diff options
author | Torvald Riegel <triegel@redhat.com> | 2012-01-13 23:45:06 +0000 |
---|---|---|
committer | Torvald Riegel <torvald@gcc.gnu.org> | 2012-01-13 23:45:06 +0000 |
commit | 07b6642b935e1cd499a2aae071db06d845e39a8b (patch) | |
tree | 8ed0df69ae3d1543fa4811e7cb7e72a8d99333b5 /libitm/config/generic/tls.cc | |
parent | 4cce1836bde85844781736f0f87b51ae9393da5f (diff) | |
download | gcc-07b6642b935e1cd499a2aae071db06d845e39a8b.tar.gz |
libitm: Filter out undo writes that overlap with the libitm stack.
PR libitm/51855
* config/generic/tls.h (GTM::mask_stack_top): New.
(GTM::mask_stack_bottom): Declare.
* config/generic/tls.c (GTM::mask_stack_bottom): New.
* local.cc (gtm_undolog::rollback): Filter out any updates that
overlap the libitm stack. Add current transaction as parameter.
* libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
* beginend.cc (GTM::gtm_thread::rollback): Adapt.
* testsuite/libitm.c/stackundo.c: New test.
From-SVN: r183172
Diffstat (limited to 'libitm/config/generic/tls.cc')
-rw-r--r-- | libitm/config/generic/tls.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libitm/config/generic/tls.cc b/libitm/config/generic/tls.cc index e502e50869b..f07d082b4ee 100644 --- a/libitm/config/generic/tls.cc +++ b/libitm/config/generic/tls.cc @@ -30,4 +30,11 @@ namespace GTM HIDDEN { __thread gtm_thread_tls _gtm_thr_tls; #endif +// See tls.h for comments. +void * __attribute__((noinline)) +mask_stack_bottom(gtm_thread *tx) +{ + return (uint8_t*)__builtin_dwarf_cfa() - 256; +} + } // namespace GTM |