PR tree-optimization/68911
[official-gcc.git] / libitm / ChangeLog
blobe07cca9c71b56d71024b9f6f889a0385f9269b46
1 2016-01-12  Torvald Riegel  <triegel@redhat.com>
3         * libitm_i.h (gtm_mask_stack): Remove.
4         * beginend.cc (gtm_stmlock_array, gtm_clock): Likewise.
5         * stmlock.h: Remove file.
6         * config/alpha/cacheline.h: Likewise.
7         * config/generic/cacheline.h: Likewise.
8         * config/powerpc/cacheline.h: Likewise.
9         * config/sparc/cacheline.h: Likewise.
10         * config/x86/cacheline.h: Likewise.
12 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
14         Update copyright years.
16         * libitm.texi: Bump @copying's copyright year.
18 2015-11-26  Torvald Riegel  <triegel@redhat.com>
20         * method-ml.cc (ml_mg): Use multiplicative instead of simple hashing.
21         (ml_wt_dispatch::pre_write): Adapt.
22         (ml_wt_dispatch::pre_load): Likewise.
24 2015-11-22  Torvald Riegel  <triegel@redhat.com>
26         * libitm_i.h (gtm_alloc_action): Remove union.
27         * testsuite/libitm.c/alloc-1.c: New.
29 2015-11-19  Torvald Riegel  <triegel@redhat.com>
31         * testsuite/libitm.c++/eh-5.C: New.
32         * libitm.h (_ITM_cxa_free_exception): New.
33         * libitm.map (_ITM_cxa_free_exception): Add it.
34         * libitm.texi: Update ABI docs.
35         * libitm_i.h (gtm_transaction_cp::cxa_unthrown): Remove.
36         (gtm_transaction_cp::cxa_uncaught_count): Add.
37         (gtm_thread::cxa_unthrown): Remove.
38         (gtm_thread::cxa_uncaught_count_ptr): Add.
39         (gtm_thread::cxa_uncaught_count): Add.
40         (gtm_thread::drop_references_allocations): Rename to...
41         (gtm_thread::discard_allocation): ... this and adapt.
42         (gtm_thread::init_cpp_exceptions): New.
43         * beginend.cc (gtm_thread::gtm_thread): Adapt EH handling.
44         (gtm_thread::begin_transaction): Likewise.
45         (gtm_transaction_cp::save): Likewise.
46         (gtm_thread::trycommit): Likewise.
47         * eh_cpp.cc: Add overview comments.
48         (__cxa_eh_globals, __cxa_get_globals, __cxa_free_exception): Declare.
49         (free_any_exception, _ITM_cxa_free_exception): New.
50         (gtm_thread::init_cpp_exceptions): Define.
51         (_ITM_cxa_allocate_exception, _ITM_cxa_throw): Adapt.
52         (_ITM_cxa_begin_catch, _ITM_cxa_end_catch): Likewise.
53         (gtm_thread::revert_cpp_exceptions): Likewise.
55 2015-11-09  Torvald Riegel  <triegel@redhat.com>
57         * alloc_cpp.cc (_ZdlPvX, _ZdlPvXRKSt9nothrow_t, _ZGTtdlPvX,
58         _ZGTtdlPvXRKSt9nothrow_t, delsz_opnt): New.
59         * libitm.map: Add _ZGTtdlPvX and _ZGTtdlPvXRKSt9nothrow_t.
60         * libitm_i.h (gtm_alloc_action): Add free_fn_sz and sz.  Add comments.
61         (gtm_thread::forget_allocations): New overload with size_t argument.
62         * alloc.c (gtm_thread::forget_allocation): Define new overload and
63         adapt existing one.
64         (gtm_thread::record_allocation): Adapt.
65         (gtm_thread::commit_allocations_1): Adapt.
66         (gtm_thread::commit_allocations_2): Adapt.
67         * testsuite/libitm.c++/newdelete.C: New.
69 2015-10-27  Daniel Jacobowitz  <dan@codesourcery.com>
70             Joseph Myers  <joseph@codesourcery.com>
71             Mark Shinwell  <shinwell@codesourcery.com>
72             Andrew Stubbs  <ams@codesourcery.com>
73             Rich Felker <dalias@libc.org>
75         * config/sh/sjlj.S (_ITM_beginTransaction): Bypass PLT calling
76         GTM_begin_transaction for compatibility with FDPIC.
78 2015-10-09  David Malcolm  <dmalcolm@redhat.com>
80         * testsuite/lib/libitm.exp: Load multiline.exp before prune.exp,
81         using load_gcc_lib.
83 2015-08-20  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>  (tiny change)
85         PR libitm/61164
86         * local_atomic (__always_inline): Rename to...
87         (__libitm_always_inline): ... this.
89 2015-07-03  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
91         PR target/52482
92         * config/powerpc/sjlj.S: Port to Xcode 2.5.
94 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
96         * config/linux/x86/futex_bits.h (sys_futex0) [__x86_64__]: Change
97         operands "op" and "val" to int.
99 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
101         * config/linux/sh/futex_bits.h (sys_futex0) Change operands
102         "op" and "val" to int.
104 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
106         * config/linux/alpha/futex_bits.h (sys_futex0) Change operands
107         "op" and "val" to int.
109 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
111         * config/linux/futex.cc (gtm_futex_wait, gtm_futex_wake):
112         Declare as static int.
113         (FUTEX_PRIVATE_FLAG): Remove L suffix.
114         * config/linux/futex_bits.h (sys_futex0) Change operand "op" to int.
116 2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
118         * config/linux/x86/futex_bits.h (sys_futex0) [__PIC__]: Remove
119         sys_futex0 function.
121 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
123         * Makefile.in: Regenerated with automake-1.11.6.
124         * aclocal.m4: Likewise.
125         * configure: Likewise.
126         * testsuite/Makefile.in: Likewise.
128 2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
130         * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
131         * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
133 2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
135         PR libitm/64360
136         * libitm.c/stackundo.c (test2): Make it static.
137         (test1): Likewise.
139 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
141         Update copyright years.
143 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
145         * libitm.texi: Bump @copying's copyright year.
147 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
149         * testsuite/lib/libitm.exp: Load target-utils.exp.
150         Move load of target-supports.exp earlier.
152 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
154         * configure.tgt (x86_64): Tune -m32 multilib to generic.
156 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
158         PR bootstrap/63784
159         * configure: Regenerated.
161 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
163         PR target/63610
164         * configure: Regenerate.
166 2014-10-06  Marek Polacek  <polacek@redhat.com>
168         * testsuite/libitm.c/memcpy-1.c: Declare getpagesize.
169         * testsuite/libitm.c/memset-1.c: Likewise.
171 2014-07-24  Richard Henderson  <rth@redhat.com>
173         * config/aarch64/sjlj.S (_ITM_beginTransaction): Use post-inc
174         addressing mode in epilogue.
176 2014-05-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
178         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
179         -mclear-hwcap instead.
180         * configure: Regenerate.
181         * clearcap.map: Remove.
183 2014-05-21  John Marino  <gnugcc@marino.st>
185         * configure.tgt (*-*-dragonfly*): New target.
187 2014-05-19  Richard Henderson  <rth@redhat.com>
189         * config/aarch64/sjlj.S: New file.
190         * config/aarch64/target.h: New file.
191         * configure.tgt: Enable aarch64.
193 2014-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
195         * config/generic/asmcfi.h: Also check for
196         __GCC_HAVE_DWARF2_CFI_ASM.
198 2013-04-02  Richard Henderson  <rth@redhat.com>
200         * config/alpha/target.h (PAGE_SIZE, FIXED_PAGE_SIZE): Remove.
201         * config/arm/target.h, config/sh/target.h: Likewise.
202         * config/sparc/target.h, config/x86/target.h: Likewise.
204 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
206         * config/linux/futex_bits.h: Include errno.h.
207         (sys_futex0): If syscall returns -1, return -errno rather than
208         -1.
210 2014-03-26  Joseph Myers  <joseph@codesourcery.com>
212         * libitm.texi (Index): Rename to Library Index.
214 2014-01-13  H.J. Lu  <hongjiu.lu@intel.com>
216         PR libitm/53113
217         * Makefile.am (x86_sse.lo): Append -msse to CXXFLAGS.
218         (x86_avx.lo): Append -mavx to CXXFLAGS.
219         * Makefile.in: Regenerate.
221 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
223         Update copyright years
225 2014-01-02  Tobias Burnus  <burnus@net-b.de>
227         * libitm.texi: Bump @copying's copyright year.
229 2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
231         * config/powerpc/sjlj.S [__powerpc64__ && _CALL_ELF == 2]:
232         (FUNC): Define ELFv2 variant.
233         (END): Likewise.
234         (HIDDEN): Likewise.
235         (CALL): Likewise.
236         (BASE): Likewise.
237         (LR_SAVE): Likewise.
239 2013-09-20  Alan Modra  <amodra@gmail.com>
241         * configure: Regenerate.
243 2013-08-30  Torvald Riegel  <triegel@redhat.com>
245         * config/posix/rwlock.cc: Fix initialization order.
247 2013-08-30  Torvald Riegel  <triegel@redhat.com>
249         * libitm_i.h (gtm_thread): Assign an asm name to serial_lock.
250         (htm_fastpath): Assign an asm name.
251         * libitm.h (_ITM_codeProperties): Add non-ABI flags used by custom
252         HTM fast paths.
253         (_ITM_actions): Likewise.
254         * config/x86/target.h (HTM_CUSTOM_FASTPATH): Enable custom fastpath on
255         x86_64.
256         * config/x86/sjlj.S (_ITM_beginTransaction): Add custom HTM fast path.
257         * config/posix/rwlock.h (gtm_rwlock): Update comments.  Move summary
258         field to the start of the structure.
259         * config/linux/rwlock.h (gtm_rwlock): Update comments.
260         * beginend.cc (gtm_thread::begin_transaction): Add retry policy
261         handling for custom HTM fast paths.
263 2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
264         Revert:
265         2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
267         * configure.tgt: Add -msoft-float to XCFLAGS.
269 2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
271         * configure.tgt: Add -msoft-float to XCFLAGS.
273 2013-07-29  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
275         * config/s390/target.h (htm_begin, htm_commit, htm_abort)
276         (htm_transaction_active): Enable zEC12 instructions in the
277         assembler.
278         * configure.tgt: Remove -Wa,-march=zEC12 from XCFLAGS.
280 2013-07-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
282         * acinclude.m4: Add htm asm check for s390.
283         * configure.tgt: Add -mhtm and -Wa,-march=zEC12 to the options.
284         * configure: Regenerate.
285         * config/s390/target.h: Remove __HTM__ check.
286         (htm_available): Call getauxval to get hwcaps and check whether
287         HTM is available or not.
289 2013-07-15  Peter Bergner  <bergner@vnet.ibm.com>
291         * acinclude.m4 (LIBITM_CHECK_AS_HTM): New.
292         * configure.ac: Use it.
293         (AC_CHECK_HEADERS): Check for sys/auxv.h.
294         (AC_CHECK_FUNCS): Check for getauxval.
295         * config.h.in, configure: Rebuild.
296         * configure.tgt (target_cpu): Add -mhtm to XCFLAGS.
297         * config/powerpc/target.h: Include sys/auxv.h and htmintrin.h.
298         (USE_HTM_FASTPATH): Define.
299         (_TBEGIN_STARTED, _TBEGIN_INDETERMINATE, _TBEGIN_PERSISTENT,
300         _HTM_RETRIES) New macros.
301         (htm_abort, htm_abort_should_retry, htm_available, htm_begin, htm_init,
302         htm_begin_success, htm_commit, htm_transaction_active): New functions.
304 2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
306         * config/s390/target.h: Include htmintrin.h.
307         (_HTM_ITM_RETRIES): New macro definition.
308         (htm_available, htm_init, htm_begin, htm_begin_success)
309         (htm_commit, htm_abort, htm_abort_should_retry): New functions.
311 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
312             Cesar Philippidis  <cesar@codesourcery.com>
314         * testsuite/lib/libitm.exp: Reorder lib loads into dependency order.
315         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
316         * testsuite/libitm.c/c.exp: load_gcc_lib gcc-dg.exp.
317         * testsuite/libitm.c++/c++.exp: load_gcc_lib gcc-dg.exp.
319 2013-06-20  Torvald Riegel  <triegel@redhat.com>
321         * query.cc (_ITM_inTransaction): Abort when using the HTM fastpath.
322         (_ITM_getTransactionId): Same.
323         * config/x86/target.h (htm_transaction_active): New.
325 2013-06-20  Torvald Riegel  <triegel@redhat.com>
327         PR libitm/57643
328         * beginend.cc (gtm_thread::begin_transaction): Handle reentrancy in
329         the HTM fastpath.
331 2013-03-31  Gerald Pfeifer  <gerald@pfeifer.com>
333         PR bootstrap/56714
334         * local_atomic (__always_inline): Always define our version.
335         (__calculate_memory_order): Mark inline.
336         (atomic_thread_fence): Ditto.
337         (atomic_signal_fence): Ditto.
338         (atomic_bool::atomic_flag_test_and_set_explicit): Ditto.
339         (atomic_bool::atomic_flag_clear_explicit): Ditto.
340         (atomic_bool::atomic_flag_test_and_set): Ditto.
341         (atomic_bool::atomic_flag_clear): Ditto.
343 2013-04-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
345         * config/s390/sjlj.S: New file.
346         * config/s390/target.h: New file.
347         * configure.tgt: Set options for S/390.
349 2013-03-23  Andi Kleen  <ak@linux.intel.com>
351         * local_atomic (__always_inline): Add.
352         (__calculate_memory_order, atomic_thread_fence,
353          atomic_signal_fence, test_and_set, clear, store, load,
354          exchange, compare_exchange_weak, compare_exchange_strong,
355          fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
356         Add __always_inline to force inlining.
358 2013-02-11  Iain Sandoe  <iain@codesourcery.com>
359             Jack Howarth  <howarth@bromo.med.uc.edu>
360             Patrick Marlier  <patrick.marlier@gmail.com>
362         PR libitm/55693
363         * alloc_cpp.cc: Enable function declarations on darwin.
364         * eh_cpp.cc: Likewise.
366 2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
368         Update copyright years.
370 2012-11-09  Torvald Riegel  <triegel@redhat.com>
372         * beginend.cc (htm_fastpath): New.
373         (gtm_thread::begin_transaction, _ITM_commitTransaction,
374         _ITM_commitTransactionEH): Add HTM fastpath handling.
375         * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
376         * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
377         * config/x86/target.h (htm_available, htm_init, htm_begin_success,
378         htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
379         * configure.tgt: Add -mrtm to XCFLAGS.
380         * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
381         (gtm_thread::serialirr_mode): Add HTM fastpath handling.
382         * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
383         * retry.cc (parse_default_method): Add HTM method parsing.
384         (gtm_thread::number_of_threads_changed): Use HTM by default if
385         available.
387 2012-11-04  Thomas Schwinge  <thomas@codesourcery.com>
389         * configure: Regenerate.
391 2012-10-31  Richard Henderson  <rth@redhat.com>
393         * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
394         * configure.ac: Use it.
395         * config.h.in, configure: Rebuild.
396         * testsuite/Makefile.in: Rebuild.
398 2012-10-24  Torvald Riegel  <triegel@redhat.com>
400         * libitm.texi: Clarify ABI requirements for data-logging functions.
402 2012-10-24  Torvald Riegel  <triegel@redhat.com>
404         * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
405         it requires serial mode instead of assuming that for certain
406         dispatchs.
407         * dispatch.h (abi_dispatch::requires_serial): New.
408         (abi_dispatch::abi_dispatch): Adapt.
409         * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
410         * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
411         * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
412         serial_dispatch::serial_dispatch,
413         serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
415 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
417         * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
418         and ia32 declarations some more.
419         * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
421 2012-09-20  Jakub Jelinek  <jakub@redhat.com>
423         PR other/43620
424         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
425         * configure: Regenerate.
426         * Makefile.in: Regenerate.
428 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
430         * configure: Regenerated.
432 2012-07-31  Uros Bizjak  <ubizjak@gmail.com>
434         * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
436 2012-05-21  Patrick Marlier  <patrick.marlier@gmail.com>
438         * eh_cpp.cc: Fix __cxa_end_catch declaration.
440 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
442         * configure: Regenerated.
444 2012-04-04  H.J. Lu  <hongjiu.lu@intel.com>
446         PR libitm/52854
447         * config/x86/target.h (gtm_jmpbuf): Replace long with long long
448         for x86-64.
450 2012-04-03  Tristan Gingold  <gingold@adacore.com>
452         * configure: Regenerate.
454 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
456         PR bootstrap/52812
457         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
459 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
461         * testsuite/lib/libitm.exp: load fortran-modules.exp
463 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
465         * configure.tgt (*-*-irix6*): Remove.
467 2012-03-13  Torvald Riegel  <triegel@redhat.com>
469         PR libitm/52526
470         * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
471         wake-up.
473 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
475         * configure.tgt (*-*-osf*): Remove.
476         * configure: Regenerate.
478 2012-03-05  Torvald Riegel  <triegel@redhat.com>
480         * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
481         memtransfer/memset if size isn't larger than zero.
483 2012-03-02  Torvald Riegel  <triegel@redhat.com>
485         * libitm.texi: Link to specification and add a usage example.
487 2012-02-24  Torvald Riegel  <triegel@redhat.com>
489         * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
490         default dispatch for more than 1 thread to ml_wt.
492 2012-02-20  Torvald Riegel  <triegel@redhat.com>
494         * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
496 2012-02-20  Torvald Riegel  <triegel@redhat.com>
498         * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
500 2012-02-20  Torvald Riegel  <triegel@redhat.com>
502         * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
503         serial mode corner cases made obsolete by prior gtm_rwlock changes.
504         (gl_wt_dispatch.rollback): Same.
506 2012-02-20  Torvald Riegel  <triegel@redhat.com>
508         * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
510 2012-02-20  Torvald Riegel  <triegel@redhat.com>
512         * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
513         for RfW src.  Optimize number of calls to gtm_thr.
515 2012-02-20  Torvald Riegel  <triegel@redhat.com>
517         * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
518         acquisition to ...
519         * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
520         (default_dispatch): Make atomic.
521         (GTM::gtm_thread::set_default_dispatch): Access atomically.
522         (GTM::gtm_thread::decide_retry_strategy): Access atomically and
523         use decide_begin_dispatch() if default_dispatch might have changed.
524         (GTM::gtm_thread::number_of_threads_changed): Initialize
525         default_dispatch here.
527 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
528             Patrick Marlier  <patrick.marlier@gmail.com>
530         PR libitm/52220
531         * alloc_cpp.cc: No dummy definitions for darwin.
532         * eh_cpp.cc: Likewise.
534 2012-02-14  Richard Henderson  <rth@redhat.com>
536         * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
538 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
540         * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
542 2012-02-14  Torvald Riegel  <triegel@redhat.com>
544         * libitm_i.h (GTM::gtm_rwlog_entry): New.
545         (GTM::gtm_thread): Add read and write logs.
546         (GTM::dispatch_ml_wt): Declare.
547         * retry.cc (parse_default_method): Support ml_wt.
548         * method-ml.cc: New file.
549         * Makefile.am: Add method-ml.cc.
550         * Makefile.in: Regenerate.
552 2012-02-14  Torvald Riegel  <triegel@redhat.com>
554         * dispatch.h (GTM::abi_dispatch::supports): New.
555         (GTM::method_group::reinit): New.
556         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
557         (GTM::gtm_thread::number_of_threads_changed): Check that the method
558         supports the current situation.
560 2012-02-14  Torvald Riegel  <triegel@redhat.com>
562         * util.cc (GTM::xcalloc): New.
563         * common.h (GTM::xcalloc): Declare.
565 2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
567         * config/sparc/target.h (cpu_relax): Read from CC register.
568         * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
570 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
572         * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
574 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
576         * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
577         * config/sparc/cacheline.h: New file.
578         * config/sparc/target.h: Likewise.
579         * config/sparc/sjlj.S: Likewise.
580         * config/linux/sparc/futex_bits.h: Likewise.
582 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
584         * configure.ac (link_itm): Fix comment.
585         * configure: Regenerate.
586         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
588 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
590         PR libitm/51822
591         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
592         Correct libgomp references.
594 2012-01-24  Torvald Riegel  <triegel@redhat.com>
596         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
597         wake-up.
599 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
601         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
602         end of structure.
603         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
604         offset values.  Do not copy return address.  Decrement stack
605         by 56 bytes only.
606         (GTM_longjump) [__x86_64__]: Update offset values.
608 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
610         PR libitm/51830
611         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
612         the first function argument to %eax.
614 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
616         * libitm.h (_ITM_getThreadnum): Remove.
617         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
619 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
621         * clearcap.map: New file.
622         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
623         * configure.ac: Call it.
624         Clear HWCAP_LDFLAGS if defaulting to -mavx.
625         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
626         * configure: Regenerate.
627         * Makefile.in: Regenerate.
628         * testsuite/Makefile.in: Regenerate.
630 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
632         PR libitm/51173
633         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
634         include, exclude options.
636 2012-01-14  Torvald Riegel  <triegel@redhat.com>
638         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
639         rolling back.
640         * containers.h (GTM::vector::set_size): New.
642 2012-01-14  Torvald Riegel  <triegel@redhat.com>
644         PR libitm/51855
645         * config/generic/tls.h (GTM::mask_stack_top): New.
646         (GTM::mask_stack_bottom): Declare.
647         * config/generic/tls.c (GTM::mask_stack_bottom): New.
648         * local.cc (gtm_undolog::rollback): Filter out any updates that
649         overlap the libitm stack.  Add current transaction as parameter.
650         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
651         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
652         * testsuite/libitm.c/stackundo.c: New test.
654 2012-01-10  Richard Henderson  <rth@redhat.com>
656         * libitm_i.h (_Unwind_DeleteException): Declare weak.
657         * eh_cpp.cc (_Unwind_DeleteException): Define for
658         !HAVE_ELF_STYLE_WEAKREF.
660 2012-01-08  Torvald Riegel  <triegel@redhat.com>
662         * local.cc (GTM_LB): Use GTM::gtm_undolog.
663         (GTM::gtm_thread::drop_references_undolog): Remove.
664         (GTM::gtm_thread::commit_undolog,
665         GTM::gtm_thread::rollback_undolog): Move to ...
666         * libitm_i.h (GTM::gtm_undolog): ...here. New.
667         (GTM::gtm_undolog_entry): Remove.
668         (GTM::gtm_thread): Adapt.
669         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
670         (GTM::gtm_thread::trycommit): Adapt.
671         * method-serial.cc (serial_dispatch::log): Adapt.
672         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
673         (gl_wt_dispatch::store): Fix likely/unlikely.
674         * containers.h (GTM::vector::resize): Add additional_capacity
675         parameter and handle it.
676         (GTM::vector::resize_noinline): New/adapt.
677         (GTM::vector::push): New.
679 2012-01-06  Richard Henderson  <rth@redhat.com>
681         * configure.tgt: Support powerpc-linux and powerpc-darwin.
682         * config/linux/powerpc/futex_bits.h: New file.
683         * config/powerpc/cacheline.h: New file.
684         * config/powerpc/sjlj.S: New file.
685         * config/powerpc/target.h: New file.
686         * config/generic/asmcfi.h (cfi_offset): New.
687         (cfi_restore, cfi_undefined): New.
689 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
691         PR other/51171
692         * testsuite/libitm.c/reentrant.c: Remove xfail.
693         (thread): Pass x to pure().
694         From Patrik Marlier <patrick.marlier@gmail.com>.
696 2011-12-24  Torvald Riegel  <triegel@redhat.com>
698         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
699         privatization safety if already in serial mode.
701 2011-12-24  Torvald Riegel  <triegel@redhat.com>
703         * beginend.cc (GTM::gtm_thread::restart): Add and handle
704         finish_serial_upgrade parameter.
705         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
706         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
707         Don't unset reader flag.
708         (GTM::gtm_rwlock::write_upgrade_finish): New.
709         * config/posix/rwlock.cc: Same.
710         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
711         Declare.
712         * config/posix/rwlock.h: Same.
713         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
714         flag after commit or after rollback when restarting.
716 2011-12-24  Torvald Riegel  <triegel@redhat.com>
718         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
719         (GTM::gtm_thread::try_commit): Changed memory order.
720         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
721         as parameter.
722         * config/linux/x86/futex_bits.h (sys_futex0): Same.
723         * config/linux/sh/futex_bits.h (sys_futex0): Same.
724         * config/linux/futex_bits.h (sys_futex0): Same.
725         * config/linux/futex.cc (futex_wait, futex_wake): Same.
726         * config/linux/futex.h (futex_wait, futex_wake): Same.
727         * config/linux/rwlock.h (gtm_rwlock::writers,
728         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
729         ints.
730         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
731         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
732         gtm_rwlock::write_unlock): Fix memory orders and fences.
733         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
734         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
735         gtm_rwlock::write_unlock): Same.
736         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
737         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
738         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
739         Add comments.
740         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
741         gl_wt_dispatch::load, gl_wt_dispatch::store,
742         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
743         orders and fences.  Add comments.
745 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
747         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
748         * Makefile.in: Regenerated.
750 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
752         * configure.tgt: Add sh* case.
753         * config/sh/target.h: New file.
754         * config/sh/sjlj.S: New file.
755         * config/linux/sh/futex_bits.h: New file.
757 2011-12-14  Richard Henderson  <rth@redhat.com>
759         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
760         * config/arm/sjlj.S, config/arm/target.h: New files.
761         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
762         (cfi_rel_offset): New.
763         * config/linux/futex_bits.h: New file.
764         * config/linux/futex.cc: Include futex_bits.h here...
765         * config/linux/futex.h: ... not here.
766         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
767         * configure.ac (ARCH_AM): New conditional.
768         * Makefile.in, configure: Rebuild.
769         * configure.tgt: Handle ARM.
771 2011-12-13  Richard Henderson  <rth@redhat.com>
773         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
774         signed/unsigned comparison werror.
776         * local_atomic: New file.
777         * libitm_i.h: Include it.
778         (gtm_thread::shared_state): Use atomic template.
779         * beginend.cc (GTM::gtm_clock): Use atomic template.
780         (global_tid): Use atomic template if 64-bit atomics available.
781         (gtm_thread::gtm_thread): Update shared_state access.
782         (gtm_thread::trycommit): Likewise.
783         (choose_code_path): Update global_tid access.
784         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
785         * stmlock.h (GTM::gtm_clock): Use atomic template.
786         (gtm_get_clock, gtm_inc_clock): Update accesses.
787         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
788         redundant __sync_synchronize after atomic shared_state access.
789         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
790         (gtm_rwlock::write_lock_generic): Likewise.
791         (gtm_rwlock::read_unlock): Likewise.
792         * config/alpha/target.h (atomic_read_barrier): Remove.
793         (atomic_write_barrier): Remove.
794         * config/x86/target.h (atomic_read_barrier): Remove.
795         (atomic_write_barrier): Remove.
797 2011-11-30  Richard Henderson  <rth@redhat.com>
799         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
800         * beginend.c (_ITM_abortTransaction): Update to match.
801         (GTM::gtm_thread::restart): Likewise.
802         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
803         * config/x86/sjlj.S (GTM_longjmp): Likewise.
805 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
807         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
808         * Makefile.in: Regenerate.
810 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
812         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
813         * alloc_cpp.cc: Generate dummy functions if we don't
814         HAVE_ELF_STYLE_WEAKREF.
815         * eh_cpp.cc: Likewise.
816         * configure: Regenerate.
817         * aclocal.m4:  Likewise.
818         * config.h.in: Likewise.
819         * Makefile.in: Likewise.
820         * testsuite/Makefile.in: Likewise.
822 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
824         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
825         __USER_LABEL_PREFIX__ for targets that use it.
826         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
827         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
828         in portability to non-elf targets.
829         (GTM_longjmp): Likewise.
830         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
831         where required.
833 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
835         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
836         * testsuite/libitm.c/memset-1.c: Likewise.
838 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
840         * configure: Regenerate.
842 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
844         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
845         (LIBITM_ENABLE_SYMVERS): Handle sun style.
846         * Makefile.am: Handle sun style versioning.
847         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
848         * configure: Regenerate.
849         * Makefile.in: Regenerate.
851 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
853         * config/generic/asmcfi.h: Fix comment.
854         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
855         sequence without .hidden support, error for non-ELF targets.
856         (GTM_longjmp) [__ELF__]: Only use .hidden if
857         HAVE_ATTRIBUTE_VISIBILITY.
859 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
861         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
862         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
863         Dummy functions.
864         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
865         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
867 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
869         PR bootstrap/51098
870         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
871         * configure: Regenerate.
873 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
875         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
877 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
879         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
880         .hidden.
881         (.note.GNU-stack): Only use if __linux__.
882         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
883         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
884         * testsuite/libitm.c/reentrant.c: Likewise.
885         * testsuite/libitm.c/simple-2.c: Likewise.
886         * testsuite/libitm.c/txrelease.c: Likewise.
887         * testsuite/libitm.c++/static_ctor.C: Likewise.
889 2011-11-10  Richard Henderson  <rth@redhat.com>
891         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
892         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
893         * configure.ac (ARCH_X86_AVX): New conditional.
894         * Makefile.in, configure: Rebuild.
896 2011-11-09  Richard Henderson  <rth@redhat.com>
898         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
899         * configure.ac: Use it.
900         * config.h.in, configure: Rebuild.
901         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
903 2011-11-09  Richard Henderson  <rth@redhat.com>
905         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
906         * config/alpha/unaligned.h: Remove file.
907         * config/generic/unaligned.h: Remove file.
908         * config/x86/unaligned.h: Remove file.
909         * config/generic/cachepage.h: Remove file.
910         * config/posix/cachepage.cc: Remove file.
911         * config/generic/cacheline.cc: Remove file.
912         * config/x86/cacheline.cc: Remove file.
913         * config/generic/cacheline.h (gtm_cacheline): Remove the
914         store_mask, copy_mask, copy_mask_wb methods.
915         * config/x86/cacheline.h: Likewise.
916         * config/alpha/cacheline.h: Fall back to generic after setting size.
917         * config/generic/tls.cc (gtm_mask_stack): Remove.
918         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
919         (GTM_vpalignr_table): Remove.
920         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
921         (GTM_pshift_table): Remove.
922         * config/libitm_i.h: Don't include cachepage.h.
923         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
924         * Makefile.in, testsuite/Makefile.in: Rebuild.
926 2011-11-09  Richard Henderson  <rth@redhat.com>
928         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
929         to emit branch prediction hint.
931         * config/x86/sjlj.S: Protect elf directives with __ELF__.
932         Protect .note.GNU-stack with __linux__.
934         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
935         * configure, aclocal.m4, config.h.in: Rebuild.
936         * config/generic/asmcfi.h: New file.
937         * config/x86/sjlj.S: Use it.
939 2011-11-08  Richard Henderson  <rth@redhat.com>
941         * local.cc (_ITM_LB): Use a normal call, not a function alias.
943 2011-11-08  Richard Henderson  <rth@redhat.com>
945         * configure.tgt: Test correct directory for supported cpus.
947         * configure.ac: Exit if unsupported.
948         * configure: Rebuild.
949         * configure.tgt: Delete boilerplate from libgomp for unsupported
950         targets.  Set UNSUPPORTED for unsupported targets.
952 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
954         * configure.tgt: Handle i386 like i[456]86.
955         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
956         take address.
957         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
958         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
960 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
962         * method-wbetl.cc: Update copyright notice.
963         * aatree.cc: Same.
964         * util.cc: Same.
965         * libitm.h: Same.
966         * memset.cc: Same.
967         * eh_cpp.cc: Same.
968         * barrier.tpl: Same.
969         * useraction.cc: Same.
970         * stmlock.h: Same.
971         * memcpy.cc: Same.
972         * common.h: Same.
973         * config/generic/tls.cc: Same.
974         * config/generic/cacheline.h: Same.
975         * config/generic/cachepage.h: Same.
976         * config/generic/cacheline.cc: Same.
977         * config/generic/unaligned.h: Same.
978         * config/x86/cacheline.h: Same.
979         * config/x86/cacheline.cc: Same.
980         * config/x86/unaligned.h: Same.
981         * config/alpha/cacheline.h: Same.
982         * config/alpha/unaligned.h: Same.
983         * config/alpha/sjlj.S: Same.
984         * config/posix/cachepage.cc: Same.
985         * config/linux/futex.h: Same.
986         * config/linux/alpha/futex_bits.h: Same.
988 2011-11-04  Torvald Riegel  <triegel@redhat.com>
990         * libitm.texi: No cover text and invariant sections.
992 2011-11-03  Richard Henderson  <rth@redhat.com>
994         * local_type_traits: New file.
995         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
997 2011-11-03  Richard Henderson  <rth@redhat.com>
999         * configure.ac: Don't test for gfortran.
1000         * configure: Rebuild.
1002         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
1003         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
1005 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
1007         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
1008         * testsuite/libitm.c/memset-1.c: Same.
1009         * testsuite/libitm.c/c.exp: Same.
1010         * testsuite/lib/libitm-dg.exp: Same.
1011         * testsuite/lib/libitm.exp: Same.
1012         * testsuite/libitm.c++/c++.exp: Same.
1014 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
1016         * testsuite/config/default.exp: Update copyright date.
1017         * configure.ac: Add copyright info.
1018         * configure.tgt: Same.
1020 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
1022         * testsuite/libitm.c/reentrant.c: XFAIL.
1023         * testsuite/libitm.c++/static_ctor.C: XFAIL.
1025 2011-10-29  Torvald Riegel  <triegel@redhat.com>
1027         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
1028         handle aborts.
1029         (_ITM_abortTransaction): Handle aborts of outer transactions.
1030         * libitm_i.h: Same.
1031         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
1032         * libitm.texi: Document aborts of outer transactions.
1033         * testsuite/libitm.c/cancel.c: New file.
1035 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1037         * testsuite/*: Change __transaction to __transaction_atomic or
1038         __transaction_relaxed.
1040 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1042         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
1043         (gtm_thr): Same.
1045 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1047         * libitm_i.h: Add gl_wt dispatch.
1048         * retry.cc (parse_default_method): Same.
1049         * method-gl.cc: New file.
1050         * Makefile.am: Use method-gl.cc.
1051         * Makefile.in: Rebuild.
1053 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1055         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
1056         safety if requested by a TM method.
1057         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
1058         privatization safety.
1059         * method-serial.cc: Same.
1061 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1063         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
1064         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
1065         undolog-related member functions from *_local to *_undolog.
1066         * local.cc (gtm_thread::commit_undolog): Same.
1067         * beginend.cc (GTM::gtm_thread::trycommit): Same.
1068         (GTM::gtm_thread::rollback): Roll back undolog before
1069         dispatch-specific rollback.
1071 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1073         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
1074         re-initialization of the current method group.
1075         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
1077 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1079         * alloc.cc (commit_allocations_2): Do not free transaction-local
1080         memory when committing a nested transaction.
1082 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1084         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
1085         serial-irrevocable dispatch, not serial.
1087 2011-10-19  Torvald Riegel  <triegel@redhat.com>
1089         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
1090         declarations.
1091         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
1092         * method-serial.cc: Implement begin_or_restart().
1093         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
1094         dispatch-specific begin_or_restart().
1095         (GTM::gtm_thread::restart): Same.
1097 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1099         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
1100         restarting without switching to serial mode.
1101         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
1102         transaction state. Choose closed-nesting alternative if available.
1103         (GTM::gtm_thread::set_default_dispatch): New.
1104         (parse_default_method): New.
1105         (GTM::gtm_thread::number_of_threads_changed): New.
1106         * method-serial.cc (GTM::serial_mg): New method group class.
1107         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
1108         fini.
1109         (GTM::serial_dispatch): Same.
1110         (GTM::serialirr_onwrite_dispatch): Same.
1111         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
1112         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
1113         registered threads.
1114         (GTM::gtm_thread::gtm_thread): Same.
1115         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
1116         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
1117         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
1118         choose dispatch but set state according to dispatch here.
1119         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
1120         (GTM::method_group): New class.
1121         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
1122         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
1123         * libitm.texi: Document TM methods, method groups, method life cycle.
1124         Rename method sets to method groups.
1126 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1128         * config/x86/tls.h: Moved to ...
1129         * config/linux/x86/tls.h: ... here.
1131 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1133         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
1134         Add X32 support.
1135         * config/x86/sjlj.S: Same.
1137 2011-08-19  Torvald Riegel  <triegel@redhat.com>
1139         * config/linux/rwlock.h: New file.
1140         * config/linux/rwlock.c: New file.
1141         * configure.ac: Reenable futex support (undo SVN rev 157758).
1142         * Makefile.am: Same.
1143         * configure.tgt: Same.
1144         * config/linux/alpha/futex_bits.h: Same.
1145         * config/linux/futex.h: Same. Return number of woken processes.
1146         * config/linux/futex.cc: Same.
1147         (futex_wait): Remove spinning.
1148         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
1149         Use __x86_64__ instead of __LP64__.
1150         * aclocal.m4: Include generic futex checks.
1151         * configure: Rebuild.
1152         * Makefile.in: Rebuild.
1153         * testsuite/Makefile.in: Rebuild.
1154         * beginend.cc: Include pthread.h.
1155         * config/posix/cachepage.cc: Same.
1157 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1159         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1160         (abi_disp, set_abi_disp): Move to tx's TLS slot.
1161         (set_gtm_thr): New.
1162         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1163         (set_gtm_thr): New.
1164         (GTM::gtm_thread::thread_num): Removed.
1165         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
1166         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
1167         tx-to-thread renaming.
1168         * beginend.cc: Adapted to tx-to-thread renaming.
1169         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
1170         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
1171         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
1172         gtm_transaction to gtm_thread.
1173         (_ITM_getThreadnum): Removed. Not supported anymore.
1174         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
1175         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
1176         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
1177         gtm_tx-to-gtm_thr renaming if necessary.
1178         * eh_cpp.cc: Same.
1179         * local.cc: Same.
1180         * retry.cc: Same.
1181         * clone.cc: Same.
1182         * alloc.cc: Same.
1183         * alloc_c.cc: Same.
1184         * alloc_cpp.cc: Same.
1185         * method-serial.cc: Same.
1186         * config/generic/tls.cc: Same.
1187         * config/posix/rwlock.h (gtm_rwlock): Same.
1188         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
1190 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1192         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
1193         implementation.
1194         (gtm_rwlock::read_unlock): Same.
1195         (gtm_rwlock::write_lock_generic): New. Generalized from ...
1196         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
1197         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
1198         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
1199         w_upgrade. Replaced by per-transaction flags (in shared_state).
1200         Added c_confirmed_writers.
1201         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
1202         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
1203         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1204         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
1205         * beginend.cc (GTM::gtm_transaction::begin_transaction,
1206         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
1207         * libitm.texi: Document locking conventions and implementations in
1208         libitm.
1210 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1212         * libitm_i.h (next_tx): Add list of all threads' transaction.
1213         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
1214         transaction with list of transactions and ...
1215         (thread_exit_handler): ... deregister here.
1216         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
1217         * config/x86/target.h: Same.
1219 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1221         * testsuite/libitm.c++/static_ctor.C: New file.
1223 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1225         * testsuite/libitm.c/reentrant.c: New file.
1227 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1229         * config/generic/tls.h: Remove the free list for transactions and ...
1230         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
1231         (GTM::gtm_transaction::operator delete): ... and release here.
1232         (thread_exit_handler): New. Delete tx when thread terminates.
1233         (thread_exit_init): New.
1234         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
1235         * testsuite/libitm.c/txrelease.c: New file.
1237 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1239         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
1240         * testsuite/libitm.c/notx.c: New file.
1242 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1244         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
1245         * libitm_i.h (local_tid): ... to here.
1246         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1247         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
1249 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1251         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
1252         serialirr_onwrite_dispatch as new default for now.
1253         * method-serial.cc (serialirr_onwrite_dispatch): New.
1254         (GTM::dispatch_serialirr_onwrite): New.
1255         * libitm_i.h: Same.
1257 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1259         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
1260         * query.cc (_ITM_getTransactionId): There is no active transaction if
1261         the current nesting level is zero.
1263 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1265         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
1266         rollback.
1268 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1270         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
1271         transaction properties from the caller instead of from the
1272         transaction object.
1273         * libitm_i.h: Same.
1274         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1276 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1278         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
1279         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
1280         * dispatch.h: Same.
1281         * method-serial.cc: Same.
1282         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
1283         flat nesting as default, and closed nesting on demand.
1284         (GTM::gtm_transaction::rollback): Same.
1285         (_ITM_abortTransaction): Same.
1286         (GTM::gtm_transaction::restart): Same.
1287         (GTM::gtm_transaction::trycommit): Same.
1288         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
1289         (choose_code_path): New.
1290         (GTM::gtm_transaction_cp::save): New.
1291         (GTM::gtm_transaction_cp::commit): New.
1292         * query.cc (_ITM_inTransaction): Support flat nesting.
1293         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
1294         (GTM::gtm_transaction): Support flat and closed nesting.
1295         * alloc.cc (commit_allocations_2): New.
1296         (commit_cb_data): New helper struct.
1297         (GTM::gtm_transaction::commit_allocations): Handle nested
1298         commits/rollbacks.
1299         * libitm.texi: Update user action section, add description of nesting.
1301 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1303         * libitm_i.h: Add closed nesting as restart reason.
1304         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1306 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1308         * useraction.cc: Use vector instead of list to store actions.
1309         Also support partial rollbacks for closed nesting.
1310         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
1311         * beginend.cc: Same.
1313 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1315         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
1316         closed_nesting flags, as well as a closed nesting alternative.
1317         * method-serial.cc: Same.
1318         (serial_dispatch): Renamed to serialirr_dispatch.
1319         (GTM::dispatch_serialirr): Same.
1320         (serial_dispatch_ul): Renamed to serial_dispatch.
1321         (GTM::dispatch_serial): Same.
1323 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1325         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
1327 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1329         * aatree.h (aa_tree::remove): New.
1330         (aa_tree::operator new): Add placement new.
1332 2011-07-02  Torvald Riegel  <triegel@redhat.com>
1334         * containers.h: New file.
1335         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
1336         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
1337         * common.h: ... to here.
1338         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
1339         * local.cc: Same.
1341 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1343         * libitm_i.h (STATE_ABORTING): Remove.
1344         * beginend.cc (_ITM_abortTransaction): Same.
1345         (GTM::gtm_transaction::trycommit_and_finalize): Same.
1346         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
1347         (_ITM_rollbackTransaction): Remove.
1348         * beginend.cc: Same.
1349         * libitm.map: Same.
1350         * libitm.texi: Document these ABI changes.
1352 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1354         * libitm.texi: New file.
1355         * Makefile.am: Add libitm.texi.
1356         * Makefile.in: Rebuild.
1358 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1360         * libitm_i.h: Move parts to common.h and dispatch.h.
1361         * common.h: New file.
1362         * dispatch.h: New file, new dispatch class.
1363         Rename GTM::abi_dispatch::lock_type to ls_modifier.
1364         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
1365         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
1366         decision to retry.cc.
1367         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
1368         only.
1369         (GTM::gtm_transaction::decide_begin_dispatch): Same.
1370         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1371         logging.
1372         * barrier.cc: Use new barriers definitions.
1373         (abi_dispatch::memmove_overlap_check): New.
1374         * config/x86/x86_sse.cc: Same.
1375         * config/x86/x86_avx.cc: Same.
1376         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1377         memcpy.cc.
1378         * Makefile.in: Rebuild.
1379         * method-readonly.cc: Remove.
1380         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1381         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1383 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1385         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1386         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1387         * testsuite/libitm.c/dropref-2.c: Same.
1388         * testsuite/libitm.c/dropref.c: Same.
1390 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1392         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1393         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1394         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1395         * alloc_c.cc: Same.
1396         * barrier.tpl: Same.
1397         * beginend.c: Same.
1398         * config/generic/tls.h: Same.
1399         * config/x86/tls.h: Same.
1400         * libitm_i.h: Same.
1401         * memcpy.cc: Same.
1402         * memset.cc: Same.
1403         * method-readonly.cc: Same.
1404         * method-serial.cc: Same.
1405         * method-wbetl.cc: Same.
1406         * retry.cc: Same.
1408 2011-03-03  Richard Henderson  <rth@redhat.com>
1410         * config/posix/rwlock.cc (write_upgrade): Add missing case.
1411         From Patrik Marlier <patrick.marlier@unine.ch>.
1413 2011-02-03  Richard Henderson  <rth@redhat.com>
1415         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1416         * configure.ac: Use it.
1417         * configure, config.h.in: Rebuild.
1418         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1419         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1420         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1421         * libitm.map: Use wildcards to match size_t mangling.
1423 2010-12-14  Richard Henderson  <rth@redhat.com>
1425         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1426         blocks of TIDs per thread.
1427         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1428         (setup_gtm_thr): Return the thread structure.
1429         * config/x86/tls.h (setup_gtm_thr): Likewise.
1431 2010-12-14  Richard Henderson  <rth@redhat.com>
1433         * clone.cc (table_lock): Remove.
1434         (find_clone): Don't take it.
1435         (ExcludeTransaction): New helper class.
1436         (_ITM_registerTMCloneTable): Use it.
1437         (_ITM_deregisterTMCloneTable): Likewise.
1439 2010-12-14  Richard Henderson  <rth@redhat.com>
1441         * config/x86/tls.h: New file.
1443 2010-07-15  Richard Henderson  <rth@redhat.com>
1445         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1446         * Makefile.in: Rebuild.
1448 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1450         * method-wbetl.cc (trydropreference): Fix source line.
1452 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1454         * libitm.h: Add comment.
1455         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1457 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
1459         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1460         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1461         available, use pthread mutexes.
1462         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1463         * config.h.in: Regenerate.
1464         * configure: Regenerate.
1466 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
1468         * libitm.h (ITM_PURE): Define.
1469         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1471 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1473         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1474         (validate): Add comment.
1475         (trydropreference): New.
1476         * method-readonly.cc (class readonly_dispatch): Add
1477         trydropreference.
1478         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1479         Call trydropreference().
1480         * libitm.h (_ITM_dropReferences): Remove const attribute.
1481         * method-serial.cc (class serial_dispatch): Add trydropreference.
1482         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1484 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1486         * memcpy.cc (do_memcpy): Comment.
1488 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
1490         * barrier.tpl: Add comments throughout.
1492 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1494         * method-wbetl.cc (struct w_entry): Add comments.
1495         (trycommit): Same.
1496         (rollback): Same.
1498 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1500         * alloc_c.cc (_ITM_dropReferences): New.
1501         * libitm.map (_ITM_dropReferences): Add.
1502         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1503         * libitm_i.h (struct gtm_transaction): Declare
1504         drop_references_allocations and drop_references_local.
1505         * local.cc (rollback_local): Ignore memory when applicable.
1506         (drop_references_local): New.
1508 2010-06-23  Richard Henderson  <rth@redhat.com>
1510         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1511         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1512         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1513         * config/alpha/target.h: Likewise.
1514         * config/generic/tls.cc (gtm_mask_stack): Use it.
1516 2010-06-23  Richard Henderson  <rth@redhat.com>
1518         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1519         a mutex instead of trying a lock-free compare-and-swap on the list.
1520         (gtm_cacheline_page::operator delete): Likewise.
1522 2010-06-16  Richard Henderson  <rth@redhat.com>
1524         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1525         that overlap the libitm stack.
1526         * barrier.tpl: Mark incoming stack.
1527         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1528         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1529         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1530         * memcpy.cc, memset.cc: Likewise.
1531         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1532         * config/generic/tls.h (gtm_thread): Add stack_top member.
1533         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1534         * libitm_i.h (gtm_mask_stack): Declare.
1535         * config/generic/tls.cc: New file.
1536         * Makefile.am (libitm_la_SOURCES): Add it.
1537         (AM_CXXFLAGS): Turn off exceptions.
1538         * Makefile.in: Rebuild.
1540 2010-06-16  Richard Henderson  <rth@redhat.com>
1542         * alloc.cc (struct gtm_alloc_action): Move definition ...
1543         * libitm_i.h: ... here.
1544         (class gtm_transaction): Declare new and delete.
1545         * beginend.cc (alloc_tx): Reformulate as operator new.
1546         (free_tx): Reformulate as operator delete.
1547         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1549 2010-06-11  Richard Henderson  <rth@redhat.com>
1551         * clone.cc (clone_entry_compare): Fix typo.
1552         From Patrik Marlier <patrick.marlier@unine.ch>.
1554 2010-05-13  Richard Henderson  <rth@redhat.com>
1556         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1557         in extern "C".
1559 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
1561         * libitm_i.h (struct gtm_transaction): Remove
1562         get_allocation_size.
1563         (record_allocation): Remove size parameter.
1564         * libitm.map (_ITM_realloc): Remove.
1565         * alloc_c.cc (_ITM_realloc): Remove.
1566         (_ITM_malloc): Remove size argument to record_allocation.
1567         (_ITM_calloc): Same.
1568         * alloc_cpp.cc (_ZGTtnwm): Same.
1569         (_ZGTtnwmRKSt9nothrow_t): Same.
1570         (_ZGTtnam): Same.
1571         (_ZGTtnamRKSt9nothrow_t): Same.
1572         * alloc.cc (struct gtm_alloc_action): Remove size.
1573         (get_allocation_size): Remove.
1574         (commit_allocations): Add comment.
1575         (record_allocation): Remove size parameter.
1576         (forget_allocation): Remove set of size.
1578 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
1580         * Makefile.am (abi_version): New.
1581         (AM_CXXFLAGS): Pass abi_version.
1582         * Makefile.in: Regenerate.
1583         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1585 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1587         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1588         _ITM_getTMCloneOrIrrevokable.
1589         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1590         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1592 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1594         * configure.ac: Remove Linux futex support.
1595         * configure.tgt (config_path): Same.
1596         * Makefile.am: Same.
1597         * config/linux: Remove entire directory.
1598         * configure: Rebuild.
1599         * Makefile.in: Rebuild.
1600         * testsuite/Makefile.in: Rebuild.
1602 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1604         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1605         switching to serial mode.
1606         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1608 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1610         * configure.tgt: Add emacs -*- tags.
1611         * barrier.tpl: Same.
1613 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1615         * Makefile.am: Rename serial.cc to method-serial.cc.
1616         * Makefile.in: Regenerate with automake 1.11.1.
1617         * testsuite/Makefile.in: Same.
1618         * aclocal.m4: Regenerate with aclocal 1.11.1.
1619         * method-serial.cc: Rename from serial.cc.
1620         * libitm_i.h (struct gtm_transaction): Update comment on
1621         serialirr_mode.
1623 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1625         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1626         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1628 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1630         * configure: Rebuild.
1632 2009-11-12  Richard Henderson  <rth@redhat.com>
1634         * Rewrite everything in C++.
1636 2009-11-03  Richard Henderson  <rth@redhat.com>
1638         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1639         * Makefile.am (libitm_la_SOURCES): Add them.
1640         * configure.ac (ARCH_X86): New conditional.
1641         * Makefile.in, configure: Rebuild.
1642         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1643         Move futex setup into "other system configury" case.
1644         * local.c (rollback_local): Merge into ...
1645         (GTM_rollback_local): ... here.
1646         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1647         (_ITM_LB): Define as an alias to GTM_LB.
1649 2009-11-03  Richard Henderson  <rth@redhat.com>
1651         * method-readonly.c: New file.
1652         * Makefile.am (libitm_la_SOURCES): Add it.
1653         * Makefile.in: Rebuild.
1654         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1655         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1656         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1657         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1658         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1659         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1660         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1661         gtm_get_clock, gtm_inc_clock): New.
1662         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1663         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1664         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1665         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1666         replace uses with new libitm_i.h symbols.
1667         (dispatch_wbetl): Rename from wbetl_dispatch.
1668         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1669         away from dispatch_readonly; abort if the beginTransaction call
1670         asserted that the transaction was readonly.
1672 2009-11-03  Richard Henderson  <rth@redhat.com>
1674         * memset.c: New file.
1675         * Makefile.am (libitm_la_SOURCES): Add it.
1676         * Makefile.in: Rebuild.
1677         * testsuite/libitm.c/memset-1.c: New.
1679 2009-11-03  Richard Henderson  <rth@redhat.com>
1681         * dispatch.c: Remove file.
1682         * useraction.c (struct gtm_user_action): Move from libitm.h.
1683         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1684         (serial_memset, serial_memmove, serial_memcpy): Remove.
1685         (serial_W*, serial_R*): Remove.
1686         (serial_dispatch): Update to match.
1687         * configure.ac: Move Werror down below configure checks.  Don't
1688         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1689         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1690         Use GCC_AC_FUNC_MMAP_BLACKLIST
1691         * libitm.h: Split out all internal items to...
1692         * libitm_i.h: ... here.  New file.
1693         * copymask.c: New file.
1694         * local.c (struct gtm_local_undo): Move from libitm.h.
1695         (GTM_alloc_local): Rename from alloc_local; export.
1696         * memcpy.c: New file.
1697         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1698         * config/posix/page.c: New file.
1699         * config/posix/target_tls.h: Remove file.
1700         * barrier.c: New file.
1701         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1702         copymask.c, page.c.
1703         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1704         * method-wbetl.c: Rewrite for new cacheline methods.
1705         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1707         * config/alpha/sjlj.S: Fix typo.
1708         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1709         * config/alpha/copymask.c: New file.
1710         * config/alpha/target.h (CACHELINE_SIZE): New.
1711         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1713         * config/x86/target_i.h: Copy functions from x86/target.h.
1714         * config/x86/copymask.c: New file.
1715         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1716         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1717         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1718         * config/x86/target_tls.h: Move contents to target_i.h.
1720         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1721         * testsuite/libitm.c/memcpy-1.c: New.
1723 2009-10-22  Richard Henderson  <rth@redhat.com>
1725         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1726         (AM_CCASFLAGS): New.
1727         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1728         saving/restoring _AC_ARG_VAR_PRECIOUS.
1729         * Makefile.in, aclocal.m4, config.h.in, configure,
1730         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1732 2009-10-22  Richard Henderson  <rth@redhat.com>
1734         * testsuite/*: Update for new compiler syntax.
1736 2009-10-21  Richard Henderson  <rth@redhat.com>
1738         * libitm.h (_ITM_abortReason): Add outerAbort.
1740 2009-08-03  Richard Henderson  <rth@redhat.com>
1742         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1743         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1744         * method-wbetl.c (struct w_entry): Remove mask.
1745         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1746         adjust all callers.
1748 2009-07-22  Richard Henderson  <rth@redhat.com>
1750         * eh_cpp.c: New file.
1751         * Makefile.am (libitm_la_SOURCES): Add it.
1752         * Makefile.in: Rebuild.
1753         * beginend.c (GTM_rollback_transaction): Undo exception state.
1754         (GTM_trycommit_transaction): Mark inline.
1755         (GTM_trycommit_and_finalize_transaction): Split out from ...
1756         (_ITM_commitTransaction): ... here.
1757         (_ITM_commitTransactionEH): New function.
1758         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1759         cxa_unthrown, eh_in_flight; reorder.
1761         * testsuite/libitm.c++/c++.exp: New.
1762         * testsuite/libitm.c++/eh-1.C: New.
1764         * aatree.c (aa_free): Remove REGPARM.
1765         * aatree.h: Remove all REGPARM.
1767 2009-07-18  Richard Henderson  <rth@redhat.com>
1769         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1770         * Makefile.am (libitm_la_SOURCES): Add them.
1771         * Makefile.in: Rebuild.
1772         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1773         (GTM_trycommit_transaction): Likewise.
1774         * libitm.h: Include aatree.h
1775         (struct gtm_alloc_action): New.
1776         (struct gtm_transaction): Add alloc_actions.
1777         (GTM_record_allocation, GTM_forget_allocation): Declare.
1778         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1779         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1780         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1781         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1782         _ZGTtdaPvRKSt9nothrow_t): Export.
1784 2009-07-18  Richard Henderson  <rth@redhat.com>
1786         * target_tls.h: Move ...
1787         * config/posix/target_tls.h: ... here.
1789 2009-07-07  Richard Henderson  <rth@redhat.com>
1791         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1793 2009-07-07  Richard Henderson  <rth@redhat.com>
1795         * Update to GPL3.
1797 2009-07-07  Richard Henderson  <rth@redhat.com>
1799         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1800         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1802         * configure.tgt: Don't use -ftls-model for x86 linux.
1803         * libitm.h: Include target.h after standard includes.
1804         (_gtm_thr): Rename from gtm_thr.
1805         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1806         (gtm_disp, set_gtm_disp): New.
1807         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1808         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1809         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1811 2009-07-07  Richard Henderson  <rth@redhat.com>
1813         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1815 2009-07-06  Richard Henderson  <rth@redhat.com>
1817         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1818         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1819         (_ITM_beginTransaction): Take variadic arguments.
1820         (_ITM_registerThrownObject): Declare.
1821         * beginend.c, serial.c: Update.
1822         * libitm.map: Add _ITM_registerThrownObject.
1824 2009-01-28  Richard Henderson  <rth@redhat.com>
1826         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1827         * Makefile.in: Rebuild.
1828         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1829         (GTM_restart_transaction): Fix uninstrumented code check.
1830         * retry.c (GTM_decide_retry_strategy): Add serial check.
1831         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1832         automatically go irrevokable when in serial mode.
1833         * clone.c: New file.
1834         * libitm.h, libitm.map: Update.
1836 2009-01-27  Richard Henderson  <rth@redhat.com>
1838         * Makefile.am (LTCCASCOMPILE): Define.
1839         (libitm_la_SOURCES): Add methid-wbetl.c.
1840         * testsuite/Makefile.am: New
1841         * configure.ac: Add testsuite/Makefile.
1842         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1843         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1844         (_ITM_abortTransaction): Finalize implementation method; pass
1845         transaction properties to longjmp.
1846         (GTM_restart_transaction): Split out from ...
1847         (_ITM_commitTransaction): ... here.
1848         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1849         Move to config/x86/target.h.
1850         * config/linux/alpha/futex_bits.h: New.
1851         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1852         * config/x86/target.h: Disable target types for 32-bit.
1853         * config/alpha/sjlj.S, config/alpha/target.h: New.
1854         * libitm.h (struct gtm_dispatch): Add init, fini.
1855         (enum restart_reason): New.
1856         (struct gtm_transaction): Add method and restarts.
1857         * retry.c (GTM_decide_retry_strategy): Implement.
1858         * serial.c (serial_init, serial_fini): New.
1859         (GTM_serialmode): Finialize outgoing method.
1860         * method-wbetl.c: New.
1862 2008-12-09  Richard Henderson  <rth@redhat.com>
1864         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1865         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1866         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1867         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1868         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1869         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1870         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1871         * serial.c (serial_R##T, serial_W##T): Likewise.
1873 2008-11-21  Richard Henderson  <rth@redhat.com>
1875         * Initial commit.
1877 Copyright (C) 2008-2016 Free Software Foundation, Inc.
1879 Copying and distribution of this file, with or without modification,
1880 are permitted in any medium without royalty provided the copyright
1881 notice and this notice are preserved.