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