always define STACK_GROWS_DOWNWARD
[official-gcc.git] / libitm / ChangeLog
bloba2b3a152297135a37d605e9a20c6a1a08923806c
1 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
3         * Makefile.in: Regenerated with automake-1.11.6.
4         * aclocal.m4: Likewise.
5         * configure: Likewise.
6         * testsuite/Makefile.in: Likewise.
8 2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
10         * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
11         * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
13 2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15         PR libitm/64360
16         * libitm.c/stackundo.c (test2): Make it static.
17         (test1): Likewise.
19 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
21         Update copyright years.
23 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
25         * libitm.texi: Bump @copying's copyright year.
27 2014-12-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29         * testsuite/lib/libitm.exp: Load target-utils.exp.
30         Move load of target-supports.exp earlier.
32 2014-12-03  Uros Bizjak  <ubizjak@gmail.com>
34         * configure.tgt (x86_64): Tune -m32 multilib to generic.
36 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
38         PR bootstrap/63784
39         * configure: Regenerated.
41 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
43         PR target/63610
44         * configure: Regenerate.
46 2014-10-06  Marek Polacek  <polacek@redhat.com>
48         * testsuite/libitm.c/memcpy-1.c: Declare getpagesize.
49         * testsuite/libitm.c/memset-1.c: Likewise.
51 2014-07-24  Richard Henderson  <rth@redhat.com>
53         * config/aarch64/sjlj.S (_ITM_beginTransaction): Use post-inc
54         addressing mode in epilogue.
56 2014-05-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
58         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
59         -mclear-hwcap instead.
60         * configure: Regenerate.
61         * clearcap.map: Remove.
63 2014-05-21  John Marino  <gnugcc@marino.st>
65         * configure.tgt (*-*-dragonfly*): New target.
67 2014-05-19  Richard Henderson  <rth@redhat.com>
69         * config/aarch64/sjlj.S: New file.
70         * config/aarch64/target.h: New file.
71         * configure.tgt: Enable aarch64.
73 2014-04-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
75         * config/generic/asmcfi.h: Also check for
76         __GCC_HAVE_DWARF2_CFI_ASM.
78 2013-04-02  Richard Henderson  <rth@redhat.com>
80         * config/alpha/target.h (PAGE_SIZE, FIXED_PAGE_SIZE): Remove.
81         * config/arm/target.h, config/sh/target.h: Likewise.
82         * config/sparc/target.h, config/x86/target.h: Likewise.
84 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
86         * config/linux/futex_bits.h: Include errno.h.
87         (sys_futex0): If syscall returns -1, return -errno rather than
88         -1.
90 2014-03-26  Joseph Myers  <joseph@codesourcery.com>
92         * libitm.texi (Index): Rename to Library Index.
94 2014-01-13  H.J. Lu  <hongjiu.lu@intel.com>
96         PR libitm/53113
97         * Makefile.am (x86_sse.lo): Append -msse to CXXFLAGS.
98         (x86_avx.lo): Append -mavx to CXXFLAGS.
99         * Makefile.in: Regenerate.
101 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
103         Update copyright years
105 2014-01-02  Tobias Burnus  <burnus@net-b.de>
107         * libitm.texi: Bump @copying's copyright year.
109 2013-11-14  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
111         * config/powerpc/sjlj.S [__powerpc64__ && _CALL_ELF == 2]:
112         (FUNC): Define ELFv2 variant.
113         (END): Likewise.
114         (HIDDEN): Likewise.
115         (CALL): Likewise.
116         (BASE): Likewise.
117         (LR_SAVE): Likewise.
119 2013-09-20  Alan Modra  <amodra@gmail.com>
121         * configure: Regenerate.
123 2013-08-30  Torvald Riegel  <triegel@redhat.com>
125         * config/posix/rwlock.cc: Fix initialization order.
127 2013-08-30  Torvald Riegel  <triegel@redhat.com>
129         * libitm_i.h (gtm_thread): Assign an asm name to serial_lock.
130         (htm_fastpath): Assign an asm name.
131         * libitm.h (_ITM_codeProperties): Add non-ABI flags used by custom
132         HTM fast paths.
133         (_ITM_actions): Likewise.
134         * config/x86/target.h (HTM_CUSTOM_FASTPATH): Enable custom fastpath on
135         x86_64.
136         * config/x86/sjlj.S (_ITM_beginTransaction): Add custom HTM fast path.
137         * config/posix/rwlock.h (gtm_rwlock): Update comments.  Move summary
138         field to the start of the structure.
139         * config/linux/rwlock.h (gtm_rwlock): Update comments.
140         * beginend.cc (gtm_thread::begin_transaction): Add retry policy
141         handling for custom HTM fast paths.
143 2013-08-14  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
144         Revert:
145         2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
147         * configure.tgt: Add -msoft-float to XCFLAGS.
149 2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
151         * configure.tgt: Add -msoft-float to XCFLAGS.
153 2013-07-29  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
155         * config/s390/target.h (htm_begin, htm_commit, htm_abort)
156         (htm_transaction_active): Enable zEC12 instructions in the
157         assembler.
158         * configure.tgt: Remove -Wa,-march=zEC12 from XCFLAGS.
160 2013-07-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
162         * acinclude.m4: Add htm asm check for s390.
163         * configure.tgt: Add -mhtm and -Wa,-march=zEC12 to the options.
164         * configure: Regenerate.
165         * config/s390/target.h: Remove __HTM__ check.
166         (htm_available): Call getauxval to get hwcaps and check whether
167         HTM is available or not.
169 2013-07-15  Peter Bergner  <bergner@vnet.ibm.com>
171         * acinclude.m4 (LIBITM_CHECK_AS_HTM): New.
172         * configure.ac: Use it.
173         (AC_CHECK_HEADERS): Check for sys/auxv.h.
174         (AC_CHECK_FUNCS): Check for getauxval.
175         * config.h.in, configure: Rebuild.
176         * configure.tgt (target_cpu): Add -mhtm to XCFLAGS.
177         * config/powerpc/target.h: Include sys/auxv.h and htmintrin.h.
178         (USE_HTM_FASTPATH): Define.
179         (_TBEGIN_STARTED, _TBEGIN_INDETERMINATE, _TBEGIN_PERSISTENT,
180         _HTM_RETRIES) New macros.
181         (htm_abort, htm_abort_should_retry, htm_available, htm_begin, htm_init,
182         htm_begin_success, htm_commit, htm_transaction_active): New functions.
184 2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
186         * config/s390/target.h: Include htmintrin.h.
187         (_HTM_ITM_RETRIES): New macro definition.
188         (htm_available, htm_init, htm_begin, htm_begin_success)
189         (htm_commit, htm_abort, htm_abort_should_retry): New functions.
191 2013-06-20  Iain Sandoe  <iain@codesourcery.com>
192             Cesar Philippidis  <cesar@codesourcery.com>
194         * testsuite/lib/libitm.exp: Reorder lib loads into dependency order.
195         Do not load_gcc_lib gcc-dg.exp and add a comment as to why.
196         * testsuite/libitm.c/c.exp: load_gcc_lib gcc-dg.exp.
197         * testsuite/libitm.c++/c++.exp: load_gcc_lib gcc-dg.exp.
199 2013-06-20  Torvald Riegel  <triegel@redhat.com>
201         * query.cc (_ITM_inTransaction): Abort when using the HTM fastpath.
202         (_ITM_getTransactionId): Same.
203         * config/x86/target.h (htm_transaction_active): New.
205 2013-06-20  Torvald Riegel  <triegel@redhat.com>
207         PR libitm/57643
208         * beginend.cc (gtm_thread::begin_transaction): Handle reentrancy in
209         the HTM fastpath.
211 2013-03-31  Gerald Pfeifer  <gerald@pfeifer.com>
213         PR bootstrap/56714
214         * local_atomic (__always_inline): Always define our version.
215         (__calculate_memory_order): Mark inline.
216         (atomic_thread_fence): Ditto.
217         (atomic_signal_fence): Ditto.
218         (atomic_bool::atomic_flag_test_and_set_explicit): Ditto.
219         (atomic_bool::atomic_flag_clear_explicit): Ditto.
220         (atomic_bool::atomic_flag_test_and_set): Ditto.
221         (atomic_bool::atomic_flag_clear): Ditto.
223 2013-04-23  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
225         * config/s390/sjlj.S: New file.
226         * config/s390/target.h: New file.
227         * configure.tgt: Set options for S/390.
229 2013-03-23  Andi Kleen  <ak@linux.intel.com>
231         * local_atomic (__always_inline): Add.
232         (__calculate_memory_order, atomic_thread_fence,
233          atomic_signal_fence, test_and_set, clear, store, load,
234          exchange, compare_exchange_weak, compare_exchange_strong,
235          fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor):
236         Add __always_inline to force inlining.
238 2013-02-11  Iain Sandoe  <iain@codesourcery.com>
239             Jack Howarth  <howarth@bromo.med.uc.edu>
240             Patrick Marlier  <patrick.marlier@gmail.com>
242         PR libitm/55693
243         * alloc_cpp.cc: Enable function declarations on darwin.
244         * eh_cpp.cc: Likewise.
246 2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
248         Update copyright years.
250 2012-11-09  Torvald Riegel  <triegel@redhat.com>
252         * beginend.cc (htm_fastpath): New.
253         (gtm_thread::begin_transaction, _ITM_commitTransaction,
254         _ITM_commitTransactionEH): Add HTM fastpath handling.
255         * config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
256         * config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
257         * config/x86/target.h (htm_available, htm_init, htm_begin_success,
258         htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
259         * configure.tgt: Add -mrtm to XCFLAGS.
260         * method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
261         (gtm_thread::serialirr_mode): Add HTM fastpath handling.
262         * libitm_i.h (htm_fastpath, dispatch_htm): Declare.
263         * retry.cc (parse_default_method): Add HTM method parsing.
264         (gtm_thread::number_of_threads_changed): Use HTM by default if
265         available.
267 2012-11-04  Thomas Schwinge  <thomas@codesourcery.com>
269         * configure: Regenerate.
271 2012-10-31  Richard Henderson  <rth@redhat.com>
273         * acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
274         * configure.ac: Use it.
275         * config.h.in, configure: Rebuild.
276         * testsuite/Makefile.in: Rebuild.
278 2012-10-24  Torvald Riegel  <triegel@redhat.com>
280         * libitm.texi: Clarify ABI requirements for data-logging functions.
282 2012-10-24  Torvald Riegel  <triegel@redhat.com>
284         * retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
285         it requires serial mode instead of assuming that for certain
286         dispatchs.
287         * dispatch.h (abi_dispatch::requires_serial): New.
288         (abi_dispatch::abi_dispatch): Adapt.
289         * method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
290         * method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
291         * method-serial.cc (serialirr_dispatch::serialirr_dispatch,
292         serial_dispatch::serial_dispatch,
293         serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
295 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
297         * config/x86/target.h (struct gtm_jmpbuf): Merge x86_64
298         and ia32 declarations some more.
299         * config/x86/sjlj.S (_ITM_beginTransaction): Move ret to common code.
301 2012-09-20  Jakub Jelinek  <jakub@redhat.com>
303         PR other/43620
304         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
305         * configure: Regenerate.
306         * Makefile.in: Regenerate.
308 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
310         * configure: Regenerated.
312 2012-07-31  Uros Bizjak  <ubizjak@gmail.com>
314         * config/x86/target.h (cpu_relax): Use __builtin_ia32_pause.
316 2012-05-21  Patrick Marlier  <patrick.marlier@gmail.com>
318         * eh_cpp.cc: Fix __cxa_end_catch declaration.
320 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
322         * configure: Regenerated.
324 2012-04-04  H.J. Lu  <hongjiu.lu@intel.com>
326         PR libitm/52854
327         * config/x86/target.h (gtm_jmpbuf): Replace long with long long
328         for x86-64.
330 2012-04-03  Tristan Gingold  <gingold@adacore.com>
332         * configure: Regenerate.
334 2012-03-31  H.J. Lu  <hongjiu.lu@intel.com>
336         PR bootstrap/52812
337         * configure.tgt (i[456]86-*-linux*): Handle -mx32 like -m64.
339 2012-03-16  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
341         * testsuite/lib/libitm.exp: load fortran-modules.exp
343 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
345         * configure.tgt (*-*-irix6*): Remove.
347 2012-03-13  Torvald Riegel  <triegel@redhat.com>
349         PR libitm/52526
350         * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
351         wake-up.
353 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
355         * configure.tgt (*-*-osf*): Remove.
356         * configure: Regenerate.
358 2012-03-05  Torvald Riegel  <triegel@redhat.com>
360         * dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
361         memtransfer/memset if size isn't larger than zero.
363 2012-03-02  Torvald Riegel  <triegel@redhat.com>
365         * libitm.texi: Link to specification and add a usage example.
367 2012-02-24  Torvald Riegel  <triegel@redhat.com>
369         * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change
370         default dispatch for more than 1 thread to ml_wt.
372 2012-02-20  Torvald Riegel  <triegel@redhat.com>
374         * method-gl.cc (gl_wt_dispatch::orec): Put on separate cacheline.
376 2012-02-20  Torvald Riegel  <triegel@redhat.com>
378         * method-gl.cc (gl_wt_dispatch::rollback): Optimize memory orders.
380 2012-02-20  Torvald Riegel  <triegel@redhat.com>
382         * method-gl.cc (gl_wt_dispatch::trycommit): Remove handling of
383         serial mode corner cases made obsolete by prior gtm_rwlock changes.
384         (gl_wt_dispatch.rollback): Same.
386 2012-02-20  Torvald Riegel  <triegel@redhat.com>
388         * method-gl.cc (gl_wt_dispatch::pre_write): Optimize memory orders.
390 2012-02-20  Torvald Riegel  <triegel@redhat.com>
392         * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
393         for RfW src.  Optimize number of calls to gtm_thr.
395 2012-02-20  Torvald Riegel  <triegel@redhat.com>
397         * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
398         acquisition to ...
399         * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
400         (default_dispatch): Make atomic.
401         (GTM::gtm_thread::set_default_dispatch): Access atomically.
402         (GTM::gtm_thread::decide_retry_strategy): Access atomically and
403         use decide_begin_dispatch() if default_dispatch might have changed.
404         (GTM::gtm_thread::number_of_threads_changed): Initialize
405         default_dispatch here.
407 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
408             Patrick Marlier  <patrick.marlier@gmail.com>
410         PR libitm/52220
411         * alloc_cpp.cc: No dummy definitions for darwin.
412         * eh_cpp.cc: Likewise.
414 2012-02-14  Richard Henderson  <rth@redhat.com>
416         * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
418 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
420         * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
422 2012-02-14  Torvald Riegel  <triegel@redhat.com>
424         * libitm_i.h (GTM::gtm_rwlog_entry): New.
425         (GTM::gtm_thread): Add read and write logs.
426         (GTM::dispatch_ml_wt): Declare.
427         * retry.cc (parse_default_method): Support ml_wt.
428         * method-ml.cc: New file.
429         * Makefile.am: Add method-ml.cc.
430         * Makefile.in: Regenerate.
432 2012-02-14  Torvald Riegel  <triegel@redhat.com>
434         * dispatch.h (GTM::abi_dispatch::supports): New.
435         (GTM::method_group::reinit): New.
436         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
437         (GTM::gtm_thread::number_of_threads_changed): Check that the method
438         supports the current situation.
440 2012-02-14  Torvald Riegel  <triegel@redhat.com>
442         * util.cc (GTM::xcalloc): New.
443         * common.h (GTM::xcalloc): Declare.
445 2012-02-14  Eric Botcazou  <ebotcazou@adacore.com>
447         * config/sparc/target.h (cpu_relax): Read from CC register.
448         * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
450 2012-02-14  Uros Bizjak  <ubizjak@gmail.com>
452         * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
454 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
456         * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
457         * config/sparc/cacheline.h: New file.
458         * config/sparc/target.h: Likewise.
459         * config/sparc/sjlj.S: Likewise.
460         * config/linux/sparc/futex_bits.h: Likewise.
462 2012-02-13  Eric Botcazou  <ebotcazou@adacore.com>
464         * configure.ac (link_itm): Fix comment.
465         * configure: Regenerate.
466         * testsuite/lib/libitm.exp: Do not pass -litm for the link.
468 2012-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
470         PR libitm/51822
471         * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
472         Correct libgomp references.
474 2012-01-24  Torvald Riegel  <triegel@redhat.com>
476         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
477         wake-up.
479 2012-01-24  Uros Bizjak  <ubizjak@gmail.com>
481         * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
482         end of structure.
483         * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
484         offset values.  Do not copy return address.  Decrement stack
485         by 56 bytes only.
486         (GTM_longjump) [__x86_64__]: Update offset values.
488 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
490         PR libitm/51830
491         * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
492         the first function argument to %eax.
494 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
496         * libitm.h (_ITM_getThreadnum): Remove.
497         * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
499 2012-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
501         * clearcap.map: New file.
502         * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
503         * configure.ac: Call it.
504         Clear HWCAP_LDFLAGS if defaulting to -mavx.
505         * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
506         * configure: Regenerate.
507         * Makefile.in: Regenerate.
508         * testsuite/Makefile.in: Regenerate.
510 2012-01-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
512         PR libitm/51173
513         * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
514         include, exclude options.
516 2012-01-14  Torvald Riegel  <triegel@redhat.com>
518         * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
519         rolling back.
520         * containers.h (GTM::vector::set_size): New.
522 2012-01-14  Torvald Riegel  <triegel@redhat.com>
524         PR libitm/51855
525         * config/generic/tls.h (GTM::mask_stack_top): New.
526         (GTM::mask_stack_bottom): Declare.
527         * config/generic/tls.c (GTM::mask_stack_bottom): New.
528         * local.cc (gtm_undolog::rollback): Filter out any updates that
529         overlap the libitm stack.  Add current transaction as parameter.
530         * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
531         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
532         * testsuite/libitm.c/stackundo.c: New test.
534 2012-01-10  Richard Henderson  <rth@redhat.com>
536         * libitm_i.h (_Unwind_DeleteException): Declare weak.
537         * eh_cpp.cc (_Unwind_DeleteException): Define for
538         !HAVE_ELF_STYLE_WEAKREF.
540 2012-01-08  Torvald Riegel  <triegel@redhat.com>
542         * local.cc (GTM_LB): Use GTM::gtm_undolog.
543         (GTM::gtm_thread::drop_references_undolog): Remove.
544         (GTM::gtm_thread::commit_undolog,
545         GTM::gtm_thread::rollback_undolog): Move to ...
546         * libitm_i.h (GTM::gtm_undolog): ...here. New.
547         (GTM::gtm_undolog_entry): Remove.
548         (GTM::gtm_thread): Adapt.
549         * beginend.cc (GTM::gtm_thread::rollback): Adapt.
550         (GTM::gtm_thread::trycommit): Adapt.
551         * method-serial.cc (serial_dispatch::log): Adapt.
552         * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
553         (gl_wt_dispatch::store): Fix likely/unlikely.
554         * containers.h (GTM::vector::resize): Add additional_capacity
555         parameter and handle it.
556         (GTM::vector::resize_noinline): New/adapt.
557         (GTM::vector::push): New.
559 2012-01-06  Richard Henderson  <rth@redhat.com>
561         * configure.tgt: Support powerpc-linux and powerpc-darwin.
562         * config/linux/powerpc/futex_bits.h: New file.
563         * config/powerpc/cacheline.h: New file.
564         * config/powerpc/sjlj.S: New file.
565         * config/powerpc/target.h: New file.
566         * config/generic/asmcfi.h (cfi_offset): New.
567         (cfi_restore, cfi_undefined): New.
569 2012-01-05  Aldy Hernandez  <aldyh@redhat.com>
571         PR other/51171
572         * testsuite/libitm.c/reentrant.c: Remove xfail.
573         (thread): Pass x to pure().
574         From Patrik Marlier <patrick.marlier@gmail.com>.
576 2011-12-24  Torvald Riegel  <triegel@redhat.com>
578         * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
579         privatization safety if already in serial mode.
581 2011-12-24  Torvald Riegel  <triegel@redhat.com>
583         * beginend.cc (GTM::gtm_thread::restart): Add and handle
584         finish_serial_upgrade parameter.
585         * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
586         * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
587         Don't unset reader flag.
588         (GTM::gtm_rwlock::write_upgrade_finish): New.
589         * config/posix/rwlock.cc: Same.
590         * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
591         Declare.
592         * config/posix/rwlock.h: Same.
593         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
594         flag after commit or after rollback when restarting.
596 2011-12-24  Torvald Riegel  <triegel@redhat.com>
598         * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
599         (GTM::gtm_thread::try_commit): Changed memory order.
600         * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
601         as parameter.
602         * config/linux/x86/futex_bits.h (sys_futex0): Same.
603         * config/linux/sh/futex_bits.h (sys_futex0): Same.
604         * config/linux/futex_bits.h (sys_futex0): Same.
605         * config/linux/futex.cc (futex_wait, futex_wake): Same.
606         * config/linux/futex.h (futex_wait, futex_wake): Same.
607         * config/linux/rwlock.h (gtm_rwlock::writers,
608         gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
609         ints.
610         * config/linux/rwlock.cc (gtm_rwlock::read_lock,
611         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
612         gtm_rwlock::write_unlock): Fix memory orders and fences.
613         * config/posix/rwlock.cc (gtm_rwlock::read_lock,
614         gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
615         gtm_rwlock::write_unlock): Same.
616         * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
617         * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
618         gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
619         Add comments.
620         (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
621         gl_wt_dispatch::load, gl_wt_dispatch::store,
622         gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
623         orders and fences.  Add comments.
625 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
627         * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
628         * Makefile.in: Regenerated.
630 2011-12-17  Kaz Kojima  <kkojima@gcc.gnu.org>
632         * configure.tgt: Add sh* case.
633         * config/sh/target.h: New file.
634         * config/sh/sjlj.S: New file.
635         * config/linux/sh/futex_bits.h: New file.
637 2011-12-14  Richard Henderson  <rth@redhat.com>
639         * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
640         * config/arm/sjlj.S, config/arm/target.h: New files.
641         * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
642         (cfi_rel_offset): New.
643         * config/linux/futex_bits.h: New file.
644         * config/linux/futex.cc: Include futex_bits.h here...
645         * config/linux/futex.h: ... not here.
646         * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
647         * configure.ac (ARCH_AM): New conditional.
648         * Makefile.in, configure: Rebuild.
649         * configure.tgt: Handle ARM.
651 2011-12-13  Richard Henderson  <rth@redhat.com>
653         * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
654         signed/unsigned comparison werror.
656         * local_atomic: New file.
657         * libitm_i.h: Include it.
658         (gtm_thread::shared_state): Use atomic template.
659         * beginend.cc (GTM::gtm_clock): Use atomic template.
660         (global_tid): Use atomic template if 64-bit atomics available.
661         (gtm_thread::gtm_thread): Update shared_state access.
662         (gtm_thread::trycommit): Likewise.
663         (choose_code_path): Update global_tid access.
664         * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
665         * stmlock.h (GTM::gtm_clock): Use atomic template.
666         (gtm_get_clock, gtm_inc_clock): Update accesses.
667         * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
668         redundant __sync_synchronize after atomic shared_state access.
669         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
670         (gtm_rwlock::write_lock_generic): Likewise.
671         (gtm_rwlock::read_unlock): Likewise.
672         * config/alpha/target.h (atomic_read_barrier): Remove.
673         (atomic_write_barrier): Remove.
674         * config/x86/target.h (atomic_read_barrier): Remove.
675         (atomic_write_barrier): Remove.
677 2011-11-30  Richard Henderson  <rth@redhat.com>
679         * libitm_i.h (GTM_longjmp): Swap first and second arguments.
680         * beginend.c (_ITM_abortTransaction): Update to match.
681         (GTM::gtm_thread::restart): Likewise.
682         * config/alpha/sjlj.S (GTM_longjmp): Likewise.
683         * config/x86/sjlj.S (GTM_longjmp): Likewise.
685 2011-11-23  Iain Sandoe  <iains@gcc.gnu.org>
687         * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
688         * Makefile.in: Regenerate.
690 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
692         * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
693         * alloc_cpp.cc: Generate dummy functions if we don't
694         HAVE_ELF_STYLE_WEAKREF.
695         * eh_cpp.cc: Likewise.
696         * configure: Regenerate.
697         * aclocal.m4:  Likewise.
698         * config.h.in: Likewise.
699         * Makefile.in: Likewise.
700         * testsuite/Makefile.in: Likewise.
702 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
704         * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
705         __USER_LABEL_PREFIX__ for targets that use it.
706         (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
707         (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
708         in portability to non-elf targets.
709         (GTM_longjmp): Likewise.
710         * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
711         where required.
713 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
715         * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
716         * testsuite/libitm.c/memset-1.c: Likewise.
718 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
720         * configure: Regenerate.
722 2011-11-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
724         * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
725         (LIBITM_ENABLE_SYMVERS): Handle sun style.
726         * Makefile.am: Handle sun style versioning.
727         (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
728         * configure: Regenerate.
729         * Makefile.in: Regenerate.
731 2011-11-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
733         * config/generic/asmcfi.h: Fix comment.
734         * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
735         sequence without .hidden support, error for non-ELF targets.
736         (GTM_longjmp) [__ELF__]: Only use .hidden if
737         HAVE_ATTRIBUTE_VISIBILITY.
739 2011-11-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
741         * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
742         _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
743         Dummy functions.
744         * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
745         __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
747 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
749         PR bootstrap/51098
750         * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
751         * configure: Regenerate.
753 2011-11-14  H.J. Lu  <hongjiu.lu@intel.com>
755         * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
757 2011-11-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
759         * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
760         .hidden.
761         (.note.GNU-stack): Only use if __linux__.
762         * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
763         * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
764         * testsuite/libitm.c/reentrant.c: Likewise.
765         * testsuite/libitm.c/simple-2.c: Likewise.
766         * testsuite/libitm.c/txrelease.c: Likewise.
767         * testsuite/libitm.c++/static_ctor.C: Likewise.
769 2011-11-10  Richard Henderson  <rth@redhat.com>
771         * config/x86/x86_avx.cc: Remove #undef __AVX__ hack.  Tidy comments.
772         * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
773         * configure.ac (ARCH_X86_AVX): New conditional.
774         * Makefile.in, configure: Rebuild.
776 2011-11-09  Richard Henderson  <rth@redhat.com>
778         * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
779         * configure.ac: Use it.
780         * config.h.in, configure: Rebuild.
781         * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
783 2011-11-09  Richard Henderson  <rth@redhat.com>
785         * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
786         * config/alpha/unaligned.h: Remove file.
787         * config/generic/unaligned.h: Remove file.
788         * config/x86/unaligned.h: Remove file.
789         * config/generic/cachepage.h: Remove file.
790         * config/posix/cachepage.cc: Remove file.
791         * config/generic/cacheline.cc: Remove file.
792         * config/x86/cacheline.cc: Remove file.
793         * config/generic/cacheline.h (gtm_cacheline): Remove the
794         store_mask, copy_mask, copy_mask_wb methods.
795         * config/x86/cacheline.h: Likewise.
796         * config/alpha/cacheline.h: Fall back to generic after setting size.
797         * config/generic/tls.cc (gtm_mask_stack): Remove.
798         * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
799         (GTM_vpalignr_table): Remove.
800         * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
801         (GTM_pshift_table): Remove.
802         * config/libitm_i.h: Don't include cachepage.h.
803         * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
804         * Makefile.in, testsuite/Makefile.in: Rebuild.
806 2011-11-09  Richard Henderson  <rth@redhat.com>
808         * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
809         to emit branch prediction hint.
811         * config/x86/sjlj.S: Protect elf directives with __ELF__.
812         Protect .note.GNU-stack with __linux__.
814         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
815         * configure, aclocal.m4, config.h.in: Rebuild.
816         * config/generic/asmcfi.h: New file.
817         * config/x86/sjlj.S: Use it.
819 2011-11-08  Richard Henderson  <rth@redhat.com>
821         * local.cc (_ITM_LB): Use a normal call, not a function alias.
823 2011-11-08  Richard Henderson  <rth@redhat.com>
825         * configure.tgt: Test correct directory for supported cpus.
827         * configure.ac: Exit if unsupported.
828         * configure: Rebuild.
829         * configure.tgt: Delete boilerplate from libgomp for unsupported
830         targets.  Set UNSUPPORTED for unsupported targets.
832 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
834         * configure.tgt: Handle i386 like i[456]86.
835         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
836         take address.
837         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
838         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
840 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
842         * method-wbetl.cc: Update copyright notice.
843         * aatree.cc: Same.
844         * util.cc: Same.
845         * libitm.h: Same.
846         * memset.cc: Same.
847         * eh_cpp.cc: Same.
848         * barrier.tpl: Same.
849         * useraction.cc: Same.
850         * stmlock.h: Same.
851         * memcpy.cc: Same.
852         * common.h: Same.
853         * config/generic/tls.cc: Same.
854         * config/generic/cacheline.h: Same.
855         * config/generic/cachepage.h: Same.
856         * config/generic/cacheline.cc: Same.
857         * config/generic/unaligned.h: Same.
858         * config/x86/cacheline.h: Same.
859         * config/x86/cacheline.cc: Same.
860         * config/x86/unaligned.h: Same.
861         * config/alpha/cacheline.h: Same.
862         * config/alpha/unaligned.h: Same.
863         * config/alpha/sjlj.S: Same.
864         * config/posix/cachepage.cc: Same.
865         * config/linux/futex.h: Same.
866         * config/linux/alpha/futex_bits.h: Same.
868 2011-11-04  Torvald Riegel  <triegel@redhat.com>
870         * libitm.texi: No cover text and invariant sections.
872 2011-11-03  Richard Henderson  <rth@redhat.com>
874         * local_type_traits: New file.
875         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
877 2011-11-03  Richard Henderson  <rth@redhat.com>
879         * configure.ac: Don't test for gfortran.
880         * configure: Rebuild.
882         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
883         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
885 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
887         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
888         * testsuite/libitm.c/memset-1.c: Same.
889         * testsuite/libitm.c/c.exp: Same.
890         * testsuite/lib/libitm-dg.exp: Same.
891         * testsuite/lib/libitm.exp: Same.
892         * testsuite/libitm.c++/c++.exp: Same.
894 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
896         * testsuite/config/default.exp: Update copyright date.
897         * configure.ac: Add copyright info.
898         * configure.tgt: Same.
900 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
902         * testsuite/libitm.c/reentrant.c: XFAIL.
903         * testsuite/libitm.c++/static_ctor.C: XFAIL.
905 2011-10-29  Torvald Riegel  <triegel@redhat.com>
907         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
908         handle aborts.
909         (_ITM_abortTransaction): Handle aborts of outer transactions.
910         * libitm_i.h: Same.
911         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
912         * libitm.texi: Document aborts of outer transactions.
913         * testsuite/libitm.c/cancel.c: New file.
915 2011-10-19  Torvald Riegel  <triegel@redhat.com>
917         * testsuite/*: Change __transaction to __transaction_atomic or
918         __transaction_relaxed.
920 2011-10-19  Torvald Riegel  <triegel@redhat.com>
922         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
923         (gtm_thr): Same.
925 2011-10-19  Torvald Riegel  <triegel@redhat.com>
927         * libitm_i.h: Add gl_wt dispatch.
928         * retry.cc (parse_default_method): Same.
929         * method-gl.cc: New file.
930         * Makefile.am: Use method-gl.cc.
931         * Makefile.in: Rebuild.
933 2011-10-19  Torvald Riegel  <triegel@redhat.com>
935         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
936         safety if requested by a TM method.
937         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
938         privatization safety.
939         * method-serial.cc: Same.
941 2011-10-19  Torvald Riegel  <triegel@redhat.com>
943         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
944         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
945         undolog-related member functions from *_local to *_undolog.
946         * local.cc (gtm_thread::commit_undolog): Same.
947         * beginend.cc (GTM::gtm_thread::trycommit): Same.
948         (GTM::gtm_thread::rollback): Roll back undolog before
949         dispatch-specific rollback.
951 2011-10-19  Torvald Riegel  <triegel@redhat.com>
953         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
954         re-initialization of the current method group.
955         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
957 2011-10-19  Torvald Riegel  <triegel@redhat.com>
959         * alloc.cc (commit_allocations_2): Do not free transaction-local
960         memory when committing a nested transaction.
962 2011-10-19  Torvald Riegel  <triegel@redhat.com>
964         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
965         serial-irrevocable dispatch, not serial.
967 2011-10-19  Torvald Riegel  <triegel@redhat.com>
969         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
970         declarations.
971         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
972         * method-serial.cc: Implement begin_or_restart().
973         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
974         dispatch-specific begin_or_restart().
975         (GTM::gtm_thread::restart): Same.
977 2011-08-23  Torvald Riegel  <triegel@redhat.com>
979         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
980         restarting without switching to serial mode.
981         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
982         transaction state. Choose closed-nesting alternative if available.
983         (GTM::gtm_thread::set_default_dispatch): New.
984         (parse_default_method): New.
985         (GTM::gtm_thread::number_of_threads_changed): New.
986         * method-serial.cc (GTM::serial_mg): New method group class.
987         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
988         fini.
989         (GTM::serial_dispatch): Same.
990         (GTM::serialirr_onwrite_dispatch): Same.
991         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
992         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
993         registered threads.
994         (GTM::gtm_thread::gtm_thread): Same.
995         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
996         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
997         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
998         choose dispatch but set state according to dispatch here.
999         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
1000         (GTM::method_group): New class.
1001         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
1002         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
1003         * libitm.texi: Document TM methods, method groups, method life cycle.
1004         Rename method sets to method groups.
1006 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1008         * config/x86/tls.h: Moved to ...
1009         * config/linux/x86/tls.h: ... here.
1011 2011-08-23  Torvald Riegel  <triegel@redhat.com>
1013         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
1014         Add X32 support.
1015         * config/x86/sjlj.S: Same.
1017 2011-08-19  Torvald Riegel  <triegel@redhat.com>
1019         * config/linux/rwlock.h: New file.
1020         * config/linux/rwlock.c: New file.
1021         * configure.ac: Reenable futex support (undo SVN rev 157758).
1022         * Makefile.am: Same.
1023         * configure.tgt: Same.
1024         * config/linux/alpha/futex_bits.h: Same.
1025         * config/linux/futex.h: Same. Return number of woken processes.
1026         * config/linux/futex.cc: Same.
1027         (futex_wait): Remove spinning.
1028         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
1029         Use __x86_64__ instead of __LP64__.
1030         * aclocal.m4: Include generic futex checks.
1031         * configure: Rebuild.
1032         * Makefile.in: Rebuild.
1033         * testsuite/Makefile.in: Rebuild.
1034         * beginend.cc: Include pthread.h.
1035         * config/posix/cachepage.cc: Same.
1037 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1039         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1040         (abi_disp, set_abi_disp): Move to tx's TLS slot.
1041         (set_gtm_thr): New.
1042         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
1043         (set_gtm_thr): New.
1044         (GTM::gtm_thread::thread_num): Removed.
1045         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
1046         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
1047         tx-to-thread renaming.
1048         * beginend.cc: Adapted to tx-to-thread renaming.
1049         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
1050         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
1051         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
1052         gtm_transaction to gtm_thread.
1053         (_ITM_getThreadnum): Removed. Not supported anymore.
1054         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
1055         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
1056         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
1057         gtm_tx-to-gtm_thr renaming if necessary.
1058         * eh_cpp.cc: Same.
1059         * local.cc: Same.
1060         * retry.cc: Same.
1061         * clone.cc: Same.
1062         * alloc.cc: Same.
1063         * alloc_c.cc: Same.
1064         * alloc_cpp.cc: Same.
1065         * method-serial.cc: Same.
1066         * config/generic/tls.cc: Same.
1067         * config/posix/rwlock.h (gtm_rwlock): Same.
1068         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
1070 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1072         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
1073         implementation.
1074         (gtm_rwlock::read_unlock): Same.
1075         (gtm_rwlock::write_lock_generic): New. Generalized from ...
1076         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
1077         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
1078         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
1079         w_upgrade. Replaced by per-transaction flags (in shared_state).
1080         Added c_confirmed_writers.
1081         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
1082         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
1083         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1084         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
1085         * beginend.cc (GTM::gtm_transaction::begin_transaction,
1086         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
1087         * libitm.texi: Document locking conventions and implementations in
1088         libitm.
1090 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1092         * libitm_i.h (next_tx): Add list of all threads' transaction.
1093         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
1094         transaction with list of transactions and ...
1095         (thread_exit_handler): ... deregister here.
1096         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
1097         * config/x86/target.h: Same.
1099 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1101         * testsuite/libitm.c++/static_ctor.C: New file.
1103 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1105         * testsuite/libitm.c/reentrant.c: New file.
1107 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1109         * config/generic/tls.h: Remove the free list for transactions and ...
1110         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
1111         (GTM::gtm_transaction::operator delete): ... and release here.
1112         (thread_exit_handler): New. Delete tx when thread terminates.
1113         (thread_exit_init): New.
1114         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
1115         * testsuite/libitm.c/txrelease.c: New file.
1117 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1119         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
1120         * testsuite/libitm.c/notx.c: New file.
1122 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1124         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
1125         * libitm_i.h (local_tid): ... to here.
1126         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1127         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
1129 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1131         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
1132         serialirr_onwrite_dispatch as new default for now.
1133         * method-serial.cc (serialirr_onwrite_dispatch): New.
1134         (GTM::dispatch_serialirr_onwrite): New.
1135         * libitm_i.h: Same.
1137 2011-08-12  Torvald Riegel  <triegel@redhat.com>
1139         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
1140         * query.cc (_ITM_getTransactionId): There is no active transaction if
1141         the current nesting level is zero.
1143 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1145         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
1146         rollback.
1148 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1150         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
1151         transaction properties from the caller instead of from the
1152         transaction object.
1153         * libitm_i.h: Same.
1154         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
1156 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1158         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
1159         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
1160         * dispatch.h: Same.
1161         * method-serial.cc: Same.
1162         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
1163         flat nesting as default, and closed nesting on demand.
1164         (GTM::gtm_transaction::rollback): Same.
1165         (_ITM_abortTransaction): Same.
1166         (GTM::gtm_transaction::restart): Same.
1167         (GTM::gtm_transaction::trycommit): Same.
1168         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
1169         (choose_code_path): New.
1170         (GTM::gtm_transaction_cp::save): New.
1171         (GTM::gtm_transaction_cp::commit): New.
1172         * query.cc (_ITM_inTransaction): Support flat nesting.
1173         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
1174         (GTM::gtm_transaction): Support flat and closed nesting.
1175         * alloc.cc (commit_allocations_2): New.
1176         (commit_cb_data): New helper struct.
1177         (GTM::gtm_transaction::commit_allocations): Handle nested
1178         commits/rollbacks.
1179         * libitm.texi: Update user action section, add description of nesting.
1181 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1183         * libitm_i.h: Add closed nesting as restart reason.
1184         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
1186 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1188         * useraction.cc: Use vector instead of list to store actions.
1189         Also support partial rollbacks for closed nesting.
1190         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
1191         * beginend.cc: Same.
1193 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1195         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
1196         closed_nesting flags, as well as a closed nesting alternative.
1197         * method-serial.cc: Same.
1198         (serial_dispatch): Renamed to serialirr_dispatch.
1199         (GTM::dispatch_serialirr): Same.
1200         (serial_dispatch_ul): Renamed to serial_dispatch.
1201         (GTM::dispatch_serial): Same.
1203 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1205         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
1207 2011-07-28  Torvald Riegel  <triegel@redhat.com>
1209         * aatree.h (aa_tree::remove): New.
1210         (aa_tree::operator new): Add placement new.
1212 2011-07-02  Torvald Riegel  <triegel@redhat.com>
1214         * containers.h: New file.
1215         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
1216         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
1217         * common.h: ... to here.
1218         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
1219         * local.cc: Same.
1221 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1223         * libitm_i.h (STATE_ABORTING): Remove.
1224         * beginend.cc (_ITM_abortTransaction): Same.
1225         (GTM::gtm_transaction::trycommit_and_finalize): Same.
1226         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
1227         (_ITM_rollbackTransaction): Remove.
1228         * beginend.cc: Same.
1229         * libitm.map: Same.
1230         * libitm.texi: Document these ABI changes.
1232 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1234         * libitm.texi: New file.
1235         * Makefile.am: Add libitm.texi.
1236         * Makefile.in: Rebuild.
1238 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1240         * libitm_i.h: Move parts to common.h and dispatch.h.
1241         * common.h: New file.
1242         * dispatch.h: New file, new dispatch class.
1243         Rename GTM::abi_dispatch::lock_type to ls_modifier.
1244         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
1245         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
1246         decision to retry.cc.
1247         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
1248         only.
1249         (GTM::gtm_transaction::decide_begin_dispatch): Same.
1250         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
1251         logging.
1252         * barrier.cc: Use new barriers definitions.
1253         (abi_dispatch::memmove_overlap_check): New.
1254         * config/x86/x86_sse.cc: Same.
1255         * config/x86/x86_avx.cc: Same.
1256         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
1257         memcpy.cc.
1258         * Makefile.in: Rebuild.
1259         * method-readonly.cc: Remove.
1260         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
1261         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
1263 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1265         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
1266         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
1267         * testsuite/libitm.c/dropref-2.c: Same.
1268         * testsuite/libitm.c/dropref.c: Same.
1270 2011-06-30  Torvald Riegel  <triegel@redhat.com>
1272         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
1273         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
1274         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
1275         * alloc_c.cc: Same.
1276         * barrier.tpl: Same.
1277         * beginend.c: Same.
1278         * config/generic/tls.h: Same.
1279         * config/x86/tls.h: Same.
1280         * libitm_i.h: Same.
1281         * memcpy.cc: Same.
1282         * memset.cc: Same.
1283         * method-readonly.cc: Same.
1284         * method-serial.cc: Same.
1285         * method-wbetl.cc: Same.
1286         * retry.cc: Same.
1288 2011-03-03  Richard Henderson  <rth@redhat.com>
1290         * config/posix/rwlock.cc (write_upgrade): Add missing case.
1291         From Patrik Marlier <patrick.marlier@unine.ch>.
1293 2011-02-03  Richard Henderson  <rth@redhat.com>
1295         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
1296         * configure.ac: Use it.
1297         * configure, config.h.in: Rebuild.
1298         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
1299         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
1300         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
1301         * libitm.map: Use wildcards to match size_t mangling.
1303 2010-12-14  Richard Henderson  <rth@redhat.com>
1305         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
1306         blocks of TIDs per thread.
1307         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
1308         (setup_gtm_thr): Return the thread structure.
1309         * config/x86/tls.h (setup_gtm_thr): Likewise.
1311 2010-12-14  Richard Henderson  <rth@redhat.com>
1313         * clone.cc (table_lock): Remove.
1314         (find_clone): Don't take it.
1315         (ExcludeTransaction): New helper class.
1316         (_ITM_registerTMCloneTable): Use it.
1317         (_ITM_deregisterTMCloneTable): Likewise.
1319 2010-12-14  Richard Henderson  <rth@redhat.com>
1321         * config/x86/tls.h: New file.
1323 2010-07-15  Richard Henderson  <rth@redhat.com>
1325         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
1326         * Makefile.in: Rebuild.
1328 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1330         * method-wbetl.cc (trydropreference): Fix source line.
1332 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
1334         * libitm.h: Add comment.
1335         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
1337 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
1339         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
1340         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
1341         available, use pthread mutexes.
1342         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
1343         * config.h.in: Regenerate.
1344         * configure: Regenerate.
1346 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
1348         * libitm.h (ITM_PURE): Define.
1349         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
1351 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1353         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
1354         (validate): Add comment.
1355         (trydropreference): New.
1356         * method-readonly.cc (class readonly_dispatch): Add
1357         trydropreference.
1358         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
1359         Call trydropreference().
1360         * libitm.h (_ITM_dropReferences): Remove const attribute.
1361         * method-serial.cc (class serial_dispatch): Add trydropreference.
1362         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
1364 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
1366         * memcpy.cc (do_memcpy): Comment.
1368 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
1370         * barrier.tpl: Add comments throughout.
1372 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1374         * method-wbetl.cc (struct w_entry): Add comments.
1375         (trycommit): Same.
1376         (rollback): Same.
1378 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
1380         * alloc_c.cc (_ITM_dropReferences): New.
1381         * libitm.map (_ITM_dropReferences): Add.
1382         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
1383         * libitm_i.h (struct gtm_transaction): Declare
1384         drop_references_allocations and drop_references_local.
1385         * local.cc (rollback_local): Ignore memory when applicable.
1386         (drop_references_local): New.
1388 2010-06-23  Richard Henderson  <rth@redhat.com>
1390         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1391         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1392         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1393         * config/alpha/target.h: Likewise.
1394         * config/generic/tls.cc (gtm_mask_stack): Use it.
1396 2010-06-23  Richard Henderson  <rth@redhat.com>
1398         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1399         a mutex instead of trying a lock-free compare-and-swap on the list.
1400         (gtm_cacheline_page::operator delete): Likewise.
1402 2010-06-16  Richard Henderson  <rth@redhat.com>
1404         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1405         that overlap the libitm stack.
1406         * barrier.tpl: Mark incoming stack.
1407         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1408         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1409         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1410         * memcpy.cc, memset.cc: Likewise.
1411         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1412         * config/generic/tls.h (gtm_thread): Add stack_top member.
1413         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1414         * libitm_i.h (gtm_mask_stack): Declare.
1415         * config/generic/tls.cc: New file.
1416         * Makefile.am (libitm_la_SOURCES): Add it.
1417         (AM_CXXFLAGS): Turn off exceptions.
1418         * Makefile.in: Rebuild.
1420 2010-06-16  Richard Henderson  <rth@redhat.com>
1422         * alloc.cc (struct gtm_alloc_action): Move definition ...
1423         * libitm_i.h: ... here.
1424         (class gtm_transaction): Declare new and delete.
1425         * beginend.cc (alloc_tx): Reformulate as operator new.
1426         (free_tx): Reformulate as operator delete.
1427         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1429 2010-06-11  Richard Henderson  <rth@redhat.com>
1431         * clone.cc (clone_entry_compare): Fix typo.
1432         From Patrik Marlier <patrick.marlier@unine.ch>.
1434 2010-05-13  Richard Henderson  <rth@redhat.com>
1436         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1437         in extern "C".
1439 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
1441         * libitm_i.h (struct gtm_transaction): Remove
1442         get_allocation_size.
1443         (record_allocation): Remove size parameter.
1444         * libitm.map (_ITM_realloc): Remove.
1445         * alloc_c.cc (_ITM_realloc): Remove.
1446         (_ITM_malloc): Remove size argument to record_allocation.
1447         (_ITM_calloc): Same.
1448         * alloc_cpp.cc (_ZGTtnwm): Same.
1449         (_ZGTtnwmRKSt9nothrow_t): Same.
1450         (_ZGTtnam): Same.
1451         (_ZGTtnamRKSt9nothrow_t): Same.
1452         * alloc.cc (struct gtm_alloc_action): Remove size.
1453         (get_allocation_size): Remove.
1454         (commit_allocations): Add comment.
1455         (record_allocation): Remove size parameter.
1456         (forget_allocation): Remove set of size.
1458 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
1460         * Makefile.am (abi_version): New.
1461         (AM_CXXFLAGS): Pass abi_version.
1462         * Makefile.in: Regenerate.
1463         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1465 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
1467         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1468         _ITM_getTMCloneOrIrrevokable.
1469         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1470         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1472 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
1474         * configure.ac: Remove Linux futex support.
1475         * configure.tgt (config_path): Same.
1476         * Makefile.am: Same.
1477         * config/linux: Remove entire directory.
1478         * configure: Rebuild.
1479         * Makefile.in: Rebuild.
1480         * testsuite/Makefile.in: Rebuild.
1482 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
1484         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1485         switching to serial mode.
1486         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1488 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
1490         * configure.tgt: Add emacs -*- tags.
1491         * barrier.tpl: Same.
1493 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
1495         * Makefile.am: Rename serial.cc to method-serial.cc.
1496         * Makefile.in: Regenerate with automake 1.11.1.
1497         * testsuite/Makefile.in: Same.
1498         * aclocal.m4: Regenerate with aclocal 1.11.1.
1499         * method-serial.cc: Rename from serial.cc.
1500         * libitm_i.h (struct gtm_transaction): Update comment on
1501         serialirr_mode.
1503 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
1505         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1506         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1508 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
1510         * configure: Rebuild.
1512 2009-11-12  Richard Henderson  <rth@redhat.com>
1514         * Rewrite everything in C++.
1516 2009-11-03  Richard Henderson  <rth@redhat.com>
1518         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1519         * Makefile.am (libitm_la_SOURCES): Add them.
1520         * configure.ac (ARCH_X86): New conditional.
1521         * Makefile.in, configure: Rebuild.
1522         * configure.tgt: Set up ARCH; do cflags setup at the same time.
1523         Move futex setup into "other system configury" case.
1524         * local.c (rollback_local): Merge into ...
1525         (GTM_rollback_local): ... here.
1526         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1527         (_ITM_LB): Define as an alias to GTM_LB.
1529 2009-11-03  Richard Henderson  <rth@redhat.com>
1531         * method-readonly.c: New file.
1532         * Makefile.am (libitm_la_SOURCES): Add it.
1533         * Makefile.in: Rebuild.
1534         * beginend.c (gtm_stmlock_array, gtm_clock): New.
1535         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1536         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1537         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1538         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1539         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1540         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1541         gtm_get_clock, gtm_inc_clock): New.
1542         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1543         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1544         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1545         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1546         replace uses with new libitm_i.h symbols.
1547         (dispatch_wbetl): Rename from wbetl_dispatch.
1548         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1549         away from dispatch_readonly; abort if the beginTransaction call
1550         asserted that the transaction was readonly.
1552 2009-11-03  Richard Henderson  <rth@redhat.com>
1554         * memset.c: New file.
1555         * Makefile.am (libitm_la_SOURCES): Add it.
1556         * Makefile.in: Rebuild.
1557         * testsuite/libitm.c/memset-1.c: New.
1559 2009-11-03  Richard Henderson  <rth@redhat.com>
1561         * dispatch.c: Remove file.
1562         * useraction.c (struct gtm_user_action): Move from libitm.h.
1563         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1564         (serial_memset, serial_memmove, serial_memcpy): Remove.
1565         (serial_W*, serial_R*): Remove.
1566         (serial_dispatch): Update to match.
1567         * configure.ac: Move Werror down below configure checks.  Don't
1568         check for sys/loadavg.h, do check for malloc.h.  Don't check for
1569         getloadavg and clock_gettime; do check for memalign, posix_memalign.
1570         Use GCC_AC_FUNC_MMAP_BLACKLIST
1571         * libitm.h: Split out all internal items to...
1572         * libitm_i.h: ... here.  New file.
1573         * copymask.c: New file.
1574         * local.c (struct gtm_local_undo): Move from libitm.h.
1575         (GTM_alloc_local): Rename from alloc_local; export.
1576         * memcpy.c: New file.
1577         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1578         * config/posix/page.c: New file.
1579         * config/posix/target_tls.h: Remove file.
1580         * barrier.c: New file.
1581         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1582         copymask.c, page.c.
1583         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1584         * method-wbetl.c: Rewrite for new cacheline methods.
1585         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1587         * config/alpha/sjlj.S: Fix typo.
1588         * config/alpha/target_i.h: Copy functions from alpha/target.h.
1589         * config/alpha/copymask.c: New file.
1590         * config/alpha/target.h (CACHELINE_SIZE): New.
1591         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1593         * config/x86/target_i.h: Copy functions from x86/target.h.
1594         * config/x86/copymask.c: New file.
1595         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1596         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1597         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1598         * config/x86/target_tls.h: Move contents to target_i.h.
1600         * testsuite/libitm.c/clone-1.c: Include libitm.h.
1601         * testsuite/libitm.c/memcpy-1.c: New.
1603 2009-10-22  Richard Henderson  <rth@redhat.com>
1605         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1606         (AM_CCASFLAGS): New.
1607         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
1608         saving/restoring _AC_ARG_VAR_PRECIOUS.
1609         * Makefile.in, aclocal.m4, config.h.in, configure,
1610         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1612 2009-10-22  Richard Henderson  <rth@redhat.com>
1614         * testsuite/*: Update for new compiler syntax.
1616 2009-10-21  Richard Henderson  <rth@redhat.com>
1618         * libitm.h (_ITM_abortReason): Add outerAbort.
1620 2009-08-03  Richard Henderson  <rth@redhat.com>
1622         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1623         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1624         * method-wbetl.c (struct w_entry): Remove mask.
1625         (wbetl_write, wbetl_load): Return pointer to word containing the data;
1626         adjust all callers.
1628 2009-07-22  Richard Henderson  <rth@redhat.com>
1630         * eh_cpp.c: New file.
1631         * Makefile.am (libitm_la_SOURCES): Add it.
1632         * Makefile.in: Rebuild.
1633         * beginend.c (GTM_rollback_transaction): Undo exception state.
1634         (GTM_trycommit_transaction): Mark inline.
1635         (GTM_trycommit_and_finalize_transaction): Split out from ...
1636         (_ITM_commitTransaction): ... here.
1637         (_ITM_commitTransactionEH): New function.
1638         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1639         cxa_unthrown, eh_in_flight; reorder.
1641         * testsuite/libitm.c++/c++.exp: New.
1642         * testsuite/libitm.c++/eh-1.C: New.
1644         * aatree.c (aa_free): Remove REGPARM.
1645         * aatree.h: Remove all REGPARM.
1647 2009-07-18  Richard Henderson  <rth@redhat.com>
1649         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1650         * Makefile.am (libitm_la_SOURCES): Add them.
1651         * Makefile.in: Rebuild.
1652         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1653         (GTM_trycommit_transaction): Likewise.
1654         * libitm.h: Include aatree.h
1655         (struct gtm_alloc_action): New.
1656         (struct gtm_transaction): Add alloc_actions.
1657         (GTM_record_allocation, GTM_forget_allocation): Declare.
1658         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1659         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1660         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1661         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1662         _ZGTtdaPvRKSt9nothrow_t): Export.
1664 2009-07-18  Richard Henderson  <rth@redhat.com>
1666         * target_tls.h: Move ...
1667         * config/posix/target_tls.h: ... here.
1669 2009-07-07  Richard Henderson  <rth@redhat.com>
1671         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1673 2009-07-07  Richard Henderson  <rth@redhat.com>
1675         * Update to GPL3.
1677 2009-07-07  Richard Henderson  <rth@redhat.com>
1679         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1680         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1682         * configure.tgt: Don't use -ftls-model for x86 linux.
1683         * libitm.h: Include target.h after standard includes.
1684         (_gtm_thr): Rename from gtm_thr.
1685         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1686         (gtm_disp, set_gtm_disp): New.
1687         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1688         retry.c, serial.c, useraction.c: Use accessor functions throughout.
1689         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1691 2009-07-07  Richard Henderson  <rth@redhat.com>
1693         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
1695 2009-07-06  Richard Henderson  <rth@redhat.com>
1697         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1698         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1699         (_ITM_beginTransaction): Take variadic arguments.
1700         (_ITM_registerThrownObject): Declare.
1701         * beginend.c, serial.c: Update.
1702         * libitm.map: Add _ITM_registerThrownObject.
1704 2009-01-28  Richard Henderson  <rth@redhat.com>
1706         * Makefile.am (libitm_la_SOURCES): Add clone.c.
1707         * Makefile.in: Rebuild.
1708         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1709         (GTM_restart_transaction): Fix uninstrumented code check.
1710         * retry.c (GTM_decide_retry_strategy): Add serial check.
1711         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
1712         automatically go irrevokable when in serial mode.
1713         * clone.c: New file.
1714         * libitm.h, libitm.map: Update.
1716 2009-01-27  Richard Henderson  <rth@redhat.com>
1718         * Makefile.am (LTCCASCOMPILE): Define.
1719         (libitm_la_SOURCES): Add methid-wbetl.c.
1720         * testsuite/Makefile.am: New
1721         * configure.ac: Add testsuite/Makefile.
1722         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1723         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1724         (_ITM_abortTransaction): Finalize implementation method; pass
1725         transaction properties to longjmp.
1726         (GTM_restart_transaction): Split out from ...
1727         (_ITM_commitTransaction): ... here.
1728         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1729         Move to config/x86/target.h.
1730         * config/linux/alpha/futex_bits.h: New.
1731         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1732         * config/x86/target.h: Disable target types for 32-bit.
1733         * config/alpha/sjlj.S, config/alpha/target.h: New.
1734         * libitm.h (struct gtm_dispatch): Add init, fini.
1735         (enum restart_reason): New.
1736         (struct gtm_transaction): Add method and restarts.
1737         * retry.c (GTM_decide_retry_strategy): Implement.
1738         * serial.c (serial_init, serial_fini): New.
1739         (GTM_serialmode): Finialize outgoing method.
1740         * method-wbetl.c: New.
1742 2008-12-09  Richard Henderson  <rth@redhat.com>
1744         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1745         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1746         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1747         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1748         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1749         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1750         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1751         * serial.c (serial_R##T, serial_W##T): Likewise.
1753 2008-11-21  Richard Henderson  <rth@redhat.com>
1755         * Initial commit.