2015-05-05 Yvan Roux <yvan.roux@linaro.org>
[official-gcc.git] / libitm / ChangeLog
blob78b2de05f6d0f856ba978b6cb722aefe1689d29f
1 2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
3         * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
4         * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
6 2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
8         PR libitm/64360
9         * libitm.c/stackundo.c (test2): Make it static.
10         (test1): Likewise.
12 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
14         Update copyright years.
16 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
18         * libitm.texi: Bump @copying's copyright year.
20 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22         * testsuite/lib/libitm.exp: Load target-utils.exp.
23         Move load of target-supports.exp earlier.
25 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
27         * configure.tgt (x86_64): Tune -m32 multilib to generic.
29 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
31         PR bootstrap/63784
32         * configure: Regenerated.
34 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
36         PR target/63610
37         * configure: Regenerate.
39 2014-10-06  Marek Polacek  <polacek@redhat.com>
41         * testsuite/libitm.c/memcpy-1.c: Declare getpagesize.
42         * testsuite/libitm.c/memset-1.c: Likewise.
44 2014-07-24  Richard Henderson  <rth@redhat.com>
46         * config/aarch64/sjlj.S (_ITM_beginTransaction): Use post-inc
47         addressing mode in epilogue.
49 2014-05-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
51         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
52         -mclear-hwcap instead.
53         * configure: Regenerate.
54         * clearcap.map: Remove.
56 2014-05-21  John Marino  <gnugcc@marino.st>
58         * configure.tgt (*-*-dragonfly*): New target.
60 2014-05-19  Richard Henderson  <rth@redhat.com>
62         * config/aarch64/sjlj.S: New file.
63         * config/aarch64/target.h: New file.
64         * configure.tgt: Enable aarch64.
66 2014-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
68         * config/generic/asmcfi.h: Also check for
69         __GCC_HAVE_DWARF2_CFI_ASM.
71 2013-04-02  Richard Henderson  <rth@redhat.com>
73         * config/alpha/target.h (PAGE_SIZE, FIXED_PAGE_SIZE): Remove.
74         * config/arm/target.h, config/sh/target.h: Likewise.
75         * config/sparc/target.h, config/x86/target.h: Likewise.
77 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
79         * config/linux/futex_bits.h: Include errno.h.
80         (sys_futex0): If syscall returns -1, return -errno rather than
81         -1.
83 2014-03-26  Joseph Myers  <joseph@codesourcery.com>
85         * libitm.texi (Index): Rename to Library Index.
87 2014-01-13  H.J. Lu  <hongjiu.lu@intel.com>
89         PR libitm/53113
90         * Makefile.am (x86_sse.lo): Append -msse to CXXFLAGS.
91         (x86_avx.lo): Append -mavx to CXXFLAGS.
92         * Makefile.in: Regenerate.
94 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
96         Update copyright years
98 2014-01-02  Tobias Burnus  <burnus@net-b.de>
100         * libitm.texi: Bump @copying's copyright year.
102 2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
104         * config/powerpc/sjlj.S [__powerpc64__ && _CALL_ELF == 2]:
105         (FUNC): Define ELFv2 variant.
106         (END): Likewise.
107         (HIDDEN): Likewise.
108         (CALL): Likewise.
109         (BASE): Likewise.
110         (LR_SAVE): Likewise.
112 2013-09-20  Alan Modra  <amodra@gmail.com>
114         * configure: Regenerate.
116 2013-08-30  Torvald Riegel  <triegel@redhat.com>
118         * config/posix/rwlock.cc: Fix initialization order.
120 2013-08-30  Torvald Riegel  <triegel@redhat.com>
122         * libitm_i.h (gtm_thread): Assign an asm name to serial_lock.
123         (htm_fastpath): Assign an asm name.
124         * libitm.h (_ITM_codeProperties): Add non-ABI flags used by custom
125         HTM fast paths.
126         (_ITM_actions): Likewise.
127         * config/x86/target.h (HTM_CUSTOM_FASTPATH): Enable custom fastpath on
128         x86_64.
129         * config/x86/sjlj.S (_ITM_beginTransaction): Add custom HTM fast path.
130         * config/posix/rwlock.h (gtm_rwlock): Update comments.  Move summary
131         field to the start of the structure.
132         * config/linux/rwlock.h (gtm_rwlock): Update comments.
133         * beginend.cc (gtm_thread::begin_transaction): Add retry policy
134         handling for custom HTM fast paths.
136 2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
137         Revert:
138         2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
140         * configure.tgt: Add -msoft-float to XCFLAGS.
142 2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
144         * configure.tgt: Add -msoft-float to XCFLAGS.
146 2013-07-29  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
148         * config/s390/target.h (htm_begin, htm_commit, htm_abort)
149         (htm_transaction_active): Enable zEC12 instructions in the
150         assembler.
151         * configure.tgt: Remove -Wa,-march=zEC12 from XCFLAGS.
153 2013-07-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
155         * acinclude.m4: Add htm asm check for s390.
156         * configure.tgt: Add -mhtm and -Wa,-march=zEC12 to the options.
157         * configure: Regenerate.
158         * config/s390/target.h: Remove __HTM__ check.
159         (htm_available): Call getauxval to get hwcaps and check whether
160         HTM is available or not.
162 2013-07-15  Peter Bergner  <bergner@vnet.ibm.com>
164         * acinclude.m4 (LIBITM_CHECK_AS_HTM): New.
165         * configure.ac: Use it.
166         (AC_CHECK_HEADERS): Check for sys/auxv.h.
167         (AC_CHECK_FUNCS): Check for getauxval.
168         * config.h.in, configure: Rebuild.
169         * configure.tgt (target_cpu): Add -mhtm to XCFLAGS.
170         * config/powerpc/target.h: Include sys/auxv.h and htmintrin.h.
171         (USE_HTM_FASTPATH): Define.
172         (_TBEGIN_STARTED, _TBEGIN_INDETERMINATE, _TBEGIN_PERSISTENT,
173         _HTM_RETRIES) New macros.
174         (htm_abort, htm_abort_should_retry, htm_available, htm_begin, htm_init,
175         htm_begin_success, htm_commit, htm_transaction_active): New functions.
177 2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
179         * config/s390/target.h: Include htmintrin.h.
180         (_HTM_ITM_RETRIES): New macro definition.
181         (htm_available, htm_init, htm_begin, htm_begin_success)
182         (htm_commit, htm_abort, htm_abort_should_retry): New functions.
184 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
185             Cesar Philippidis  <cesar@codesourcery.com>
187         * testsuite/lib/libitm.exp: Reorder lib loads into dependency order.
188         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
189         * testsuite/libitm.c/c.exp: load_gcc_lib gcc-dg.exp.
190         * testsuite/libitm.c++/c++.exp: load_gcc_lib gcc-dg.exp.
192 2013-06-20  Torvald Riegel  <triegel@redhat.com>
194         * query.cc (_ITM_inTransaction): Abort when using the HTM fastpath.
195         (_ITM_getTransactionId): Same.
196         * config/x86/target.h (htm_transaction_active): New.
198 2013-06-20  Torvald Riegel  <triegel@redhat.com>
200         PR libitm/57643
201         * beginend.cc (gtm_thread::begin_transaction): Handle reentrancy in
202         the HTM fastpath.
204 2013-03-31  Gerald Pfeifer  <gerald@pfeifer.com>
206         PR bootstrap/56714
207         * local_atomic (__always_inline): Always define our version.
208         (__calculate_memory_order): Mark inline.
209         (atomic_thread_fence): Ditto.
210         (atomic_signal_fence): Ditto.
211         (atomic_bool::atomic_flag_test_and_set_explicit): Ditto.
212         (atomic_bool::atomic_flag_clear_explicit): Ditto.
213         (atomic_bool::atomic_flag_test_and_set): Ditto.
214         (atomic_bool::atomic_flag_clear): Ditto.
216 2013-04-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
218         * config/s390/sjlj.S: New file.
219         * config/s390/target.h: New file.
220         * configure.tgt: Set options for S/390.
222 2013-03-23  Andi Kleen  <ak@linux.intel.com>
224         * local_atomic (__always_inline): Add.
225         (__calculate_memory_order, atomic_thread_fence,
226          atomic_signal_fence, test_and_set, clear, store, load,
227          exchange, compare_exchange_weak, compare_exchange_strong,
228          fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
229         Add __always_inline to force inlining.
231 2013-02-11  Iain Sandoe  <iain@codesourcery.com>
232             Jack Howarth  <howarth@bromo.med.uc.edu>
233             Patrick Marlier  <patrick.marlier@gmail.com>
235         PR libitm/55693
236         * alloc_cpp.cc: Enable function declarations on darwin.
237         * eh_cpp.cc: Likewise.
239 2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
241         Update copyright years.
243 2012-11-09  Torvald Riegel  <triegel@redhat.com>
245         * beginend.cc (htm_fastpath): New.
246         (gtm_thread::begin_transaction, _ITM_commitTransaction,
247         _ITM_commitTransactionEH): Add HTM fastpath handling.
248         * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
249         * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
250         * config/x86/target.h (htm_available, htm_init, htm_begin_success,
251         htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
252         * configure.tgt: Add -mrtm to XCFLAGS.
253         * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
254         (gtm_thread::serialirr_mode): Add HTM fastpath handling.
255         * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
256         * retry.cc (parse_default_method): Add HTM method parsing.
257         (gtm_thread::number_of_threads_changed): Use HTM by default if
258         available.
260 2012-11-04  Thomas Schwinge  <thomas@codesourcery.com>
262         * configure: Regenerate.
264 2012-10-31  Richard Henderson  <rth@redhat.com>
266         * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
267         * configure.ac: Use it.
268         * config.h.in, configure: Rebuild.
269         * testsuite/Makefile.in: Rebuild.
271 2012-10-24  Torvald Riegel  <triegel@redhat.com>
273         * libitm.texi: Clarify ABI requirements for data-logging functions.
275 2012-10-24  Torvald Riegel  <triegel@redhat.com>
277         * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
278         it requires serial mode instead of assuming that for certain
279         dispatchs.
280         * dispatch.h (abi_dispatch::requires_serial): New.
281         (abi_dispatch::abi_dispatch): Adapt.
282         * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
283         * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
284         * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
285         serial_dispatch::serial_dispatch,
286         serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
288 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
290         * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
291         and ia32 declarations some more.
292         * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
294 2012-09-20  Jakub Jelinek  <jakub@redhat.com>
296         PR other/43620
297         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
298         * configure: Regenerate.
299         * Makefile.in: Regenerate.
301 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
303         * configure: Regenerated.
305 2012-07-31  Uros Bizjak  <ubizjak@gmail.com>
307         * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
309 2012-05-21  Patrick Marlier  <patrick.marlier@gmail.com>
311         * eh_cpp.cc: Fix __cxa_end_catch declaration.
313 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
315         * configure: Regenerated.
317 2012-04-04  H.J. Lu  <hongjiu.lu@intel.com>
319         PR libitm/52854
320         * config/x86/target.h (gtm_jmpbuf): Replace long with long long
321         for x86-64.
323 2012-04-03  Tristan Gingold  <gingold@adacore.com>
325         * configure: Regenerate.
327 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
329         PR bootstrap/52812
330         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
332 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
334         * testsuite/lib/libitm.exp: load fortran-modules.exp
336 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
338         * configure.tgt (*-*-irix6*): Remove.
340 2012-03-13  Torvald Riegel  <triegel@redhat.com>
342         PR libitm/52526
343         * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
344         wake-up.
346 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
348         * configure.tgt (*-*-osf*): Remove.
349         * configure: Regenerate.
351 2012-03-05  Torvald Riegel  <triegel@redhat.com>
353         * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
354         memtransfer/memset if size isn't larger than zero.
356 2012-03-02  Torvald Riegel  <triegel@redhat.com>
358         * libitm.texi: Link to specification and add a usage example.
360 2012-02-24  Torvald Riegel  <triegel@redhat.com>
362         * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
363         default dispatch for more than 1 thread to ml_wt.
365 2012-02-20  Torvald Riegel  <triegel@redhat.com>
367         * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
369 2012-02-20  Torvald Riegel  <triegel@redhat.com>
371         * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
373 2012-02-20  Torvald Riegel  <triegel@redhat.com>
375         * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
376         serial mode corner cases made obsolete by prior gtm_rwlock changes.
377         (gl_wt_dispatch.rollback): Same.
379 2012-02-20  Torvald Riegel  <triegel@redhat.com>
381         * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
383 2012-02-20  Torvald Riegel  <triegel@redhat.com>
385         * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
386         for RfW src.  Optimize number of calls to gtm_thr.
388 2012-02-20  Torvald Riegel  <triegel@redhat.com>
390         * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
391         acquisition to ...
392         * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
393         (default_dispatch): Make atomic.
394         (GTM::gtm_thread::set_default_dispatch): Access atomically.
395         (GTM::gtm_thread::decide_retry_strategy): Access atomically and
396         use decide_begin_dispatch() if default_dispatch might have changed.
397         (GTM::gtm_thread::number_of_threads_changed): Initialize
398         default_dispatch here.
400 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
401             Patrick Marlier  <patrick.marlier@gmail.com>
403         PR libitm/52220
404         * alloc_cpp.cc: No dummy definitions for darwin.
405         * eh_cpp.cc: Likewise.
407 2012-02-14  Richard Henderson  <rth@redhat.com>
409         * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
411 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
413         * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
415 2012-02-14  Torvald Riegel  <triegel@redhat.com>
417         * libitm_i.h (GTM::gtm_rwlog_entry): New.
418         (GTM::gtm_thread): Add read and write logs.
419         (GTM::dispatch_ml_wt): Declare.
420         * retry.cc (parse_default_method): Support ml_wt.
421         * method-ml.cc: New file.
422         * Makefile.am: Add method-ml.cc.
423         * Makefile.in: Regenerate.
425 2012-02-14  Torvald Riegel  <triegel@redhat.com>
427         * dispatch.h (GTM::abi_dispatch::supports): New.
428         (GTM::method_group::reinit): New.
429         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
430         (GTM::gtm_thread::number_of_threads_changed): Check that the method
431         supports the current situation.
433 2012-02-14  Torvald Riegel  <triegel@redhat.com>
435         * util.cc (GTM::xcalloc): New.
436         * common.h (GTM::xcalloc): Declare.
438 2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
440         * config/sparc/target.h (cpu_relax): Read from CC register.
441         * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
443 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
445         * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
447 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
449         * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
450         * config/sparc/cacheline.h: New file.
451         * config/sparc/target.h: Likewise.
452         * config/sparc/sjlj.S: Likewise.
453         * config/linux/sparc/futex_bits.h: Likewise.
455 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
457         * configure.ac (link_itm): Fix comment.
458         * configure: Regenerate.
459         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
461 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
463         PR libitm/51822
464         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
465         Correct libgomp references.
467 2012-01-24  Torvald Riegel  <triegel@redhat.com>
469         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
470         wake-up.
472 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
474         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
475         end of structure.
476         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
477         offset values.  Do not copy return address.  Decrement stack
478         by 56 bytes only.
479         (GTM_longjump) [__x86_64__]: Update offset values.
481 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
483         PR libitm/51830
484         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
485         the first function argument to %eax.
487 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
489         * libitm.h (_ITM_getThreadnum): Remove.
490         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
492 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
494         * clearcap.map: New file.
495         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
496         * configure.ac: Call it.
497         Clear HWCAP_LDFLAGS if defaulting to -mavx.
498         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
499         * configure: Regenerate.
500         * Makefile.in: Regenerate.
501         * testsuite/Makefile.in: Regenerate.
503 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
505         PR libitm/51173
506         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
507         include, exclude options.
509 2012-01-14  Torvald Riegel  <triegel@redhat.com>
511         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
512         rolling back.
513         * containers.h (GTM::vector::set_size): New.
515 2012-01-14  Torvald Riegel  <triegel@redhat.com>
517         PR libitm/51855
518         * config/generic/tls.h (GTM::mask_stack_top): New.
519         (GTM::mask_stack_bottom): Declare.
520         * config/generic/tls.c (GTM::mask_stack_bottom): New.
521         * local.cc (gtm_undolog::rollback): Filter out any updates that
522         overlap the libitm stack.  Add current transaction as parameter.
523         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
524         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
525         * testsuite/libitm.c/stackundo.c: New test.
527 2012-01-10  Richard Henderson  <rth@redhat.com>
529         * libitm_i.h (_Unwind_DeleteException): Declare weak.
530         * eh_cpp.cc (_Unwind_DeleteException): Define for
531         !HAVE_ELF_STYLE_WEAKREF.
533 2012-01-08  Torvald Riegel  <triegel@redhat.com>
535         * local.cc (GTM_LB): Use GTM::gtm_undolog.
536         (GTM::gtm_thread::drop_references_undolog): Remove.
537         (GTM::gtm_thread::commit_undolog,
538         GTM::gtm_thread::rollback_undolog): Move to ...
539         * libitm_i.h (GTM::gtm_undolog): ...here. New.
540         (GTM::gtm_undolog_entry): Remove.
541         (GTM::gtm_thread): Adapt.
542         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
543         (GTM::gtm_thread::trycommit): Adapt.
544         * method-serial.cc (serial_dispatch::log): Adapt.
545         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
546         (gl_wt_dispatch::store): Fix likely/unlikely.
547         * containers.h (GTM::vector::resize): Add additional_capacity
548         parameter and handle it.
549         (GTM::vector::resize_noinline): New/adapt.
550         (GTM::vector::push): New.
552 2012-01-06  Richard Henderson  <rth@redhat.com>
554         * configure.tgt: Support powerpc-linux and powerpc-darwin.
555         * config/linux/powerpc/futex_bits.h: New file.
556         * config/powerpc/cacheline.h: New file.
557         * config/powerpc/sjlj.S: New file.
558         * config/powerpc/target.h: New file.
559         * config/generic/asmcfi.h (cfi_offset): New.
560         (cfi_restore, cfi_undefined): New.
562 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
564         PR other/51171
565         * testsuite/libitm.c/reentrant.c: Remove xfail.
566         (thread): Pass x to pure().
567         From Patrik Marlier <patrick.marlier@gmail.com>.
569 2011-12-24  Torvald Riegel  <triegel@redhat.com>
571         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
572         privatization safety if already in serial mode.
574 2011-12-24  Torvald Riegel  <triegel@redhat.com>
576         * beginend.cc (GTM::gtm_thread::restart): Add and handle
577         finish_serial_upgrade parameter.
578         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
579         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
580         Don't unset reader flag.
581         (GTM::gtm_rwlock::write_upgrade_finish): New.
582         * config/posix/rwlock.cc: Same.
583         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
584         Declare.
585         * config/posix/rwlock.h: Same.
586         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
587         flag after commit or after rollback when restarting.
589 2011-12-24  Torvald Riegel  <triegel@redhat.com>
591         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
592         (GTM::gtm_thread::try_commit): Changed memory order.
593         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
594         as parameter.
595         * config/linux/x86/futex_bits.h (sys_futex0): Same.
596         * config/linux/sh/futex_bits.h (sys_futex0): Same.
597         * config/linux/futex_bits.h (sys_futex0): Same.
598         * config/linux/futex.cc (futex_wait, futex_wake): Same.
599         * config/linux/futex.h (futex_wait, futex_wake): Same.
600         * config/linux/rwlock.h (gtm_rwlock::writers,
601         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
602         ints.
603         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
604         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
605         gtm_rwlock::write_unlock): Fix memory orders and fences.
606         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
607         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
608         gtm_rwlock::write_unlock): Same.
609         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
610         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
611         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
612         Add comments.
613         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
614         gl_wt_dispatch::load, gl_wt_dispatch::store,
615         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
616         orders and fences.  Add comments.
618 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
620         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
621         * Makefile.in: Regenerated.
623 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
625         * configure.tgt: Add sh* case.
626         * config/sh/target.h: New file.
627         * config/sh/sjlj.S: New file.
628         * config/linux/sh/futex_bits.h: New file.
630 2011-12-14  Richard Henderson  <rth@redhat.com>
632         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
633         * config/arm/sjlj.S, config/arm/target.h: New files.
634         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
635         (cfi_rel_offset): New.
636         * config/linux/futex_bits.h: New file.
637         * config/linux/futex.cc: Include futex_bits.h here...
638         * config/linux/futex.h: ... not here.
639         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
640         * configure.ac (ARCH_AM): New conditional.
641         * Makefile.in, configure: Rebuild.
642         * configure.tgt: Handle ARM.
644 2011-12-13  Richard Henderson  <rth@redhat.com>
646         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
647         signed/unsigned comparison werror.
649         * local_atomic: New file.
650         * libitm_i.h: Include it.
651         (gtm_thread::shared_state): Use atomic template.
652         * beginend.cc (GTM::gtm_clock): Use atomic template.
653         (global_tid): Use atomic template if 64-bit atomics available.
654         (gtm_thread::gtm_thread): Update shared_state access.
655         (gtm_thread::trycommit): Likewise.
656         (choose_code_path): Update global_tid access.
657         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
658         * stmlock.h (GTM::gtm_clock): Use atomic template.
659         (gtm_get_clock, gtm_inc_clock): Update accesses.
660         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
661         redundant __sync_synchronize after atomic shared_state access.
662         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
663         (gtm_rwlock::write_lock_generic): Likewise.
664         (gtm_rwlock::read_unlock): Likewise.
665         * config/alpha/target.h (atomic_read_barrier): Remove.
666         (atomic_write_barrier): Remove.
667         * config/x86/target.h (atomic_read_barrier): Remove.
668         (atomic_write_barrier): Remove.
670 2011-11-30  Richard Henderson  <rth@redhat.com>
672         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
673         * beginend.c (_ITM_abortTransaction): Update to match.
674         (GTM::gtm_thread::restart): Likewise.
675         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
676         * config/x86/sjlj.S (GTM_longjmp): Likewise.
678 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
680         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
681         * Makefile.in: Regenerate.
683 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
685         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
686         * alloc_cpp.cc: Generate dummy functions if we don't
687         HAVE_ELF_STYLE_WEAKREF.
688         * eh_cpp.cc: Likewise.
689         * configure: Regenerate.
690         * aclocal.m4:  Likewise.
691         * config.h.in: Likewise.
692         * Makefile.in: Likewise.
693         * testsuite/Makefile.in: Likewise.
695 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
697         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
698         __USER_LABEL_PREFIX__ for targets that use it.
699         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
700         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
701         in portability to non-elf targets.
702         (GTM_longjmp): Likewise.
703         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
704         where required.
706 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
708         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
709         * testsuite/libitm.c/memset-1.c: Likewise.
711 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
713         * configure: Regenerate.
715 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
717         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
718         (LIBITM_ENABLE_SYMVERS): Handle sun style.
719         * Makefile.am: Handle sun style versioning.
720         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
721         * configure: Regenerate.
722         * Makefile.in: Regenerate.
724 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
726         * config/generic/asmcfi.h: Fix comment.
727         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
728         sequence without .hidden support, error for non-ELF targets.
729         (GTM_longjmp) [__ELF__]: Only use .hidden if
730         HAVE_ATTRIBUTE_VISIBILITY.
732 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
734         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
735         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
736         Dummy functions.
737         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
738         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
740 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
742         PR bootstrap/51098
743         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
744         * configure: Regenerate.
746 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
748         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
750 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
752         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
753         .hidden.
754         (.note.GNU-stack): Only use if __linux__.
755         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
756         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
757         * testsuite/libitm.c/reentrant.c: Likewise.
758         * testsuite/libitm.c/simple-2.c: Likewise.
759         * testsuite/libitm.c/txrelease.c: Likewise.
760         * testsuite/libitm.c++/static_ctor.C: Likewise.
762 2011-11-10  Richard Henderson  <rth@redhat.com>
764         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
765         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
766         * configure.ac (ARCH_X86_AVX): New conditional.
767         * Makefile.in, configure: Rebuild.
769 2011-11-09  Richard Henderson  <rth@redhat.com>
771         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
772         * configure.ac: Use it.
773         * config.h.in, configure: Rebuild.
774         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
776 2011-11-09  Richard Henderson  <rth@redhat.com>
778         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
779         * config/alpha/unaligned.h: Remove file.
780         * config/generic/unaligned.h: Remove file.
781         * config/x86/unaligned.h: Remove file.
782         * config/generic/cachepage.h: Remove file.
783         * config/posix/cachepage.cc: Remove file.
784         * config/generic/cacheline.cc: Remove file.
785         * config/x86/cacheline.cc: Remove file.
786         * config/generic/cacheline.h (gtm_cacheline): Remove the
787         store_mask, copy_mask, copy_mask_wb methods.
788         * config/x86/cacheline.h: Likewise.
789         * config/alpha/cacheline.h: Fall back to generic after setting size.
790         * config/generic/tls.cc (gtm_mask_stack): Remove.
791         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
792         (GTM_vpalignr_table): Remove.
793         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
794         (GTM_pshift_table): Remove.
795         * config/libitm_i.h: Don't include cachepage.h.
796         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
797         * Makefile.in, testsuite/Makefile.in: Rebuild.
799 2011-11-09  Richard Henderson  <rth@redhat.com>
801         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
802         to emit branch prediction hint.
804         * config/x86/sjlj.S: Protect elf directives with __ELF__.
805         Protect .note.GNU-stack with __linux__.
807         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
808         * configure, aclocal.m4, config.h.in: Rebuild.
809         * config/generic/asmcfi.h: New file.
810         * config/x86/sjlj.S: Use it.
812 2011-11-08  Richard Henderson  <rth@redhat.com>
814         * local.cc (_ITM_LB): Use a normal call, not a function alias.
816 2011-11-08  Richard Henderson  <rth@redhat.com>
818         * configure.tgt: Test correct directory for supported cpus.
820         * configure.ac: Exit if unsupported.
821         * configure: Rebuild.
822         * configure.tgt: Delete boilerplate from libgomp for unsupported
823         targets.  Set UNSUPPORTED for unsupported targets.
825 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
827         * configure.tgt: Handle i386 like i[456]86.
828         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
829         take address.
830         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
831         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
833 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
835         * method-wbetl.cc: Update copyright notice.
836         * aatree.cc: Same.
837         * util.cc: Same.
838         * libitm.h: Same.
839         * memset.cc: Same.
840         * eh_cpp.cc: Same.
841         * barrier.tpl: Same.
842         * useraction.cc: Same.
843         * stmlock.h: Same.
844         * memcpy.cc: Same.
845         * common.h: Same.
846         * config/generic/tls.cc: Same.
847         * config/generic/cacheline.h: Same.
848         * config/generic/cachepage.h: Same.
849         * config/generic/cacheline.cc: Same.
850         * config/generic/unaligned.h: Same.
851         * config/x86/cacheline.h: Same.
852         * config/x86/cacheline.cc: Same.
853         * config/x86/unaligned.h: Same.
854         * config/alpha/cacheline.h: Same.
855         * config/alpha/unaligned.h: Same.
856         * config/alpha/sjlj.S: Same.
857         * config/posix/cachepage.cc: Same.
858         * config/linux/futex.h: Same.
859         * config/linux/alpha/futex_bits.h: Same.
861 2011-11-04  Torvald Riegel  <triegel@redhat.com>
863         * libitm.texi: No cover text and invariant sections.
865 2011-11-03  Richard Henderson  <rth@redhat.com>
867         * local_type_traits: New file.
868         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
870 2011-11-03  Richard Henderson  <rth@redhat.com>
872         * configure.ac: Don't test for gfortran.
873         * configure: Rebuild.
875         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
876         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
878 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
880         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
881         * testsuite/libitm.c/memset-1.c: Same.
882         * testsuite/libitm.c/c.exp: Same.
883         * testsuite/lib/libitm-dg.exp: Same.
884         * testsuite/lib/libitm.exp: Same.
885         * testsuite/libitm.c++/c++.exp: Same.
887 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
889         * testsuite/config/default.exp: Update copyright date.
890         * configure.ac: Add copyright info.
891         * configure.tgt: Same.
893 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
895         * testsuite/libitm.c/reentrant.c: XFAIL.
896         * testsuite/libitm.c++/static_ctor.C: XFAIL.
898 2011-10-29  Torvald Riegel  <triegel@redhat.com>
900         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
901         handle aborts.
902         (_ITM_abortTransaction): Handle aborts of outer transactions.
903         * libitm_i.h: Same.
904         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
905         * libitm.texi: Document aborts of outer transactions.
906         * testsuite/libitm.c/cancel.c: New file.
908 2011-10-19  Torvald Riegel  <triegel@redhat.com>
910         * testsuite/*: Change __transaction to __transaction_atomic or
911         __transaction_relaxed.
913 2011-10-19  Torvald Riegel  <triegel@redhat.com>
915         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
916         (gtm_thr): Same.
918 2011-10-19  Torvald Riegel  <triegel@redhat.com>
920         * libitm_i.h: Add gl_wt dispatch.
921         * retry.cc (parse_default_method): Same.
922         * method-gl.cc: New file.
923         * Makefile.am: Use method-gl.cc.
924         * Makefile.in: Rebuild.
926 2011-10-19  Torvald Riegel  <triegel@redhat.com>
928         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
929         safety if requested by a TM method.
930         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
931         privatization safety.
932         * method-serial.cc: Same.
934 2011-10-19  Torvald Riegel  <triegel@redhat.com>
936         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
937         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
938         undolog-related member functions from *_local to *_undolog.
939         * local.cc (gtm_thread::commit_undolog): Same.
940         * beginend.cc (GTM::gtm_thread::trycommit): Same.
941         (GTM::gtm_thread::rollback): Roll back undolog before
942         dispatch-specific rollback.
944 2011-10-19  Torvald Riegel  <triegel@redhat.com>
946         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
947         re-initialization of the current method group.
948         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
950 2011-10-19  Torvald Riegel  <triegel@redhat.com>
952         * alloc.cc (commit_allocations_2): Do not free transaction-local
953         memory when committing a nested transaction.
955 2011-10-19  Torvald Riegel  <triegel@redhat.com>
957         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
958         serial-irrevocable dispatch, not serial.
960 2011-10-19  Torvald Riegel  <triegel@redhat.com>
962         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
963         declarations.
964         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
965         * method-serial.cc: Implement begin_or_restart().
966         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
967         dispatch-specific begin_or_restart().
968         (GTM::gtm_thread::restart): Same.
970 2011-08-23  Torvald Riegel  <triegel@redhat.com>
972         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
973         restarting without switching to serial mode.
974         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
975         transaction state. Choose closed-nesting alternative if available.
976         (GTM::gtm_thread::set_default_dispatch): New.
977         (parse_default_method): New.
978         (GTM::gtm_thread::number_of_threads_changed): New.
979         * method-serial.cc (GTM::serial_mg): New method group class.
980         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
981         fini.
982         (GTM::serial_dispatch): Same.
983         (GTM::serialirr_onwrite_dispatch): Same.
984         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
985         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
986         registered threads.
987         (GTM::gtm_thread::gtm_thread): Same.
988         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
989         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
990         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
991         choose dispatch but set state according to dispatch here.
992         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
993         (GTM::method_group): New class.
994         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
995         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
996         * libitm.texi: Document TM methods, method groups, method life cycle.
997         Rename method sets to method groups.
999 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1001         * config/x86/tls.h: Moved to ...
1002         * config/linux/x86/tls.h: ... here.
1004 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1006         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
1007         Add X32 support.
1008         * config/x86/sjlj.S: Same.
1010 2011-08-19  Torvald Riegel  <triegel@redhat.com>
1012         * config/linux/rwlock.h: New file.
1013         * config/linux/rwlock.c: New file.
1014         * configure.ac: Reenable futex support (undo SVN rev 157758).
1015         * Makefile.am: Same.
1016         * configure.tgt: Same.
1017         * config/linux/alpha/futex_bits.h: Same.
1018         * config/linux/futex.h: Same. Return number of woken processes.
1019         * config/linux/futex.cc: Same.
1020         (futex_wait): Remove spinning.
1021         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
1022         Use __x86_64__ instead of __LP64__.
1023         * aclocal.m4: Include generic futex checks.
1024         * configure: Rebuild.
1025         * Makefile.in: Rebuild.
1026         * testsuite/Makefile.in: Rebuild.
1027         * beginend.cc: Include pthread.h.
1028         * config/posix/cachepage.cc: Same.
1030 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1032         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1033         (abi_disp, set_abi_disp): Move to tx's TLS slot.
1034         (set_gtm_thr): New.
1035         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1036         (set_gtm_thr): New.
1037         (GTM::gtm_thread::thread_num): Removed.
1038         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
1039         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
1040         tx-to-thread renaming.
1041         * beginend.cc: Adapted to tx-to-thread renaming.
1042         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
1043         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
1044         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
1045         gtm_transaction to gtm_thread.
1046         (_ITM_getThreadnum): Removed. Not supported anymore.
1047         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
1048         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
1049         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
1050         gtm_tx-to-gtm_thr renaming if necessary.
1051         * eh_cpp.cc: Same.
1052         * local.cc: Same.
1053         * retry.cc: Same.
1054         * clone.cc: Same.
1055         * alloc.cc: Same.
1056         * alloc_c.cc: Same.
1057         * alloc_cpp.cc: Same.
1058         * method-serial.cc: Same.
1059         * config/generic/tls.cc: Same.
1060         * config/posix/rwlock.h (gtm_rwlock): Same.
1061         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
1063 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1065         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
1066         implementation.
1067         (gtm_rwlock::read_unlock): Same.
1068         (gtm_rwlock::write_lock_generic): New. Generalized from ...
1069         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
1070         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
1071         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
1072         w_upgrade. Replaced by per-transaction flags (in shared_state).
1073         Added c_confirmed_writers.
1074         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
1075         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
1076         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1077         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
1078         * beginend.cc (GTM::gtm_transaction::begin_transaction,
1079         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
1080         * libitm.texi: Document locking conventions and implementations in
1081         libitm.
1083 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1085         * libitm_i.h (next_tx): Add list of all threads' transaction.
1086         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
1087         transaction with list of transactions and ...
1088         (thread_exit_handler): ... deregister here.
1089         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
1090         * config/x86/target.h: Same.
1092 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1094         * testsuite/libitm.c++/static_ctor.C: New file.
1096 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1098         * testsuite/libitm.c/reentrant.c: New file.
1100 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1102         * config/generic/tls.h: Remove the free list for transactions and ...
1103         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
1104         (GTM::gtm_transaction::operator delete): ... and release here.
1105         (thread_exit_handler): New. Delete tx when thread terminates.
1106         (thread_exit_init): New.
1107         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
1108         * testsuite/libitm.c/txrelease.c: New file.
1110 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1112         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
1113         * testsuite/libitm.c/notx.c: New file.
1115 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1117         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
1118         * libitm_i.h (local_tid): ... to here.
1119         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1120         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
1122 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1124         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
1125         serialirr_onwrite_dispatch as new default for now.
1126         * method-serial.cc (serialirr_onwrite_dispatch): New.
1127         (GTM::dispatch_serialirr_onwrite): New.
1128         * libitm_i.h: Same.
1130 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1132         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
1133         * query.cc (_ITM_getTransactionId): There is no active transaction if
1134         the current nesting level is zero.
1136 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1138         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
1139         rollback.
1141 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1143         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
1144         transaction properties from the caller instead of from the
1145         transaction object.
1146         * libitm_i.h: Same.
1147         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1149 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1151         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
1152         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
1153         * dispatch.h: Same.
1154         * method-serial.cc: Same.
1155         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
1156         flat nesting as default, and closed nesting on demand.
1157         (GTM::gtm_transaction::rollback): Same.
1158         (_ITM_abortTransaction): Same.
1159         (GTM::gtm_transaction::restart): Same.
1160         (GTM::gtm_transaction::trycommit): Same.
1161         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
1162         (choose_code_path): New.
1163         (GTM::gtm_transaction_cp::save): New.
1164         (GTM::gtm_transaction_cp::commit): New.
1165         * query.cc (_ITM_inTransaction): Support flat nesting.
1166         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
1167         (GTM::gtm_transaction): Support flat and closed nesting.
1168         * alloc.cc (commit_allocations_2): New.
1169         (commit_cb_data): New helper struct.
1170         (GTM::gtm_transaction::commit_allocations): Handle nested
1171         commits/rollbacks.
1172         * libitm.texi: Update user action section, add description of nesting.
1174 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1176         * libitm_i.h: Add closed nesting as restart reason.
1177         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1179 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1181         * useraction.cc: Use vector instead of list to store actions.
1182         Also support partial rollbacks for closed nesting.
1183         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
1184         * beginend.cc: Same.
1186 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1188         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
1189         closed_nesting flags, as well as a closed nesting alternative.
1190         * method-serial.cc: Same.
1191         (serial_dispatch): Renamed to serialirr_dispatch.
1192         (GTM::dispatch_serialirr): Same.
1193         (serial_dispatch_ul): Renamed to serial_dispatch.
1194         (GTM::dispatch_serial): Same.
1196 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1198         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
1200 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1202         * aatree.h (aa_tree::remove): New.
1203         (aa_tree::operator new): Add placement new.
1205 2011-07-02  Torvald Riegel  <triegel@redhat.com>
1207         * containers.h: New file.
1208         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
1209         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
1210         * common.h: ... to here.
1211         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
1212         * local.cc: Same.
1214 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1216         * libitm_i.h (STATE_ABORTING): Remove.
1217         * beginend.cc (_ITM_abortTransaction): Same.
1218         (GTM::gtm_transaction::trycommit_and_finalize): Same.
1219         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
1220         (_ITM_rollbackTransaction): Remove.
1221         * beginend.cc: Same.
1222         * libitm.map: Same.
1223         * libitm.texi: Document these ABI changes.
1225 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1227         * libitm.texi: New file.
1228         * Makefile.am: Add libitm.texi.
1229         * Makefile.in: Rebuild.
1231 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1233         * libitm_i.h: Move parts to common.h and dispatch.h.
1234         * common.h: New file.
1235         * dispatch.h: New file, new dispatch class.
1236         Rename GTM::abi_dispatch::lock_type to ls_modifier.
1237         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
1238         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
1239         decision to retry.cc.
1240         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
1241         only.
1242         (GTM::gtm_transaction::decide_begin_dispatch): Same.
1243         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1244         logging.
1245         * barrier.cc: Use new barriers definitions.
1246         (abi_dispatch::memmove_overlap_check): New.
1247         * config/x86/x86_sse.cc: Same.
1248         * config/x86/x86_avx.cc: Same.
1249         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1250         memcpy.cc.
1251         * Makefile.in: Rebuild.
1252         * method-readonly.cc: Remove.
1253         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1254         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1256 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1258         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1259         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1260         * testsuite/libitm.c/dropref-2.c: Same.
1261         * testsuite/libitm.c/dropref.c: Same.
1263 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1265         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1266         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1267         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1268         * alloc_c.cc: Same.
1269         * barrier.tpl: Same.
1270         * beginend.c: Same.
1271         * config/generic/tls.h: Same.
1272         * config/x86/tls.h: Same.
1273         * libitm_i.h: Same.
1274         * memcpy.cc: Same.
1275         * memset.cc: Same.
1276         * method-readonly.cc: Same.
1277         * method-serial.cc: Same.
1278         * method-wbetl.cc: Same.
1279         * retry.cc: Same.
1281 2011-03-03  Richard Henderson  <rth@redhat.com>
1283         * config/posix/rwlock.cc (write_upgrade): Add missing case.
1284         From Patrik Marlier <patrick.marlier@unine.ch>.
1286 2011-02-03  Richard Henderson  <rth@redhat.com>
1288         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1289         * configure.ac: Use it.
1290         * configure, config.h.in: Rebuild.
1291         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1292         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1293         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1294         * libitm.map: Use wildcards to match size_t mangling.
1296 2010-12-14  Richard Henderson  <rth@redhat.com>
1298         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1299         blocks of TIDs per thread.
1300         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1301         (setup_gtm_thr): Return the thread structure.
1302         * config/x86/tls.h (setup_gtm_thr): Likewise.
1304 2010-12-14  Richard Henderson  <rth@redhat.com>
1306         * clone.cc (table_lock): Remove.
1307         (find_clone): Don't take it.
1308         (ExcludeTransaction): New helper class.
1309         (_ITM_registerTMCloneTable): Use it.
1310         (_ITM_deregisterTMCloneTable): Likewise.
1312 2010-12-14  Richard Henderson  <rth@redhat.com>
1314         * config/x86/tls.h: New file.
1316 2010-07-15  Richard Henderson  <rth@redhat.com>
1318         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1319         * Makefile.in: Rebuild.
1321 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1323         * method-wbetl.cc (trydropreference): Fix source line.
1325 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1327         * libitm.h: Add comment.
1328         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1330 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
1332         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1333         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1334         available, use pthread mutexes.
1335         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1336         * config.h.in: Regenerate.
1337         * configure: Regenerate.
1339 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
1341         * libitm.h (ITM_PURE): Define.
1342         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1344 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1346         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1347         (validate): Add comment.
1348         (trydropreference): New.
1349         * method-readonly.cc (class readonly_dispatch): Add
1350         trydropreference.
1351         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1352         Call trydropreference().
1353         * libitm.h (_ITM_dropReferences): Remove const attribute.
1354         * method-serial.cc (class serial_dispatch): Add trydropreference.
1355         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1357 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1359         * memcpy.cc (do_memcpy): Comment.
1361 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
1363         * barrier.tpl: Add comments throughout.
1365 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1367         * method-wbetl.cc (struct w_entry): Add comments.
1368         (trycommit): Same.
1369         (rollback): Same.
1371 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1373         * alloc_c.cc (_ITM_dropReferences): New.
1374         * libitm.map (_ITM_dropReferences): Add.
1375         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1376         * libitm_i.h (struct gtm_transaction): Declare
1377         drop_references_allocations and drop_references_local.
1378         * local.cc (rollback_local): Ignore memory when applicable.
1379         (drop_references_local): New.
1381 2010-06-23  Richard Henderson  <rth@redhat.com>
1383         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1384         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1385         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1386         * config/alpha/target.h: Likewise.
1387         * config/generic/tls.cc (gtm_mask_stack): Use it.
1389 2010-06-23  Richard Henderson  <rth@redhat.com>
1391         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1392         a mutex instead of trying a lock-free compare-and-swap on the list.
1393         (gtm_cacheline_page::operator delete): Likewise.
1395 2010-06-16  Richard Henderson  <rth@redhat.com>
1397         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1398         that overlap the libitm stack.
1399         * barrier.tpl: Mark incoming stack.
1400         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1401         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1402         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1403         * memcpy.cc, memset.cc: Likewise.
1404         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1405         * config/generic/tls.h (gtm_thread): Add stack_top member.
1406         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1407         * libitm_i.h (gtm_mask_stack): Declare.
1408         * config/generic/tls.cc: New file.
1409         * Makefile.am (libitm_la_SOURCES): Add it.
1410         (AM_CXXFLAGS): Turn off exceptions.
1411         * Makefile.in: Rebuild.
1413 2010-06-16  Richard Henderson  <rth@redhat.com>
1415         * alloc.cc (struct gtm_alloc_action): Move definition ...
1416         * libitm_i.h: ... here.
1417         (class gtm_transaction): Declare new and delete.
1418         * beginend.cc (alloc_tx): Reformulate as operator new.
1419         (free_tx): Reformulate as operator delete.
1420         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1422 2010-06-11  Richard Henderson  <rth@redhat.com>
1424         * clone.cc (clone_entry_compare): Fix typo.
1425         From Patrik Marlier <patrick.marlier@unine.ch>.
1427 2010-05-13  Richard Henderson  <rth@redhat.com>
1429         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1430         in extern "C".
1432 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
1434         * libitm_i.h (struct gtm_transaction): Remove
1435         get_allocation_size.
1436         (record_allocation): Remove size parameter.
1437         * libitm.map (_ITM_realloc): Remove.
1438         * alloc_c.cc (_ITM_realloc): Remove.
1439         (_ITM_malloc): Remove size argument to record_allocation.
1440         (_ITM_calloc): Same.
1441         * alloc_cpp.cc (_ZGTtnwm): Same.
1442         (_ZGTtnwmRKSt9nothrow_t): Same.
1443         (_ZGTtnam): Same.
1444         (_ZGTtnamRKSt9nothrow_t): Same.
1445         * alloc.cc (struct gtm_alloc_action): Remove size.
1446         (get_allocation_size): Remove.
1447         (commit_allocations): Add comment.
1448         (record_allocation): Remove size parameter.
1449         (forget_allocation): Remove set of size.
1451 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
1453         * Makefile.am (abi_version): New.
1454         (AM_CXXFLAGS): Pass abi_version.
1455         * Makefile.in: Regenerate.
1456         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1458 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1460         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1461         _ITM_getTMCloneOrIrrevokable.
1462         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1463         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1465 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1467         * configure.ac: Remove Linux futex support.
1468         * configure.tgt (config_path): Same.
1469         * Makefile.am: Same.
1470         * config/linux: Remove entire directory.
1471         * configure: Rebuild.
1472         * Makefile.in: Rebuild.
1473         * testsuite/Makefile.in: Rebuild.
1475 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1477         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1478         switching to serial mode.
1479         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1481 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1483         * configure.tgt: Add emacs -*- tags.
1484         * barrier.tpl: Same.
1486 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1488         * Makefile.am: Rename serial.cc to method-serial.cc.
1489         * Makefile.in: Regenerate with automake 1.11.1.
1490         * testsuite/Makefile.in: Same.
1491         * aclocal.m4: Regenerate with aclocal 1.11.1.
1492         * method-serial.cc: Rename from serial.cc.
1493         * libitm_i.h (struct gtm_transaction): Update comment on
1494         serialirr_mode.
1496 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1498         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1499         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1501 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1503         * configure: Rebuild.
1505 2009-11-12  Richard Henderson  <rth@redhat.com>
1507         * Rewrite everything in C++.
1509 2009-11-03  Richard Henderson  <rth@redhat.com>
1511         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1512         * Makefile.am (libitm_la_SOURCES): Add them.
1513         * configure.ac (ARCH_X86): New conditional.
1514         * Makefile.in, configure: Rebuild.
1515         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1516         Move futex setup into "other system configury" case.
1517         * local.c (rollback_local): Merge into ...
1518         (GTM_rollback_local): ... here.
1519         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1520         (_ITM_LB): Define as an alias to GTM_LB.
1522 2009-11-03  Richard Henderson  <rth@redhat.com>
1524         * method-readonly.c: New file.
1525         * Makefile.am (libitm_la_SOURCES): Add it.
1526         * Makefile.in: Rebuild.
1527         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1528         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1529         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1530         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1531         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1532         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1533         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1534         gtm_get_clock, gtm_inc_clock): New.
1535         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1536         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1537         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1538         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1539         replace uses with new libitm_i.h symbols.
1540         (dispatch_wbetl): Rename from wbetl_dispatch.
1541         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1542         away from dispatch_readonly; abort if the beginTransaction call
1543         asserted that the transaction was readonly.
1545 2009-11-03  Richard Henderson  <rth@redhat.com>
1547         * memset.c: New file.
1548         * Makefile.am (libitm_la_SOURCES): Add it.
1549         * Makefile.in: Rebuild.
1550         * testsuite/libitm.c/memset-1.c: New.
1552 2009-11-03  Richard Henderson  <rth@redhat.com>
1554         * dispatch.c: Remove file.
1555         * useraction.c (struct gtm_user_action): Move from libitm.h.
1556         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1557         (serial_memset, serial_memmove, serial_memcpy): Remove.
1558         (serial_W*, serial_R*): Remove.
1559         (serial_dispatch): Update to match.
1560         * configure.ac: Move Werror down below configure checks.  Don't
1561         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1562         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1563         Use GCC_AC_FUNC_MMAP_BLACKLIST
1564         * libitm.h: Split out all internal items to...
1565         * libitm_i.h: ... here.  New file.
1566         * copymask.c: New file.
1567         * local.c (struct gtm_local_undo): Move from libitm.h.
1568         (GTM_alloc_local): Rename from alloc_local; export.
1569         * memcpy.c: New file.
1570         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1571         * config/posix/page.c: New file.
1572         * config/posix/target_tls.h: Remove file.
1573         * barrier.c: New file.
1574         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1575         copymask.c, page.c.
1576         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1577         * method-wbetl.c: Rewrite for new cacheline methods.
1578         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1580         * config/alpha/sjlj.S: Fix typo.
1581         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1582         * config/alpha/copymask.c: New file.
1583         * config/alpha/target.h (CACHELINE_SIZE): New.
1584         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1586         * config/x86/target_i.h: Copy functions from x86/target.h.
1587         * config/x86/copymask.c: New file.
1588         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1589         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1590         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1591         * config/x86/target_tls.h: Move contents to target_i.h.
1593         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1594         * testsuite/libitm.c/memcpy-1.c: New.
1596 2009-10-22  Richard Henderson  <rth@redhat.com>
1598         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1599         (AM_CCASFLAGS): New.
1600         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1601         saving/restoring _AC_ARG_VAR_PRECIOUS.
1602         * Makefile.in, aclocal.m4, config.h.in, configure,
1603         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1605 2009-10-22  Richard Henderson  <rth@redhat.com>
1607         * testsuite/*: Update for new compiler syntax.
1609 2009-10-21  Richard Henderson  <rth@redhat.com>
1611         * libitm.h (_ITM_abortReason): Add outerAbort.
1613 2009-08-03  Richard Henderson  <rth@redhat.com>
1615         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1616         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1617         * method-wbetl.c (struct w_entry): Remove mask.
1618         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1619         adjust all callers.
1621 2009-07-22  Richard Henderson  <rth@redhat.com>
1623         * eh_cpp.c: New file.
1624         * Makefile.am (libitm_la_SOURCES): Add it.
1625         * Makefile.in: Rebuild.
1626         * beginend.c (GTM_rollback_transaction): Undo exception state.
1627         (GTM_trycommit_transaction): Mark inline.
1628         (GTM_trycommit_and_finalize_transaction): Split out from ...
1629         (_ITM_commitTransaction): ... here.
1630         (_ITM_commitTransactionEH): New function.
1631         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1632         cxa_unthrown, eh_in_flight; reorder.
1634         * testsuite/libitm.c++/c++.exp: New.
1635         * testsuite/libitm.c++/eh-1.C: New.
1637         * aatree.c (aa_free): Remove REGPARM.
1638         * aatree.h: Remove all REGPARM.
1640 2009-07-18  Richard Henderson  <rth@redhat.com>
1642         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1643         * Makefile.am (libitm_la_SOURCES): Add them.
1644         * Makefile.in: Rebuild.
1645         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1646         (GTM_trycommit_transaction): Likewise.
1647         * libitm.h: Include aatree.h
1648         (struct gtm_alloc_action): New.
1649         (struct gtm_transaction): Add alloc_actions.
1650         (GTM_record_allocation, GTM_forget_allocation): Declare.
1651         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1652         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1653         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1654         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1655         _ZGTtdaPvRKSt9nothrow_t): Export.
1657 2009-07-18  Richard Henderson  <rth@redhat.com>
1659         * target_tls.h: Move ...
1660         * config/posix/target_tls.h: ... here.
1662 2009-07-07  Richard Henderson  <rth@redhat.com>
1664         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1666 2009-07-07  Richard Henderson  <rth@redhat.com>
1668         * Update to GPL3.
1670 2009-07-07  Richard Henderson  <rth@redhat.com>
1672         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1673         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1675         * configure.tgt: Don't use -ftls-model for x86 linux.
1676         * libitm.h: Include target.h after standard includes.
1677         (_gtm_thr): Rename from gtm_thr.
1678         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1679         (gtm_disp, set_gtm_disp): New.
1680         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1681         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1682         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1684 2009-07-07  Richard Henderson  <rth@redhat.com>
1686         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1688 2009-07-06  Richard Henderson  <rth@redhat.com>
1690         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1691         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1692         (_ITM_beginTransaction): Take variadic arguments.
1693         (_ITM_registerThrownObject): Declare.
1694         * beginend.c, serial.c: Update.
1695         * libitm.map: Add _ITM_registerThrownObject.
1697 2009-01-28  Richard Henderson  <rth@redhat.com>
1699         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1700         * Makefile.in: Rebuild.
1701         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1702         (GTM_restart_transaction): Fix uninstrumented code check.
1703         * retry.c (GTM_decide_retry_strategy): Add serial check.
1704         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1705         automatically go irrevokable when in serial mode.
1706         * clone.c: New file.
1707         * libitm.h, libitm.map: Update.
1709 2009-01-27  Richard Henderson  <rth@redhat.com>
1711         * Makefile.am (LTCCASCOMPILE): Define.
1712         (libitm_la_SOURCES): Add methid-wbetl.c.
1713         * testsuite/Makefile.am: New
1714         * configure.ac: Add testsuite/Makefile.
1715         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1716         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1717         (_ITM_abortTransaction): Finalize implementation method; pass
1718         transaction properties to longjmp.
1719         (GTM_restart_transaction): Split out from ...
1720         (_ITM_commitTransaction): ... here.
1721         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1722         Move to config/x86/target.h.
1723         * config/linux/alpha/futex_bits.h: New.
1724         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1725         * config/x86/target.h: Disable target types for 32-bit.
1726         * config/alpha/sjlj.S, config/alpha/target.h: New.
1727         * libitm.h (struct gtm_dispatch): Add init, fini.
1728         (enum restart_reason): New.
1729         (struct gtm_transaction): Add method and restarts.
1730         * retry.c (GTM_decide_retry_strategy): Implement.
1731         * serial.c (serial_init, serial_fini): New.
1732         (GTM_serialmode): Finialize outgoing method.
1733         * method-wbetl.c: New.
1735 2008-12-09  Richard Henderson  <rth@redhat.com>
1737         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1738         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1739         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1740         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1741         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1742         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1743         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1744         * serial.c (serial_R##T, serial_W##T): Likewise.
1746 2008-11-21  Richard Henderson  <rth@redhat.com>
1748         * Initial commit.